Escape-Sequences continued
Hex Dec Name Function
09 09 H AB to character column
+n 0C 12 FF n dots line feed
14 20 DC4 Self est
+n 20 32 (sp) Add n dot space between characters.
+n 24 36 $ AB to dot position. Range n = 1 RM * 6.
Command ignored if n is out of range
2A 42 B same as ESC-'K'.
+n 2D 45 - Underline Mode. n = 0 is off, n = 1 is on.
30 48 0 Set line spacing to 9 DL/CL (default)
31 49 1 Set line spacing to 8 DL/CL
32 50 2 Set line spacing to 12 DL/CL
33 51 3 same as ESC-'A'.
40 64 @ Reset. Initialise Printer
+n 41 65 A Set line spacing to n DL/CL. n0 through 8 is
treated as n=8. n09 through 127 is treated as n.
n>127 is treated as (n-128)
48 72 H 80 Characters / line mode
+n 4A 74 J fast Paper Feed n DL. he column counter is
not changed
4B 75 K Bit Image Mode. See separate section Bit-
Image Graphics
53 83 S Double Strike
+s 58 88 X Set Margins. +n1 & n2 = smaller => left margin,
bigger => right
+s 5B 91 [ +n1, n2 set Character Size
62 98 b Uni-directional printing
66 102 f Draft mode
68 104 h 40 Characters / line mode
70 112 p Fine Resolution mode
+n 72 114 r Revers/Normal video (n=1/n=0).
73 115 s Normal strike
+n 7A 122 z Printing Direction:
Invers/Normal Printing (n=1/n=0)
9
Bit-Image-Graphics Protocol
he ESC K protocol is similar to EPSON line printers with limitations due to the
fact that the printers used to have a fixed number of dot positions (ND). If more
data is specified than the printer being used is capable of printing, the first ND (left
part) will be printed and the remaining columns of data will be ignored (truncated
to ND). If the margins are changed with the ESC X +s command then the effective
ND is also changed.
Protocol: ESC K n1 n2 (n2*256 + n1 bytes of data) PRIN
Example: 1Bhex K 16dec 1dec (272 bytes of data) 0Dhex
will print 272 columns of BI -IMAGE graphics (truncated at
ND columns).
If the number of bytes = N, the values of n1 and n2 are:
n1 (lsb) = the remainder of dividing N by 256 (N MOD 256). he range is
0dec through 255dec but any number larger than the number
of dots per line will be truncated.
n2 (msb) = the integers quotient of dividing N by 256 (IN (N/256)). Any
data for n2 > 0dec will be truncated.
he character line spacing remains in effect so if the graphics is desired to be
printed on adjacent character lines with no blank dot lines between the graphic
lines, the line spacing must be set by sending ESC 1 (8 DL/CL).
he first byte of data will be printed in the current dot position as a vertical group
of 8 dots defined by the data byte. he most significant bit of the byte will be
printed at the top of the group of dots and the least significant bit will be printed at
the bottom of the group of dots. (If the appropriate bit is a logical 1, a dot will be
printed. If the bit is a 0, nothing will print at that position.) he second byte will be
printed in the next dot position etc., etc., until the byte n1 + (n2 x 256) is printed.
Printing does not occur until a PRIN command is received or until more than ND
bytes of data are received.
Graphics data and ASCII text data can be printed on the same line by not printing
until all required data is in the printer's input buffer. Printing does not occur until a
PRIN command is received or if the ND counter gets greater than the ND for the
printer.
his family of printers has solenoids mounted horizontally with each printing part
of the dot positions for each dot line. Paper is automatically advanced one dot line
as each dot line is printed. he motor is turned off any time the next line of data is
not ready to be printed when the printer completes the previous character line.
he motor must be turned on for one shuttle to get back in sync before any
printing can be done, which causes the paper to feed one dot line. For graphics
mode this means that DA A MUS BE SEN A A FAS ENOUGH RA E HA
I S AYS AHEAD OF HE PRIN ER O AVOID BLANK DO LINES FROM
OCCURRING between each 8 dot lines of BI data.
10