1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-25 17:38:05 +11:00
collapseos/blk/043
Virgil Dupras 4501313410 Add [IF] .. [THEN]
Will be useful as kinds of "#ifdef"s during xcomp.
2020-04-28 08:28:59 -04:00

16 lines
748 B
Plaintext

x CASE y OF A ENDOF z OF B ENDOF C ENDCASE: If x == y, execute
A, if x == z, execute B. Otherwise, execute C. x is dropped
in case of an OF match, *but it is kept if it reaches C*. You
have to consume it to avoid PSP leak.
(br) -- Branches by the number specified in the 2
following bytes. Can be negative.
(?br) f -- Branch if f is false.
( -- *I* Comment. Ignore input until ")" is read.
[ -- Begin interpretative mode. In a definition,
execute words instead of compiling them.
] -- End interpretative mode.
ABORT -- Resets PS and RS and returns to interpreter.
ABORT" x" -- *I* Compiles a ." followed by a ABORT.
EXECUTE a -- Execute wordref at addr a