Prev: A0BC Up: Map Next: A0F8
A0DE: Look up the holder of an object (unused)
Searches the object index for the holder of the object at IY and returns its number. Nothing in the game calls this routine.
A0DE PUSH IY Save IY and IX
A0E0 PUSH IX
A0E2 LD IX,$BF50 Search every object in the game...
A0E6 CALL $9B04
A0E9 JR Z,$A0F0 No more objects: give up (below)
A0EB CP (IY+$01) Is it held by the object whose holder we want?
A0EE JR NZ,$A0E6 No: try the next one
A0F0 LD A,(IX+$00) A = the object that holds it (or $FF if none was found)
A0F3 POP IX Restore IX and IY
A0F5 POP IY
A0F7 RET
Prev: A0BC Up: Map Next: A0F8