![]() |
Routines |
| Prev: 74C1 | Up: Map | Next: 75EC |
|
Prepares a clause in the parser workspace before the grammar is tried.
|
||||
| InglishPrepareTheClause | 7574 | DEFB $00,$00,$00,$00,$00,$00 | ||
| 757A | DEFB $00 | |||
| 757B | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | |||
| 7583 | DEFB $00,$00 | |||
|
This entry point is used by the routine at TurnReadAndTokeniseTheCommand.
|
||||
| InglishPrepareTheClause_0 | 7585 | LD IY,$B9C8 | Point IY at the parser workspace. | |
| 7589 | XOR A | Clear the conjunction count. | ||
|
This entry point is used by the routine at Command_FollowTheGrammarFlag.
|
||||
| InglishPrepareTheClause_1 | 758A | LD ($B71B),A | Write A to B71B. | |
| 758D | CALL Inglish_ClearTheMatcherPhase_0 | Call Inglish_ClearTheMatcherPhase_0 to clear the matcher phase. | ||
| 7590 | LD ($B706),A | Write 00 to B706. | ||
| 7593 | LD E,$FF | The class marker starts at FF. | ||
| 7595 | LD A,($B71A) | Read the matcher path flag. | ||
| 7598 | AND A | See whether the matcher path flag is zero. | ||
| 7599 | LD D,$A0 | Class A0 is used when a game is already in progress. | ||
| 759B | JP NZ,InglishMatchOneWord_MarkTheClauseByte | If A is not zero jump to InglishMatchOneWord_MarkTheClauseByte. | ||
| 759E | LD D,$C0 | Class C0 is used for a fresh game. | ||
|
This entry point is used by the routines at InglishMatchOneWord and Command_MatchASpecialKey.
|
||||
| InglishPrepareTheClause_2 | 75A0 | XOR A | Write 00 to 757A. | |
| 75A1 | LD ($757A),A | |||
| 75A4 | LD A,E | Take the class marker FF into A. | ||
| 75A5 | OR $C7 | Merge in C7. | ||
| 75A7 | LD E,A | Keep the merged class flags in E. | ||
|
Test the matcher phase.
|
||||
| 75A8 | LD A,($B719) | Jump to InglishPrepareTheClause_BlankAParserSlot if *B719 is not 02. | ||
| 75AB | CP $02 | |||
| 75AD | JR NZ,InglishPrepareTheClause_BlankAParserSlot | |||
| 75AF | RES 1,E | Clear bit 1. | ||
| InglishPrepareTheClause_BlankAParserSlot | 75B1 | CALL Inglish_BlankAParserSlot | Call Inglish_BlankAParserSlot to blank a parser slot. | |
|
This entry point is used by the routines at InglishAcceptTheClause, InglishRestoreTheMatch, InglishRunTheGrammar, Inglish_AskWhat, CommandDispatchAControl, Command_FollowTheGrammarFlag and DisplayLocateHelpMessage.
|
||||
| InglishPrepareTheClause_3 | 75B4 | LD HL,$757B | Write 00 to 0A bytes, starting from 757B with Blanker. | |
| 75B7 | LD B,$0A | |||
| 75B9 | CALL Blanker | |||
| 75BC | SET 4,E | Set bit 4. | ||
|
This entry point is used by the routine at InglishTryTheNextClass.
|
||||
| InglishPrepareTheClause_4 | 75BE | CALL Inglish_ReadTheNextGrammarByte | Call Inglish_ReadTheNextGrammarByte to read the next grammar byte. | |
| 75C1 | PUSH DE | Save DE. | ||
| 75C2 | RRCA | Turn the grammar byte into a jump-table offset. | ||
| 75C3 | RRCA | |||
| 75C4 | RRCA | |||
| 75C5 | LD E,A | Keep the jump-table offset in E. | ||
| 75C6 | LD D,$00 | The grammar-table offset's high byte is zero. | ||
| 75C8 | LD HL,$75D2 | Point HL at entry DE of JumpTable. | ||
| 75CB | ADD HL,DE | |||
| 75CC | LD E,(HL) | Read the low byte of the handler. | ||
| 75CD | INC HL | Step to the high byte of the handler. | ||
| 75CE | LD D,(HL) | Read the high byte of the handler. | ||
| 75CF | EX DE,HL | Point HL at the handler. | ||
| 75D0 | POP DE | Jump to the action handler the caller addressed. | ||
| 75D1 | JP (HL) | |||
| JumpTable | 75D2 | DEFW InglishAcceptTheClause | ||
| 75D4 | DEFW InglishCheckTheWordClass | |||
| 75D6 | DEFW InglishRejectAClass | |||
| 75D8 | DEFW InglishRestoreTheMatch | |||
| 75DA | DEFW InglishClearTheMatchBit | |||
| 75DC | DEFW InglishRunTheGrammar | |||
| 75DE | DEFW InglishStepOverAGroup | |||
| 75E0 | DEFW InglishWalkTheGrammar | |||
| 75E2 | DEFW InglishTryTheNextClass | |||
| 75E4 | DEFW Command_MatchASpecialKey | |||
| 75E6 | DEFW InglishSaveTheMatch | |||
| 75E8 | DEFW InglishMatchOneWord | |||
| 75EA | DEFW InglishClearTheRepeatFlag | |||
| Prev: 74C1 | Up: Map | Next: 75EC |