mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-25 18:08:05 +11:00
4501313410
Will be useful as kinds of "#ifdef"s during xcomp.
13 lines
272 B
Plaintext
13 lines
272 B
Plaintext
: ELSE ( a1 -- a2 | a1: IF cell a2: ELSE cell )
|
|
COMPILE (br)
|
|
2 ALLOT
|
|
DUP H@ -^ SWAP ( a-H a )
|
|
!
|
|
H@ 2- ( push a. -2 for allot offset )
|
|
; IMMEDIATE
|
|
|
|
: [IF]
|
|
IF EXIT THEN
|
|
LIT< [THEN] BEGIN DUP WORD S= UNTIL DROP ;
|
|
: [THEN] ;
|