Sherlock: annotated disassembly

Routines

Prev: E0A0 Up: Map Next: E0E0
E0AD: Action record: Lestrade finds the large rock in the stream (RUN at $E0A2)
Addresses named in the title: E0A2.
The extra step of EXAMINE CLOSELY DEEP STREAM. If the player is in room 88 (the east side of the stream) on Tuesday, the large rock (indirect object, thing 93) is made visible (+5 and +6 bit 7), put in the player's room and held by Inspector Lestrade (the direct object): 'As you search the river Lestrade comes over to help. He stumbles and slid...' (7B5A).
Input
$A034 The direct object
$A015 The indirect object's record
Output
F NZ; the rock revealed in room 88 on Tuesday
E0AD DEFB $4D,$07,$1C,$E0 Action record header: flags $4D; bit 6: pre-check at E01C; byte 1 $07
E0B1 LD A,($A00A) Read the current actor's room (A00A) into A - Player in room 88 (east side)?
E0B4 CP $58 Compare A with $58
E0B6 JR NZ,$E0DD No: nothing happens (E0DD)
E0B8 LD A,($9FE1) Read the day (9FE1) into A - Day 1 (Tuesday)?
E0BB CP $01 Compare A with $01
E0BD JR NZ,$E0DD If A differs from $01, skip ahead to E0DD
E0BF LD IX,($A015) IX = the indirect object's record ($A015)
E0C3 SET 7,(IX+$06) Set bit 7 of byte +6 of the record at IX - Mark it as seen and visible (+6 and +5 bit 7)
E0C7 SET 7,(IX+$05) Set bit 7 of byte +5 of the record at IX
E0CB LD A,($A00A) Read the current actor's room (A00A) into A - Move it into the player's room (+15)
E0CE LD (IX+$0F),A Store A in byte +15 of the record at IX
E0D1 LD A,($A034) Read $A034 in "Game variables" into A - And make the direct object its holder (+1)
E0D4 LD (IX+$01),A Store A in byte +1 of the record at IX
E0D7 LD HL,$7B5A Point HL at the message "AS YOU SEARCH THE RIVER LESTRADE COMES OVER TO... (7B5A) - Print the message 7B5A
E0DA CALL $A59F Call the routine "Print the message at HL" (A59F)
E0DD OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller - Return NZ
E0DF RET Return to the caller
Prev: E0A0 Up: Map Next: E0E0