collapseos/blk/759

17 lines
460 B
Plaintext
Raw Normal View History

2020-06-18 21:21:46 -04:00
( Place BEGIN, where you want to jump back and AGAIN after
a relative jump operator. Just like BSET and BWR. )
: BEGIN, PC ;
: BSET PC SWAP ! ;
( same as BSET, but we need to write a placeholder )
: FJR, PC 0 A, ;
: IFZ, JNZ, FJR, ;
: IFNZ, JZ, FJR, ;
2020-06-19 07:26:33 -04:00
: IFC, JNC, FJR, ;
: IFNC, JC, FJR, ;
2020-06-18 21:21:46 -04:00
: THEN,
DUP PC ( l l pc )
-^ 1- ( l off )
( warning: l is a PC offset, not a mem addr! )
SWAP ORG @ + BIN( @ - ( off addr )
C! ;