Sherlock: annotated disassembly

Routines

Prev: E3EA Up: Map Next: E40A
E3F5: Pre-check for sitting on or getting into something
Named in the header of the shared SIT action at E40A. Refuses if the actor is busy (CBA7) or already in or on the thing (DCA7: is the actor held by it, D278), then the size check: will the actor fit in or on it (DEE4)?
Input
$A034 The thing
Output
F NZ if the actor can sit on or get into it; Z if not
E3F5 CALL $CBA7 Is the actor busy? (CBA7)
E3F8 CALL $DCA7 Call DCA7 (inside "Action record: default for verb 16 (DROP)") - Already in or on the thing? (DCA7)
E3FB RET Z If the zero flag is set, return
E3FC LD IX,($A017) Read $A017 in "Game variables" into IX - IX = the indirect object's record ($A017), IY = the direct's ($A013)
E400 LD IY,($A013) Read $A013 in "Game variables" into IY
E404 LD A,($A034) Read $A034 in "Game variables" into A - Will it fit in or on it? (DEE4)
E407 JP $DEE4 Go back to DEE4
Prev: E3EA Up: Map Next: E40A