Prev: 60707 Up: Map Next: 60773
60717: Search Vocabulary (Verbs)
Used by the routine at JumpTable.
Jump-table target JumpTable_SearchVerbs (USR JumpTable_SearchVerbs). On a hit, BASIC GO TO n*100+1000 for verb index n (see JumpTable).
SearchVocabulary_Verbs 60717 LD A,2 Write 2 to *ParserState_MatchLength.
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 Write 1 to *ParserState_WordIndex.
60729 LD (23461),A
Compare this table word.
SearchVocabulary_TryWord 60732 PUSH HL Stash HL and BC on the stack.
60733 PUSH BC
60734 LD DE,(23463) Copy *InputBuffer_TokenStart to DE.
60738 CALL CompareTokenToWord Call CompareTokenToWord.
60741 POP BC Restore BC and HL from the stack.
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 ENTER that ends this table word.
60746 LD A,(HL)
60747 CP 13
60749 JR NZ,SearchVocabulary_SkipWord
60751 INC HL Advance HL past the ENTER.
60752 LD A,(23461) Increment *ParserState_WordIndex.
60755 INC A
60756 LD (23461),A
60759 CP B Jump to SearchVocabulary_TryWord if there are more words to try.
60760 JR C,SearchVocabulary_TryWord
60762 LD BC,0 BC=0000 on a miss.
60765 RET Return.
A vocabulary word matched.
SearchVocabulary_Matched 60766 LD A,(23461) Copy *ParserState_WordIndex into BC.
60769 LD C,A
60770 LD B,0
60772 RET Return.
Prev: 60707 Up: Map Next: 60773