Prev: 54779 Up: Map Next: 54897
54795: Print Location Exits
Used by the routine at ProcessLocationTokenDisplay.
Input
A Room ID
PrintLocationExits 54795 PUSH BC Stash BC, DE, IY and IX on the stack.
54796 PUSH DE
54797 PUSH IY
54799 PUSH IX
54801 CALL GetLocationExitData Call GetLocationExitData.
54804 PUSH IX IY=IX (using the stack).
54806 POP IY
54808 JR PrintLocationExits_3 Jump to PrintLocationExits_3.
PrintLocationExits_0 54810 LD A,(IY+1) Jump to PrintLocationExits_3 if *IY+1 is zero.
54813 AND A
54814 JR Z,PrintLocationExits_3
54816 LD A,(IY+0) Jump to PrintLocationExits_3 if *IY+0 is greater than or equal to 11.
54819 CP 11
54821 JR NC,PrintLocationExits_3
54823 LD A,(IY+1) A=*IY+1.
54826 CALL FetchObjectDataPointer Call FetchObjectDataPointer.
54829 BIT 7,(IX+5) Jump to PrintLocationExits_3 if bit 7 of *IX+5 is not set.
54833 JR Z,PrintLocationExits_3
54835 LD A,(IY+0) A=*IY+0.
54838 CALL GetDirectionToken Call GetDirectionToken.
54841 CP 9 Jump to PrintLocationExits_1 if A is less than 9.
54843 JR C,PrintLocationExits_1
54845 LD DE,10 DE="ABOVE".
54848 JR Z,PrintLocationExits_2 Jump to PrintLocationExits_2 if A is equal to 9.
54850 LD DE,231 DE="BELOW".
54853 JR PrintLocationExits_2 Jump to PrintLocationExits_2.
PrintLocationExits_1 54855 LD HL,26812 HL=26812.
54858 CALL PrintTextAndHandleControlCharacters Call PrintTextAndHandleControlCharacters.
PrintLocationExits_2 54861 CALL PrintTextToken Call PrintTextToken.
54864 LD HL,26857 HL=26857.
54867 CALL PrintTextAndHandleControlCharacters Call PrintTextAndHandleControlCharacters.
54870 PUSH IY Stash IY on the stack.
54872 CALL ProcessObjectEntryAlternate_3 Call ProcessObjectEntryAlternate_3.
54875 CALL ProcessObject_Display_5 Call ProcessObject_Display_5.
54878 POP IY Restore IY from the stack.
PrintLocationExits_3 54880 ADD IY,BC IY+=BC.
54882 LD A,255 Jump to PrintLocationExits_0 if *IY+0 is not equal to 255.
54884 CP (IY+0)
54887 JP NZ,PrintLocationExits_0
54890 POP IX Restore IX, IY, DE and BC from the stack.
54892 POP IY
54894 POP DE
54895 POP BC
54896 RET Return.
Prev: 54779 Up: Map Next: 54897