1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-06 11:08:05 +11:00
collapseos/blk/243
Virgil Dupras 891e4f861a 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.
2020-06-26 21:24:12 -04:00

13 lines
390 B
Plaintext

: JPccnn, SWAP <<3 0xc2 OR A, A,, ;
: BCALL, BIN( @ + CALLnn, ;
: BJP, BIN( @ + JPnn, ;
: BJPcc, BIN( @ + JPccnn, ;
VARIABLE lblchkPS
: chkPS, lblchkPS @ CALLnn, ; ( chkPS, B305 )
CREATE lblnext 0 , ( stable ABI until set in B300 )
: JPNEXT, lblnext @ ?DUP IF JPnn, ELSE 0x1a BJP, THEN ;
: CODE ( same as CREATE, but with native word )
(entry) 0 C, ( 0 == native ) ;
: ;CODE JPNEXT, ;