z80: fix chkPS's "stable ABI" form in binaries with offset

Before lblnext is set, we need to use BJP, instead of JPnn, for the
jump to work in binaries with offsets.
This commit is contained in:
Virgil Dupras 2020-06-26 21:24:12 -04:00
parent b3e865d0fb
commit 891e4f861a

View File

@ -5,8 +5,8 @@
VARIABLE lblchkPS VARIABLE lblchkPS
: chkPS, lblchkPS @ CALLnn, ; ( chkPS, B305 ) : chkPS, lblchkPS @ CALLnn, ; ( chkPS, B305 )
CREATE lblnext 0x1a , ( stable ABI until set in B300 ) CREATE lblnext 0 , ( stable ABI until set in B300 )
: JPNEXT, lblnext @ JPnn, ; : JPNEXT, lblnext @ ?DUP IF JPnn, ELSE 0x1a BJP, THEN ;
: CODE ( same as CREATE, but with native word ) : CODE ( same as CREATE, but with native word )
(entry) 0 C, ( 0 == native ) ; (entry) 0 C, ( 0 == native ) ;
: ;CODE JPNEXT, ; : ;CODE JPNEXT, ;