Chapter 8 Bit Image Graphics

Bit Image Programming Format

The syntax of the Bit Image expression must include the appropriate dot density control code, the exact number of data bytes to be plotted, and the data themselves. The general Bit Image expression is as follows:

 

ESC CC (n1) (n2) (DATA)

where:

ESC

the Epson, Serial Matrix or Proprinter XL

 

 

compatible header

 

CC

K, L, Y, or Z to select dot density;

 

 

K = single,

 

 

L = double,

 

 

Y = double density double speed, and

 

 

Z = quad density

 

n1, n2

the number of data bytes to be printed

 

data

the dot pattern bytes

The values for n1 and n2 must be specified in the control code expression. They are defined as follows:

n1 = number of data bytes MOD 256

n2 = INT (number of data bytes/256)

The modulus arithmetic operator MOD refers to the integer value that is the remainder of an integer division. The INT operator refers to integer division and is denoted by the slash character (/). Therefore, n1 is the remainder of the number of data bytes divided by 256 and n2 is the integer value of the number of data bytes divided by 256.

n1 = (number of data bytes)-(n2x 256)

n2 = (number of data bytes)/256

If the number of data bytes to be printed is less than 256, n2 equals zero and n1 equals the number of data bytes to be printed.

The following examples illustrate the procedure to determine the Bit Image program statement.

Print 450 data bytes, single density

n2 = 450/256 = 1

n1 = 450-(1x256) = 194

The program statement is:

ESC K (194)(1)(DATA)

Print 700 data bytes, single density

n2 = 700/256 = 2

n1 = 700-(2x256) = 700-512 = 188

The program statement is:

ESC K (188)(2)(DATA)

Print 180 data bytes, single density

n2 = 180/256 = 0

n1 = 180-(0x256) =180-0 = 180

The program statement is:

ESC K (180)(0)(DATA)

262

Page 262
Image 262
IBM 4400 manual Bit Image Programming Format, ESC CC n1 n2 Data