Prev: A0BA Up: Map Next: A124
A0C8: Exits: To The North There Is
Used by the routine at YouSeeStart.
Walks the location's exit triples. For each exit guarded by a visible object it prints "to the <direction> there is". Direction 09 is printed as ABOVE and direction 0A as BELOW.
Point at this location's exits.
MessageListTheObjects A0C8 PUSH BC Point at this location's exits.
A0C9 PUSH DE
A0CA PUSH IY
A0CC PUSH IX
A0CE CALL ExitsPointAtTheList
A0D1 ADD IX,BC Step IX on by BC to the next exit and point IY at it.
A0D3 PUSH IX
A0D5 POP IY
MessageListTheObjects_Loop A0D7 SUB A Jump to MessageListTheObjects_StepToTheNextExit if this exit goes via no object.
A0D8 CP (IY+$01)
A0DB JR Z,MessageListTheObjects_StepToTheNextExit
A0DD LD A,(IY+$01) Read the object this exit goes via.
A0E0 CALL LocateObject Call LocateObject to locate object.
A0E3 BIT 7,(IX+$07) Jump to MessageListTheObjects_StepToTheNextExit if the object is not visible.
A0E7 JR Z,MessageListTheObjects_StepToTheNextExit
A0E9 LD DE,$0008 Step the pointer on by 08 bytes.
A0EC ADD IX,DE
A0EE PUSH IX Save the name pointer and read this exit's direction.
A0F0 LD A,(IY+$00)
A0F3 CALL ExitsTheDirectionWord Call ExitsTheDirectionWord to describe the direction word.
A0F6 CP $09 Jump to MessageListTheObjects_PrintTheLeadIn if the direction is below 09.
A0F8 JR C,MessageListTheObjects_PrintTheLeadIn
A0FA LD DE,$07B5 Use the token ABOVE when the direction is 09.
A0FD JR Z,MessageListTheObjects_PrintADictionaryToken
A0FF LD DE,$082B Use the token BELOW.
A102 JR MessageListTheObjects_PrintADictionaryToken Jump to MessageListTheObjects_PrintADictionaryToken to print a dictionary token.
MessageListTheObjects_PrintTheLeadIn A104 LD HL,$AE17 Point at the message "to the[0x16]" (AE17).
A107 CALL PrintMessage Call PrintMessage to print message.
MessageListTheObjects_PrintADictionaryToken A10A CALL PrintToken Call PrintToken to print a dictionary token.
A10D LD HL,$B013 Point at the message "there is[0x00][0x14]" (B013).
A110 CALL PrintMessage Call PrintMessage to print message.
MessageListTheObjects_StepToTheNextExit A113 ADD IY,BC Step to the next exit and jump back to MessageListTheObjects_Loop unless the direction is FF.
A115 LD A,$FF
A117 CP (IY+$00)
A11A JP NZ,MessageListTheObjects_Loop
A11D POP IX Restore IX, IY, DE and BC from the stack.
A11F POP IY
A121 POP DE
A122 POP BC
A123 RET Return.
View the equivalent code in;
Prev: A0BA Up: Map Next: A124