Prev: 0E9B Up: Map Next: 0ECD
0EAC: 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 0EAC DI The maskable interrupt is disabled during COPY.
0EAD LD B,$B0 The 176 lines.
0EAF LD HL,$4000 The base address of the display.
The following loop is now entered.
COPY_1 0EB2 PUSH HL Save the base address and the number of the line.
0EB3 PUSH BC
0EB4 CALL COPY_LINE It is called 176 times.
0EB7 POP BC Fetch the line number and the base address.
0EB8 POP HL
0EB9 INC H The base address is updated by 256 locations for each line of pixels.
0EBA LD A,H Jump forward and hence round the loop again directly for the eight pixel lines of a character line.
0EBB AND $07
0EBD JR NZ,COPY_2
For each new line of characters the base address has to be updated.
0EBF LD A,L Fetch the low byte.
0EC0 ADD A,$20 Update it by +20 bytes.
0EC2 LD L,A The carry flag will be reset when 'within thirds' of the display.
0EC3 CCF Change the carry flag.
0EC4 SBC A,A The A register will hold +F8 when within a 'third' but +00 when a new 'third' is reached.
0EC5 AND $F8
0EC7 ADD A,H The high byte of the address is now updated.
0EC8 LD H,A
COPY_2 0EC9 DJNZ COPY_1 Jump back until 176 lines have been printed.
0ECB JR COPY_END Jump forward to the end routine.
Prev: 0E9B Up: Map Next: 0ECD