I'm not sure if the question is addressed at me, but just in case: I use sdaz80, the default assembler for SDCC.
Which assembler are you using?
TNIasm.
As MSXimg generates data on other asm dialect, I have to do a couple of replaces to fix. No big deal.
You can choose the format of numbers in the output assembler file with this option:
-data ? Text format for numbers dec Decimal data (c & asm) hexa Default hexadecimal data (depend on langage; default) hexa0x Hexadecimal data (0xFF; c & asm) hexaH Hexadecimal data (0FFh; asm only) hexa$ Hexadecimal data ($FF; asm only) hexa# Hexadecimal data (#FF; asm only) bin Binary data (11001100b; asm only)
If your assembler has other syntax constraints, don't hesitate to tell me; I could add them as an option.
The tniasm uses the format
db 1, 2, 3
instead of
.db 1 2 3
That's the only differences I noted, it accepts all the format numbers above.
Is the comma mandatory?
Is the comma mandatory?
To my knowledge, it is. Maybe for making possible spaces inside binary numbers, as in 1110 0111 b.
You can check the tniasm.txt file with all documentation here: http://www.tni.nl/products/tniasm.html (v.0.45)
With the latest version of MSXimg (1.15.1), you can add the option "-asm tniasm" to get the data directly in the right format.
Let's me know if final comma is a problem or not.
Thank you. It worked fine, just a small inconvenience: it leaves a comma after the last value and tniasm won't accept (most high level languages accept it).
The tniasm uses the format
db 1, 2, 3
instead of
.db 1 2 3
The former syntax is used by most Z80 assemblers… It’s standard Z80 assembly notation.
I know that. But I hope you won't mind me supporting sdasz80 first in my tools, since it is the assembler of SDCC and the heart of MSXgl. ^^
That said, I'd be happy to add support for all the other assemblers used by the MSX community, but I really don't have the courage to read the documentation for each of them.
db
and dw
seems standard; what about 32-bit integers?
Do they all support hexadecimal in the 0xFF
format?
I had tried to ask for information a few years ago, but I had no answers.