Prev: 03739 Up: Map Next: 03789
03756: THE 'COPY' COMMAND ROUTINE
The address of this routine is found in the parameter table.
The one hundred and seventy six pixel lines of the display are dealt with one by one.
COPY 03756 DI The maskable interrupt is disabled during COPY.
03757 LD B,176 The 176 lines.
03759 LD HL,16384 The base address of the display.
The following loop is now entered.
COPY_1 03762 PUSH HL Save the base address and the number of the line.
03763 PUSH BC
03764 CALL COPY_LINE It is called 176 times.
03767 POP BC Fetch the line number and the base address.
03768 POP HL
03769 INC H The base address is updated by 256 locations for each line of pixels.
03770 LD A,H Jump forward and hence round the loop again directly for the eight pixel lines of a character line.
03771 AND 7
03773 JR NZ,COPY_2
For each new line of characters the base address has to be updated.
03775 LD A,L Fetch the low byte.
03776 ADD A,32 Update it by 32 bytes.
03778 LD L,A The carry flag will be reset when 'within thirds' of the display.
03779 CCF Change the carry flag.
03780 SBC A,A The A register will hold 248 when within a 'third' but 0 when a new 'third' is reached.
03781 AND 248
03783 ADD A,H The high byte of the address is now updated.
03784 LD H,A
COPY_2 03785 DJNZ COPY_1 Jump back until 176 lines have been printed.
03787 JR COPY_END Jump forward to the end routine.
Prev: 03739 Up: Map Next: 03789