mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-06 10:18:05 +11:00
3aa681ceca
The ":" now takes care of scanning for ";". Conceptually, having ";" as an immediate word is slightly simpler than the approach in this commit, but when bootstrapping is involved, this simpler approach gets murkier. Moreover, it got even murkier-er when trying to de-stabilize EXIT, so here we are.
14 lines
456 B
Plaintext
14 lines
456 B
Plaintext
( We don't use ." and ABORT in core, they're not xcomp-ed )
|
|
: ." [COMPILE] LIT" COMPILE (print) ; IMMEDIATE
|
|
: ABORT" [COMPILE] ." COMPILE ABORT ; IMMEDIATE
|
|
: BEGIN H@ ; IMMEDIATE
|
|
: AGAIN COMPILE (br) H@ - _bchk C, ; IMMEDIATE
|
|
: UNTIL COMPILE (?br) H@ - _bchk C, ; IMMEDIATE
|
|
: [ INTERPRET ; IMMEDIATE
|
|
: ] R> DROP ;
|
|
: COMPILE ' LITN ['] , , ; IMMEDIATE
|
|
: [COMPILE] ' , ; IMMEDIATE
|
|
: ['] ' LITN ; IMMEDIATE
|
|
':' X' _ 4 - C! ( give : its name )
|
|
'(' X' _ 4 - C!
|