mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-24 00:08:06 +11:00
f54b1dc504
This allows us to make DO..LOOP more compact.
11 lines
231 B
Plaintext
11 lines
231 B
Plaintext
: VARIABLE CREATE 2 ALLOT ;
|
|
: CONSTANT CREATE , DOES> @ ;
|
|
: / /MOD SWAP DROP ;
|
|
: MOD /MOD DROP ;
|
|
|
|
( In addition to pushing H@ this compiles 2>R so that loop
|
|
variables are sent to PS at runtime )
|
|
: DO COMPILE 2>R H@ ; IMMEDIATE
|
|
|
|
|