Prev: 8C45 Up: Map Next: 8C86
8C75: TAKE OUT OF
The containers' handler for TAKE X OUT OF Y (the goblins' cache, the cupboard, the chest and the boat). The target must actually be inside the container (9BD3 checks the holder chain), or 'the X is not in the Y.' Then it is taken like anything else (the rest of 8CC8, reached at 8CD1).
8C75 LD A,($B5D9) A = the target of the current command
8C78 LD HL,$B5DA HL = the address holding the instrument (the container we are meant to take it out of)
8C7B CALL $9BD3 Is the target actually inside that container? (reuses the tail of 9BCD, comparing against whatever holder number sits at HL)
8C7E LD HL,$AEA8 "the X is not in the Y."
8C81 JP NZ,$72D4 If it is not inside, say so and stop
8C84 JR $8CD1 Otherwise take it just like an ordinary TAKE (joins the rest of 8CC8)
Prev: 8C45 Up: Map Next: 8C86