| The Hobbit (v1.0) | Routines |
| Prev: 6BEE | Up: Map | Next: 6C27 |
|
The BASIC loader 'hobbit' loads the loading screen to 40000, copies it onto the display, loads this 37,888-byte block at 24576 (6000) and then does RANDOMIZE USR 27648, which arrives here.
The first job is to make pristine copies of everything that changes during play, so the game can be restarted after Bilbo dies without reloading the tape: the object table (C00B, $614 bytes) and the room table (B97A, $5D9 bytes) are copied up to $F400 onwards, the 28 bytes of game variables at B5DC are copied to $5F00, and the timer and character tables at C973 ($BF bytes) follow the room copy.
Execution then falls through into 6C27, which is also the restart point.
|
||||
| 6C00 | DI | Disable interrupts | ||
| 6C01 | LD DE,$F400 | Back up the object table... | ||
| 6C04 | LD HL,$C00B | HL = the object table (Bilbo's record) | ||
| 6C07 | LD BC,$0614 | BC = $0614 | ||
| 6C0A | LDIR | Copy BC bytes from HL to DE | ||
| 6C0C | LD HL,$B97A | ...and the room table... | ||
| 6C0F | LD BC,$05D9 | BC = $05D9 | ||
| 6C12 | LDIR | Copy BC bytes from HL to DE | ||
| 6C14 | LD DE,$5F00 | ...the game variables at B5DC... | ||
| 6C17 | LD HL,$B5DC | HL = the address of the saved variables | ||
| 6C1A | LD BC,$001C | BC = 28 | ||
| 6C1D | LDIR | Copy BC bytes from HL to DE | ||
| 6C1F | LD HL,$C973 | ...and the timer/character tables | ||
| 6C22 | LD BC,$00BF | BC = 191 | ||
| 6C25 | LDIR | Copy BC bytes from HL to DE | ||
| Prev: 6BEE | Up: Map | Next: 6C27 |