Star Micronics SR-10/I5 user manual n Specifying the graphics data

Models: SR-10/I5

1 130
Download 130 pages 19.46 Kb
Page 115
Image 115
nSpecifying the graphics data

it’s possible to have a graphics image as wide as 480 dots on SR-10 or 816 dots on SR- 15. So to figure out how many columns of graphics data to expect, SR-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 numberof columns,

 

 

 

x. ranees from:

then nl is:

I and n2 is:

I

1to 255

X

0

 

256to 511

x-256

1

 

512to767

x-512

2

 

768to1023

x-768

3

 

1024to1279

x- 1024

4

 

1280to1535

x- 1280

5

 

1536to1791

x- 1536

6

 

1792to2047

x- 1792

7

 

2048to2303

x-2048

8

 

2304to2559

x-2304

9

 

2560to2815

x- 2560

10

 

2816to3071

x-2816

11

 

3072to3264

x- 3072

12

 

nSpecifying the graphics data

Now that we’ve told SR-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 SR- 10/l 5’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

Page 115
Image 115
Star Micronics SR-10/I5 user manual n Specifying the graphics data