| The Hobbit (v1.0) | Routines |
| Prev: A550 | Up: Map | Next: A591 |
|
The trap door can only be opened or closed from room 32; elsewhere 'you cannot reach the trap door'.
|
||||
| A577 | LD IX,($B5FC) | IX = the actor's own record | ||
| A57B | LD A,(IX+$10) | Is the actor in room 32 (the only place the trap door can be worked from)? | ||
| A57E | CP $20 | |||
| A580 | LD HL,$B00D | "you cannot reach the trap door." | ||
| A583 | JP NZ,$72D4 | No: say so and stop | ||
| A586 | LD A,($B5D8) | Yes - is this actually CLOSE (action 12)? | ||
| A589 | CP $0C | |||
| A58B | JP Z,$90A2 | Yes: close it as usual | ||
| A58E | JP $9078 | Otherwise (OPEN): open it as usual | ||
| Prev: A550 | Up: Map | Next: A591 |