User`s manual
8–29IBM Proprinter Emulation
Escape
Printer capability is greatly increased by combining character codes into
escape sequences. Escape sequences always begin with the ASCII escape
sequence introducer, ESC (hex 1B).
An ESC sequence introducer in the data stream signals the printer to wait for
special instructions. The character codes following the ESC character tell the
printer what to do.
NOTE: For readability, code sequences appear in this manual with spaces
inserted between command elements. Do not insert spaces between
code characters when you are programming unless the ASCII space
character (SP) is part of a code sequence. For example, a code
sequence printed in this manual as ESC [ 1 is programmed as
ESC[1
An escape sequence uses two or more bytes to define a specific printer
control function. The format for an escape sequence is:
ESC X
2D – 5F
n
0 – FF
Escape
Sequence
Introducer
Character(s) Numerical
parameter(s)
1B
After the ESC character are one or more characters which indicate the action
of the control code. One or more numerical parameters may in turn follow
these characters. For example, the sequence ESC S n tells the printer to
begin the superscript print attribute if n is an even number, or to begin the
subscript attribute if n is an odd number.
If the characters following the ESC code are not within the defined ranges, or
if they are within the defined ranges but not recognized as a function of this
printer, the entire sequence is ignored.
An Escape code can occur anywhere in the datastream and is acted upon
immediately.