![]() |
Routines |
| Prev: ED23 | Up: Map | Next: ED65 |
|
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 02 and walks up to index 2E. On a hit, returns BC=word index for BASIC GO TO n*100+1000 (see JumpTable); on a miss, BC=0000.
|
||||
| SearchVocabulary_Verbs | ED2D | LD A,$02 | Set the minimum match length to 02. | |
| ED2F | LD ($5BA4),A | |||
| ED32 | LD B,$2F | Point HL at Table_Verbs with word limit 2F. | ||
| ED34 | LD HL,$FAA9 | |||
|
This entry point is used by the routines at SearchVocabulary_Prepositions, SearchVocabulary_Nouns and SearchVocabulary_Commands.
Shared search loop used by SearchVocabulary_Verbs, SearchVocabulary_Prepositions, SearchVocabulary_Nouns and SearchVocabulary_Commands.
|
||||
| SearchVocabulary_Loop | ED37 | LD A,$01 | Start the word index at 01. | |
| ED39 | LD ($5BA5),A | |||
| SearchVocabulary_TryWord | ED3C | PUSH HL | Compare the current table word to the token at InputBuffer_TokenStart. | |
| ED3D | PUSH BC | |||
| ED3E | LD DE,($5BA7) | |||
| ED42 | CALL CompareTokenToWord | |||
| ED45 | POP BC | |||
| ED46 | POP HL | |||
| ED47 | JR NC,SearchVocabulary_Matched | Jump to SearchVocabulary_Matched if the word matched. | ||
| SearchVocabulary_SkipWord | ED49 | INC HL | Skip ahead to the CR that ends this table word. | |
| ED4A | LD A,(HL) | |||
| ED4B | CP $0D | |||
| ED4D | JR NZ,SearchVocabulary_SkipWord | |||
| ED4F | INC HL | Advance the word index and try the next entry. | ||
| ED50 | LD A,($5BA5) | |||
| ED53 | INC A | |||
| ED54 | LD ($5BA5),A | |||
| ED57 | CP B | |||
| ED58 | JR C,SearchVocabulary_TryWord | Jump to SearchVocabulary_TryWord if there are more words to try. | ||
| ED5A | LD BC,$0000 | BC=0000 on a miss. | ||
| ED5D | RET | Return. | ||
| SearchVocabulary_Matched | ED5E | LD A,($5BA5) | BC=the matched word index. | |
| ED61 | LD C,A | |||
| ED62 | LD B,$00 | |||
| ED64 | RET | Return. | ||
| Prev: ED23 | Up: Map | Next: ED65 |