Prev: 41146 Up: Map Next: 41252
41160: 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 9 is printed as ABOVE and direction 10 as BELOW.
Point at this location's exits.
MessageListTheObjects 41160 PUSH BC Point at this location's exits.
41161 PUSH DE
41162 PUSH IY
41164 PUSH IX
41166 CALL ExitsPointAtTheList
41169 ADD IX,BC Step IX on by BC to the next exit and point IY at it.
41171 PUSH IX
41173 POP IY
MessageListTheObjects_Loop 41175 SUB A Jump to MessageListTheObjects_StepToTheNextExit if this exit goes via no object.
41176 CP (IY+1)
41179 JR Z,MessageListTheObjects_StepToTheNextExit
41181 LD A,(IY+1) Read the object this exit goes via.
41184 CALL LocateObject Call LocateObject to locate object.
41187 BIT 7,(IX+7) Jump to MessageListTheObjects_StepToTheNextExit if the object is not visible.
41191 JR Z,MessageListTheObjects_StepToTheNextExit
41193 LD DE,8 Step the pointer on by 8 bytes.
41196 ADD IX,DE
41198 PUSH IX Save the name pointer and read this exit's direction.
41200 LD A,(IY+0)
41203 CALL ExitsTheDirectionWord Call ExitsTheDirectionWord to describe the direction word.
41206 CP 9 Jump to MessageListTheObjects_PrintTheLeadIn if the direction is below 9.
41208 JR C,MessageListTheObjects_PrintTheLeadIn
41210 LD DE,1973 Use the token ABOVE when the direction is 9.
41213 JR Z,MessageListTheObjects_PrintADictionaryToken
41215 LD DE,2091 Use the token BELOW.
41218 JR MessageListTheObjects_PrintADictionaryToken Jump to MessageListTheObjects_PrintADictionaryToken to print a dictionary token.
MessageListTheObjects_PrintTheLeadIn 41220 LD HL,44567 Point at the message "to the[0x16]" (44567).
41223 CALL PrintMessage Call PrintMessage to print message.
MessageListTheObjects_PrintADictionaryToken 41226 CALL PrintToken Call PrintToken to print a dictionary token.
41229 LD HL,45075 Point at the message "there is[0x00][0x14]" (45075).
41232 CALL PrintMessage Call PrintMessage to print message.
MessageListTheObjects_StepToTheNextExit 41235 ADD IY,BC Step to the next exit and jump back to MessageListTheObjects_Loop unless the direction is 255.
41237 LD A,255
41239 CP (IY+0)
41242 JP NZ,MessageListTheObjects_Loop
41245 POP IX Restore IX, IY, DE and BC from the stack.
41247 POP IY
41249 POP DE
41250 POP BC
41251 RET Return.
View the equivalent code in;
Prev: 41146 Up: Map Next: 41252