![]() |
Routines |
| Prev: 23296 | Up: Map | Next: 23375 |
|
Used by the routine at TapeLoader.
Pull one tape block into the address and length set up by the caller.
|
||||
|
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. | ||
| Prev: 23296 | Up: Map | Next: 23375 |