2020-08-16 06:37:58 +10:00
|
|
|
CREATE XCURRENT 0 ,
|
2020-09-20 03:54:01 +10:00
|
|
|
: XCON XCURRENT CURRENT* ! ; : XCOFF 0x02 RAM+ CURRENT* ! ;
|
|
|
|
: (xentry) XCON (entry) XCOFF ; : XCREATE (xentry) 2 C, ;
|
|
|
|
: XCODE XCON CODE XCOFF ; : XIMM XCON IMMEDIATE XCOFF ;
|
2020-05-13 11:08:18 +10:00
|
|
|
: _xapply ( a -- a-off )
|
|
|
|
DUP ORG @ > IF ORG @ - BIN( @ + THEN ;
|
2020-09-20 03:54:01 +10:00
|
|
|
: XFIND XCURRENT @ SWAP _find DROP _xapply ;
|
|
|
|
: X' XCON ' XCOFF ; : X['] XCON ' _xapply LITN XCOFF ;
|
|
|
|
: XCOMPILE XCON ' _xapply LITN
|
2020-05-16 02:50:14 +10:00
|
|
|
LIT< , FIND DROP _xapply , XCOFF ;
|
2020-05-13 11:08:18 +10:00
|
|
|
: X[COMPILE] XCON ' _xapply , XCOFF ;
|
2020-09-20 03:54:01 +10:00
|
|
|
: XDO LIT< 2>R XFIND , H@ ;
|
|
|
|
: XLOOP LIT< (loop) XFIND , H@ - C, ;
|
|
|
|
: XIF LIT< (?br) XFIND , H@ 1 ALLOT ;
|
|
|
|
: XELSE LIT< (br) XFIND , 1 ALLOT [COMPILE] THEN H@ 1- ;
|