80 Delta User’s Manual
Assigning a value to your character
We’ve done a pretty thorough job of designing and describing
a user-defined character. But the Delta has room for 189
download characters-how does it know which user-defined char-
acter we want to print? Exactly the same way it knows which
standard character we want to print: every character is assigned a
unique number.
The standard characters are assigned the ASCII codes-num-
bers from 0 to 255. For the download character sets there are two
banks of characters that can be defined: values from 33 to 126 and
160 to 254. This means that once a character is defined and
assigned a value (and the download character set is selected), you
can use that character on the printer the same way you would any
standard character. You can send the character with the same
ASCII value (for instance, if you had assigned your character a
code of 66, it would print each time you sent a character “B” to the
printer). You can also access the character from a BASIC program
with the CHR$ function-in this case LPRINT CHR$(66) would
print the character.
Except for the limitation that download characters must be
assigned values in the range of 33 to 126 or 160 to 254, there are no
rules or restrictions on the use of numbers. This means you can
use whatever is most convenient for you-perhaps seldom-used
keys can be replaced by more useful characters. In our example,
we’ll assign the heart a value of 72, which is the ASCII value for
the letter “H”. This way, when we want to print a heart, all we
have to do is send the printer an “H”-that’s easy to remember!
We could hardly write bridge columns with just a heart, so in
Figure 7-9 we’ve made completed grids for all four card suits. In
order to make them easy to use, we’ve assigned the club a value of
67 (the ASCII value for “C”), the diamond is 68 (“D”), and the
spade is 83 (“57’). The information on the grids is now complete
(except for proportional width data-a more advanced topic we’ll
take up shortly).
Download character definition command
You’ve read through a long explanation of download charac-
ters and we haven’t even told you the command syntax yet! Now
the wait is over. This is the most complex command in the Delta
repertoire and now you’ve got the necessary knowledge to imple-
ment it. Here it is:
-
-
-
-
-
-
-
-
-
-
-
-
(ESC) "*" CHR$(l) nln2mlm2m3m4m5m6m7m8m9m10mll -