Column reservation numbers
The graphics command requires more than one number to specify
how many columns to reserve because one line can use thousands of
columns, but the LQ does not use numbers larger than 255 (decimal).
Therefore, the graphics mode command uses two numbers for reserv-
ing columns.
To figure the number of columns reserved, multiply the second
number by 256 and add it to the first number. Since the command is
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 num-
ber 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).
The LQ will interpret the number of bytes determined 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 LQ 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 will be
interpreted and printed as regular text.
First graphics program
This first program is just a simple example to show you how the
graphics command, column reservation numbers, and data can be
used in a BASIC program. Type in and run the following program; be
especially careful to include both semicolons. The program produces
the printout you see below it.
20 LPRINT CHR$(27)"*"CHR$(32)CHR$(40)CHR$(0);
30
FOR X=1 TO 120
40 LPRINT
CHR$(170);
50
NEXT X
6-6