Sherlock: annotated disassembly

Routines

Prev: C86E Up: Map Next: C8A7
C898: Follow IY's containment chain
Swaps IX and IY (C89E), follows the chain (C86E), and swaps back.
Input
IY A thing's record
Output
A The highest holder reached
IX, IY Kept
C898 CALL $C89E Call C89E (inside "Follow IY's containment chain") - Swap IX and IY (C89E), climb the chain (C86E), swap them back
C89B CALL $C86E Call the routine "Follow an object's containment chain to its root" (C86E)
C89E PUSH IX Save IX on the stack
C8A0 PUSH IY Save IY on the stack
C8A2 POP IX Restore IX from the stack
C8A4 POP IY Restore IY from the stack
C8A6 RET Return to the caller
Prev: C86E Up: Map Next: C8A7