IBM￿

Commands￿

￿

 

 

Notes

 

 

Function

(ASCII, Decimal, Hexadecimal)

 

 

 

 

 

 

 

Move to the Left

ASCII: ESC e n1 n2

Move to the left, relative to present posi-

 

 

(Backwards)

Dec: 27 101 n1 n2

tion, calculated as

 

 

 

Hex: 1B 65 n1 n2

(n1 =[n2 x 256])/ 120 inches

 

 

 

 

n1=0 to 255

 

 

 

 

n2=0 to 255

 

 

 

 

n1=n2=0: no movement

 

 

Self Left & Right Margins

ASCII: ESC X n m

Sets left (n) and right (m) margins in

 

 

 

Dec: 27 88 n m

character columns at current pitch. Once

 

 

 

Hex: 1B 58 n m

set, margins remain fixed even if charac-

 

 

 

 

ter pitch is changed. m must be at least

 

 

 

 

10 character space (at 10 cpi) to the right

 

 

 

 

of n.

 

 

 

 

n=0 to 255; n=0: left margin unchanged

 

 

 

 

m=0 to 255; m=0: right margin un-

 

 

 

 

changed

 

 

Engage/ Disengage

ASCII: ESC U n

n=1: Unidirectional printing On

 

 

Unidirectional Printing

Dec: 27 85 n

n=0: Unidirectional printing Off (return

 

 

 

Hex: 1B 55 n

to bidirectional)

 

 

Backspace

ASCII: BS

Prints data in buffer and moves one

 

 

 

Dec: 8

character to the left according to current

 

 

 

Hex: 08

character pitch.

 

 

Set Print Position

ASCII: ESC DLE @ Pn A1 A2 P1 P2

OKI unique command. Sets horizontal

 

 

 

P3 P4

position of printhead.

 

 

 

Dec: 27 16 64 [data]

Pn: specifies number of bytes to follow,

 

 

 

Hex: 1B 10 40 [data]

range 0 to 127 (MSB ignored)

 

 

 

 

A1: specifies if motion is absolute (even

 

 

 

 

number) or relative (odd number)

 

 

 

 

A2: specifies direction of relative move-

 

 

 

 

ment right (even number) or left (odd

 

 

 

 

number)

 

 

 

 

P1, P2, P3, P4=0 to9: specify print posi-

 

 

 

 

tion, in four digits:

 

 

 

 

(P1 x 1000) + (P2 x 100) + (P3x 10) + P4

 

 

 

 

Unit of print position is 1/ inch in LQ

 

 

 

 

360

 

 

 

 

mode; 1/ inch in Utility mode.

 

 

 

 

240

 

 

 

 

Maximum default value for left and

 

 

 

 

right margins: 2880 for ML390 Turbo:

 

 

 

 

4896 for ML 391 Turbo

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

102

Appendix D: Printer Commands