beautypg.com

Column reservation numbers, A simple graphics program – Epson 4500 User Manual

Page 121

background image

Graphics

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 printer does not use numbers larger than 255 in

decimal. Therefore the graphics mode command uses two numbers, n1

and n2, for reserving columns.

To find n1 and n2, divide the total number of columns by 256. The

result is n2; the remainder is n1. 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 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).

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 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.

A Simple 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.

4-14

Software and Graphics