collapseos/blk/288
Virgil Dupras 2d17b4e8ec Make string length-prefixed instead of null-terminated
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.
2020-05-25 20:34:52 -04:00

11 lines
346 B
Plaintext

PC ORG @ 0x22 + ! ( litWord, 0xf7, tight on the 0x100 limit )
( Like numberWord, but instead of being followed by a 2 bytes
number, it's followed by a null-terminated string. When
called, puts the string's address on PS )
IY PUSHqq, HL POPqq, ( <-- IP )
E (HL) LDrr, D 0 LDrn,
DE INCss,
DE ADDIYss,
HL PUSHqq,
JPNEXT,