The program uses a machine language printer driver routine (line 10), then tells the system where the new driver is located. When you RUN the program, all codes (including those nasty problem codes) are sent directly to the printer. This driver will also work with the TRS-80 Model III with one change in line 10; change 32E837 to D3FB.

IBM Personal Computers

There are three problems in using the IBM Personal Computer BASIC (version 2.0) to drive a printer. First, the IBM-PC assumes that your print line is 80 characters wide and inserts a line feed/ carriage return (<LF> <CR>) after each 80 characters you send it. Second, it adds <LF> to each <CR> in an LPRINT statement. And third, it will not send ASCII decimal 26 to the printer.

Here is the way to adjust the width when it is the only prob- lem. Tell the computer that the print line is wider than 80 characters with this WIDTH statement:

WIDTH "LPT1:", 255

The extra line feed problem can be solved by using this in your program:

OPEN "LPT1:" AS #1 : WIDTH #1, 255

The statement OPEN “LPT1:” AS #l opens the printer as a random file and allows you to send any code. However, you must now use PRINT #1 rather than LPRINT in your program. This allows you to print anything, but it ignores any previous WIDTH statements so WIDTH #l, 255 is included here.

Unfortunately, this solution won’t work with DOS 1.0 because it can’t run a printer like a file. You may be able to get a free update (DOS 1.05) from your dealer. Another problem with DOS

1.0is that it doesn’t send ASCII 7 to the printer; it just sounds the computer’s buzzer.

Sending an ASCII decimal 26 to the printer is more of a prob- lem. We have three suggested solutions:

1.Use a machine language routine to drive the printer. The September 1983 issue of Softalk for the IBM Personal Compu- ter has an article describing a suitable routine.

92