mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 20:08:05 +11:00
440ea43a88
Initially, I used the same letters as those used in the z80 ref docs, but it makes the different assemblers harder to use than they should. Having consistent "argtype" rules across assemblers should help.
16 lines
666 B
Plaintext
16 lines
666 B
Plaintext
lblfind BSET
|
|
( 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 PUSH,
|
|
( First, figure out string len )
|
|
A (HL) LDrr, A ORr,
|
|
( special case. zero len? we never find anything. )
|
|
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 LDri, ( C holds our length )
|
|
BC ADDHLd, HL INCd, ( HL points to after-last-char )
|
|
( cont . )
|