FAQ  •  Register  •  Login

Forgotten JP

<<

einar

Posts: 84

Joined: Sun Apr 08, 2012 9:33 pm

Post Tue Sep 08, 2015 6:42 pm

Forgotten JP

NIRVANA demo code ends like this:

  Code:
    DO
        ...
        FOR sprite = 0 TO 7
            ...
        NEXT sprite
    LOOP
btiles:
    asm
        incbin "nirvana.btile"
    end asm


Previous versions of ZX BASIC compiled it correctly. Latest version 1.4.0s1964 now compiles it incorrectly, as follows:

  Code:
__LABEL47:
   ld a, 7
   ld hl, (_sprite - 1)
   cp h
   jp c, __LABEL2
__LABEL__btiles:
#line 132
   incbin "nirvana.btile"
#line 133


It's now forgetting to generate the last JP corresponding to the DO..LOOP statement!

If you would like to compile it yourself, source code is available here:

https://www.dropbox.com/sh/bgtoq6tdwropzzr/AAAknv_0PeJGhn36dLJZfGASa
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Fri Sep 11, 2015 10:27 pm

Re: Forgotten JP

This is another serious bug based on the optimizer change after version s1935.
Can you download ZXBasic Version 1.4.0s1967 and tell me if it works now, plz? :roll:

Return to Bug Reports

Who is online

Users browsing this forum: Exabot [Bot] and 1 guest

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

phpBB SEO