Prev: D5FB Up: Map Next: D671
D60B: Print Location Exits
Used by the routine at ProcessLocationTokenDisplay.
Input
A Room ID
PrintLocationExits D60B PUSH BC Stash BC, DE, IY and IX on the stack.
D60C PUSH DE
D60D PUSH IY
D60F PUSH IX
D611 CALL GetLocationExitData Call GetLocationExitData.
D614 PUSH IX IY=IX (using the stack).
D616 POP IY
D618 JR PrintLocationExits_3 Jump to PrintLocationExits_3.
PrintLocationExits_0 D61A LD A,(IY+$01) Jump to PrintLocationExits_3 if *IY+01 is zero.
D61D AND A
D61E JR Z,PrintLocationExits_3
D620 LD A,(IY+$00) Jump to PrintLocationExits_3 if *IY+00 is greater than or equal to 0B.
D623 CP $0B
D625 JR NC,PrintLocationExits_3
D627 LD A,(IY+$01) A=*IY+01.
D62A CALL FetchObjectDataPointer Call FetchObjectDataPointer.
D62D BIT 7,(IX+$05) Jump to PrintLocationExits_3 if bit 7 of *IX+05 is not set.
D631 JR Z,PrintLocationExits_3
D633 LD A,(IY+$00) A=*IY+00.
D636 CALL GetDirectionToken Call GetDirectionToken.
D639 CP $09 Jump to PrintLocationExits_1 if A is less than 09.
D63B JR C,PrintLocationExits_1
D63D LD DE,$000A DE="ABOVE".
D640 JR Z,PrintLocationExits_2 Jump to PrintLocationExits_2 if A is equal to 09.
D642 LD DE,$00E7 DE="BELOW".
D645 JR PrintLocationExits_2 Jump to PrintLocationExits_2.
PrintLocationExits_1 D647 LD HL,$68BC HL=68BC.
D64A CALL PrintTextAndHandleControlCharacters Call PrintTextAndHandleControlCharacters.
PrintLocationExits_2 D64D CALL PrintTextToken Call PrintTextToken.
D650 LD HL,$68E9 HL=68E9.
D653 CALL PrintTextAndHandleControlCharacters Call PrintTextAndHandleControlCharacters.
D656 PUSH IY Stash IY on the stack.
D658 CALL ProcessObjectEntryAlternate_3 Call ProcessObjectEntryAlternate_3.
D65B CALL ProcessObject_Display_5 Call ProcessObject_Display_5.
D65E POP IY Restore IY from the stack.
PrintLocationExits_3 D660 ADD IY,BC IY+=BC.
D662 LD A,$FF Jump to PrintLocationExits_0 if *IY+00 is not equal to FF.
D664 CP (IY+$00)
D667 JP NZ,PrintLocationExits_0
D66A POP IX Restore IX, IY, DE and BC from the stack.
D66C POP IY
D66E POP DE
D66F POP BC
D670 RET Return.
Prev: D5FB Up: Map Next: D671