Epson FX-286 User Manual - Page 117

Data numbers for user-defined characters, Width statements, LPRINT CHR$27&CHR$0CHR$65CHR$90, O-6

Page 117 highlights

The command in line 180 begins the definition process. It ends with two ASCII numbers that set up the range of characters to be defined. Since this program defines only one character, the two numbers are the same (both 60). If, however, you want to define more than one character, you put the number of the first one in the first position and the last one in the second position. For example, to redefine all the capital letters the command would be as follows because 65 is the ASCII code for capital A and 90 is the code for capital Z. LPRINT CHR$(27)"&"CHR$(0)CHR$(65)CHR$(90); The CHR$(0) tells the printer which RAM area to use, but since an unmodified printer has only one area, always use CHR$(0) there. The above method works for the standard printable characters (codes 33 to 126 and 161 to 254). If you need to redefine more charac- ters, you can use ESCape codes to allow you to define and print certain control codes in the same way that you treat other characters. The ESCape "6" command changes codes 128 through 159 and 255 to printable characters, and ESCape "7" returns these codes to their normal functions. In the same manner, ESCape "I1" changes the fol- lowing codes into printable characters: O-6, 16-17, 21-26, 28-31, 128134, 144-145, 149-154, 156-159. ESCape "I0" returns these codes to their normal functions. Data numbers for user-defined characters Each user-defined character requires 12 data numbers. The first one should be 128 if the character uses the top eight pins and 0 if it uses the bottom eight pins. The other 11 numbers specify the dot patterns, using the same pin numbering system that is used for printing dot graphics. As you may have noticed, the program on page 108 always uses zero for the last two numbers (line 220). WIDTH statements Defining many characters may use so much data that your computer system interferes with your character definition by inserting carriage return and line feed codes. To avoid this problem use a WIDTH statement, such as the one below, in any program that defines more than two or three characters: WIDTH "LPT1:",255 The format for this statement may be different for your system. Consult your software manuals. C-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
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223

The command in line
180
begins the definition process. It ends with
two ASCII numbers that set up the range of characters to be defined.
Since this program defines only one character, the two numbers are
the same (both
60).
If, however, you want to define more than one
character, you put the number of the first one in the first position and
the last one in the second position. For example, to redefine all the
capital letters the command would be as follows because
65
is the
ASCII code for capital A and
90
is the code for capital Z.
LPRINT CHR$(27)"&"CHR$(0)CHR$(65)CHR$(90);
The CHR$(0) tells the printer which RAM area to use, but since an
unmodified printer has only one area, always use CHR$(0) there.
The above method works for the standard printable characters
(codes 33 to
126
and 161 to 254). If you need to redefine more charac-
ters, you can use ESCape codes to allow you to define and print cer-
tain control codes in the same way that you treat other characters.
The ESCape “6” command changes codes 128 through
159
and 255
to printable characters, and ESCape “7” returns these codes to their
normal functions. In the same manner, ESCape “I1” changes the fol-
lowing codes into printable characters:
O-6, 16-17, 21-26, 28-31, 128-
134, 144-145, 149-154, 156-159.
ESCape “I0” returns these codes to
their normal functions.
Data numbers for user-defined characters
Each user-defined character requires 12 data numbers. The first one
should be
128
if the character uses the top eight pins and 0 if it uses the
bottom eight pins. The other 11 numbers specify the dot patterns,
using the same pin numbering system that is used for printing dot
graphics. As you may have noticed, the program on page 108 always
uses zero for the last two numbers (line 220).
WIDTH statements
Defining many characters may use so much data that your com-
puter system interferes with your character definition by inserting car-
riage return and line feed codes. To avoid this problem use a WIDTH
statement, such as the one below, in any program that defines more
than two or three characters:
WIDTH "LPT1:",255
The format for this statement may be different for your system. Con-
sult your software manuals.
C-9