1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-20 17:08:07 +11:00
collapseos/blk/432

17 lines
452 B
Plaintext
Raw Normal View History

2020-04-26 11:54:07 +10:00
( Increase loop counter and returns whether we should loop. )
: _
R> ( IP, keep for later )
R> 1+ ( ip i+1 )
DUP >R ( ip i )
I' = ( ip f )
SWAP >R ( f )
;
( One could think that we should have a sub word to avoid all
these COMPILE, but we can't because otherwise it messes with
the RS )
: LOOP
COMPILE _ COMPILE (?br)
H@ - ,
COMPILE R> COMPILE DROP COMPILE R> COMPILE DROP
; IMMEDIATE