Graphics

Column reservation numbers

High-density graphics may require thousands of columns to print one line. The printer, however, cannot use decimal number’s larger than 255. Therefore, the graphics commands use two numbers, n1 and n2, to reserve columns.

To calculate n1 and n2, divide the total number of columns by

256.The result is n2; the remainder is n1. Since the commands are set up for two numbers, you must supply two even if you need only one. When you need fewer than 256 columns, just make n1 the number of columns you are reserving and make n2 a zero.

For example, if you wish to send 1632 columns of graphics data, n1 should be 96 and n2 should be 6 because 1632 = 96 + (6 x 256).

If you are using a programming language with MOD (modulus) and INT (integer) functions, you can use the following formulas to calculate n1 and n2, in which c is the total number of columns:

n1 = c MOD 256

n2 = INT(c/256)

For all subsequent bytes sent to the printer after n1 and n2, the printer interprets the number of bytes specified by n1 and n2 as graphics data, no matter what codes they are. This means that you must be sure to supply enough bytes of graphics data or the printer will stop and seem to be locked while waiting for more data. If, on the other hand, you supply too much graphics data, the excess will be interpreted and printed as regular ASCII text.

Software and Graphics 4-13