I recently acquired a stack of SYNC magazines, and while browsing through them came across a short and simple word-processing program that was written for the TS1000 computer for use with a small printer such as TS2040.
Since I include myself in the group of TS2040 owners who are reluctant to learn a complicated word-processing program just to put out a few words of readable text on our small printers,I’m bringing the program to your attention with the hope that it might spur a few others to dash something off for Rod to use in our newsletter.
The program treats your text input in Line 10 as a string, whether it’s a title, a sentence, or a paragraph. You can’t LPRINT more than one of them at a time unless they’re joined together with spaces, and figuring out the correct number of spaces you would need to join each text string could take more time than LPRINTing one text string and starting a new one.
So just type out one text string at a time, ignoring lines that seem to end or start with a space and words that start on one line and finish on the next one.
ENTER Line 10 with your completed text string into the program, RUN it and when LPRINTed, your text string will come out properly spaced and without any broken words. You could change the program to PRINT it to the screen and then COPY it, but you may end up COPYing a lot of blank screen.
After LPRINTing one text string and re-LISTing the program, I found it more convenient to start a new Line 10 than to EDIT the one LISTed since this left my previous text string visible for reference at the top of the screen, and after that my earlier text strings could be referred to on the printer tape.
The original program and a much fuller explanation of it can be found in the SYNC issue of NOV/DEC 1982.
As written for the TS1000, Line 40 used CHRS$ 0 which I have changed to CHRS$ 32 for use with my TS2068. Also, I did find one bug in the program in that it wouldn’t LPRINT a text string ofless than 32 characters and/or spaces. This I corrected by the insertion of Line 15.
Following isthe program as used in producing this article.
10 LET A$="(Your text string)"
15 IF LEN A$<=32 THEN LPRINT A$
20 FOR R=32 TO LEN A$ STEP 32
30 FOR K=0 TO 32
40 IF A$(R-K)=CHR$ 32 THEN GO TO 60
50 NEXT K
60 LPRINT A$((R-31) TO (R-K))
70 LET R=R-K
80 IF (R+32)>LEN A$ THEN GO TO 100
90 NEXT R
100 LPRINT A$((R+1) TO )
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.