Epson FX-85 User Manual - Page 63

Special printer drivers, DATA 2lE837CB7E20FC211100397E32E837C9

Page 63 highlights

These codes can be sent directly to the printer by POKEing them to a special memory location where they are immediately forwarded to the printer. The format is: POKE 14312, N where N is the decimal value of the code you wish to send to the printer. This works fine as long as the printer is ready to receive the data when you are ready to send it. On the Model I, the printer's readiness is assured if location 14312 contains a decimal 63. It is best to first test to see if the printer is ready with: 100 IF PEEK(14312)63 THEN 100 This puts the program into a continuous loop until the printer is ready to receive data. If data is sent while the printer is "out to lunch," it will be lost. To show how similar these commands can be from system to system, here is the same concept implemented on the Apple II Plus: 100 IF PEEK(49601)>127 THEN 100 200 POKE 49296,N 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 problems 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 2lE837CB7E20FC211100397E32E837C9 20 READ B$: A=16571 30 FOR P=1 TO LEN (B$) STEP 2 40 B=ASC(MID$(B$,P,l)) - 48 308

  • 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

These codes can be sent directly to the printer by POKEing them to
a special memory location where they are immediately forwarded to
the printer. The format is:
POKE 14312, N
where N is the decimal value of the code you wish to send to the
printer. This works fine as long as the printer is ready to receive the
data when you are ready to send it. On the Model I, the printer’s
readiness is assured if location
14312
contains a decimal
63.
It is best to first test to see if the printer is ready with:
100 IF PEEK(14312)<>63 THEN 100
This puts the program into a continuous loop until the printer is ready
to receive data. If data is sent while the printer is “out to lunch,” it will
be lost.
To show how similar these commands can be from system to sys-
tem, here is the same concept implemented on the Apple II Plus:
100 IF PEEK(49601)>127 THEN 100
200 POKE 49296,N
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 problems
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
0
S
, 10s,
and
12s.
10 DATA 2lE837CB7E20FC211100397E32E837C9
20 READ B$: A=16571
30 FOR P=1 TO LEN (B$) STEP 2
40
B=ASC(MID$(B$,P,l)) - 48
308