largest number we can send in one byte (that’s what the BASIC
CHR$( ) function sends: one byte) is 255. And with the normal
density graphics it’s possible to have a graphics image as wide
as 480 dots. So to figure out how many columns of graphics data
to expect, your printer multiplies n2 by 256 and adds the value
of nl to the product. 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
assigned to variable X, then nl =X MOD 256 and
nZ=INT(X/256)). Table 7-l might make things even easier.
Table 7-1
Calculating nl and n2.
kf the numb
1024 to 1279 1 x-1024 4
I ILO” L” IJ3.J I x-1280 5
?G G
t 1536 to 1791 I x-15 V” I
innn L- 1920 1 x-1792 ;
n Specifying the graphics data
Now that we’ve told the printer 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 the print head. In Figure 7-
1, you can see that we’ve. labelled each pin on the print head
with a number, as we did with download characters. And speci-
fying 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 example, 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.