TRS-80 Computers

The TRS-80 computers are not without their own set of quirks. The TRS-80 Model I computer, for instance, does not correctly send ASCII decimal codes 0, 10, 11, and 12 to printers like the SQ-2000. A quick solution for TRS-80 Model I (and TRS-80 Model

III)users to avoid sending ASCII decimal 12 (Form Feed, or <FF>) is to use its high-order counterpart ASCII decimal 140. This is achieved by adding 128 to the problem code (128 + 12 = 140).

There are two more generic solutions for avoiding these problem codes. First, these codes can be sent directly to the printer with POKE codes. The following routine will accomplish this:

100 IF PEEK(14312)<>63 THEN 100

110 POKE 14312,N

Line 100 checks the printer’s status by putting the program into a continuous loop until it finds decimal 63 in memory location 14312.

With the TRS-80 Model I and TRS-80 Model III computers, you can also modify the printer driver so that the problem codes are sent correctly to the printer. The following printer driver was written by Bob Boothe and reprinted with the permission of 80 Microcomputing (Wayne Green Publishers). Try the following routine for Model I users (Model III users, see the small change below).

10 DATA 21E837CB7E20FC211100397E32E837C9

20 READ B$: A=16571

30 FOR P-1 TO LEN(B$) STEP 2 40 B=ASC(MID$(B$,P,1)) - 48 50 IF B>9 THEN B=B - 7

60 T=ASC(MID$(B$,P + 1,1)) - 48 70 IF T>9 THEN T=T - 7

80 POKE A,B*1G + T

90A=A+1 100 NEXT P

110POKE 16422,187

120POKE 16423,64

91