FAQ  •  Register  •  Login

Comments inside ASM blocks (*solved*)

<<

einar

Posts: 84

Joined: Sun Apr 08, 2012 9:33 pm

Post Tue Aug 20, 2013 3:10 pm

Comments inside ASM blocks (*solved*)

Trying to compile the sub-routine below...

  Code:
sub test()
    asm
        ex af,af'               ; A'=player
    end asm
end sub


...produces this error message:

C:\...\zxbasic-1.3.0s1022\dist>zxb test.bas
test.bas:4: Error: illegal preprocessor character '='


However the following sub-routine compiles just fine:

  Code:
sub test()
    asm
        ex af,af'               ; A=player
    end asm
end sub


This other sub-routine also compiles just fine:

  Code:
sub test()
    asm
        exx                     ; A'=player
    end asm
end sub


ZX BASIC parser is obviously misunderstanding those two apostrophes in the first case.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Fri Nov 22, 2013 11:00 pm

Re: Comments inside ASM blocks

einar wrote:Trying to compile the sub-routine below...

  Code:
sub test()
    asm
        ex af,af'               ; A'=player
    end asm
end sub


...produces this error message:

C:\...\zxbasic-1.3.0s1022\dist>zxb test.bas
test.bas:4: Error: illegal preprocessor character '='


This is, again, another corner case for the ZXBASIC preprocessor when entering an ASM context. A' is also a register (hence the confusion). Let me check it...
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Sat Nov 23, 2013 12:12 am

Re: Comments inside ASM blocks

I think I finally fixed it. Please, download the Latest version and check if it works ok now. :|

Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 2 guests

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

phpBB SEO