If you have ever used a word processor for a more expensive computer, like an Apple //e, you have noticed a few features not found on Tasword Two. I regularly use PFS:Write on the Apple //e in my planetarium. (I apologize for having another computer in addition to my beloved TS2068. My only excuse is having to have the Apple to interface with a laser video disc player.)
Both word processors include many identical features: help screens; word wrap; fast cursor movement by character, by word, by line, by page, and to the beginning or end of the text file; character and line insert and delete; block move and copy; left, center, and right line formatting; reformatting of text after insertions or deletions; optional right justification; embedding of printer control codes within the text files; and search and replace. Whew!
Tasword Two is truly amazing, considering that it needs 80K less memory and costs $110.00 less than PFS:Write, but there is room for improvement. There are number of features PFS:Write has that are not included with a stock version of Tasword Two.
The modifications I have made allow Tasword Two to use tape or (Aerco FD68) disk for loads and saves, catalog either of two disk drives, “reboot” either drive, print headers and footers, print multiple copies with all the pages properly numbered, skip perforations after a selectable number of lines, and count the number of words in a text file.
I’m greatly indebted to articles in the February/March 1986 issue of ZX Computing and the May 1985 issue of Sinclair User. Thanks to Mike deSosa for sending me the latter article.
The ZX Computing article was, of course, written about the Spectrum version of Tasword Two. I had to modify the machine code for the word count routine before it would work correctly on the TS2068. This has appeared previously in Time Designs.
The Sinclair User article, by John Lambert, is the earliest source I’ve seen for selectable lines per page, page numbering, multiple printouts, headers, footers, and custom color selection for the screen. The listing, however, has a number of bugs.
The footer and pagination don’t always appear in consistent positions at the bottom of the page. The page count is off under certain conditions. The LPRINT command to print the footer is ignored by the TS2068 version of Tasword Two. Finally, a list of addresses to poke with new values to change the paper and ink colors of the text file, the prompt area at the bottom of the screen, and the margins is incomplete. The information below will “correct” the listing in Sinclair User.
Any modifications to Tasword Two should be preceded by the incorporation of as many memory saving tricks as possible. Mike de Sosa is responsible for several. He used tokens and variables to represent often used GOSUB lines and frequently used numbers for TABs and calculations. Here is a fairly complete list.
0 = NOT PI 12 = tw 64 = sf 4000 = ft 1 = SGN PI 14 = w 850 = ef 6000 = gs 10 = t 31 = th 950 = nf 9000 = nt
One could also have used variables for 0 and 1, say “z” and “o.”
Some additional memory was saved by reducing the amount of text in screen prompts and in the menu. I don’t believe any clarity is lost by these changes.
Another change I made renders Tasword Two compatible with a word processor whose default page format is a one-inch margin at the top and bottom of the page. The margin area is usually where headers and footers are printed. In keeping with convention, two blank lines are printed, then the header, and then three blank lines. Six lines equals one inch. Then the text file starts. The header is printed on every page in the document, but it uses up no space in the text file.
The footer is likewise separated from the last line of the text file on a given page by three blank lines. The footer is printed next. Then the current page number and total number of pages in the document is printed on the next line. Finally a form feed is sent to the printer. This effectively leaves one blank line after the automatic page numbering.
When I first typed in the Sinclair User listing, the footer would not print out at all. This is why Mike sent me the article in the first place. Repositioning a USR call solved the problem.
The original Sinclair User listing allowed for the number of lines per page to be specified along with Tasword’s line spacing choice. It failed to take into account the extra blank lines needed to keep the footer in a consistent place when line spacing is greater than one.
If a document has a one inch margin at the top and bottom, then 54 lines of text will fit on a standard page. If the line spacing is one, then everything gets printed in the right place. If the line spacing is three, then Tasword prints a line and skips two lines until it gets to the 18th line (54/3=18).
It prints the 18th line, then thinks, “I’m through printing lines on that page,” fails to put in two blank lines, and prints the footer. This puts the footer and page numbering two lines higher than it should be. An addition to line 290 tells Tasword to print “line spacing minus one” blank lines between the last line of text on the page and the footer and pagination.
Another problem occurred when the Sinclair User listing calculated how many pages it would take to print an entire document, given the user-specified lines per page and the line spacing. If the text just happened to fill the final page of a multi-page document, the page counter calculated one page too many. An addition to line 250 prevents “one” from being added to the page count if the total number of lines divided by the lines per page is an integer.
The final consideration is the alteration of the screen colors. POKE the following addresses to change the text area to your choice of paper and ink, where “C” is calculated by the formula “C = (8 * paper)+ink.”
POKE 58512, 54 POKE 58521, 54 POKE 58513, C POKE 58522, C
For example, to use red paper with black ink, you use the formula “C = (8 * 2) + 0 = 16.”
A surprise may await you after you’ve changed the text area paper and ink colors. If you try to set left and right margins, your text may disappear or your margins may be invisible if you chose certain incompatible combinations. To alter the paper and ink colors in the margins for suitable contrast and visibility, POKE the following addresses with your selection according to the aforementioned formula.
POKE 58508, 54 POKE 58517, 54 POKE 58509, C POKE 58518, C
Now that you’ve customized the text area and margins, you can alter the ink and paper of the bottom two lines where line and column numbers, justification, word wrap, and insert mode status are shown. To alter the two status lines, POKE new values into the respective addresses. The value of “C” is calculated in the manner shown previously.
POKE 59993, C (top) POKE 64570, C (bottom)
The final touch-up is color selection for the 64-column and 32-column mode borders. You can change the following addresses to indicate your choice of BORDER color. The value of “B” equals the paper color you want. Thus “B” ranges from 0 to 7.
POKE 64516, B (64-column) POKE 60641, B (32-column)
The final modifications I’ve made to my copy of Tasword involve the use of my Aerco FD68 Disk system. The save and load routines allow both tape and disk to be used. The difference is in the use of an “*” to prefix disk file names or to catalog the disk before loading or merging a text file. At Tasword’s “STOP” menu, you can also use appropriate keys to catalog drive A (<=), catalog drive B (>=), or reboot (<>).

