Sherlock: annotated disassembly

Routines

Prev: C8A7 Up: Map Next: C8BE
C8AF: Is object A held, at any depth, by a person?
Climbs the containment chain (+1) until it reaches nothing ($FF, Z) or a container that is a person (NZ).
Input
A A thing number
Output
F NZ if some person holds it at any depth; Z if not
C8AF CALL $D237 IX = the thing's record (D237)
C8B2 LD A,(IX+$01) Read byte +1 of the record at IX into A - Its holder (+1): $FF - held by nothing - return Z
C8B5 CP $FF Compare A with $FF
C8B7 RET Z If A equals $FF, return
C8B8 CALL $C8BE Call the routine "Is object A a person? (NZ if so)" (C8BE) - Is the holder a person (+5 bit 6)? NZ: yes, return
C8BB RET NZ If the zero flag is clear, return
C8BC JR $C8B2 Otherwise climb to the holder and ask again
Prev: C8A7 Up: Map Next: C8BE