2020-06-12 11:29:00 -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, JRNZ, FJR, ;
|
|
|
|
: IFNZ, JRZ, FJR, ;
|
|
|
|
: IFC, JRNC, FJR, ;
|
|
|
|
: IFNC, JRC, FJR, ; )
|
|
|
|
: THEN,
|
|
|
|
DUP PC ( l l pc )
|
2020-06-12 12:07:48 -04:00
|
|
|
-^ 1- ( l off )
|
2020-06-12 11:29:00 -04:00
|
|
|
( warning: l is a PC offset, not a mem addr! )
|
2020-06-12 14:01:24 -04:00
|
|
|
SWAP ORG @ + BIN( @ - ( off addr )
|
2020-06-12 11:29:00 -04:00
|
|
|
C! ;
|