mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 22:08:05 +11:00
a348ee9106
The few extra bytes they save in the core aren't worth the extra complexity. This was initially done in a context where I had troubles keeping the RC2014 binary with SDC inside the 8K limit. At this point, even with the few extra bytes we add here, we're at 7200 bytes, so I'd say we're fine.
10 lines
223 B
Plaintext
10 lines
223 B
Plaintext
: +! TUCK @ + SWAP ! ;
|
|
: / /MOD NIP ;
|
|
: MOD /MOD DROP ;
|
|
: ALLOT HERE +! ;
|
|
: FILL ( a n b -- )
|
|
SWAP 2 PICK + ( a b a+n ) ROT ( b a+n a ) DO ( b )
|
|
DUP I C!
|
|
LOOP DROP ;
|
|
: ALLOT0 ( n -- ) H@ OVER 0 FILL ALLOT ;
|