![]() |
Routines |
| Prev: 31608 | Up: Map | Next: 31779 |
|
Used by the routine at Inglish_ScoreTheCurrentAction.
Saves the clause window: the object's id and location, then copies the clause pairs into the match buffers.
|
||||
| Inglish_SaveTheClauseWindow | 31646 | PUSH IY | Read the low byte of the pointer in the clause. | |
| 31648 | LD L,(IY+0) | |||
| 31651 | LD H,(IY+1) | Read the high byte of the pointer in the clause. | ||
| 31654 | LD A,H | Use the clause byte at offset 1 again. | ||
| 31655 | AND 128 | Keep only bit 7. | ||
| 31657 | LD (31058),A | Update the saved phrase byte. | ||
| 31660 | RES 7,H | Clear bit 7 of the pointer's high byte. | ||
| 31662 | LD (31064),HL | Remember the pointer in the saved text pointer. | ||
| 31665 | LD HL,31066 | Point HL at the swapped text pointer. | ||
| 31668 | PUSH HL | Count 4 passes. | ||
| 31669 | LD B,4 | |||
|
Fill the buffer at HL.
|
||||
| 31671 | CALL Blanker | Call Blanker to fill a run of bytes. | ||
| 31674 | POP HL | Count 2 passes. | ||
| 31675 | LD B,2 | |||
| 31677 | LD E,4 | Save the clause bytes at offset 4. | ||
| 31679 | CALL Inglish_CopyOneClausePair | Call Inglish_CopyOneClausePair to copy one clause pair. | ||
| 31682 | LD E,14 | Save the clause bytes at offset 14. | ||
| 31684 | CALL Inglish_CopyOneClausePair | Call Inglish_CopyOneClausePair to copy one clause pair. | ||
| 31687 | LD E,6 | Save the clause bytes at offset 6. | ||
| 31689 | CALL Inglish_CopyOneClausePair | Call Inglish_CopyOneClausePair to copy one clause pair. | ||
| 31692 | LD E,16 | Save the clause bytes at offset 16. | ||
| 31694 | CALL Inglish_CopyOneClausePair | Call Inglish_CopyOneClausePair to copy one clause pair. | ||
| 31697 | XOR A | Clear *46815. | ||
| 31698 | LD (46815),A | |||
| 31701 | LD HL,31064 | Point HL at the saved text pointer. | ||
| 31704 | LD DE,8 | Each action record is 8 bytes. | ||
| 31707 | LD IX,43859 | Point IX at the action table. | ||
| Inglish_SaveTheClauseWindow_UseTheActionTable | 31711 | PUSH IX | Use the action table as the parser pointer. | |
| 31713 | POP IY | |||
| 31715 | CALL Inglish_MatchClausePairs | Call Inglish_MatchClausePairs to match clause pairs. | ||
| 31718 | JR Z,Inglish_SaveTheClauseWindow_ScoreTheSwappedClause | Jump to Inglish_SaveTheClauseWindow_ScoreTheSwappedClause if Inglish_MatchClausePairs returned zero. | ||
| 31720 | ADD IX,DE | Add 0008 onto the action table. | ||
| 31722 | LD A,(IX+1) | Read the high byte of this action's token. | ||
| 31725 | OR (IX+0) | Jump back to Inglish_SaveTheClauseWindow_UseTheActionTable if this action's token is not zero. | ||
| 31728 | JR NZ,Inglish_SaveTheClauseWindow_UseTheActionTable | |||
| 31730 | POP IY | Restore the clause pointer from the stack. | ||
|
Test the low half of the class being matched.
|
||||
| 31732 | LD A,(46815) | Jump to Inglish_PlantJumpRelativeIfNonZero_ReadThePointers if *46815 is not zero. | ||
| 31735 | AND A | |||
| 31736 | JP NZ,Inglish_PlantJumpRelativeIfNonZero_ReadThePointers | |||
| 31739 | LD HL,(31064) | Read the pointer stored in the saved text pointer. | ||
| 31742 | PUSH HL | Point HL at "[0x0d] You[0x01].[0x0d] Time passes.". | ||
| 31743 | LD HL,44451 | |||
| 31746 | XOR A | Clear *WaitCountdown. | ||
| 31747 | LD (46849),A | |||
| 31750 | LD (46876),A | Update *46876. | ||
| 31753 | LD A,1 | Write 1 (the gate shut) to *46842. | ||
| 31755 | LD (46842),A | |||
| 31758 | CALL MessageOpenTheGateForAConjunction | Call MessageOpenTheGateForAConjunction to open the message gate for a conjunction. | ||
| 31761 | LD A,(46875) | Read *46875. | ||
| 31764 | DEC A | Return if the conjunction count reached zero. | ||
| 31765 | RET Z | |||
| 31766 | POP HL | Jump back to InglishApplyAMatch_GiveEveryOtherCharacterATurn to advance the other characters. | ||
| 31767 | POP HL | |||
| 31768 | JP InglishApplyAMatch_GiveEveryOtherCharacterATurn | |||
| Inglish_SaveTheClauseWindow_ScoreTheSwappedClause | 31771 | POP IY | Restore the clause pointer from the stack and call Inglish_ScoreTheSwappedClause to score the swapped clause. | |
| 31773 | CALL Inglish_ScoreTheSwappedClause | |||
| 31776 | OR 1 | Clear the zero flag. | ||
| 31778 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 31608 | Up: Map | Next: 31779 |