FAQ  •  Register  •  Login

asm/endasm DEFB not accepting 0xFE or FEh instead of 254

<<

nitrofurano

Posts: 135

Joined: Thu Sep 29, 2011 12:44 pm

Location: Porto, Portugal

Post Thu Oct 06, 2011 4:02 pm

asm/endasm DEFB not accepting 0xFE or FEh instead of 254

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
<<

boriel

Site Admin

Posts: 1143

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Thu Oct 06, 2011 5:42 pm

Re: asm/endasm DEFB not accepting 0xFE or FEh instead of 254

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
<<

nitrofurano

Posts: 135

Joined: Thu Sep 29, 2011 12:44 pm

Location: Porto, Portugal

Post Thu Oct 06, 2011 8:07 pm

Re: asm/endasm DEFB not accepting 0xFE or FEh instead of 254

thanks! :)

Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO