This program was written on a 2K TS1000 and will handle a full screen of text. It gives you a full screen editor that will handle about 20 words per minute. You can print the screen to the printer by Lprinting, and Stop will bring you to a halt at line 410. Run to restart the program as the screen will be collapsed after any clearing of the screen.
[We experimented with this listing by compiling it on the Bob Berch compiler (available from G. Russell Electronics). It was necessary to change line 120 to: LET Z=CODE INKEY$, change all P$ references to Z and delete all of the CHR$ tokens. What did we find?
First, the text writer would not handle less than about 80 words per minute, so it was necessary to add a loop in the input to slow it down. Even the uncompiled version (without string references) ran at about 35 words per minute. It would no longer fit in 2K. (It was 2200 bytes). This program was definitely fun to play around with. Being short, it was easy to follow through and see the necessary steps required to build a more sophisticated full screen word processor.-ed.]
10 REM TEXT WRITER
20 FOR I=1 TO 22
30 PRINT " "
40 NEXT I
50 LET R=0
60 LET C=0
70 LET P=C+33*R
80 LET A=PEEK 16396+256*PEEK 16397+1
90 LET X=PEEK (A+P)
100 POKE (A+P),X+128
110 IF INKEY$="" THEN GOTO 110
120 LET P$=INKEY$
130 POKE (A+P),X
140 IF CODE P$>111 AND CODE P$<116 THEN GOTO (P$=CHR$ 115)*200+(P$=CHR$ 113)*250+(P$=CHR$ 114)*280+(P$=CHR$ 112)*330
150 IF P$>CHR$ 115 THEN GOTO 290*(P$=CHR$ 121)+330*(P$=CHR$ 227 OR P$=CHR$ 225)+70+120*(P$=CHR$ 118)
190 POKE (A+P),CODE P$*(P$<CHR$ 118)
200 LET C=C+1
210 IF C>31 THEN LET R=R+1
220 IF C>31 THEN LET C=0
230 IF R>21 THEN LET R=0
240 GOTO 70
250 LET R=R+1
260 IF R>21 THEN LET R=0
270 GOTO 70
280 LET C=C-1
290 IF C<0 THEN LET R=R-1
300 IF C<0 THEN LET C=31
310 IF R<0 THEN LET R=21
320 GOTO 70
330 LET R=R-1
340 IF R<0 THEN LET R=21
350 GOTO 70
360 LET C=0
370 LET R=R+1
380 IF R>21 THEN LET R=0
390 GOTO 70
400 POKE (A+P),X
410 IF P$=CHR$ 227 THEN STOP
420 COPY
430 GOTO 70
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.