![]() |
Routines |
| Prev: 16384 | Up: Map | Next: 23375 |
|
Load the screen, the room pictures and the game. The last block falls straight into the tape loading routine.
|
||||
|
Load the first block: the loading screen.
|
||||
| TapeLoader | 23296 | LD IX,16384 | Load 6912 bytes of the loading screen to 16384 with flag byte 215. | |
| 23300 | LD DE,6912 | |||
| 23303 | LD A,215 | |||
| 23305 | CALL TapeLoading | |||
|
Load the second block: the room pictures.
|
||||
| 23308 | LD IX,25000 | Load 18988 bytes of picture data to Image_TheField with flag byte 10. | ||
| 23312 | LD DE,18988 | |||
| 23315 | LD A,10 | |||
| 23317 | CALL TapeLoading | |||
|
Load the third block: the game. Execution falls into TapeLoading.
|
||||
| 23320 | LD IX,43988 | Load 21045 bytes of the game to GameEntryPoint with flag byte 43. | ||
| 23324 | LD DE,21045 | |||
| 23327 | LD A,43 | |||
|
Tape loading routine.
|
||||
| TapeLoading | 23329 | SCF | Set the carry flag to indicate "loading". | |
| 23330 | INC D | This resets the Z flag (D cannot hold +255.) | ||
| 23331 | EX AF,AF' | The A register holds +0 for a header and +255 for a block of data. The carry flag is reset for verifying and set for loading. | ||
| 23332 | DEC D | Put back D to its original value. | ||
| 23333 | DI | Disable interrupts while the tape loads, as the start of LD_BYTES would. | ||
| 23334 | LD A,15 | Set the border to WHITE. | ||
| 23336 | OUT (254),A | |||
| 23338 | CALL 1378 | Call LD_BYTES at 1378. | ||
| 23341 | PUSH AF | Remember whether the block loaded. | ||
| 23342 | LD A,(23624) | A=*BORDCR. | ||
| 23345 | AND %00111000 | Keep the border colour (bits 3-5 of *BORDCR). | ||
| 23347 | RRC A | Move the border colour into the low three bits. | ||
| 23349 | RRC A | |||
| 23351 | RRC A | |||
| 23353 | OUT (254),A | Set border to the colour held by A. | ||
| 23355 | LD A,127 | See whether SPACE is pressed. | ||
| 23357 | IN A,(254) | |||
| 23359 | RRA | |||
| 23360 | EI | Re-enable interrupts, as the ROM does when its own load ends. | ||
| 23361 | JP NC,0 | Jump to START if the carry flag is not set. | ||
| 23364 | POP AF | Restore the load result from the stack (the carry flag is set when the block loaded). | ||
| 23365 | RET C | Return if the carry flag is set. | ||
| 23366 | LD HL,(23635) | Write *PROG to *VARS. | ||
| 23369 | LD (23627),HL | |||
| 23372 | LD (HL),128 | Write 128 to *PROG. | ||
| 23374 | RST 8 | Call ERROR_1. | ||
|
View the equivalent code in;
|
||||
| Prev: 16384 | Up: Map | Next: 23375 |