ZX81 Screen Clear

See all articles from Sinc-Link v5 n4
Author(s): John Thomas
Publication: Sinc-Link
Pub Details: Sinc-Link v5 n4 (Volume 5, Issue 4)
Date: July/August 1987
Pages: 4

Here’s a nice touch for a program. It allows erasing “bottom lines” rather than all as in CLS.

Enter this demonstration program:

  1 REM 1 2 3 4 5 6
10 PRINT"XXXXXX"
20 PRINT "XXXXXX"
30 PRINT "XXXXXX"
40 PRINT "XXXXXX"
50 PRINT "XXXXXX"
60 PRINT "XXXXXX"
70 PRINT "XXXXXX"
80 PRINT "XXXXXX"
90 POKE 16515,20
100 RAND USR 16514

Then enter these POKEs

POKE 16514, 6
POKE 16515, 22
POKE 16516, 205
POKE 16517, 44
POKE 16518, 10
POKE 16519, 201

(This will change the look of the LINE 1 REM)

The example above will leave the top 4 lines (1, 20, 30, and 40) and erases lines 50, 60, 70, and 80.

To use this routine in a program, add the REM line to a program and make USR calls to it when desired. In the program, before using the USR call, POKE 16514 minus the number of lines you want left from the top. May be used many times in a program to keep just the important lines on a screen in view.

The M/C is relocatable as long as the program POKE and call are changed to suit.


ZX81- SELECTIVE LINE ERASE

Here’s a nice touch for a program. It allows erasing “bottom lines”, rather than all lines as with the CLS command.

In the program, POKE 16514,(24 minus the number of lines you want left from the top. May be used many times to keep just the important lines in view.

The following example leaves the top four lines (10,20,30,40) and erases lines 50, 60, 70, and 80. Next use could be to erase all but the top two, etc. The M/C is relocatable as long as the program POKE and CALL are changed to suit.

1 REM 1 2 3 4 5 6
10 PRINT "XXXXXXXXXXXXXXX"
20 PRINT "XXXXXXXXXXXXXXX"
30 PRINT "XXXXXXXXXXXXXX"
40 PRINT "XXXXXXXXXXXXXXX"
50 PRINT "XXXXXXXXXXXXXXXXX"
60 PRINT "XXXXXXXXXXXXXXXX"
70 PRINT "XXXXXXXXXXXXXXXXX"
90 POKE 16515,20
100 RAND USR 16514

POKE the following numbers into line 1.

POKE 16514,6
POKE 16515,22
POKE 16516,205
POKE 16517,44
POKE 16518,10
POKE 16519,201

An interesting routine from one of our members. GFC

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.