Sherlock: annotated disassembly

Routines

Prev: D671 Up: Map Next: D6B8
D68C: List the plain exits: 'VISIBLE EXITS ARE ...'
68F1, then the direction names (D5FB).
Input
A A room number
Output
"VISIBLE EXITS ARE" and the plain exits listed; registers kept
D68C PUSH IX Save IX on the stack - Save the registers
D68E PUSH IY Save IY on the stack
D690 PUSH DE Save DE on the stack
D691 PUSH BC Save BC on the stack
D692 CALL $D5EF IX = room A's exits (D5EF)
D695 CALL $D671 Call the routine "Step IX to the room's next plain exit (Z at the end)" (D671) - Find the first plain exit (D671); none: finish
D698 JR Z,$D6B1 If the zero flag is set, skip ahead to D6B1
D69A LD HL,$68F1 Point HL at the message "VISIBLE EXITS ARE" (68F1)
D69D CALL $A59F Call the routine "Print the message at HL" (A59F)
D6A0 LD A,(IX+$00) Read the first byte of the record at IX into A
D6A3 CALL $D5FB Call the routine "DE = the word for direction A (NORTH ... DOWN)" (D5FB)
D6A6 CALL $A887 Call A887 (inside "Print the dictionary word that HL refers to")
D6A9 CALL $D671 Call the routine "Step IX to the room's next plain exit (Z at the end)" (D671)
D6AC JR NZ,$D6A0 If the zero flag is clear, go back to D6A0
D6AE CALL $A414 Call A414 (inside "Print the rest of a narrated command: verb...")
D6B1 POP BC Restore BC from the stack
D6B2 POP DE Restore DE from the stack
D6B3 POP IY Restore IY from the stack
D6B5 POP IX Restore IX from the stack
D6B7 RET Return to the caller
Prev: D671 Up: Map Next: D6B8