1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-10 09:38:06 +11:00
collapseos/blk/393
Virgil Dupras 705d68deec Move most of the high layer of comp core into the low one
With KEY and EMIT being switch words, most of the high layer can
be defined before drivers.

In addition to this change, I've compacted core blocks which were
becoming quite sparse.
2020-10-28 18:18:00 -04:00

17 lines
406 B
Plaintext

: IF ( -- a | a: br cell addr )
COMPILE (?br) H@ 1 ALLOT ( br cell allot )
; IMMEDIATE
: THEN ( a -- | a: br cell addr )
DUP H@ -^ _bchk SWAP ( a-H a ) C!
; IMMEDIATE
: ELSE ( a1 -- a2 | a1: IF cell a2: ELSE cell )
COMPILE (br)
1 ALLOT
[COMPILE] THEN
H@ 1- ( push a. 1- for allot offset )
; IMMEDIATE
: LIT"
COMPILE (s) H@ 0 C, ,"
DUP H@ -^ 1- ( a len ) SWAP C!
; IMMEDIATE