04.01.2015 Views

SB-10 USER'S MANUAL

SB-10 USER'S MANUAL

SB-10 USER'S MANUAL

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table f-2. Calculating the width of your graphic image.<br />

IF THE NUMBER OF<br />

COLUMNS RANGES FROM: THEN nl IS: AND n2 IS:<br />

1to255 X 0<br />

256 to 511 x -256 1<br />

512 to 767 x-512 2<br />

768 to <strong>10</strong>23 x -768 3<br />

<strong>10</strong>24 to 1279 x-<strong>10</strong>24 4<br />

1280 to 1440 x-1280 5<br />

128<br />

64<br />

32<br />

16<br />

8<br />

4<br />

2<br />

1<br />

Figure F-5. Pin values for 8-bit graphics.<br />

To fire, say, the second pin from the top, you’ll send the BASIC<br />

code CHR$(64). You can fire several pins at once by adding their<br />

values and sending the sum total in a single BASIC CHR$ code. Thus:<br />

To fire the<br />

then send<br />

1st 3rd and 4th -> the BASIC -> CHR$(176)<br />

pins, add their<br />

CHR$ code:<br />

values (128 + 32 + 16)<br />

Here’s a short program to show you how you can implement 8-bit<br />

graphics to make a simple zigzag image (Figure F-6).<br />

NEW<br />

<strong>10</strong> 'PRINT GRAPHIC PATTERN<br />

20 WIDTH "LPT1:".255<br />

30 LPRINT CHR$(27) CHR$(89) CHR$(94) CHR$(l);<br />

40 FOR I=1 TO 25<br />

50 FOR J=O TO 6<br />

60 L-PRINT CHR$(2-J);<br />

779

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!