TS 1000 Read Data

Date: 1983
Type: Program
Platform(s): ZX81, TS 1000

Draws a large TS on the screen in black squares, as an example of keeping data in strings on a computer that has no READ and DATA statements. X$ holds the 34 row numbers and Y$ the 34 column numbers, two digits each with a comma between; the loop takes them out three characters at a time with VAL and prints CHR$ (128), the black square, at each position.

RUN it. It needs 2K: in 1K it stops with 4 (out of memory) at line 140 after drawing part of the T.

The REM lines credit the Portland Area Timex Sinclair Users Group, August 1983; no programmer is named.

Published in The Plotter February 1992 (TS 1000 Read Data).

Image Gallery

Source Code

  10 REM PROGRAM TO READ DATA
  20 REM PORTLAND AREA TIMEX SINCLAIR USERS GROUP
  30 REM AUGUST 1983
  40 REM YOU SHOULD PRINT A LARGE TS ON THE SCREEN
 100 LET C=1
 110 LET X$="06,06,06,06,06,06,06,06,06,06,06,06,07,07,07,08,08,09,09,09,09,09,09,10,10,11,11,11,12,12,12,12,12,12"
 120 LET Y$="07,08,09,10,11,12,13,16,17,18,19,20,10,15,21,10,15,10,16,17,18,19,20,10,21,10,15,21,10,16,17,18,19,20"
 130 FOR N=1 TO LEN (X$) STEP 3
 140 LET X=VAL (X$(C TO C+1))
 150 LET Y=VAL (Y$(C TO C+1))
 160 PRINT AT X,Y;CHR$ (128)
 170 LET C=C+3
 180 NEXT N

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