Lexmark XS795 Printer Languages and Interfaces Technical Reference - Page 8

Command structure, Control codes, Commands

Page 8 highlights

Printer Control Language (PCL) emulation 8 Command structure Control codes Code Dec Hex BS 8 08 HT 9 09 LF 10 0A FF 12 0C CR 13 0D SP 32 20 SI 15 0F SO 14 0E Function Backspace Horizontal Tab Line Feed Form Feed Carriage Return Space Primary Font Secondary Font Result Moves the cursor toward the left margin one horizontal space equal to the last printed character Moves the cursor to the next defined tab stop Advances the cursor to the same horizontal position on the following line as determined by either the Vertical Motion Index (VMI) or Set Line Spacing command Advances the cursor to the same horizontal position at the top margin of the next page Moves the cursor to the left margin Moves the cursor to the right one column Selects the primary font Selects the secondary font Commands PCL emulation commands are multibyte strings (also known as escape sequences) that begin with the Escape control code (ESC, ←, decimal 27, or hexadecimal 1B). The ESC control code notifies the printer to interpret the characters that follow as part of a command and are not control codes or data to be printed. Command structure Most PCL emulation commands have the following structure: ESC & a # C Spaces have been added to this example for readability. The command parameter variables are indicated by a number sign (#). Element ESC Description Decimal 27 or hex 1B. & Parameterized character from American National Standard Code for Information Interchange (ASCII) table (ranging from 33 to 47 decimal). a Group character from ASCII table (ranging from 96 to 126 decimal) that specifies a group type of control. # Decimal character string value within specified numeric ranges. May be preceded by a + or - sign and contain a decimal point.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148

Command structure
Control codes
Code
Dec
Hex
Function
Result
BS
8
08
Backspace
Moves the cursor toward the left margin
one horizontal space equal to the last
printed character
HT
9
09
Horizontal Tab
Moves the cursor to the next defined tab
stop
LF
10
0A
Line Feed
Advances the cursor to the same
horizontal position on the following line as
determined by either the Vertical Motion
Index (VMI) or Set Line Spacing command
FF
12
0C
Form Feed
Advances the cursor to the same
horizontal position at the top margin of the
next page
CR
13
0D
Carriage Return
Moves the cursor to the left margin
SP
32
20
Space
Moves the cursor to the right one column
SI
15
0F
Primary Font
Selects the primary font
SO
14
0E
Secondary Font
Selects the secondary font
Commands
PCL emulation commands are multibyte strings (also known as escape sequences) that begin with the Escape
control code (
ESC
, ←, decimal 27, or hexadecimal 1B). The
ESC
control code notifies the printer to interpret the
characters that follow as part of a command and are not control codes or data to be printed.
Command structure
Most PCL emulation commands have the following structure:
ESC
& a # C
Spaces have been added to this example for readability. The command parameter variables are indicated by
a number sign (#).
Element
Description
ESC
Decimal 27 or hex 1B.
&
Parameterized character from American National Standard Code for Information
Interchange (ASCII) table (ranging from 33 to 47 decimal).
a
Group character from ASCII table (ranging from 96 to 126 decimal) that specifies a
group type of control.
#
Decimal character string value within specified numeric ranges. May be preceded by
a + or - sign and contain a decimal point.
Printer Control Language (PCL) emulation
8