If you’d like to save yourself some typing, I’ll supply a tape or disk of my modifications to the BASIC portion of Tasword for $6.00 postpaid. I’ll also include the machine code routine which provides a count of the number of words in the text file when you go to the main menu. Contact me at 3308 Bluemont Drive, Memphis, Tennessee (38134).
Here are some notes on the program lines:
15 - 20: variables defined for memory savings
25 : my choice of STOP menu paper and ink colors
: USR 52610 is for the word count routine
95 : establishes "<=" key to catalog drive A
100 : establishes ">=" key to catalog drive B
105 : establishes "<>" key to reboot selected drive
200 : lines/page POKEd into unused address 33220
225 : "len" = total characters to print
250 : "pl" = total characters to print on each page
: "tp" = total pages to print (if len/pl is not
an integer, then "1" is added to "tp")
265 : "a$" is temporarily the document's header
270 : 2 line feeds; the header; 3 line feeds
290 : proper # blank lines print if line spacing >1
292 : "a$" is temporarily the document's footer
294 : 3 line feeds; then the footer;
296 : then the pagination; then a form feed
298 : USR 59806 moved here to allow "LPRINTs" above
299 : "f" is pages; "n" is number of copies
700 : save BASIC ("boot" name for disk auto boot)
705 : save machine code (extra code for word count)
1000 ff: tape/disk text file save routines
2000 ff: tape/disk text file load/merge routines
8000 : GOSUB to center the header and footer
9000 : GOSUB frequently used by print options
10 CLS : LET a=USR VAL "64330"
: GO TO t+t
11 BEEP VAL ".2",VAL "3": BEEP
VAL ".3",VAL "2": RETURN
15 POKE VAL "23609",VAL "2": C
LEAR VAL "33279": LET t=VAL "10"
: LET sf=VAL "64": LET ft=VAL "4
000": GO SUB ft: CAT "tasword.bi
n",: CLS : GO SUB VAL "11": LET
a=USR VAL "59081": GO TO t
20 CLS : LET a=sf*INT (a/sf+VA
L "0.99"): LET tw=VAL "12": LET
w=VAL "14": LET th=VAL "31": LET
ef=VAL "850": LET nf=VAL "950":
LET gs=VAL "6000": LET nt=VAL "
9000": IF a=NOT PI THEN GO TO nt
-gs
25 PAPER VAL "5": INK NOT PI:
CLS : GO SUB ft: PRINT AT VAL "4
",NOT PI;"Edit file [";USR VAL "
52610";" words]";TAB th;"Y"
28 PRINT '"Save file";TAB th;"
S"
30 PRINT '"Load file";TAB th;"
J"
35 PRINT '"Merge file";TAB th;
"M"
40 PRINT '"Print file";TAB th;
"P"
45 PRINT '"Save Tasword FD68";
TAB th;"T"
50 PRINT '"Graphics/Printer";T
AB th;"G"
55 PRINT '"BASIC";TAB th;"B"
70 PRINT AT t+t,VAL "11";"Pres
s key."
80 LET a$=INKEY$: IF a$="" THE
N GO TO VAL "80"
90 LET i=NOT PI: LET b=CODE a$
: IF b<VAL "97" THEN LET b=b+th+
SGN PI
95 IF b=VAL "199" THEN CAT "a:
",: GO TO VAL "720"
100 IF b=VAL "200" THEN CAT "b:
",: GO TO VAL "720"
105 IF b=VAL "201" THEN CAT "bo
ot.bas",
110 IF b=VAL "115" THEN LET i=V
AL "6"
120 IF b=VAL "106" THEN LET i=V
AL "8"
125 IF b=VAL "116" THEN LET i=w
130 IF b=VAL "112" THEN LET i=t
w
140 IF b=VAL "121" THEN LET i=V
AL "4"
150 IF b=VAL "109" THEN LET i=t
160 IF b=VAL "103" THEN LET i=V
AL "16"
170 IF b=VAL "98" THEN LET i=VA
L "18"
180 IF i>NOT PI THEN PRINT AT i
,th; FLASH SGN PI;CHR$ (b-th-SGN
PI);: GO TO VAL "500"
190 GO TO VAL "80"
200 CLS : GO SUB ft: PRINT AT V
AL "2",VAL "9";"PRINT OPTIONS":
PRINT "ENTER for defaults": LET
i=VAL "6": LET j=NOT PI: LET j0=
t+tw: LET x=VAL "33220": LET a$=
"Lines/Page=": GO SUB ef: LET i=
VAL "8": PRINT AT i,NOT PI;"Line
spacing=1": GO SUB gs: GO SUB n
t
210 POKE VAL "62235",VAL a$: LE
T i=t: PRINT AT i,NOT PI;"Start
line=1": GO SUB gs: GO SUB nt
220 LET c=sf*(INT VAL a$-SGN PI
): LET st=c+FN p(VAL "62216"): L
ET i=tw: PRINT AT i,NOT PI;"Fini
sh line=last": GO SUB gs: IF a$=
"" THEN LET len=a-c: GO TO VAL "
230"
225 LET len=sf*INT VAL a$-c
230 LET i=w: PRINT AT i,NOT PI;
"First page=1": GO SUB gs: GO SU
B nt
240 LET pa=VAL a$-SGN PI: LET i
=VAL "18": PRINT AT i,NOT PI;"#
of copies=1": GO SUB gs: GO SUB
nt
250 LET co=VAL a$: LET end=st+l
en: LET pl=INT (PEEK VAL "33220"
/PEEK VAL "62235")*sf: LET tp=IN
T ((len/pl)+(SGN PI AND len/pl<>
INT (len/pl))): FOR n=SGN PI TO
co: LET fl=NOT PI: LET cp=pa: FO
R f=st TO end-SGN PI STEP pl: LE
T b=f: LET x=VAL "60045": GO SUB
nf: LET cp=cp+SGN PI: RANDOMIZE
USR VAL "59806": RANDOMIZE USR
(FN p(VAL "62472")): CLS : PRINT
AT t,NOT PI;"Key 'q' to halt pr
inting";AT w,NOT PI;"Printing co
py # ";n;AT VAL "18",NOT PI;"Pag
e # ";cp: IF end-f<pl THEN LET b
=end-f: LET fl=SGN PI: GO TO VAL
"260"
255 LET b=pl
260 LET x=VAL "60049": GO SUB n
f
265 LET a$="Type Header Here"
270 LPRINT CHR$ t;CHR$ t;: GO S
UB VAL "8000": LPRINT CHR$ t;CHR
$ t;CHR$ t
275 LET c=PEEK VAL "62470": IF
c<>NOT PI THEN LPRINT CHR$ c
280 RANDOMIZE USR VAL "60038"
285 LET c=PEEK VAL "62471": IF
c<>NOT PI THEN LPRINT CHR$ c
290 IF fl=SGN PI OR PEEK VAL "6
2235">SGN PI THEN FOR g=SGN PI T
O ((pl-b)*PEEK VAL "62235"/sf+PE
EK VAL "62235"-SGN PI): LPRINT C
HR$ t: NEXT g
292 LET a$="Type Footer Here"
294 LPRINT CHR$ t;CHR$ t;CHR$ t
: GO SUB VAL "8000"
296 FOR g=SGN PI TO VAL "25"+PE
EK VAL "60927": LPRINT " ";: NEX
T g: LPRINT "Page # ";cp;" of ";
tp;CHR$ tw
298 RANDOMIZE USR VAL "59806":
IF INKEY$="q" THEN GO TO SGN PI
299 NEXT f: NEXT n: GO TO SGN P
I
700 LET i=VAL "8": MOVE "boot.b
as",15
705 MOVE "tasword.bin";52610,12
925
710 CLS : CAT "",
720 PRINT #NOT PI;AT NOT PI,NOT
PI;" Press ENTER to go back to
menu": PAUSE NOT PI: GO TO VAL "
25"
1000 LET b=FN p(VAL "62216"): CL
S
1005 PRINT AT VAL "8",NOT PI;"Na
me text file-Prefix * for disk":
LET i=t: LET j0=NOT PI: GO SUB
gs
1010 IF LEN a$>t AND a$(SGN PI)<
>"*" THEN CLS : PRINT AT tw,NOT
PI;"Too many characters - max is
10": GO TO VAL "1005"
1020 IF LEN a$=NOT PI THEN : CLS
: PRINT AT tw,NOT PI;"There mus
t be a name": GO TO VAL "1005"
1025 IF a$(SGN PI)="*" THEN LET
a$=a$(VAL "2" TO ): LET i=tw: LE
T a$=a$+".bin"","+STR$ b+","+STR
$ a: MOVE "a$",: CLS : GO TO VAL
"1040"
1030 LET i=tw: SAVE a$CODE b,a:
CLS
1040 PRINT AT VAL "8",NOT PI;a$;
" saved:";AT t,NOT PI;a;" bytes,
",a/PEEK VAL "62237";" lines"
1050 PRINT AT tw,NOT PI;"Verify
";a$;"?": LET i=w: GO SUB VAL "9
20": IF i=NOT PI THEN GO TO t+t
1060 IF LEN a$>t THEN GO TO VAL
"710"
1100 CLS : PRINT "Start tape": V
ERIFY a$CODE b,a
1110 PRINT AT th-t,VAL "6";"text
file verified": GO TO VAL "25"
2000 CLS : PRINT AT VAL "8",NOT
PI;"Type the name of the text fi
le";AT t,NOT PI;"and press ENTER
"
2010 PRINT AT tw,VAL "2";"Just p
ress ENTER to load the";AT w,VAL
"2";"first tape file, or * to C
AT"
2015 LET j0=NOT PI: LET i=VAL "1
6": GO SUB gs
2020 IF a$<>"*" THEN PRINT AT VA
L "18",VAL "9";"Play the tape":
GO TO VAL "2030"
2025 CLS : CAT "",: INPUT "Type
filename",a$: LET a$=a$+".bin"",
"
2026 IF b=109 THEN LET b=FN p(VA
L "62216"): LET c=((FN p(VAL "62
221")+VAL "22")*sf-a): LET a$=a$
+STR$ (a+b)+","+STR$ c
2029 CAT "a$",: GO TO t
2030 LET b=FN p(VAL "62216"): LO
AD a$CODE (a+b),((FN p(VAL "6222
1")+t+tw)*sf-a): GO TO t
8000 FOR g=SGN PI TO (VAL "80"-L
EN a$)/VAL "2": LPRINT " ";: NEX
T g: LPRINT a$;CHR$ t: RETURN
9000 IF a$="" THEN LET a$="1"
9010 RETURN
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.