Encryptions/Codes Programming interface (General)
14
T5023/5023+ - Programming Guide
ASCII code
A code table specifies how the printable characters and control commands, for
example, for document ejection and carriage return are encrypted binarily in the
computer or printer. The encryption is expressed by a corresponding hexadeci-
mal or decimal number. A certain character then lies in hexadecimal notation or
in the decimal representation, for example, in the range hex 00 to hex FF or de-
cimal 0 to decimal 255 (8- bit encryption).
Examples:
With the document printer and with most computers the basis for the encryptions is
the code system ASCII ( A merican S tandard C ode for I nformation I nterchange),
which only differs in certain characters for special foreign languages (national ASCII
table). The ASCII code is encrypted via 7 bits, whereby 128 different meanings are
possible
.
Escape sequences / CSI sequences
As the ASCII table provides fewer control codes than print functions, the commands
for the printer normally consist of a sequence of two or more ASCII characters. Such
a code sequence is always preceded by the encryption of the control code ESC (Es-
cape) (ASCII code 27 (decimal) or 1B (hexadecimal). This signals to the printer that
the encryptions following ESC are to be interpreted as commands for
the printer.
There are two kinds of code sequences for the document printer:
– ESC ...
Code sequences, which begin with ESC or the appropriate encryption, are
called ESC sequences.
– CSI ... = ESC [ ...
Code sequences introduced with CSI (Control Sequence Introducer) are
called CSI sequences. CSI sequences are introduced with encryptions of
the character sequence “ESC [” and concluded with the encryption of two
Character Meaning Decimal Hex
A
a
4
LF
ESC
Letter big A
Letter small a
Number 4
Line Feed
Escape
65
97
52
10
27
41
61
34
0A
1B