Star Micronics SB-15 user manual N2 is

Models: SB-15

1 128
Download 128 pages 39.39 Kb
Page 113
Image 113

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,

then nl is:

x, ranges from:

1 to

255

X

256

to 511

x-256

512

to 767

x-512

768

to 1023

x-768

1024

to

1279

x -

1024

1280 to

1535

x-

1280

1536

to 1791

x-

1536

1792 to 2047

x-

1792

2048

to 2303

x -

2048

2304

to 2559

x -

2304

2560

to 28 15

x -

2560

2816

to 3071

x-2816

3072

to 3264

x -

3072

and n2 is:

0

1

2

3

4

5

I6

7

8

9

10

11

I12

nSpecifying 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 toppin 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

Page 113
Image 113
Star Micronics SB-15 user manual N2 is