We’ll be discussing proportional character widths in detail later
in this chapter; for now, we’ll leave it at 11. The descender data
was discussed earlier: to use the top eight pins, this bit should
be 1; to use the bottom eight pins this bit should be 0. Figure
9-10 shows the bits of the attribute byte as we’ll use them for
our flask character. By now you’ve probably seen an easier way
to determine the value of the attribute byte. Instead of translating
everything to binary, merely assign the descender data a value
of 128 (the value of the first bit) if you dont’t want descenders,
or 0 if you want descenders. Then just add the descender data
to the proportional width. This way, it’s simply a matter of adding
two decimal numbers. (In our case, it’s 128 + 11 = 139.)
0 000 1011 = Il(decimal)
Descender Starting Ending
data print column print column
I-
Figure 9-10. The attribute byte (4) for our flask character.
You’ll probably recognize ml...&1 from the top of our layout
grid. That’s right, each column is described by one byte. Now
we’ve got everything we need to download one character to the
printer. The complete command for our flask character with the
STAR mode is shown in Figure 9- 11.
~R$(27)CHR$(42)CHR$(l)CHR$(l6~)CHR$(l6~)CHR$(l39)
Escape * 1 nl n2 mg
CHR$(2)CHR$(5)CHR$(8)CHR$(24l)CHR$(@)CHR$(@)
ml m2 m3 m4 m5 m6
CHR$(241)CHR$(8)CHR$(5)CHR$(2)CHR$(@)
m7 m8 m9 ml@ ml1
L I
Figure 9-11. This is the complete command to send our flask character
to the SD-lo/l5 printer.
Now let’s send the information to the printer. But, before you
send the information, be sure that the DIP switch l-5 is set off
position. If not, set it correctly while the power is off, then, turn
the power on again. The following program will send the character
definitions for all three characters with the STAR mode to the
printer. Enter the program and run it.
90
-
-