Prev: 30511 Up: Map Next: 30608
30515: Inglish: Restore The Match
Restores a saved match and tries the clause again. Reached through the jump table at JumpTable, dispatched from 30160.
InglishRestoreTheMatch 30515 BIT 3,E Jump to InglishRestoreTheMatch_TestTheGrammarFlag if bit 3 of the grammar flag is set.
30517 JR NZ,InglishRestoreTheMatch_TestTheGrammarFlag
30519 CALL Inglish_TestTheConjunctionCount Call Inglish_TestTheConjunctionCount to test the conjunction count.
30522 JR NZ,InglishRestoreTheMatch_TestTheGrammarFlag Jump to InglishRestoreTheMatch_TestTheGrammarFlag if a conjunction is still left.
30524 LD HL,(30068) Read the pointer stored at InglishPrepareTheClause.
30527 LD (46812),HL Update *46812.
30530 LD D,176 The restored class is 176.
30532 LD A,(30070) Read the saved grammar flag.
30535 LD E,A Keep the saved grammar flag.
30536 LD A,(30073) Read the saved replay path.
30539 LD (46854),A Update *46854.
30542 LD IY,(30071) Read the saved matcher pointer.
30546 JP InglishMatchOneWord Jump to InglishMatchOneWord to match one word.
InglishRestoreTheMatch_TestTheGrammarFlag 30549 CALL Inglish_ClearTheMatcherPhase_0 Call Inglish_ClearTheMatcherPhase_0 to clear the matcher phase.
30552 BIT 1,E Jump to Inglish_AskWhat_0 if bit 1 of the saved grammar flag is clear.
30554 JP Z,Inglish_AskWhat_0
30557 BIT 0,E Jump to InglishRestoreTheMatch_SaveTheTokenPointer if the match bit of the saved grammar flag is clear.
30559 JR Z,InglishRestoreTheMatch_SaveTheTokenPointer
InglishRestoreTheMatch_StoreThePairOfClauseBytes 30561 CALL Inglish_StoreTheBytePair Call Inglish_StoreTheBytePair to store the pair of clause bytes.
30564 JP InglishPrepareTheClause_3 Jump back to InglishPrepareTheClause_3 to clear the matcher scratch.
InglishRestoreTheMatch_SaveTheTokenPointer 30567 PUSH DE Save DE, BC and the token pointer at 46812 on the stack.
30568 PUSH BC
30569 LD HL,(46812)
30572 PUSH HL
InglishRestoreTheMatch_Loop 30573 CALL Inglish_ReadTheNextGrammarByte Call Inglish_ReadTheNextGrammarByte to read the next grammar byte.
30576 CP 0 Jump back to InglishRestoreTheMatch_Loop if the grammar byte is zero.
30578 JR Z,InglishRestoreTheMatch_Loop
30580 SET 0,E Set bit 0 of E, and jump to InglishRestoreTheMatch_StoreTheNextPair if the grammar byte is 32.
30582 CP 32
30584 JR Z,InglishRestoreTheMatch_StoreTheNextPair
30586 POP HL Update *46812.
30587 LD (46812),HL
30590 POP BC Jump back to InglishRestoreTheMatch_StoreThePairOfClauseBytes to store the next pair of clause bytes.
30591 POP DE
30592 JR InglishRestoreTheMatch_StoreThePairOfClauseBytes
InglishRestoreTheMatch_StoreTheNextPair 30594 CALL Inglish_StoreTheBytePair Call Inglish_StoreTheBytePair to store the pair of clause bytes.
30597 POP HL Drop one saved value, restore BC and HL, and force L to 2.
30598 POP BC
30599 POP HL
30600 LD L,2
30602 CALL Inglish_StoreTheBytePair_0 Call Inglish_StoreTheBytePair_0 to store the pair of clause bytes.
30605 JP InglishPrepareTheClause_3 Jump back to InglishPrepareTheClause_3 to clear the matcher scratch.
Prev: 30511 Up: Map Next: 30608