![]() |
|
asm/endasm DEFB not accepting 0xFE or FEh instead of 254 - Printable Version +- Boriel Basic Forum (https://forum.boriel.com) +-- Forum: Compilers and Computer Languages (https://forum.boriel.com/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://forum.boriel.com/forumdisplay.php?fid=11) +---- Forum: Help & Support (https://forum.boriel.com/forumdisplay.php?fid=16) +---- Thread: asm/endasm DEFB not accepting 0xFE or FEh instead of 254 (/showthread.php?tid=380) |
asm/endasm DEFB not accepting 0xFE or FEh instead of 254 - nitrofurano - 2011-10-06 hi! i always had some idea that z80 assemblers accepts byte values in hexadecimal format, instead of only decimals - i'm i wrong, or is this zxbasic compiling missing this feature? (or can we suggest this feature?) Code: guest@macbook_mint1 /mnt/sda4/trabalhos/programacao/8bit/zxspectrum/ftpupload/zxspectrumstuff_20111001/borielzxbasiccompiler/snippets $ zxb.py -t -B -a asm.bas Generating LALR tables
WARNING: Token 'BIN' defined, but not used
WARNING: There is 1 unused token
Generating LALR tables
WARNING: Token 'UMINUS' defined, but not used
WARNING: There is 1 unused token
asm.bas:2: Error: Syntax error. Unexpected token 'x00' [ID]
guest@macbook_mint1 /mnt/sda4/trabalhos/programacao/8bit/zxspectrum/ftpupload/zxspectrumstuff_20111001/borielzxbasiccompiler/snippets $ zxb.py -t -B -a asm.bas
Generating LALR tables
WARNING: Token 'BIN' defined, but not used
WARNING: There is 1 unused token
Generating LALR tables
WARNING: Token 'UMINUS' defined, but not used
WARNING: There is 1 unused token
asm.bas:3: Error: Undefined label 'ffh'
guest@macbook_mint1 /mnt/sda4/trabalhos/programacao/8bit/zxspectrum/ftpupload/zxspectrumstuff_20111001/borielzxbasiccompiler/snippets $Code: asm
DEFB 0,1,2,3,4,5,6,7
DEFB 00h,01h,02h,03h,04h,05h,06h,07h
DEFB 0xff,0xfe,0xfd,0xfc,0xfb,0xfa,0xf9,0xf8
end asmRe: asm/endasm DEFB not accepting 0xFE or FEh instead of 254 - boriel - 2011-10-06 nitrofurano Wrote:hi!NOTE: To remove these warnings, enter your zxb.py directory and type ./zxb.py to create the static cache. These warnings should not appear anymore. nitrofurano Wrote:The 0xNNN format is not allowed. Use $NNN format or NNNh format. E.g. Code: $C9 <-- Allowed
1Fh <-- Allowed
FFh <-- Error. "FFh" is an identifier. Prefix with "0"
0FFh <-- Ok. Now allowed.
0xC9 <-- Not allowedRe: asm/endasm DEFB not accepting 0xFE or FEh instead of 254 - nitrofurano - 2011-10-06 thanks!
|