![]() |
Routines |
| Prev: 793D | Up: Map | Next: 79A9 |
|
Used by the routine at TurnReadAndTokeniseTheCommand.
Starts matching the current clause. Clears the phrase scratch byte and uses the parser workspace at B9C8. A different replay path skips ahead to InglishApplyAMatch_UpdateTheReplayPath.
|
||||
| InglishApplyAMatch | 7960 | XOR A | Clear *B71C. | |
| 7961 | LD ($B71C),A | |||
| 7964 | LD IY,$B9C8 | Jump to InglishApplyAMatch_UpdateTheReplayPath if the matcher path flag is not zero. | ||
| 7968 | LD HL,$B71A | |||
| 796B | CP (HL) | |||
| 796C | LD (HL),A | |||
| 796D | JP NZ,InglishApplyAMatch_UpdateTheReplayPath | |||
| InglishApplyAMatch_ScoreTheCurrentAction | 7970 | CALL Inglish_ScoreTheCurrentAction | Call Inglish_ScoreTheCurrentAction to score the current action. | |
| 7973 | JR NZ,InglishApplyAMatch_RunTheAction | Jump to InglishApplyAMatch_RunTheAction if Inglish_ScoreTheCurrentAction returned with the zero flag clear (an action was scored). | ||
| 7975 | XOR A | Clear *B705. | ||
| 7976 | LD ($B705),A | |||
| 7979 | RET | Return. | ||
| InglishApplyAMatch_RunTheAction | 797A | CALL Inglish_AskWhetherToSuppress | Call Inglish_AskWhetherToSuppress to run the action and see whether its message was held back. | |
| 797D | JP Z,Inglish_CopyTheParserSlot_DispatchTheAction | Jump to Inglish_CopyTheParserSlot_DispatchTheAction if Inglish_AskWhetherToSuppress did not hold the message back. | ||
| 7980 | LD A,$01 | Write 01 (the gate shut) to *B6FA. | ||
| 7982 | LD ($B6FA),A | |||
| 7985 | CALL Inglish_DescribeTheAction | Call Inglish_DescribeTheAction to describe the action. | ||
| 7988 | CALL Turn_RunTheHandlerIfPresent | Call Turn_RunTheHandlerIfPresent to run the handler when one is present. | ||
|
This entry point is used by the routine at Inglish_SaveTheClauseWindow.
|
||||
| InglishApplyAMatch_GiveEveryOtherCharacterATurn | 798B | CALL TurnAdvanceTheOtherCharacters | Call TurnAdvanceTheOtherCharacters to give every other character a turn. | |
|
This entry point is used by the routine at Inglish_CopyTheParserSlot.
Test the phrase scratch byte.
|
||||
| InglishApplyAMatch_TestThePhraseScratchByte | 798E | LD A,($B71C) | Jump to InglishApplyAMatch_ScoreTheCurrentAction if *B71C is not zero. | |
| 7991 | AND A | |||
| 7992 | JR NZ,InglishApplyAMatch_ScoreTheCurrentAction | |||
|
This entry point is used by the routine at Inglish_CopyTheParserSlot.
|
||||
| InglishApplyAMatch_UpdateTheReplayPath | 7994 | LD A,($B706) | Read *B706. | |
| 7997 | DEC A | Step the replay path down by one. | ||
| 7998 | LD ($B706),A | Update *B706. | ||
| 799B | RET Z | Return if the replay path reached zero. | ||
| 799C | LD BC,$FFE8 | Step back one clause record. Each record is 18 bytes. | ||
| InglishApplyAMatch_SkipMarkedClause | 799F | ADD IY,BC | Jump back to InglishApplyAMatch_SkipMarkedClause if bit 6 of the clause byte at offset 1 is set. | |
| 79A1 | BIT 6,(IY+$01) | |||
| 79A5 | JR NZ,InglishApplyAMatch_SkipMarkedClause | |||
| 79A7 | JR InglishApplyAMatch_ScoreTheCurrentAction | Jump back to InglishApplyAMatch_ScoreTheCurrentAction to run the grammar. | ||
| Prev: 793D | Up: Map | Next: 79A9 |