![]() |
Routines |
| Prev: 5DA7 | Up: Map | Next: 5DD3 |
|
Success return from Load_Tape_Block. Restores the border from BORDCR, then either returns with the load flags intact or prints "ATTEMPTED BREAK!" and hangs. Load_Tape_Block_PrintError also enters the print loop at Restore_Border_PrintLoop for "TAPE LOADING ERROR".
|
||||||||||||||||||||
|
Preserve the load flags and restore the border colour.
|
||||||||||||||||||||
| Restore_Border | 5DAC | PUSH AF | Stash AF on the stack. | |||||||||||||||||
| 5DAD | LD A,($5C48) | Fetch *BORDCR into A. | ||||||||||||||||||
| 5DB0 | AND %00111000 | Keep only the PAPER bits that hold the border colour. | ||||||||||||||||||
| 5DB2 | RRCA | Move the border colour into bits 0-2. | ||||||||||||||||||
| 5DB3 | RRCA | |||||||||||||||||||
| 5DB4 | RRCA | |||||||||||||||||||
| 5DB5 | OUT ($FE),A | Set the border from A. | ||||||||||||||||||
|
Test whether SPACE is still held (BREAK during the load).
|
||||||||||||||||||||
| 5DB7 | LD A,$7F | Read from the keyboard;
|
||||||||||||||||||
| 5DB9 | IN A,($FE) | |||||||||||||||||||
| 5DBB | RRA | Rotate the SPACE bit into the carry flag. | ||||||||||||||||||
| 5DBC | EI | Enable interrupts. | ||||||||||||||||||
| 5DBD | JR C,Restore_Border_Return | Jump to Restore_Border_Return if SPACE is not pressed. | ||||||||||||||||||
|
Print "ATTEMPTED BREAK!" and hang.
|
||||||||||||||||||||
| 5DBF | LD A,$01 | Open stream 01 via CHAN_OPEN. | ||||||||||||||||||
| 5DC1 | CALL $1601 | |||||||||||||||||||
| 5DC4 | LD B,$17 | Point DE at Messaging_AttemptedBreak with length 17. | ||||||||||||||||||
| 5DC6 | LD DE,$5DD3 | |||||||||||||||||||
|
This entry point is used by the routine at Load_Tape_Block.
Print B characters from DE.
|
||||||||||||||||||||
| Restore_Border_PrintLoop | 5DC9 | LD A,(DE) | Print the character at *DE with PRINT_A_1. | |||||||||||||||||
| 5DCA | RST $10 | |||||||||||||||||||
| 5DCB | INC DE | Advance DE. | ||||||||||||||||||
| 5DCC | DJNZ Restore_Border_PrintLoop | Jump back to Restore_Border_PrintLoop until B is zero. | ||||||||||||||||||
|
Hang after a loader message.
|
||||||||||||||||||||
| Restore_Border_Hang | 5DCE | JP Restore_Border_Hang | Jump to Restore_Border_Hang. | |||||||||||||||||
|
Return to the caller with the preserved load flags.
|
||||||||||||||||||||
| Restore_Border_Return | 5DD1 | POP AF | Restore AF from the stack. | |||||||||||||||||
| 5DD2 | RET | Return. | ||||||||||||||||||
| Prev: 5DA7 | Up: Map | Next: 5DD3 |