Epson LX-80 User Manual - Page 132

Special printer drivers, Solutions for Seven-Bit Systems - printer driver for an

Page 132 highlights

The printer's status is stored in location 49601 and the outgoing values are sent to 49296. Special printer drivers An even better (but more difficult) way to overcome these prob- lems is to modify the printer driver so that the codes are passed correctly to the printer without any PEEKS or POKES. If you do not want to write such a driver yourself, your computer dealer may be able to help you. Or you may find aid in the pages of a trade journal. The following printer driver, for instance, was written for the TRS-80 Model I by Bob Boothe and reprinted with the kind permission of 80 Micro (Wayne Green Publishers). The program POKES a machine-language printer driver program (stored in line 10) into memory, then tells the system where its new driver is located. Once you RUN the program, all codes sent by any BASIC program are sent directly to the printer-including 0s, 10s, and 12s. 10 DATA 21E83'7CH7E20FC211100397E32E837C9 20 READ B$: A-=16571 30 FOR I'=3 TO TJ:N(E\$) STFY 2 40 B-=ASC(MID$( B$, P, 1) ) - 48 50 IF' IS>9 THEN B-H -- 7 60 T=A:;C(MID$( R$, I' t 3. r 1.) > -- 48 '70 IF T>9 THF:N T-T - 7 80 POKE A,R*l6 + T 90 A=.At 1 1.00 NEXT P 110 POKE 16422,187 120 POKE 164%3,64 This driver will also work on the TRS-80 Model III-with one change in line 10: change 32E837 to D3FB. That's all there is to it. Solutions for Seven-Bit Systems The BASIC language on some computers can only send seven bits to the printer at one time, even though the machine language may be able to send eight. (The Apple II Plus is a case in point). On such computers, the CHR$ function cannot send the entire range of ASCII codes (0-255) to the printer; it can send only the lower half (0-127). F-10

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158

The printer’s status is stored in location 49601 and the outgoing
values are sent to 49296.
Special printer drivers
An even better (but more difficult) way to overcome these
prob-
lems is to modify the printer driver so that the codes are passed
correctly to the printer without any
PEEK
S
or
POKE
S
.
If you do not
want to write such a driver yourself, your computer dealer may be
able to help you. Or you may find aid in the pages of a trade journal.
The following printer driver, for instance, was written for the
TRS-80 Model I by Bob Boothe and reprinted with the kind permis-
sion of 80 Micro (Wayne Green Publishers). The program POKE
S
a
machine-language printer driver program (stored in line 10) into
memory, then tells the system where its new driver is located. Once
you RUN the program, all codes sent by any BASIC program are
sent directly to the printer-including 0s, 10s, and 12s.
10
DATA
21E83’7CH7E20FC211100397E32E837C9
20
READ
B$:
A-=16571
30
FOR
I’=3
TO
TJ:N(E\$)
STFY
2
40
B-=ASC(MID$(
B$,
P,
1)
)
-
48
50
IF’
IS>9
THEN
B-H
--
7
60
T=A:;C(MID$(
R$,
I’
t
3.
r
1.)
>
--
48
‘70
IF
T>9
THF:N
T-T
-
7
80
POKE
A,R*l6
+
T
90
A=.At
1
1.00
NEXT
P
110
POKE
16422,187
120
POKE
164%3,64
This driver will also work on the TRS-80 Model III-with one
change in line 10: change 32E837 to D3FB. That’s all there is to it.
Solutions for Seven-Bit Systems
The BASIC language on some computers can only send seven bits
to the printer at one time, even though the machine language may be
able to send eight. (The Apple II Plus is a case in point). On such
computers,
the CHR$ function cannot send the entire range of
ASCII codes (0-255) to the printer; it can send only the lower half
(0-127).
F-10