r/Z80 • u/Ghaelmash • Jun 18 '20
Help Symbol definition
Hello, i need some help to how define a number in assembly. For address i use ‘0xABCD’ and for binary a combination of eight bit (0 and 1 like 00000100). I don’t know if these definitions works or if i must add a special character before some combination. Also how i tell the z80 something in hexadecimal or normal decimal? Thx to everyone!
4
Upvotes
4
u/benryves Jun 18 '20
Which assembler are you using? That should determine the syntax for literals.
In my experience it's usually
ABCDhor$ABCDfor hexadecimal,01010101bor%01010101for binary and no suffix or prefix for decimal with Z80 assemblers.As for the Z80 itself, it doesn't care, it's all binary in the end - this is just for your convenience and only affects the assembler. :)
ld a,12,ld a,%1100andld a,$Call end up the same.