collapseos/blk/398
Virgil Dupras f2f520cacc Extract (br), (?br) and (loop)'s code out of stable ABI zone
There is now no more actual code in stable ABI, only references.
This makes refactoring of this code much easier. For example,
changing IY to BC as the IP register.
2020-07-05 14:57:18 -04:00

13 lines
326 B
Plaintext

: IF ( -- a | a: br cell addr )
0x3f ( ?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 )
0x3b ( br ) ,
2 ALLOT
[COMPILE] THEN
H@ 2- ( push a. -2 for allot offset )
; IMMEDIATE