collapseos/blk/263
Virgil Dupras adea75e50a Add alias and switch word types
I'm pretty happy about how lightweight the implementation turns
out to be.
2020-10-28 15:02:06 -04:00

14 lines
528 B
Plaintext

CREATE XCURRENT 0 ,
: XCON XCURRENT CURRENT* ! ; : XCOFF 0x02 RAM+ CURRENT* ! ;
: (xentry) XCON (entry) XCOFF ; : XCREATE (xentry) 2 C, ;
: X:** (xentry) 5 C, , ;
: XCODE XCON CODE XCOFF ; : XIMM XCON IMMEDIATE XCOFF ;
: _xapply ( a -- a-off )
DUP ORG @ > IF ORG @ - BIN( @ + THEN ;
: XFIND XCURRENT @ SWAP _find DROP _xapply ;
: XLITN LIT" (n)" XFIND , , ;
: X' XCON ' XCOFF ; : X['] XCON ' _xapply XLITN XCOFF ;
: XCOMPILE XCON ' _xapply XLITN
LIT" ," FIND DROP _xapply , XCOFF ;
: X[COMPILE] XCON ' _xapply , XCOFF ;