2020-04-23 11:19:12 +10:00
|
|
|
PC ORG @ 4 + ! ( find )
|
|
|
|
( Find the entry corresponding to word name where (HL) points
|
|
|
|
to in dictionary having its tip at DE and sets DE to point
|
|
|
|
to that entry. Z if found, NZ if not. )
|
|
|
|
HL PUSHqq,
|
|
|
|
( First, figure out string len )
|
2020-05-26 10:34:52 +10:00
|
|
|
A (HL) LDrr, A ORr,
|
2020-04-23 11:19:12 +10:00
|
|
|
( special case. zero len? we never find anything. )
|
2020-05-26 10:34:52 +10:00
|
|
|
IFNZ, ( fail-B296 )
|
|
|
|
( Let's do something weird: We'll hold HL by the *tail*.
|
|
|
|
Because of our dict structure and because we know our
|
|
|
|
lengths, it's easier to compare starting from the end. )
|
|
|
|
C A LDrr, B 0 LDrn, ( C holds our length )
|
|
|
|
BC ADDHLss, HL INCss, ( HL points to after-last-char )
|
|
|
|
( cont . )
|
2020-06-12 08:12:01 +10:00
|
|
|
|