A 49-byte machine code routine that does for the TS1000 what SCREEN$ does for the TS2068: it copies the whole display into a string, and PRINT brings it back.
DIM the string to 704 characters at the start of the program, POKE 16417 with the code of its letter, and call RAND USR 16514 from within the program. The main file is the article’s example, with the routine already in line 1: RUN fills part of the screen with Xs, stores it, clears it and prints it back. The second file is the loader, for entering the 49 bytes by hand (they add up to 4680). The loader stops with report 5/200 before it shows the sum; CONT shows it. The routine needs a full display file, so it does not work on a 1K or 2K machine: use 16K.
The two inverse characters in line 1 that can’t be read on the copy were worked out from the printed bytes.
Published in LISTing May – June 1985 (Screen$ – TS1000).
Source Code
LISTING 2 (example, with the routine in line 1)
1 REM U5RNDLEN %4E=RND GOSUB ?(RND GOSUB ???E(RND GOSUB %L\' \: GOSUB ? FOR E£RND7\.'-VAL \.'4? FOR ? FOR 7<( SAVE 7AT ( LET TAN 0
10 DIM A$(704)
20 POKE 16417,38
30 FOR I=1 TO 100
40 PRINT "X";
50 NEXT I
60 RAND USR 16514
70 CLS
80 PRINT A$
LISTING 1 (loader)
1 REM 12345678901234567890123456789012345678901234567890
10 FOR I=16514 TO 16562
20 INPUT A
30 POKE I,A
40 SCROLL
50 PRINT I;":";A
60 NEXT I
65 SCROLL
70 PRINT "DONE"
75 SCROLL
100 REM SUMCHECK SHOULD BE *4680*
120 PRINT "PRESS A KEY BEGIN SUMCHECK"
130 IF INKEY$="" THEN GOTO 130
140 FAST
150 LET SUM=0
160 FOR I=16514 TO 16562
165 LET Z=PEEK I
170 LET SUM=SUM+Z
180 NEXT I
190 SLOW
200 PRINT SUM
DATA (enter from left to right; sum 4680)
58 33 64 198 160 42
20 64 237 91 16 64
237 82 68 77 42 16
64 237 177 1 5 0
237 74 235 42 12 64
35 6 22 197 6 32
78 235 113 235 35 19
16 248 35 193 16 241
201Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


