| The Hobbit (v1.0) | Routines |
| Prev: A4DB | Up: Map | Next: A539 |
|
The expiry routine of timer 0, two turns after the barrel is thrown through the trap door into the forest river below the cellar (A4DB). If Bilbo is in the barrel he reads 'you are thrown onto the bank of the long lake.' Everything in the barrel is moved to room 34 on the long lake (9B38) and tipped out there (9CA8), silently. The barrel itself goes back to the cellar (room 32), closed and full, and the wine (object 20) is put back in it. This is the book's escape from the Elvenking's halls, and the game resets it so the barrel is ready again.
|
||||
| A4F4 | SUB A | Let other timers expire this turn too | ||
| A4F5 | LD ($B5E1),A | |||
| A4F8 | LD A,($C00C) | Is Bilbo in the barrel (object 19)? | ||
| A4FB | CP $13 | |||
| A4FD | LD HL,$B21E | "you are thrown onto the bank of the long lake." | ||
| A500 | CALL Z,$72D4 | If so, say so | ||
| A503 | LD A,$22 | Put the barrel in room 34, the long lake... | ||
| A505 | LD ($C2ED),A | |||
| A508 | LD B,A | |||
| A509 | LD A,$13 | ...and take everything in it along | ||
| A50B | CALL $9B38 | |||
| A50E | LD IX,$C2DD | IX = the barrel's record | ||
| A512 | LD (IX+$10),$20 | Put the barrel back in the cellar (room 32) | ||
| A516 | RES 5,(IX+$07) | Closed... | ||
| A51A | SET 2,(IX+$07) | ...and full | ||
| A51E | SUB A | Quietly... | ||
| A51F | LD ($B5F3),A | |||
| A522 | LD A,$13 | ...tip its contents out on the lake bank | ||
| A524 | CALL $9CA8 | |||
| A527 | LD A,$01 | Output back on | ||
| A529 | LD ($B5F3),A | |||
| A52C | LD IY,$C307 | IY = the wine's record | ||
| A530 | LD (IY+$10),$20 | The wine is in the cellar... | ||
| A534 | LD (IY+$01),$13 | ...inside the barrel | ||
| A538 | RET | |||
| Prev: A4DB | Up: Map | Next: A539 |