Star Micronics Delta User Manual page 93

Star micronics printer user's manual
Table of Contents

Advertisement

.-,,--
Creatinn
Your Own Characters
81
R = LMscemr '16
Fwmal
ESE~i",P,m
m,
+ Wdl"
Figure
7-9. Character designs for the four card suits.
Like the other Delta 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
heart it is CHR$(72).
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 7-10 shows the bits of the attribute byte as we'll
use them for our heart 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 determine the
value of the attribute byte. Instead of translating
everything
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 des-
cenders. Then just add the descender
data to the proportional
width. This way, it's simply a matter of adding two decimal num-
bers. (In our case, it's 0 + 11 = 11.)

Advertisement

Table of Contents
loading

Table of Contents