Poor Man’s Word Processor/TS-2068

Authors

Publication

Pub Details

Date

Pages

See all articles from SUM v3 n11

This program was developed to be used with a “home brew” interface before I found John Oliger had a neat little interface that is hard to beat. The program can be used with any printer. Some modifications may have to be made since this one was for use with the JUKI 2200. (I don’t recommend the JUKI 2200 however since, in my opinion, it has serious shortcomings, unknown to me, until after purchase.)

Enter the program as shown. To LOAD program, use LOAD “WP” or “”. It will auto run when loaded. To become familiar with the program, STOP the program when prompted to do so by entering any letter. The program is looking for a number. A letter will stop it with error: 2 Variable not found, 1340:1.

LIST the program and notice the program has line numbers 1, 2, then skips to 999. These missing line numbers are used for DATA lines containing your material to. be printed. Each paragraph is typed in using a line number and the DATA statement. Like this example:

10 DATA "This is the sentence to be printed."

Printed, it will look like this:

This is the sentence to be printed.

An empty DATA line results in a skipped line for paragraph seperation. An easier method is to use a comma and a pair of quotes at the end of a line. Example:

10 DATA "This is the sentence to be printed",""

The comma and double quotes prints a blank line.

The program starts at line 1330. A is the line counter. B is the page counter and is initially set at 49 (ASCII for 1). Poke 23609, 50 sounds a BEEP at each keystroke. POKE a smaller number to 23609 for a shorter BEEP or larger number for a longer BEEP. |

Line 1340 selects number of characters printed per inch. If your printer does not have this capability, you will need to know how many characters per inch your printer does print and change line 1340 to: 1340 LET E=n.. Where n equals characters per inch and DELETE lines 1339, 1350, and 1360.

Line 1370 lets you select printer line length. The numbers printed on the screen suggest three sizes. However any reasonable number, including fractions like 4.5, 4.6, 5.4 etc. can be used.

Selection is done by: E (set in line 1340) * number selected (F)= number of characters per line (D). Example: If E=12 and 4 is entered, 12*4=48 characters per line. characters per line direct, change line 1340 to: 1340 INPUT;”Enter number of characters per line “;D. Any method may be used but since D=number of characters per line, it must be defined. Lines 1380 to 1405 set the parameters for the JUKI. DELETE these lines or change as needed for your printer.

Lines 1410 to 1440 allow entering of prerecorded DATA files. Press M and start tape. When tape is loaded, printing will start automatically. If the program already has a data file within, pressing ENTER will start the printing process. CAUTION: Do not enter a DATA file that uses lines 1, 2 or 999 to 1510. To do so will invalidate the program.

Before printing starts, several things take place. First, line 1450 determines if this is the first page to be printed. If it is, the program goes to line 1510 where A is moved from 1 to 7. This shortens the page by 7 lines to allow for headings. If not the first page, then lines 1469 to 1500 are executed. If this is not the first page, line 1470 prints page number then skips a line before printing continues.

Line 1469 checks to see if the printer is busy. If it is, the line loops itself until the printer is no longer busy. This same check will be found before each OUT statement where needed.

Line 1500 directs the program to line 1010. Lines 1010 to 1090 loads A$ with first, or next DATA statement and looks at the end of the line to see if it ends in a space. If not, a space is entered between the first and second word and the check is made again. If there is still no space at the end, a space is added between the second and third word and continues until a space is found at the end of the line.

When all lines in the DATA statement are properly spaced, the sentence or paragraph will be printed on the screen and to the printer. Because the screen is only 32 characters wide, it will not illustrate the actual printing. What you see is NOT what you get.

Lines 1095 to 1130 send one character at a time to the printer. Line 1120 checks to see if the proper number of characters per line have been printed. When line is full, line 1160 counts the line number and outputs a line feed to the printer. Line 1170 resets V, the character counter and returns to the printing loop.

Line 1140 sets printer to the next line and goes to line 1000 where the line count variable A is checked to see if 52 or more lines have been printed. If not, another DATA statement is loaded into A$ and the procedure is repeated.

If more than 52 lines (45 for 1st page) have been printed, program goes to. line 1290 where program is halted and message to change paper is printed. Entering a P in either upper or lower case continues printing at line 1470.

The program continues until all DATA lines are sent to the printer. At this time the program stops with out of data statement. To reprint the same text, RUN the program again.

There will be a delay between a request for printing and actual printing. This delay is due to the time it takes for the BASIC program to check for and introduce spaces between words. Generally, the longer the sentence or paragraph, the longer the delay.

There are a couple of pitfalls to be aware of. If the line length selected is too short or there are too many long words in the line, there may not be enough spaces available to arrive at a space at the end of the line. Spaces are only added one time between each word. If this does not bring a space to the end of the line, a word will be broken. This happens so seldom it is not considered a problem. If it does, rearrange the sentence.

The lines in a complete paragraph are counted before the algorithm for end of page is executed. This was done to enable the complete paragraph to be printed intact. If the last paragraph is too long you can run out of paper. Again this has not been a problem but can happen. If this becomes a problem, change the count in line 1000 to less than 52.

A backup copy of this program is recommended. Use GOTO 1280 to SAVE. Program will auto run when loaded. Good printing!

Products

 

Media

 

Image Gallery

Source Code

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

Scroll to Top