symbol disassembly on Cspect

Discuss ZX Spectrum Next Games, Tools and more.
Post Reply
Mike Lamb
Posts: 2
Joined: Mon Jun 04, 2018 2:53 pm

symbol disassembly on Cspect

Post by Mike Lamb » Tue Jun 05, 2018 2:09 pm

Has anyone got this working? What format is Cspect expecting for the symbol table?

Alcoholics Anonymous
Posts: 508
Joined: Mon May 29, 2017 7:00 pm

Re: symbol disassembly on Cspect

Post by Alcoholics Anonymous » Tue Jun 05, 2018 4:56 pm

cspect comes with some example asm files. Some of those examples have map files and I think that's the symbol file format.

Here's an excerpt from one of them:

Code: Select all

000086F2 BACKGROUND
000080ED BACKX
000080E9 BACKY
000083E6 BITMAPOFF
000083DE BITMAPON
00008000 CHARDATA
000086EC CLOUD0
000086C2 CLOUD1
000086C6 CLOUD2
000086CA CLOUD3
000083C8 CLS
00008387 CLS256
This has changed since last year. It used to be snasm/cspect couldn't do addresses outside the 64k range but I know Mike has been working on making a linear 32-bit address space to represent more of the Next's memory space. It looks like he's expanded the number of digits for addresses to prepare for that but I don't see any examples that use more than 64k addresses. And these addresses have leading 0s up to the 64k part so I don't think these map files are using linear addresses either.

So at the moment anyway it looks like symbols are confined to 64k.

Mike Lamb
Posts: 2
Joined: Mon Jun 04, 2018 2:53 pm

Re: symbol disassembly on Cspect

Post by Mike Lamb » Tue Jun 05, 2018 9:51 pm

Thanks. I wrote a little program to take the sjasmplus symbol file and convert it to Cspect format

https://drive.google.com/open?id=15AEgr ... nwLMC7Chgl

Ped7g
Posts: 109
Joined: Mon Jul 16, 2018 7:11 pm

Re: symbol disassembly on Cspect

Post by Ped7g » Fri Jul 05, 2019 3:29 am

Will do a bit of forum necromancy here, but in case somebody will run into this by using forum search, here are some updates:

The sjasmplus (z00m's branch at https://github.com/z00m128/sjasmplus/releases Docs: http://z00m128.github.io/sjasmplus/documentation.html ) has now direct support for CSpect map files (compatible with #CSpect 2.8.x), you can use directive CSPECTMAP to request the map file production and define its name (since v1.13.1).

Also the format of CSpect map file must have changed one more time since this thread was active, because now the line format is:

Code: Select all

HEXA_16BIT_ADDRESS HEXA_LONG_ADDRESS TYPE LABELNAME
where TYPE is: 00 = regular label, 01 = EQU (sjasmplus does use extra "02" for "variable" symbols defined by "DEFL")

Post Reply