Atari Text Editor Program

Elwood J. C. Kureth

I'd be willing to bet that a fair number of people who own a computer and a line printer do not own a typewriter. Of those individuals who don't own one, it would probably be safe to assume that its absence could be attributed to the fact that (a) the need for a typewriter has never arisen, or (b) they don't need (or use) a typewriter often enough to warrant purchasing their own.

If you already own a typewriter (as I do) in addition to your computer and its related items, and you already type with confidence, then perhaps this program will be of little use. However, if you're like me, you usually end up making a few mistakes, which means erasing or starting all over again.

This program was written for an Atari 800 with an Epson MX8OF/T printer. It's not a word processing program by any means; in fact, it's very limited in its application. What it allows you to do however, is put text on the screen, edit it, and send it to a printer in two different print modes.

RUN it and you will be asked to set the right margin (up to 80 columns). Hit a RETURN to enter the number. You will then have to determine if you want emphasized print. This type of print is much bolder than normal print and approaches letter quality. Simply type "Y" or "N" (no RETURN is necessary because the keyboard "reads" your input). Next, you will be prompted for single or double space. After your selection, you will face a blank screen. The first key you hit will display the cursor, and away you go.

Four spaces from the end of each line a warning buzzer will sound, just like the bell on a typewriter. The cursor will not advance once you have reached the right margin; it will, however, backspace or RETURN. So there's no need to worry about overrunning your margin.

NOTE: A HEART (CHR$(O)) will appear each time a RETURN is hit. The heart will help you keep track of your lines on a 40 column screen.

Let's say you have a 37 or less character line on the screen (79 or less character line for an 80 column screen), and you want to change a character. If the cursor has already advanced down one physical line (due to a RETURN or end-of screen return) you will be unable to correctly edit the line the cursor just left. If you wish to make a change to a line of text, it must be done while the cursor is on that line.

You may move the cursor backwards by using either the DELETE/BACK S key or the CTRL<--keys. Using the DELETE/BACK S key will delete the character the cursor covers. Let's say you have the word "MICROOCOMPUTERS", and you wish to delete the second "O" from that word. This action could be accomplished one of two ways. The DELETE/BACK S key could be used until the cursor is over the second "O", thereby deleting it, as well as all the characters that had followed it. Now it would be necessary to retype the rest of the word.

The alternate method would be to use the CTRL<-- keys, moving the cursor backwards to the immediate right of the second "O" (cursor would be covering the "C"). At this point you would hit the DELETE/BACK S key, which would move the cursor over the "O" (deleting it), followed immediately by the CTRL--> keys to the point where you'd left off. The cursor will automatically stop at that point if you hold the keys down.

CAUTION: With the exception of the abovementioned example, anytime you move the cursor backwards, your first action when moving it forward again must be to type at least one character, as opposed to immediately using the CTRL--> keys to start moving the cursor forward. If, in the example used above, you overshoot the "O" and the cursor winds up over the "M", instead of using the CTRL--> keys to move the cursor, you would first type the letter "M", then CTRL--> (or type) to the right of the "O", then DELETE/BACK S over the "O", then (whew!!) CTRL---> to the point at which you started backwards.

The last line of text must be followed by a RETURN. Then, it's simply a matter of hitting a CTRL P, and your text is transferred from screen to paper. More copies? Just hit a CTRL P.

If you desire to type new material, you must first clear the memory by hitting the ESC key. If this is not done, two things can happen when you print out the new text. First, the previous material will be printed out before the new text. Secondly, if you hit a SYSTEM RESET, run the program, type new material, and edit that new material, you could get a rather confusing text. Always hit the ESC key first after you're through printing your material.

1 REM ATARI VERSION--BY ELWOOD J.C. KURETH,JR.
5 OPEN #1,4,0,"K":OPEN #7,8,0,"P":GRAPHICS 0
10 POKE 752,1:M=0:COUNT=0:BUZZ=0:? #7;CHR$(27);CHR$(64)
15 ? CHR$(125):POSITION 5,5:? "SET RIGHT MARGIN (UP TO 80)";:INPUT MARGIN:IF MARGIN>80 THEN GOTO 15
20 POSITION 2,5:? "DO YOU WANT EMPHASIZED PRINT(Y OR N)":GET #1,LTTR:IF LTTR<>89 AND LTTR<>78 THEN GOTO 20
22 ? CHR$(125):POSITION 5,5:? "SINGLE OR DOUBLE SPACE(S OR D)"
23 GET #1,SPACE:IF SPACE<>83 AND SPACE<>68 THEN GOTO 22
24 ? CHR$(125);:POKE 752,0
25 GET #1,IT
26 IF IT=156 OR IT=157 OR IT=254 OR IT=255 OR IT=125 THEN GOTO 25
28 IF IT=126 OR IT=30 THEN GOTO 500:REM BACKSPACE
30 IF BUZZ=MARGIN AND IT<>155 THEN GOTO 25
35 IF IT=16 THEN GOTO 600:REM PRINT
37 IF IT=31 THEN GOTO 900:REM ADVANCE CURSOR
38 IF IT=27 THEN GOTO 2000:REM CLEAR MEMORY
40 COUNT=COUNT+1:BUZZ=BUZZ+1:IF BUZZ=MARGIN-4 THEN ? "}":REM BUZZ CHAR. IN QUOTES
41 IF IT=155 THEN ? CHR$(0);:GOTO 1000:REM RETURN
42 M=M+1
45 POKE 6000+M,IT:? CHR$(PEEK(6000+M));:GOTO 25
500 IF IT=126 THEN POKE 6000+M,0
510 ? CHR$(IT);:GET #1,IT
515 IF IT=126 OR IT=30 THEN M=M-1:BUZZ=BUZZ-1:GOTO 500
520 IF IT=155 THEN GOTO 1000
530 GOTO 45
600 FOR X=1 TO COUNT:IF LTTR=89 THEN ? #7;CHR$(27);CHR$(69);
620 ? #7;CHR$(PEEK(6000+X));:NEXT X:GOTO 25
900 M=M+1:BUZZ=BUZZ+1
905 GET #1,IT
907 IF M>COUNT AND IT=31 THEN GOTO 905
908 IF IT=31 THEN ? CHR$(IT);:GOTO 900
910 IF IT=155 THEN GOTO 1000
920 GOTO 45
1000 COUNT=COUNT+1:POKE 6000+COUNT,155:? CHR$(PEEK(6000+COUNT));
1010 IF SPACE=68 THEN COUNT=COUNT+1:POKE 6000+COUNT,155:? CHR$(PEEK(6000+COUNT));
1020 M=COUNT:BUZZ=0:GOTO 25
2000 POKE 752,1:? "}":POSITION 7,5:? "**** PLEASE WAIT ****":REM BUZZ CHAR. IN QUOTES
2010 FOR FILL=1 TO COUNT:POKE 6000+FILL,0:NEXT FILL:? CHR$(125):GOTO 10

Elwood J.C. Kureth, HHD, 14th Maintenance Bn., APO New York 09169.

Table of Contents
Previous Section: Atari Word Processors
Next Section: VisiCalc