![]() |
Routines |
| Prev: D607 | Up: Map | Next: D671 |
|
Used by the routine at DescribeCurrentRoom.
Reads this room's exits and prints them.
|
||||||||
| PrintLocationExits | D60B | PUSH BC | Call GetLocationExitData to get location exit data. | |||||
| D60C | PUSH DE | |||||||
| D60D | PUSH IY | |||||||
| D60F | PUSH IX | |||||||
| D611 | CALL GetLocationExitData | |||||||
| D614 | PUSH IX | Jump ahead to PrintLocationExits_DoesMatchCharacter to step to the next schedule entry and take the end marker. | ||||||
| D616 | POP IY | |||||||
| D618 | JR PrintLocationExits_DoesMatchCharacter | |||||||
|
Skip this exit when its door object is zero.
|
||||||||
| PrintLocationExits_Loop | D61A | LD A,(IY+$01) | Jump to PrintLocationExits_DoesMatchCharacter if the door object is zero. | |||||
| D61D | AND A | |||||||
| D61E | JR Z,PrintLocationExits_DoesMatchCharacter | |||||||
| D620 | LD A,(IY+$00) | Jump to PrintLocationExits_DoesMatchCharacter if the direction is 0B or more. | ||||||
| D623 | CP $0B | |||||||
| D625 | JR NC,PrintLocationExits_DoesMatchCharacter | |||||||
| D627 | LD A,(IY+$01) | Look up the door object. | ||||||
| D62A | CALL FetchObjectDataPointer | |||||||
| D62D | BIT 7,(IX+$05) | Jump ahead to PrintLocationExits_DoesMatchCharacter if the object-attribute flag is clear. | ||||||
| D631 | JR Z,PrintLocationExits_DoesMatchCharacter | |||||||
| D633 | LD A,(IY+$00) | Call GetDirectionToken to get direction token. | ||||||
| D636 | CALL GetDirectionToken | |||||||
| D639 | CP $09 | Jump ahead to PrintLocationExits_Next if the direction is below a tab. | ||||||
| D63B | JR C,PrintLocationExits_Next | |||||||
| D63D | LD DE,$000A | Take a step of 000A and jump ahead to PrintLocationExits_PrintTextToken if the direction token is 09. | ||||||
| D640 | JR Z,PrintLocationExits_PrintTextToken | |||||||
| D642 | LD DE,$00E7 | Use a step of 00E7 and join PrintLocationExits_PrintTextToken. | ||||||
| D645 | JR PrintLocationExits_PrintTextToken | |||||||
| PrintLocationExits_Next | D647 | LD HL,$68BC | Take the message, then call PrintTextAndHandleControlCharacters to print the message. | |||||
| D64A | CALL PrintTextAndHandleControlCharacters | |||||||
|
Print text token.
|
||||||||
| PrintLocationExits_PrintTextToken | D64D | CALL PrintTextToken | Call PrintTextToken to print the dictionary word. | |||||
| D650 | LD HL,$68E9 | Take the exits message, then call PrintTextAndHandleControlCharacters to print the exits message. | ||||||
| D653 | CALL PrintTextAndHandleControlCharacters | |||||||
| D656 | PUSH IY | Keep the schedule entry, then call TakeTheFoundObject to run object entry alternate. | ||||||
| D658 | CALL TakeTheFoundObject | |||||||
| D65B | CALL PrintFullStop | Call PrintFullStop to print a full stop. | ||||||
| D65E | POP IY | Restore the schedule entry from the stack. | ||||||
| PrintLocationExits_DoesMatchCharacter | D660 | ADD IY,BC | Jump back to PrintLocationExits_Loop unless the next entry is the end marker (FF). | |||||
| D662 | LD A,$FF | |||||||
| D664 | CP (IY+$00) | |||||||
| D667 | JP NZ,PrintLocationExits_Loop | |||||||
| D66A | POP IX | Restore the saved character record, the saved schedule entry, the saved source and the saved count from the stack. | ||||||
| D66C | POP IY | |||||||
| D66E | POP DE | |||||||
| D66F | POP BC | |||||||
| D670 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: D607 | Up: Map | Next: D671 |