COPY a Specific Line

Developer(s): Sebastien Boisvert
Date: 1991
Type: Program
Platform(s): ZX81, TS 1000
Tags: Printer

Copies one chosen line of the screen to the ZX printer, where COPY prints the whole screen. A 19-byte relocatable routine moves the line into the printer buffer and prints it with the ROM; the BASIC asks for the line (1-24, 1 = top) and POKEs its offset into the routine.

In the article you make a 1 REM of 19 spaces, RUN 100 and type the 19 values, then delete lines 100-130. The download is that finished program, with the code already in the REM; the full printed listing, loader included, is in the .txt. Use lines 10-50 as a subroutine after your own PRINTs (RUN clears the screen first).

Published in Sinc-Link January-February 1991 (Data-Read-Restore on a TS1000).

Related Articles

This is a DATA/READ/RESTORE program that appeared in the February ’87 issue of ZX Computing that was written by David Nowotnik in 1983.

Image Gallery

Source Code

  1 REM ...19 spaces...
 10 INPUT L   Line to be copied (1-24): 1=top line
 20 LET L=(L-1)*33
 30 POKE 16519,L-256*INT (L/256)
 40 POKE 16520,INT (L/256)
 50 RAND USR 16514
100 FOR F=16514 TO 16532
110 INPUT A
120 POKE F,A
130 NEXT F

Values (RUN 100):
42:12:64:35:1:0:0:9:1:32:0:17:60:64:237:176:195:83:8

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