Graphics

Even in single-density graphics mode, one 8-inch line can accommodate

480columns of graphics; jr( quadruple-density, almost 2OOO columns can fit on the same g-inch Bne. Since the &inter does not use decimal numbers larger than 255, the graphics mode command uses two numbers for reserving columns.

To figure nl and n2, divide the total number of columns by 256. The result is ir2; the’ remainder is nl. Since the command is set up for two numbers, you must supply two even if you need only one. When you need fewer ti& 256 cohmms, just make nl the number of cohunns you are resa+@ and make &a zero. For example, if you wish to &cl 1632 c6lumns of .gr&phica data; nl should be 96 andn2shouldbebl+rusel632 - % + (6 x 256).

If you are using a programming language with MOD (modulus) and INT (integer) functions, you can use the following formulas to

calculitte rr2 <title, in tiki& ti is- the tad iitixW& ~9 columns:

:,”

nl = nMOD256 ?I2 - INT (n/256)

The print& will’ i&!rpre+ f the ntimber of by& det&&ed ‘by nl and n2 as grapWs data; no titter i&at codes ;+liey are. This means that you must be sure to suppI)? tiugh by&s’ of gra#&x data or the printer will stop and wait for more data and will seem to be locked. If, on the other hand, you supply too much graphics data, the excess v&l be interpreted and printed as regular text.

Printing sisnple patterns

The first ex&tple is just a’ s&&program to show you how the graphics command, column reservation numbers, and data can be used in a BASIC program.

4-14Software and Graphics