![]() |
Routines |
| Prev: 9E95 | Up: Map | Next: 9EC7 |
|
Used by the routine at Inglish_CopyTheParserSlot.
Walks the current location's exits, finds each destination and matches its name against the clause.
|
||||
| ExitsFindTheExitToANamedPlace | 9EA0 | PUSH IY | Set DE to 0002, the offset of a location's name. | |
| 9EA2 | PUSH DE | |||
| 9EA3 | LD DE,$0002 | |||
| ExitsFindTheExitToANamedPlace_Loop | 9EA6 | CALL Table_StepThroughThreeByteRecords | Call Table_StepThroughThreeByteRecords to step to the next exit. | |
| 9EA9 | JR Z,ExitsFindTheExitToANamedPlace_RestoreAndReturn | Jump to ExitsFindTheExitToANamedPlace_RestoreAndReturn at the end of the exit list. | ||
| 9EAB | LD A,(IX+$02) | Read this exit's destination. | ||
| 9EAE | PUSH IX | Call LocateLocation to find this location's record. | ||
|
Find the location's record.
|
||||
| 9EB0 | CALL LocateLocation | |||
| 9EB3 | PUSH IX | Point IY at this location's name. | ||
| 9EB5 | POP IY | |||
| 9EB7 | POP IX | |||
| 9EB9 | ADD IY,DE | |||
| 9EBB | CALL Inglish_MatchClausePairs | Call Inglish_MatchClausePairs to match clause pairs. | ||
| 9EBE | JR NZ,ExitsFindTheExitToANamedPlace_Loop | Jump back to ExitsFindTheExitToANamedPlace_Loop to try the next exit unless the name matched. | ||
| 9EC0 | LD A,(IX+$02) | Read the destination's location id to return it. | ||
| ExitsFindTheExitToANamedPlace_RestoreAndReturn | 9EC3 | POP DE | Restore DE and IY from the stack. | |
| 9EC4 | POP IY | |||
| 9EC6 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 9E95 | Up: Map | Next: 9EC7 |