Prev: 23975 Up: Map Next: 24019
23980: Restore Border
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 23980 PUSH AF Stash AF on the stack.
23981 LD A,(23624) Fetch *BORDCR into A.
23984 AND %00111000 Keep only the PAPER bits that hold the border colour.
23986 RRCA Move the border colour into bits 0-2.
23987 RRCA
23988 RRCA
23989 OUT (254),A Set the border from A.
Test whether SPACE is still held (BREAK during the load).
23991 LD A,127 Read from the keyboard;
Port Number Bit
0 1 2 3 4
127 SPACE SYMBOL SHIFT M N B
23993 IN A,(254)
23995 RRA Rotate the SPACE bit into the carry flag.
23996 EI Enable interrupts.
23997 JR C,Restore_Border_Return Jump to Restore_Border_Return if SPACE is not pressed.
Print "ATTEMPTED BREAK!" and hang.
23999 LD A,1 Open stream 1 via CHAN_OPEN.
24001 CALL 5633
24004 LD B,23 Point DE at Messaging_AttemptedBreak with length 23.
24006 LD DE,24019
This entry point is used by the routine at Load_Tape_Block.
Print B characters from DE.
Restore_Border_PrintLoop 24009 LD A,(DE) Print the character at *DE with PRINT_A_1.
24010 RST 16
24011 INC DE Advance DE.
24012 DJNZ Restore_Border_PrintLoop Jump back to Restore_Border_PrintLoop until B is zero.
Hang after a loader message.
Restore_Border_Hang 24014 JP Restore_Border_Hang Jump to Restore_Border_Hang.
Return to the caller with the preserved load flags.
Restore_Border_Return 24017 POP AF Restore AF from the stack.
24018 RET Return.
Prev: 23975 Up: Map Next: 24019