Speed Up PRINT Lines — ZX81

Author(s): John Oliger
Publication: Syntax
Pub Details: Syntax/Syntax ZX80 v3 n4 (Volume 3, Issue 4)
Date: April 1982
Pages: 6

You can make PRINT statements execute faster. Enter the following test and run in SLOW mode:

  10 FOR N=1 TO 50
20 SCROLL
30 PRINT "THIS IS A TEST OF PRINTING SPEED"
40 NEXT N

Run time=17 sec. Add this line:

  25 PRINT AT 21,31;AT 21,0;

Run time=9 sec.

I think the reason it prints so much faster the second time is that when you SCROLL you upset the padded out line 21. Adding line 25 pads it back out. (This is just a guess.)

In a long inventory program I wrote the ZX81 took about a second to print 2 characters and a very long time to print the entire line.

Try this:

   1 DIM A(3000)
10 FOR N=1 TO 10
20 SCROLL
30 PRINT "THIS IS A TEST OF PRINTING SPEED"
40 NEXT N

Now run and time. Run time=3 min, 29 sec. Add line 25:

  25 PRINT AT 21,31;AT 21,0;

Run time=27 sec.

I suggest adding this line right after every SCROLL.

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