Star Micronics SB-15 Printer User Manual


 
it’s possible to have a graphics image as wide as 480 dots on SD-10
or 816 dots on SD-15. So to figure out how many columns of
graphics data to expect, SD-lo/l5 multiplies n2 by 256 and adds
the value of nl. If you divide the number of columns by 256,
then n2 is the quotient and nl is the remainder (why not let your
computer figure it out for you: if the number of columns is as-
signed to
variable X, then nl =X MOD 256 and
n2 = INT(X/256)). Table 10-l might make things even easier.
Table 10-l
Calculating nl and n2 for graphics
If the number of columns,
x, ranges from:
then nl is: and n2 is:
1 to 255
X
0
256 to 511
x-256
1
512 to 767
x-512
2
768 to 1023
x-768
3
1024 to 1279
x - 1024
4
1280 to 1535
x- 1280
5
1536 to 1791
x-
1536 I
6
1792 to 2047
x-
1792
7
2048 to 2303
x -
2048
8
2304 to 2559
x -
2304
9
2560 to 28 15
x - 2560
10
2816 to 3071
x-2816
11
3072 to 3264
x - 3072
I
12
n Specifying the graphics data
Now that we’ve told SD- lo/l5 how much data to expect, we
better figure out how to send that information! Just as you do
with download characters, with dot graphics you have fontrol
over the firing of every single pin on SD-10/15’s print head. In
Figure 10-1, you can see that we’ve labeled each pin on the print
head with a number, as we did with download characters (you
should note one important difference: this time the top pin has
the highest value; for download character definitions it is the
bottom pin). And specifying pins to fire is done in the same way:
to fire the second pin from the top, for instance, send a CHR$(64).
Firing several pins at once is done in a similar fashion. For ex-
ample, to print the first, third, and fourth dots, add their values
(128 + 32 + 16) to send this total: CHR$(176). This is one
byte of graphics data; it would replace ml in our format statement
on page 104.
105