Forgotten JP - Printable Version

+- Forum (
+-- Forum: Compilers and Computer Languages (
+--- Forum: ZX Basic Compiler (
+---- Forum: Bug Reports (
+---- Thread: Forgotten JP (/showthread.php?tid=700)

Forgotten JP - einar - 09-08-2015

NIRVANA demo code ends like this:

        FOR sprite = 0 TO 7
        NEXT sprite
        incbin "nirvana.btile"
    end asm

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

    ld a, 7
    ld hl, (_sprite - 1)
    cp h
    jp c, __LABEL2
#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:

Re: Forgotten JP - boriel - 09-11-2015

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: