Sherlock: annotated disassembly

Routines

Prev: E3F5 Up: Map Next: E432
E40A: Shared SIT implementation ($AA71 entry #9)
Addresses named in the title: AA71.
`LD IY,($A017); LD A,($A034); LD (IY+1),A` - sets the current actor's own record field +1 to the target furniture's id. Sitting in something is implemented as 'you are now contained by it' - the same mechanism used for an item being inside a box, reused here for a person sitting in a chair.
Record header: flags $78, pre-check routine E3F5 (the shared guard CBA7, then DCA7, then the 'will it fit' tail at DEE4), body at E413.
It isn't part of this entry: E420 is entry #8 (GET OUT)'s pre-check routine, which entry #8's own header points at.
Input
$A034 The thing
Output
F NZ; the thing is now the actor's holder
E40A DEFB $78,$20,$F5,$E3,$90,$40,$28,$00 Action record header: flags $78; bit 5: test D078 first; bit 6: pre-check at E3F5; bit 4: five extra bytes; byte 1 $20
E412 DEFB $00
This entry point is used by the routine at E3EA.
E413 LD IY,($A017) IY = the record at $A017
E417 LD A,($A034) The direct object ($A034)...
E41A LD (IY+$01),A ...becomes its holder (+1): sitting is being contained by the furniture
E41D OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller - Succeed
E41F RET Return to the caller
E420 CALL $CBA7 (GET OUT's pre-check, header at E432) Is the actor busy? (CBA7)
E423 LD A,($A036) Read $A036 in "Game variables" into A - Is the actor inside the thing ($A034), at any depth? (D278)
E426 LD HL,$A034 Point HL at $A034 in "Game variables"
E429 CALL $D278 Call D278 (inside "Is thing A carried by the actor, perhaps...")
E42C JP NC,$DC15 No: refuse (DC15)
E42F OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller - Yes: pass
E431 RET Return to the caller
Prev: E3F5 Up: Map Next: E432