Prev: A950 Up: Map Next: A985
A968: Timer 9 expires: the side door vanishes
The expiry routine of timer 9 (C9B2). If the side door of the Lonely Mountain (object 11, flags at $C1AB) has been opened, nothing happens and the timer stops: the door stays. Otherwise the timer is restarted at its reload value (5), the door is made invisible, and if Bilbo is at the side door (room 42) he reads 'the hole vanishes.'
A968 LD HL,$C1AB HL = the side door's flags
A96B BIT 5,(HL) Has it been opened?
A96D RET NZ Yes: it stays open and visible; the timer stops
A96E LD A,($C9B2) No: restart the timer (count = 5)
A971 LD ($C9B3),A
A974 LD HL,$C1AB
A977 RES 7,(HL) Make the door invisible
A979 LD A,($C01B) Is Bilbo at the side door (room 42)?
A97C CP $2A
A97E RET NZ No: done
This entry point is used by the routine at A996.
A97F LD HL,$B196 "the hole vanishes."
A982 JP $72D4
Prev: A950 Up: Map Next: A985