Sherlock: annotated disassembly

Routines

Prev: E40A Up: Map Next: E452
E432: Shared GET-OUT implementation ($AA71 entry #8)
Addresses named in the title: AA71.
`LD IY,($A013); LD A,(IY+1); LD IY,($A017); LD (IY+1),A` - reads the *target* furniture's own field +1 (whatever contains the furniture - the room it's in) and copies that into the current actor's field +1. Getting out of a chair is 'you are now contained by whatever contains the chair' - the natural inverse of SIT (E40A above), built from the same containment field.
Input
$A013 The thing the actor is in
Output
F NZ; the actor is held by what held the thing
E432 DEFB $78,$20,$20,$E4,$10,$80,$28,$00 Action record header: flags $78; bit 5: test D078 first; bit 6: pre-check at E420; bit 4: five extra bytes; byte 1 $20
E43A DEFB $00
E43B LD IY,($A013) Read $A013 in "Game variables" into IY - The thing the direct object is in (its +1)...
E43F LD A,(IY+$01) Read byte +1 of the record at IY into A
E442 LD IY,($A017) Read $A017 in "Game variables" into IY - ...becomes the holder of the record at $A017 (the
E446 LD (IY+$01),A Store A in byte +1 of the record at IY
E449 OR $01 Make A non-zero, which clears the zero flag, and hand that back to the caller - Succeed
E44B RET Return to the caller
E44C CALL $CBA7 Call the routine "Refuse if the character is busy: 'SORRY, I CANNOT DO..." (CBA7)
E44F JP $E28D Go back to the routine "Refuse if the actor is the direct object" (E28D)
Prev: E40A Up: Map Next: E452