Prev: A124 Up: Map Next: A164
A138: Display Exits
Used by the routine at YouSeeStart.
Prints the exits out of the current place.
Save the registers used while the exits are listed.
DisplayExits A138 PUSH IX Save IX, IY, DE and BC, then call ExitsPointAtTheList to list the exits.
A13A PUSH IY
A13C PUSH DE
A13D PUSH BC
A13E CALL ExitsPointAtTheList
A141 CALL MessageAConjunction Call MessageAConjunction to print a conjunction.
A144 JR Z,DisplayExits_RestoreAndReturn Jump to DisplayExits_RestoreAndReturn if there are no exits.
A146 LD HL,$B020 Point at the message "visible exits are:[0x16]" (B020).
A149 CALL PrintMessage Call PrintMessage to print message.
DisplayExits_Loop A14C LD A,(IX+$00) Read this exit's direction.
A14F CALL ExitsTheDirectionWord Call ExitsTheDirectionWord to describe the direction word.
A152 CALL PrintToken Call PrintToken to print a dictionary token.
A155 CALL MessageAConjunction Call MessageAConjunction to print a conjunction.
A158 JR NZ,DisplayExits_Loop Jump back to DisplayExits_Loop while MessageAConjunction reports another name follows.
A15A CALL Print_LineBreak Call Print_LineBreak to print a newline.
Restore the registers saved for the exit list.
DisplayExits_RestoreAndReturn A15D POP BC Restore BC, DE, IY and IX from the stack.
A15E POP DE
A15F POP IY
A161 POP IX
A163 RET Return.
View the equivalent code in;
Prev: A124 Up: Map Next: A164