Sherlock: annotated disassembly

Routines

Prev: E5C1 Up: Map Next: E5FD
E5D8: Verb 129 (scripts only): are two things in the same room?
Refuses if the direct and indirect objects are in different rooms, or are the same thing. 482 tests, equal exactly when the rooms were.
Used by: internal verb 129 (IS WITH: are the direct and indirect objects in the same room?).
Input
$A034, $A035 Two things
Output
F NZ if they are in the same room and are different; otherwise $DC15
E5D8 DEFB $47,$07,$DF,$E5 Action record header: flags $47; bit 6: pre-check at E5DF; byte 1 $07
E5DC OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller
E5DE RET Return to the caller
E5DF LD IX,($A013) Read $A013 in "Game variables" into IX - The direct object's room...
E5E3 LD A,(IX+$0F) Read byte +15 of the record at IX into A
E5E6 LD IX,($A015) ...and the indirect object's
E5EA CP (IX+$0F) Compare A with byte +15 of the record at IX - The same?
E5ED LD A,($A035) Read $A035 in "Game variables" into A
This entry point is used by the routines at E5C1 and E5FD.
E5F0 JP NZ,$DC15 No: refuse
E5F3 LD HL,$A034 Nor may it be the actor itself
E5F6 CP (HL) Compare A with the byte at $A034 in "Game variables"
E5F7 JP Z,$DC15 It is: refuse
E5FA OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller - Succeed
E5FC RET Return to the caller
Prev: E5C1 Up: Map Next: E5FD