![]() |
Routines |
| Prev: EDAF | Up: Map | Next: EE60 |
|
Used by the routine at JumpTable.
Jump-table target JumpTable_TokenHelper: using the delimiter in ParserState_TokenDelimiter, try SearchVocabulary_Prepositions (prepositions) and then walk a BASIC-resident word list via StepBasicListEntry. Returns BC=index or 0000.
|
||||
| MatchTokenInBasicList | EDEE | LD A,$02 | Set match length 02 and reset the word index. | |
| EDF0 | LD ($5BA4),A | |||
| EDF3 | DEC A | |||
| EDF4 | LD ($5BA5),A | |||
| EDF7 | LD A,($5BAC) | Jump to MatchTokenInBasicList_ClearDirty if the delimiter ends the line or is a quote. | ||
| EDFA | CP $0D | |||
| EDFC | JR Z,MatchTokenInBasicList_ClearDirty | |||
| EDFE | CP $22 | |||
| EE00 | JR Z,MatchTokenInBasicList_ClearDirty | |||
| EE02 | LD HL,($5BA7) | Stash InputBuffer_TokenStart in HL, promote InputBuffer_NextToken as the current token, try a preposition match (SearchVocabulary_Prepositions) and seed ParserState_WordIndex to 01. | ||
| EE05 | PUSH HL | |||
| EE06 | LD HL,($5BA9) | |||
| EE09 | LD ($5BA7),HL | |||
| EE0C | CALL SearchVocabulary_Prepositions | |||
| EE0F | LD A,$01 | |||
| EE11 | LD ($5BA5),A | |||
| EE14 | POP HL | Pop the stashed pointer back into InputBuffer_TokenStart via HL. | ||
| EE15 | LD ($5BA7),HL | |||
| EE18 | LD A,C | Jump to MatchTokenInBasicList_ClearDirty if C holds a preposition hit. | ||
| EE19 | AND A | |||
| EE1A | JR NZ,MatchTokenInBasicList_ClearDirty | |||
| EE1C | LD A,$01 | Mark the line dirty and scan the BASIC list. | ||
| EE1E | LD ($5BFD),A | |||
| EE21 | JR MatchTokenInBasicList_Scan | |||
| MatchTokenInBasicList_ClearDirty | EE23 | SUB A | Clear the dirty flag and use the BASIC-helper scan. | |
| EE24 | LD ($5BFD),A | |||
| EE27 | JR BasicHelper_Scan | |||
| MatchTokenInBasicList_Scan | EE29 | LD HL,($5C57) | Compare the next BASIC-list word to the token at InputBuffer_TokenStart. | |
| EE2C | LD DE,$0008 | |||
| EE2F | ADD HL,DE | |||
| EE30 | LD DE,($5BA7) | |||
| EE34 | PUSH HL | |||
| EE35 | CALL CompareTokenToWord | |||
| EE38 | POP HL | |||
| EE39 | JR C,MatchTokenInBasicList_AdvanceEntry | |||
| MatchTokenInBasicList_NextWord | EE3B | INC HL | Skip to the next space-separated word in this entry. | |
| EE3C | LD A,(HL) | |||
| EE3D | CP $22 | |||
| EE3F | JR Z,MatchTokenInBasicList_AdvanceEntry | |||
| EE41 | CP $20 | |||
| EE43 | JR NZ,MatchTokenInBasicList_NextWord | |||
| EE45 | INC HL | Compare that word to the next input token. | ||
| EE46 | LD DE,($5BA9) | |||
| EE4A | CALL CompareTokenToWord | |||
| EE4D | JR NC,MatchTokenInBasicList_Hit | |||
|
This entry point is used by the routine at BasicHelper.
|
||||
| MatchTokenInBasicList_AdvanceEntry | EE4F | CALL StepBasicListEntry | Step to the next BASIC-list entry and keep scanning. | |
| EE52 | CP B | |||
| EE53 | JR C,MatchTokenInBasicList_Scan | |||
|
This entry point is used by the routines at BasicHelper and SeedPrimaryWorkBuffer.
|
||||
| MatchTokenInBasicList_Miss | EE55 | LD BC,$0000 | BC=0000 on a miss. | |
| EE58 | RET | Return. | ||
|
This entry point is used by the routines at BasicHelper and SeedPrimaryWorkBuffer.
|
||||
| MatchTokenInBasicList_Hit | EE59 | LD A,($5BA5) | BC=the matched word index. | |
| EE5C | LD C,A | |||
| EE5D | LD B,$00 | |||
| EE5F | RET | Return. | ||
| Prev: EDAF | Up: Map | Next: EE60 |