Prev: 55858 Up: Map Next: 55933
55860: 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 55860 LD A,(HL) Keep this character's dictionary length and turn it into an offset.
55861 INC HL
55862 AND 31
55864 RLCA
55865 LD E,A
55866 LD D,0
55868 PUSH HL Use the dictionary index at Table_WordIndex.
55869 POP IX
55871 LD HL,23936
55874 ADD HL,DE
55875 LD E,(HL)
55876 INC HL Read the next byte of the input byte.
55877 LD D,(HL)
55878 INC HL
55879 PUSH DE
FindTokenDictionaryEntry_DictionaryLinkEmpty 55880 LD E,(HL) Go back to FindTokenDictionaryEntry_DictionaryLinkEmpty while this dictionary link is empty.
55881 INC HL
55882 LD D,(HL)
55883 INC HL
55884 LD A,D
55885 OR E
55886 JR Z,FindTokenDictionaryEntry_DictionaryLinkEmpty
55888 LD HL,23999 Add the dictionary base and store the address at 55858.
55891 ADD HL,DE
55892 LD (55858),HL
55895 POP DE
55896 LD A,D Read the high byte of the source.
55897 OR E Merge the low byte of the source into the result.
55898 RET Z Return when this dictionary link is empty.
55899 LD HL,23999 Take the dictionary index and point DE at the word buffer (WordBuffer).
55902 ADD HL,DE
55903 LD DE,23563
55906 LD B,1 Count 1.
FindTokenDictionaryEntry_RecordFlagByte 55908 LD A,(IX+0) Jump to FindTokenDictionaryEntry_SignalStepFailed if this dictionary byte is below 64 (the word has ended).
55911 CP 64
55913 JR C,FindTokenDictionaryEntry_SignalStepFailed
55915 OR 32 Make the letter lower case, store it in the word buffer, and repeat from FindTokenDictionaryEntry_RecordFlagByte.
55917 LD (DE),A
55918 INC DE
55919 INC IX
55921 INC B
55922 JR FindTokenDictionaryEntry_RecordFlagByte
On failure, store the result in the working byte, then keep the match flags before returning.
FindTokenDictionaryEntry_SignalStepFailed 55924 XOR A Clear the character at the pointer and remember the input length.
55925 LD (DE),A
55926 LD A,B
55927 LD (56339),A
55930 OR %00000001 Reset the zero flag.
55932 RET Return.
Prev: 55858 Up: Map Next: 55933