Star Micronics Radix User Manual page 132

Table of Contents

Advertisement

118
Radix User's ManuaI
Like the other Radix commands, it starts with an (ESC)
(CHR$(27)). The next character is an asterisk (*), which is
CHR!$(42), followed by a CHR!$(l).
nl is the value we assign to the character-in
the case of the
bullet it is CHR$(43).
n2 is called the attribute byte, for it describes two attributes of
the character we have designed: descender data and proportional
width information. A byte consists of eight bits. In the attribute
byte, the first three (high order) bits are unused, the fourth bit is
used for the descender data, and the last four bits are used for
proportional widths. 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 seven
pins, this bit should be 0; to use the bottom seven pins this bit
should be 1. Figure 11-10 shows the bits of the attribute byte as
we'll use them for our bullet character. Since the descender data is
0, the value of the byte is equal to the value of the proportional
data-11. By now you've probably seen an easier way to deter-
mine the value of the attribute byte. Instead of translating every-
thing to binary, merely assign the descender data a value of
16
(the
value of the fourth bit) if you want descenders, or 0 if you don't
want descenders. Then just add the descender data to the propor-
tional width. This way, it's simply a matter of adding two decimal
numbers. (In our case, it's 0 + 11 = 11.)
0 0 0 0 m
=
11
-1 Unused
(decimal)
Proportional
Descender data
width
Figure 11-10. The attribute byte [nZ) for our bullet character.
You'll probably recognize ml. . .mll from the top of our lay-
out 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 bullet character is shown
in Figure
11-11.
Now let's send the information to the printer. The following
program will send the character definitions for all three charac-
ters to the printer. Enter the program and run it.
-
..-
-
-
-
-
._
-
-
-
-
'-
-.

Advertisement

Table of Contents
loading

Table of Contents