mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-28 09:48:05 +11:00
f6ded7712e
This is the first commit I do entirely in VE. It's a habit I'm planning on taking as it helps a lot to find usability issues.
17 lines
328 B
Plaintext
17 lines
328 B
Plaintext
: IF ( -- a | a: br cell addr )
|
|
COMPILE (?br) H@ 2 ALLOT ( br cell allot )
|
|
; IMMEDIATE
|
|
: THEN ( a -- | a: br cell addr )
|
|
DUP H@ -^ _bchk SWAP ( a-H a ) !
|
|
; IMMEDIATE
|
|
: ELSE ( a1 -- a2 | a1: IF cell a2: ELSE cell )
|
|
COMPILE (br)
|
|
2 ALLOT
|
|
[COMPILE] THEN
|
|
H@ 2- ( push a. -2 for allot offset )
|
|
; IMMEDIATE
|
|
|
|
|
|
|
|
|