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
282 B
Plaintext
10 lines
282 B
Plaintext
: LIT< WORD 34 , DUP C@ 1+ MOVE, ; IMMEDIATE
|
|
: BEGIN H@ ; IMMEDIATE
|
|
: AGAIN COMPILE (br) H@ - _bchk , ; IMMEDIATE
|
|
: UNTIL COMPILE (?br) H@ - _bchk , ; IMMEDIATE
|
|
: [ INTERPRET ; IMMEDIATE
|
|
: ] R> DROP ;
|
|
: LITA 36 , , ;
|
|
: COMPILE ' LITA ['] , , ; IMMEDIATE
|
|
: [COMPILE] ' , ; IMMEDIATE
|