1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 16:58:06 +11:00
collapseos/blk/263
Virgil Dupras 68dd800bd1 Remove LIT< in favor of LIT" exclusively
This duplicated feature existed because of bootstrapping issues
with LIT", but again, with careful threading, we can clean things
up.

We can now have a proper "Collapse OS" prompt :)
2020-09-19 18:51:29 -04:00

16 lines
636 B
Plaintext

CREATE XCURRENT 0 ,
: XCON XCURRENT CURRENT* ! ; : XCOFF 0x02 RAM+ CURRENT* ! ;
: (xentry) XCON (entry) XCOFF ; : XCREATE (xentry) 2 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 ;
: X' XCON ' XCOFF ; : X['] XCON ' _xapply LITN XCOFF ;
: XCOMPILE XCON ' _xapply LITN
LIT" ," FIND DROP _xapply , XCOFF ;
: X[COMPILE] XCON ' _xapply , XCOFF ;
: 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- ;