it’s possible to have a graphics image as wide as 480 dots on SG-10
or 816 dots on SG-15. So to figure out how many columns of
graphics data to expect, SG- lo/15 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: andn2 is:
1 to 255 X 0
256 to 511 x-256 1
512 to 767 x-512 2
768 to 1023 x-768
1024 to 1279 x - 1024 4
1280 to 1535 x - 1280 5
1536 to 1791 x- 1536 6
1792 to 2047 x- 1792 7
2048 to 2303 x-2048 8
2304 to 2559 x-2304 9
2560 to 2815 x-2560 10
2816 to 3071 x-2816 II
3072 to 3264 I x - 3072 I 12 I
n Specifying the graphics data
Now that we’ve told SG-lo/15 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 control
.over the firing of every single pin on SG-10/15’s print head. In
Figure lo- 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 Iire is done in the same way:
to tire 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