![]() |
Routines |
| Prev: 40597 | Up: Map | Next: 40647 |
|
Used by the routine at Inglish_CopyTheParserSlot.
Walks the current location's exits, finds each destination and matches its name against the clause.
|
||||
| ExitsFindTheExitToANamedPlace | 40608 | PUSH IY | Set DE to 0002, the offset of a location's name. | |
| 40610 | PUSH DE | |||
| 40611 | LD DE,2 | |||
| ExitsFindTheExitToANamedPlace_Loop | 40614 | CALL Table_StepThroughThreeByteRecords | Call Table_StepThroughThreeByteRecords to step to the next exit. | |
| 40617 | JR Z,ExitsFindTheExitToANamedPlace_RestoreAndReturn | Jump to ExitsFindTheExitToANamedPlace_RestoreAndReturn at the end of the exit list. | ||
| 40619 | LD A,(IX+2) | Read this exit's destination. | ||
| 40622 | PUSH IX | Call LocateLocation to find this location's record. | ||
|
Find the location's record.
|
||||
| 40624 | CALL LocateLocation | |||
| 40627 | PUSH IX | Point IY at this location's name. | ||
| 40629 | POP IY | |||
| 40631 | POP IX | |||
| 40633 | ADD IY,DE | |||
| 40635 | CALL Inglish_MatchClausePairs | Call Inglish_MatchClausePairs to match clause pairs. | ||
| 40638 | JR NZ,ExitsFindTheExitToANamedPlace_Loop | Jump back to ExitsFindTheExitToANamedPlace_Loop to try the next exit unless the name matched. | ||
| 40640 | LD A,(IX+2) | Read the destination's location id to return it. | ||
| ExitsFindTheExitToANamedPlace_RestoreAndReturn | 40643 | POP DE | Restore DE and IY from the stack. | |
| 40644 | POP IY | |||
| 40646 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 40597 | Up: Map | Next: 40647 |