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 printerand with most computers the basis for the encryptions is
the code system ASCII ( AmericanSt andard Code for Information Interchange),
which onlydiffers in certain characters for special foreign languages (national ASCII
table). The ASCII code is encryptedvia 7 bits, whereby 128 different meaningsare
possible.
Escape sequences / CSI sequences
As the ASCII table providesfewer control codes than print functions, the commands
for theprinter normally consist of a sequence of two or more ASCII characters. Such
a code sequenceis always preceded by the encryption of the control code ESC (Es-
cape) (ASCII code27 (decimal) or 1B (hexadecimal). This signals to the printer that
the encryptions following ESC are to be interpre ted 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