Star Micronics SR-10/I5 user manual n Download character definition command

Models: SR-10/I5

1 130
Download 130 pages 19.46 Kb
Page 99
Image 99
nDownload character definition command

Our chart would hardly be complete with just a picture of a chemist’s flask, so in Figure 9-9 we’ve made completed grids for some other symbols: an automobile and a gun (quite a strange mix of characters!). The information on the grids is now complete (except for proportional width data-a more advanced topic we’ll take up shortly).

nDownload character definition command

You’ve read through a long explanation of download characters and we haven’t even told you the command syntax yet! Now the wait is over. This is the most complex command in the SR-lo/15 repertoire and now you’ve got the necessary knowledge to im- plement it. Here it is:

(For STAR mode)

<ESC> "*" 1 nl n2 m@ ml m2 m3 m4 m5 m6 m7 m8 m9 mlg ml1

(For IBM mode)

<ESC> "&" CHR$(@) nl n2 rn0ml m2 m3 m4 m5 m6 m7 m8 m9 ml@ ml1

Like the other SR-lo/15 commands, it starts with an < ESC > (CHR$(27)). The next character is an asterisk (*) (CHR$(42)) followed by 1, or an ampersand (&) (CHR$(38)) followed by a CHR$(O).

nl and n2 are used to specify the ASCII values of the characters you are defining. The reason that there are two bytes reserved for this is that SR- lo/15 allows you to define many characters with just a single command. nl is used to specify the beginning of a range of characters to be defined; n2 specifies the end of the range. For instance, if you wanted to change the appearance of the numerals from 0 to 9 (which have ASCII codes 48 through

57)for the STAR mode, the command would begin with < ESC > “*” CHR$(l) CHR$(48) CHR$(57)... Of course, you can also define individual characters by making nl and n2 equal.

m0 is called the attribute byte, for it describes two attributes of the character we have designed: descender data and propor- tional width information. A byte consists of eigth bits. In the attribute byte, the first (high order) bit is used for the descender data, and the last seven bits are used for proportional widths.

89

Page 99
Image 99
Star Micronics SR-10/I5 user manual n Download character definition command