Proprinter dot graphics – Genicom GEK 00031B User Manual

Page 119

Advertising
background image

GEK-00029B

5000 Series Programmer’s Manual

119

PROPRINTER DOT GRAPHICS

Dot graphics allows you to print individual dots at any position on
the page. The Proprinter doesn't adjust the line feed increment

automatically on entering graphics. If you want contiguous vertical
graphics, then you must set the line feed increment to 8/72 inch
before starting graphics and then reset it when you are finished.

An IBM graphics control sequence starts with an escape combination
that sets the graphics density (ESC K, L, Y, or Z), followed by a 2-byte

header that shows the number of subsequent bytes that are to be
interpreted as graphics data. The format of the sequence is:

ESC (density) <n1> <n2> (data) .. (data)

Since this control sequence has no terminator, you need to specify
exactly in the header the number of bytes that you want to be
interpreted as graphics. If there are fewer graphics data bytes than

specified in the header, then the printer treats subsequent text and
control codes as graphics. In that case, carriage returns and line
feeds are often ingested as graphics data.

On the other hand, if there are more graphics data bytes than
specified in the header, then the printer interprets excess bytes as
text or control codes. This can also produce indeterminate results.

The two bytes (n1, n2) specify the total number of image bytes that
follow; n2 is the most significant byte.

The total number of image data bytes - n1 + (n2 * 256)

EXAMPLE: to print 5 inches of graphics at ESC K density, which is
60 dpi, then:

Total bytes = 5 inches x 60 dpi = 300
n1 = total bytes modulo 256, in other words,
n1 = total bytes – (n2 * 256)
n1 = 300 - (1 * 256)
n1 = 44
n2 = integer (total bytes/256)

n2 = integer (300/256) = 1

The sequence sent to the printer (shown in BASIC) would look like:

CHR$(27);CHR$"K';CHR$(44);CHR$(1);CHR$(v1);... CHR$(v3OO);

where v1 through v3OO are image data bytes.

Each image data byte represents a vertical column of eight dots. The

most significant bit of the byte controls the top dot of a column, and
the least significant bit controls the bottom dot of that column. The
first byte of data (v1) is the first column, (v2) is the second column,
and so on. The illustration below shows byte values of various dot
combinations.

Advertising