Prev: A614 Up: Map Next: A655
A631: Handler for Thorin: the small curious key shatters
Attached to Thorin's record. When Thorin is dead (bit 3 of his flags at $C2A8), the small curious key (record at $C091) is marked broken (A0BC) and, if Bilbo can see it, 'the small curious key shatters.'
A631 LD HL,$C2A8 HL = Thorin's own flags
A634 BIT 3,(HL) Is he dead?
A636 RET Z No: nothing happens
A637 CALL $975D Only if this is really happening
A63A LD IX,$C09D IX = the small curious key's own record
A63E SET 3,(IX+$07) Mark it broken
A642 LD A,$02 Remove its second adjective, leaving just BROKEN
A644 CALL $A0BC
A647 LD IY,$C00B Can Bilbo actually see the key (is it near enough)?
A64B CALL $9D77
A64E RET Z No: say nothing
A64F LD HL,$AFFB "the small curious key shatters."
A652 JP $72D4
Prev: A614 Up: Map Next: A655