Prev: DA32 Up: Map Next: DA7D
DA34: Find The Dictionary Entry For This Token
Used by the routine at SkipSpaces.
Turns the low five bits of this character into the dictionary offset. The zero flag is set when the dictionary link is empty.
FindTokenDictionaryEntry DA34 LD A,(HL) Keep this character's dictionary length and turn it into an offset.
DA35 INC HL
DA36 AND $1F
DA38 RLCA
DA39 LD E,A
DA3A LD D,$00
DA3C PUSH HL Use the dictionary index at Table_WordIndex.
DA3D POP IX
DA3F LD HL,$5D80
DA42 ADD HL,DE
DA43 LD E,(HL)
DA44 INC HL Read the next byte of the input byte.
DA45 LD D,(HL)
DA46 INC HL
DA47 PUSH DE
FindTokenDictionaryEntry_DictionaryLinkEmpty DA48 LD E,(HL) Go back to FindTokenDictionaryEntry_DictionaryLinkEmpty while this dictionary link is empty.
DA49 INC HL
DA4A LD D,(HL)
DA4B INC HL
DA4C LD A,D
DA4D OR E
DA4E JR Z,FindTokenDictionaryEntry_DictionaryLinkEmpty
DA50 LD HL,$5DBF Add the dictionary base and store the address at DA32.
DA53 ADD HL,DE
DA54 LD ($DA32),HL
DA57 POP DE
DA58 LD A,D Read the high byte of the source.
DA59 OR E Merge the low byte of the source into the result.
DA5A RET Z Return when this dictionary link is empty.
DA5B LD HL,$5DBF Take the dictionary index and point DE at the word buffer (WordBuffer).
DA5E ADD HL,DE
DA5F LD DE,$5C0B
DA62 LD B,$01 Count 01.
FindTokenDictionaryEntry_RecordFlagByte DA64 LD A,(IX+$00) Jump to FindTokenDictionaryEntry_SignalStepFailed if this dictionary byte is below 40 (the word has ended).
DA67 CP $40
DA69 JR C,FindTokenDictionaryEntry_SignalStepFailed
DA6B OR $20 Make the letter lower case, store it in the word buffer, and repeat from FindTokenDictionaryEntry_RecordFlagByte.
DA6D LD (DE),A
DA6E INC DE
DA6F INC IX
DA71 INC B
DA72 JR FindTokenDictionaryEntry_RecordFlagByte
On failure, store the result in the working byte, then keep the match flags before returning.
FindTokenDictionaryEntry_SignalStepFailed DA74 XOR A Clear the character at the pointer and remember the input length.
DA75 LD (DE),A
DA76 LD A,B
DA77 LD ($DC13),A
DA7A OR %00000001 Reset the zero flag.
DA7C RET Return.
Prev: DA32 Up: Map Next: DA7D