mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 21:28:06 +11:00
2d17b4e8ec
I'm not sure why I chose null-terminated initially. Probably because the z80asm version had null-terminated strings. Length-prefixes strings are the traditional form of strings in Forth and it's a bit easier to work with them with traditional forth words when they're under this form.
10 lines
171 B
Plaintext
10 lines
171 B
Plaintext
: IMMEDIATE
|
|
CURRENT @ 1-
|
|
DUP C@ 128 OR SWAP C! ;
|
|
: IMMED? 1- C@ 0x80 AND ;
|
|
: +! TUCK @ + SWAP ! ;
|
|
: -^ SWAP - ;
|
|
: / /MOD NIP ;
|
|
: MOD /MOD DROP ;
|
|
: ALLOT HERE +! ;
|