Prev: 0D4D Up: Map Next: 0DAF
0D6B: THE 'CLS' COMMAND ROUTINE
Used by the routines at NEW and CLEAR.
The address of this routine is found in the parameter table.
In the first instance the whole of the display is 'cleared' - the 'pixels' are all reset and the attribute bytes are set to equal the value in ATTR-P - then the lower part of the display is reformed.
CLS 0D6B CALL CL_ALL The whole of the display is 'cleared'.
This entry point is used by the routines at KEY_INPUT, MAIN_EXEC and INPUT.
CLS_LOWER 0D6E LD HL,$5C3C This is TV-FLAG.
0D71 RES 5,(HL) Signal 'do not clear the lower screen after keystroke'.
0D73 SET 0,(HL) Signal 'lower part'.
0D75 CALL TEMPS Use the permanent values, i.e. ATTR-T is copied from BORDCR.
0D78 LD B,(IY+$31) The lower part of the screen is now 'cleared' with these values (B=DF-SZ).
0D7B CALL CL_LINE
With the exception of the attribute bytes for lines 22 and 23 the attribute bytes for the lines in the lower part of the display will need to be made equal to ATTR-P.
0D7E LD HL,$5AC0 Attribute byte at start of line 22.
0D81 LD A,($5C8D) Fetch ATTR-P.
0D84 DEC B The line counter.
0D85 JR CLS_3 Jump forward into the loop.
CLS_1 0D87 LD C,$20 +20 characters per line.
CLS_2 0D89 DEC HL Go back along the line setting the attribute bytes.
0D8A LD (HL),A
0D8B DEC C
0D8C JR NZ,CLS_2
CLS_3 0D8E DJNZ CLS_1 Loop back until finished.
The size of the lower part of the display can now be fixed.
0D90 LD (IY+$31),$02 It will be two lines in size (DF-SZ).
This entry point is used by the routine at CL_ALL.
It now remains for the following 'house keeping' tasks to be performed.
CL_CHAN 0D94 LD A,$FD Open channel 'K'.
0D96 CALL CHAN_OPEN
0D99 LD HL,($5C51) Fetch the address of the current channel (CURCHL) and make the output address PRINT_OUT and the input address KEY_INPUT.
0D9C LD DE,$09F4
0D9F AND A
CL_CHAN_A 0DA0 LD (HL),E
0DA1 INC HL
0DA2 LD (HL),D
0DA3 INC HL
0DA4 LD DE,$10A8
0DA7 CCF First the output address then the input address.
0DA8 JR C,CL_CHAN_A
0DAA LD BC,$1721 As the lower part of the display is being handled the 'lower print line' will be line 23.
0DAD JR CL_SET Return via CL_SET.
Prev: 0D4D Up: Map Next: 0DAF