collapseos/blk/328
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

16 lines
327 B
Plaintext

CODE S=
DE POPqq, HL POPqq, chkPS,
LDA(DE),
(HL) CPr,
IFZ, ( same size? )
B A LDrr, ( loop A times )
BEGIN,
HL INCss, DE INCss,
LDA(DE),
(HL) CPr,
JRNZ, BREAK, ( not equal? break early. NZ is set. )
DJNZ, AGAIN,
THEN,
PUSHZ,
;CODE