Epson LX-80 User Manual - Page 131

POKEing codes - printer driver

Page 131 highlights

Unfortunately, this process is also different for each computer system. We'll give the procedure for a couple of systems here; if your system is neither of them, use the procedure as a model. Consult your computer's manual to determine if you can do the same on your system. A fourth approach is to change the printer driver program in your system. This requires a knowledge of machine language and of the way your computer works. If you don't have this knowledge, your computer dealer may be able to help you or suggest someone who can. We show a sample printer driver below (following the examples of POKEing codes). The idea is to pass the codes issued by a BASIC program directly to the printer. POKEing codes The TRS-80™ Model I version of the CHR$ function does not correctly pass on the values of 0, 10, 11, and 12. Zero is a particular problem as it is very important to the ESCape codes of the LX-80 printer. 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 I'E:RK( 1431%)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 'I'fIEN 100 200 POKE 49296, N F-9

  • 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

Unfortunately, this process is also different for each computer
system. We’ll give the procedure for a couple of systems here; if your
system is neither of them, use the procedure as a model. Consult your
computer’s manual to determine if you can do the same on your
system.
A fourth approach is to change the printer driver program in your
system. This requires a knowledge of machine language and of the
way your computer works. If you don’t have this knowledge, your
computer dealer may be able to help you or suggest someone who
can.
We show a sample printer driver below (following the examples of
POKEing codes). The idea is to pass the codes issued by a BASIC
program directly to the printer.
POKEing codes
The TRS-80™ Model I version of the CHR$ function does not
correctly pass on the values of 0, 10, 11, and 12. Zero is a particular
problem as it is very important to the ESCape codes of the LX-80
printer.
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
I’E:RK(
1431%)<>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
‘I’fIEN
100
200
POKE
49296,
N
F-9