Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
asm/endasm DEFB not accepting 0xFE or FEh instead of 254
#1
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 asm
Reply
#2
nitrofurano Wrote: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 $
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:
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 asm
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 allowed
Reply
#3
thanks! Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)