Prev: 60707 Up: Map Next: 60773
60717: Search Vocabulary (Verbs)
Used by the routine at JumpTable.
Jump-table target JumpTable_SearchVerbs (USR JumpTable_SearchVerbs): search Table_Verbs for the token at InputBuffer_TokenStart. Sets ParserState_MatchLength to 2 and walks up to index 46. On a hit, returns BC=word index for BASIC GO TO n*100+1000 (see JumpTable); on a miss, BC=0000.
SearchVocabulary_Verbs 60717 LD A,2 Set the minimum match length to 2.
60719 LD (23460),A
60722 LD B,47 Point HL at Table_Verbs with word limit 47.
60724 LD HL,64169
SearchVocabulary_Loop 60727 LD A,1 Start the word index at 1.
60729 LD (23461),A
SearchVocabulary_TryWord 60732 PUSH HL Compare the current table word to the token at InputBuffer_TokenStart.
60733 PUSH BC
60734 LD DE,(23463)
60738 CALL CompareTokenToWord
60741 POP BC
60742 POP HL
60743 JR NC,SearchVocabulary_Matched Jump to SearchVocabulary_Matched if the word matched.
SearchVocabulary_SkipWord 60745 INC HL Skip ahead to the CR that ends this table word.
60746 LD A,(HL)
60747 CP 13
60749 JR NZ,SearchVocabulary_SkipWord
60751 INC HL Advance the word index and try the next entry.
60752 LD A,(23461)
60755 INC A
60756 LD (23461),A
60759 CP B
60760 JR C,SearchVocabulary_TryWord Jump to SearchVocabulary_TryWord if there are more words to try.
60762 LD BC,0 BC=0000 on a miss.
60765 RET Return.
SearchVocabulary_Matched 60766 LD A,(23461) BC=the matched word index.
60769 LD C,A
60770 LD B,0
60772 RET Return.
Prev: 60707 Up: Map Next: 60773