WORM Enhancements

See all articles from T-S Horizons n13
Author(s): Allen H. Wolach
Publication: T-S Horizons
Pub Details: T-S Horizons n13 (Issue 13)
Date: Apri 1985
Pages: 13-14

Editor’s Note: The following article expands upon Gordon Young’s program published in issues 5, 6, 7, and 9 of TS Horizons.

Recently there has been a good deal of interest in the DVORAK keyboard arrangement. The DVORAK keyboard requires less finger movement to type a series of letters as compared to the ordinary QWERTY arrangement. It is estimated that 70 percent of typing is on the home row of a DVORAK keyboard. Only 30 percent of typing is on the home row of a QWERTY keyboard. Apple IIC microcomputers come with removable keys and software to allow users to use the keyboard as a QWERTY or DVORAK keyboard.

Users of WORM who have installed a regular keyboard may want to try the DVORAK keyboard arrangement. The following figure shows the layout for a Timex/Sinclair 1000 DVORAK keyboard. The positions of two letters, V and S, were moved to accommodate the smaller number of keys on a Timex/Sinclair keyboard as compared to a standard keyboard. Punctuation marks (other than :, ;, ., and ,) are left in the positions that they occupied on the original Timex/Sinclair keyboard.

DVORAK Keyboard (Modified for TS 1000)
DVORAK Keyboard (Modified for TS 1000)

The WORM word processor can be modified to accept input from the keyboard in DVORAK fashion. A user may want to tape the DVORAK letters over the appropriate keys to facilitate using the new keyboard arrangement.

Modify WORM by entering WORM, entering the following program, and entering GOTO 9000. Then enter the numbers in Listing 1 as they are requested.

9000 FAST
9010 FOR I=17315 TO 17366
9020 SCROLL
9030 PRINT "ENTRY ";I-17314;" ";
9040 INPUT X
9050 PRINT X
9060 POKE I,X
9070 NEXT I
9080 POKE 17377,60
9090 POKE 17378,188
9100 SLOW
9110 STOP

Listing 1. Entries for program segment to create DVORAK keyboard.

166  189  175  170   26  186
174  169  168  173  185  179
178  167  183  177  187  181
180  190  172  176  184  182
171   14   38   61   47   42
 27   58   46   41   40   45
 57   51   50   39   55   49
 59   53   52   62   44   48
 56   54   43   25

The numbers are entered row by row (left to right).

When the numbers are entered and the microcomputer has stopped, delete statements 9000 through 9110 to complete the modification.

If your printer interface reverses upper case and lower case letters, change lines 9080 and 9090 in the preceding program to:

9080 POKE 17377,188
9090 POKE 17378,60

and use the entries in Listing 2 instead of Listing 1.

Listing 2. Entries for program segment to create DVORAK keyboard (upper and lower case reversed).

 38   61   47   42   26   58
 46   41   40   45   57   51
 50   39   55   49   59   53
 52   62   44   48   56   54
 43   14  166  189  175  170
 27  186  174  169  168  173
185  179  178  167  183  177
187  181  180  190  172  176
184  182  171   25

My Data Assette serial/parallel printer interface represents lower case letters as inverse letters and upper case letters as ordinary, not inverted, letters. Gordon Young uses the reverse of this representation. If other readers have the same problem, they can load WORM and then RUN, and DELETE the following five line program. The program will reverse the ordinary and inverted letters in WORM so that an interface such as the Data Assette will work properly.

8000 FOR I=17315 TO 17340
8010 POKE (I+26), PEEK I
8020 POKE I, PEEK (I-44)
8030 NEXT I
8040 STOP

WORM does not offer the option of printing text that is not right justified. In addition, WORM does not offer the option of controlling the number of lines that are printed on a page. Suppose that the first page of text goes on a sheet with a letter head. This page may only accommodate 25 lines of text. Subsequent pages may require 32 lines of text. I have written a modification for WORM that gives the user the option of not justifying the right margin and controlling page length.

When the program requests

NUMBER OF LINES THIS PAGE?

the user enters a number. If 12 is entered, 12 lines are printed and the microcomputer stops and again requests

NUMBER OF LINES THIS PAGE?

At this point a new sheet of paper can be inserted (or the paper in the printer can be moved to a new location). If the paper is not moved, the printer will continue printing on the next line. If a number that is larger than the number of lines in WORM is entered, the microcomputer will print the remainder of the text (or the entire text if nothing has been printed).

Modify WORM by loading WORM, removing statements 6000 through 6010, and inserting the following statements.

6000 CLS
6010 LET Z=1
6012 LET X=1
6014 LET V=1
6020 PRINT "RIGHT JUSTIFY? (y/n)"
6030 IF INKEY$="Y"THEN GOTO 6060
6040 IF INKEY$="N"THEN GOTO 6070
6050 GOTO 6030
6060 LET Z=0
6070 CLS
6080 PRINT "NUMBER OF LINES THIS PAGE?"
6090 INPUT Y
6100 CLS
6110 RAND USR 17911
6120 CLS
6130 FAST
6140 LET W=1
6150 IF Z=0THEN GOTO 6310
6160 IF W>=LEN P$THEN GOTO 6210
6170 IF P$(WTO W)<>" "THEN GOTO 6210
6180 LET W=W+1
6190 LPRINT ;" ";
6200 GOTO 6160
6210 FOR I=WTO LEN P$
6220 IF P$(ITO I)<>" "THEN GOTO 6260
6230 IF V=1THEN LPRINT " ";
6240 LET V=2
6250 GOTO 6280
6260 LPRINT P$(ITO I);
6270 LET V=1
6280 NEXT I
6290 LPRINT
6300 GOTO 6320
6310 LPRINT P$
6320 IF PEEK 17907=0THEN GOTO 6410
6330 RAND USR 17918
6340 LET X=X+1
6350 IF (X-1)<>YTHEN GOTO 6140
6360 PRINT "NUMBER OF LINES THIS PAGE?"
6370 INPUT Y
6380 CLS
6390 LET X=1
6400 GOTO 6140
6410 SLOW
6420 GOTO 0010

Have any readers noticed that the length of the BASIC program in WORM affects the operation of WORM? If WORM goes into never, never land while text is being entered, modify WORM by adding 1, 2, or 3 REM statements to the program. These statements should be about as long as REM statement 4 in the program. Infact, the added REM statements can be replications of statement 4 placed in statements 6, 7, and 8. Check your program or modified program to see if it goes into never, never land by running WORM and filling the text file with 6000 entries. This easily can be accomplished by placing a heavy object on one of the keys while the program is in the write mode.

TSH

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