E VT320 Programming Summary

This appendix is a summary of the control functions and commands described in the VT320 Programmer Reference Manual. If you are a programmer, you can use this appendix as a quick-reference tool to program the VT320.

The appendix is divided into sections that correspond to the chapters of the programmer reference manual. For example, to find out more about 2 Character Encoding, you would go to Chapter 2 of the programmer reference manual.

2 Character Encoding

Character Sets and Codes

Computer systems store characters as a series of bits, usually 7 bits or 8 bits long. A bit is a binary digit. The VT320 can work with 7-bit or 8-bit systems. The VT320 provides the following character sets.

An 8-bit system can use any of these character sets. A 7-bit system can use any set except the supplemental graphic sets.

Each character set has two types of characters, graphic characters and control characters. Graphic characters are the characters you can display on the screen. Control characters make the terminal perform a special function. See "Control Functions" in this appendix.

A code table is a convenient way of showing all the characters in a character set with their codes. Characters appear in rows and columns. One way of finding a character in a character set is by its column/row position. For example, in the ASCII character set the character H is at 4/8 (column 4, row 8).

Each character in a row uses the same binary code for its four least significant bits. This value appears at the left or right of each row. Each character in a column uses the same binary code for its three (or four) most significant bits. This value appears at the top of each column.

Next to each character appears the octal, decimal, and hexadecimal code for the character. Different programmers may prefer using octal, decimal, or hexadecimal values for different purposes.

DEC Multinational Character Set

Left Half -- ASCII Set
ROW COLUMN 0 1 2 3 4 5 6 7
b8 BITS
b7
b6
b5
b4 b3 b2 b1
0  
  0
  0  
  0
 
0  
  0
  0  
  1
 
0  
  0
  1  
  0
 
0  
  0
  1  
  1
 
0  
  1
  0  
  0
 
0  
  1
  0  
  1
 
0  
  1
  1  
  0
 
0  
  1
  1  
  1
 
0
0 0 0 0
NUL 0
0
0
DLE 20
16
10
SP 40
32
20
0 60
48
30
@ 100
64
40
P 120
80
50
` 140
96
60
p 160
112
70
1
0 0 0 1
SOH 1
1
1
DC1
(XON)
21
17
11
! 41
33
21
1 61
49
31
A 101
65
41
Q 121
81
51
a 141
97
61
q 161
113
71
2
0 0 1 0
STX 2
2
2
DC2 22
18
12
" 42
34
22
2 62
50
32
B 102
66
42
R 122
82
52
b 142
98
62
r 162
114
72
3
0 0 1 1
ETX 3
3
3
DC3
(XOFF)
23
19
13
# 43
35
23
3 63
51
33
C 103
67
43
S 123
83
53
c 143
99
63
s 163
115
73
4
0 1 0 0
EOT 4
4
4
DC4 24
20
14
$ 44
36
24
4 64
52
34
D 104
68
44
T 124
84
54
d 144
100
64
t 164
116
74
5
0 1 0 1
ENQ 5
5
5
NAK 25
21
15
% 45
37
25
5 65
53
35
E 105
69
45
U 125
85
55
e 145
101
65
u 165
117
75
6
0 1 1 0
ACK 6
6
6
SYN 26
22
16
& 46
38
26
6 66
54
36
F 106
70
46
V 126
86
56
f 146
102
66
v 166
118
76
7
0 1 1 1
BEL 7
7
7
ETB 27
23
17
' 47
39
27
7 67
55
37
G 107
71
47
W 127
87
57
g 147
103
67
w 167
119
77
8
1 0 0 0
BS 10
8
8
CAN 30
24
18
( 50
40
28
8 70
56
38
H 110
72
48
X 130
88
58
h 150
104
68
x 170
120
78
9
1 0 0 1
HT 11
9
9
EM 31
25
19
) 51
41
29
9 71
57
39
I 111
73
49
Y 131
89
59
i 151
105
69
y 171
121
79
10
1 0 1 0
LF 12
10
A
SUB 32
26
1A
* 52
42
2A
: 72
58
3A
J 112
74
4A
Z 132
90
5A
j 152
106
6A
z 172
122
7A
11
1 0 1 1
VT 13
11
B
ESC 33
27
1B
+ 53
43
2B
; 73
59
3B
K 113
75
4B
[ 133
91
5B
k 153
107
6B
{ 173
123
7B
12
1 1 0 0
FF 14
12
C
FS 34
28
1C
, 54
44
2C
< 74
60
3C
L 114
76
4C
\ 134
92
5C
l 154
108
6C
| 174
124
7C
13
1 1 0 1
CR 15
13
D
GS 35
29
1D
- 55
45
2D
= 75
61
3D
M 115
77
4D
] 135
93
5D
m 155
109
6D
} 175
125
7D
14
1 1 1 0
SO 16
14
E
RS 36
30
1E
. 56
46
2E
> 76
62
3E
N 116
78
4E
^ 136
94
5E
n 156
110
6E
~ 176
126
7E
15
1 1 1 1
SI 17
15
F
US 37
31
1F
/ 57
47
2F
? 77
63
3F
O 117
79
4F
_ 137
95
5F
o 157
111
6F
DEL 177
127
7F
  C0 CODES GL CODES
(ASCII GRAPHICS)
KEY  
CHARACTER 
ESC 33
27
1B
 OCTAL
 DECIMAL
 HEX
Right Half -- DEC Supplemental Graphic Set
8 9 10 11 12 13 14 15 COLUMN ROW
1  
  0
  0  
  0
 
1  
  0
  0  
  1
 
1  
  0
  1  
  0
 
1  
  0
  1  
  1
 
1  
  1
  0  
  0
 
1  
  1
  0  
  1
 
1  
  1
  1  
  0
 
1  
  1
  1  
  1
 
b8 BITS
b7
b6
b5
b4 b3 b2 b1
  200
128
80
DCS 220
144
90
(undef) 240
160
A0
° 260
176
B0
À 300
192
C0
  320
208
D0
à 340
224
E0
  360
240
F0
0 0 0 0
0
  201
129
81
PU1 221
145
91
¡ 241
161
A1
± 261
177
B1
Á 301
193
C1
Ñ 321
209
D1
á 341
225
E1
ñ 361
241
F1
0 0 0 1
1
  202
130
82
PU2 222
146
92
¢ 242
162
A2
² 262
178
B2
 302
194
C2
Ò 322
210
D2
â 342
226
E2
ò 362
242
F2
0 0 1 0
2
  203
131
83
STS 223
147
93
£ 243
163
A3
³ 263
179
B3
à 303
195
C3
Ó 323
211
D3
ã 343
227
E3
ó 363
243
F3
0 0 1 1
3
IND 204
132
84
CCH 224
148
94
  244
164
A4
  264
180
B4
Ä 304
196
C4
Ô 324
212
D4
ä 344
228
E4
ô 364
244
F4
0 1 0 0
4
NEL 205
133
85
MW 225
149
95
¥ 245
165
A5
µ 265
181
B5
Å 305
197
C5
Õ 325
213
D5
å 345
229
E5
õ 365
245
F5
0 1 0 1
5
SSA 206
134
86
SPA 226
150
96
  246
166
A6
266
182
B6
Æ 306
198
C6
Ö 326
214
D6
æ 346
230
E6
ö 366
246
F6
0 1 1 0
6
ESA 207
135
87
EPA 227
151
97
§ 247
167
A7
· 267
183
B7
Ç 307
199
C7
Œ 327
215
D7
ç 347
231
E7
œ 367
247
F7
0 1 1 1
7
HTS 210
136
88
  230
152
98
¤ 250
168
A8
  270
184
B8
È 310
200
C8
Ø 330
216
D8
è 350
232
E8
ø 370
248
F8
1 0 0 0
8
HTJ 211
137
89
  231
153
99
© 251
169
A9
¹ 271
185
B9
É 311
201
C9
Ù 331
217
D9
é 351
233
E9
ù 371
249
F9
1 0 0 1
9
VTS 212
138
8A
  232
154
9A
ª 252
170
AA
º 272
186
BA
Ê 312
202
CA
Ú 332
218
DA
ê 352
234
EA
ú 372
250
FA
1 0 1 0
10
PLD 213
139
8B
CSI 233
155
9B
« 253
171
AB
» 273
187
BB
Ë 313
203
CB
Û 333
219
DB
ë 353
235
EB
û 373
251
FB
1 0 1 1
11
PLU 214
140
8C
ST 234
156
9C
  254
172
AC
¼ 274
188
BC
Ì 314
204
CC
Ü 334
220
DC
ì 354
236
EC
ü 374
252
FC
1 1 0 0
12
RI 215
141
8D
OSC 235
157
9D
  255
173
AD
½ 275
189
BD
Í 315
205
CD
Ÿ 335
221
DD
í 355
237
ED
ÿ 375
253
FD
1 1 0 1
13
SS2 216
142
8E
PM 236
158
9E
  256
174
AE
  276
190
BE
Î 316
206
CE
  336
222
DE
î 356
238
EE
  376
254
FE
1 1 1 0
14
SS3 217
143
8F
APC 237
159
9F
  257
175
AF
¿ 277
191
BF
Ï 317
207
CF
ß 337
223
DF
ï 357
239
EF
(undef) 377
255
FF
1 1 1 1
15
  C1 CODES GR CODES
(DEC SUPPLEMENTAL GRAPHICS)

National Replacement Character Sets (NRCs)

This table shows the characters in each NRC set that differ from the ASCII set.

National Replacement Character Sets
Character Set 2/3 4/0 5/11 5/12 5/13 5/14 5/15 6/0 7/11 7/12 7/13 7/14
ASCII # @ [ \ ] ^ _ ` { | } ~
United Kingdom £ @ [ \ ] ^ _ ` { | } ~
Dutch £ ¾ ÿ ½ | ^ _ ` ¨ f ¼ '
Finnish # @ Ä Ö Å Ü _ é ä ö å ü
French £ à ° ç § ^ _ ` é ù è ¨
French Canadian # à â ç ê î _ ô é ù è û
German # § Ä Ö Ü ^ _ ` ä ö ¨ ß
Italian £ § ° ç é ^ _ ù à ò è ì
Norwegian/ Danish # @ Æ Ø Å ^ _ ` æ ø å ~
Portuguese # @ Ã Ç Õ ^ _ ` ã ç õ ~
Spanish £ § ¡ Ñ ¿ ^ _ ` ` ° ñ ç
Swedish # É Ä Ö Å Ü _ é ä ö å ü
Swiss ù à é ç ê î è ô ä ö ü û

ISO Latin Alphabet Nr 1 Supplemental Set

This is the right half of the ISO Latin-1 multinational character set. The left half is the ASCII character set.

8 9 10 11 12 13 14 15 COLUMN ROW
1  
  0
  0  
  0
 
1  
  0
  0  
  1
 
1  
  0
  1  
  0
 
1  
  0
  1  
  1
 
1  
  1
  0  
  0
 
1  
  1
  0  
  1
 
1  
  1
  1  
  0
 
1  
  1
  1  
  1
 
b8 BITS
b7
b6
b5
b4 b3 b2 b1
  200
128
80
DCS 220
144
90
NBSP 240
160
A0
° 260
176
B0
À 300
192
C0
Ð 320
208
D0
à 340
224
E0
ð 360
240
F0
0 0 0 0
0
  201
129
81
PU1 221
145
91
¡ 241
161
A1
± 261
177
B1
Á 301
193
C1
Ñ 321
209
D1
á 341
225
E1
ñ 361
241
F1
0 0 0 1
1
  202
130
82
PU2 222
146
92
¢ 242
162
A2
² 262
178
B2
 302
194
C2
Ò 322
210
D2
â 342
226
E2
ò 362
242
F2
0 0 1 0
2
  203
131
83
STS 223
147
93
£ 243
163
A3
³ 263
179
B3
à 303
195
C3
Ó 323
211
D3
ã 343
227
E3
ó 363
243
F3
0 0 1 1
3
IND 204
132
84
CCH 224
148
94
¤ 244
164
A4
´ 264
180
B4
Ä 304
196
C4
Ô 324
212
D4
ä 344
228
E4
ô 364
244
F4
0 1 0 0
4
NEL 205
133
85
MW 225
149
95
¥ 245
165
A5
µ 265
181
B5
Å 305
197
C5
Õ 325
213
D5
å 345
229
E5
õ 365
245
F5
0 1 0 1
5
SSA 206
134
86
SPA 226
150
96
¦ 246
166
A6
266
182
B6
Æ 306
198
C6
Ö 326
214
D6
æ 346
230
E6
ö 366
246
F6
0 1 1 0
6
ESA 207
135
87
EPA 227
151
97
§ 247
167
A7
· 267
183
B7
Ç 307
199
C7
× 327
215
D7
ç 347
231
E7
÷ 367
247
F7
0 1 1 1
7
HTS 210
136
88
  230
152
98
¨ 250
168
A8
¸ 270
184
B8
È 310
200
C8
Ø 330
216
D8
è 350
232
E8
ø 370
248
F8
1 0 0 0
8
HTJ 211
137
89
  231
153
99
© 251
169
A9
¹ 271
185
B9
É 311
201
C9
Ù 331
217
D9
é 351
233
E9
ù 371
249
F9
1 0 0 1
9
VTS 212
138
8A
  232
154
9A
ª 252
170
AA
º 272
186
BA
Ê 312
202
CA
Ú 332
218
DA
ê 352
234
EA
ú 372
250
FA
1 0 1 0
10
PLD 213
139
8B
CSI 233
155
9B
« 253
171
AB
» 273
187
BB
Ë 313
203
CB
Û 333
219
DB
ë 353
235
EB
û 373
251
FB
1 0 1 1
11
PLU 214
140
8C
ST 234
156
9C
¬ 254
172
AC
¼ 274
188
BC
Ì 314
204
CC
Ü 334
220
DC
ì 354
236
EC
ü 374
252
FC
1 1 0 0
12
RI 215
141
8D
OSC 235
157
9D
- 255
173
AD
½ 275
189
BD
Í 315
205
CD
Ý 335
221
DD
í 355
237
ED
ý 375
253
FD
1 1 0 1
13
SS2 216
142
8E
PM 236
158
9E
® 256
174
AE
¾ 276
190
BE
Î 316
206
CE
Þ 336
222
DE
î 356
238
EE
þ 376
254
FE
1 1 1 0
14
SS3 217
143
8F
APC 237
159
9F
¯ 257
175
AF
¿ 277
191
BF
Ï 317
207
CF
ß 337
223
DF
ï 357
239
EF
ÿ 377
255
FF
1 1 1 1
15
C1 CODES GR CODES
(ISO LATIN-1 SUPPLEMENTAL GRAPHIC)
 

DEC Special Graphic Character Set

ROW COLUMN 0 1 2 3 4 5 6 7
b8 BITS
b7
b6
b5
b4 b3 b2 b1
0  
  0
  0  
  0
 
0  
  0
  0  
  1
 
0  
  0
  1  
  0
 
0  
  0
  1  
  1
 
0  
  1
  0  
  0
 
0  
  1
  0  
  1
 
0  
  1
  1  
  0
 
0  
  1
  1  
  1
 
0
0 0 0 0
NUL 0
0
0
DLE 20
16
10
SP 40
32
20
0 60
48
30
@ 100
64
40
P 120
80
50
140
96
60

SCAN 3
160
112
70
1
0 0 0 1
SOH 1
1
1
DC1
(XON)
21
17
11
! 41
33
21
1 61
49
31
A 101
65
41
Q 121
81
51
141
97
61

SCAN 5
161
113
71
2
0 0 1 0
STX 2
2
2
DC2 22
18
12
" 42
34
22
2 62
50
32
B 102
66
42
R 122
82
52
HT 142
98
62

SCAN 7
162
114
72
3
0 0 1 1
ETX 3
3
3
DC3
(XOFF)
23
19
13
# 43
35
23
3 63
51
33
C 103
67
43
S 123
83
53
FF 143
99
63

SCAN 9
163
115
73
4
0 1 0 0
EOT 4
4
4
DC4 24
20
14
$ 44
36
24
4 64
52
34
D 104
68
44
T 124
84
54
CR 144
100
64
164
116
74
5
0 1 0 1
ENQ 5
5
5
NAK 25
21
15
% 45
37
25
5 65
53
35
E 105
69
45
U 125
85
55
LF 145
101
65
165
117
75
6
0 1 1 0
ACK 6
6
6
SYN 26
22
16
& 46
38
26
6 66
54
36
F 106
70
46
V 126
86
56
° 146
102
66
166
118
76
7
0 1 1 1
BEL 7
7
7
ETB 27
23
17
' 47
39
27
7 67
55
37
G 107
71
47
W 127
87
57
± 147
103
67
167
119
77
8
1 0 0 0
BS 10
8
8
CAN 30
24
18
( 50
40
28
8 70
56
38
H 110
72
48
X 130
88
58
NL 150
104
68
170
120
78
9
1 0 0 1
HT 11
9
9
EM 31
25
19
) 51
41
29
9 71
57
39
I 111
73
49
Y 131
89
59
VT 151
105
69
171
121
79
10
1 0 1 0
LF 12
10
A
SUB 32
26
1A
* 52
42
2A
: 72
58
3A
J 112
74
4A
Z 132
90
5A
152
106
6A
172
122
7A
11
1 0 1 1
VT 13
11
B
ESC 33
27
1B
+ 53
43
2B
; 73
59
3B
K 113
75
4B
[ 133
91
5B
153
107
6B
173
123
7B
12
1 1 0 0
FF 14
12
C
FS 34
28
1C
, 54
44
2C
< 74
60
3C
L 114
76
4C
\ 134
92
5C
154
108
6C
174
124
7C
13
1 1 0 1
CR 15
13
D
GS 35
29
1D
- 55
45
2D
= 75
61
3D
M 115
77
4D
] 135
93
5D
155
109
6D
£ 175
125
7D
14
1 1 1 0
SO 16
14
E
RS 36
30
1E
. 56
46
2E
> 76
62
3E
N 116
78
4E
^ 136
94
5E
156
110
6E
· 176
126
7E
15
1 1 1 1
SI 17
15
F
US 37
31
1F
/ 57
47
2F
? 77
63
3F
O 117
79
4F
(blank) 137
95
5F

SCAN 1
157
111
6F
DEL 177
127
7F
  C0 CODES GL CODES
(DEC SPECIAL GRAPHICS)
KEY  
CHARACTER 
ESC 33
27
1B
 OCTAL
 DECIMAL
 HEX

Display Controls Font

You can have the terminal display the characters in your control functions, rather than performing the function. This is useful for debugging programs. To display control characters, you use the Controls feature in the Display Set-Up screen (Chapter 4).

Display Controls Font (Left Half)
ROW COLUMN 0 1 2 3 4 5 6 7
b8 BITS
b7
b6
b5
b4 b3 b2 b1
0  
  0
  0  
  0
 
0  
  0
  0  
  1
 
0  
  0
  1  
  0
 
0  
  0
  1  
  1
 
0  
  1
  0  
  0
 
0  
  1
  0  
  1
 
0  
  1
  1  
  0
 
0  
  1
  1  
  1
 
0
0 0 0 0
NU 0
0
0
DL 20
16
10
  40
32
20
0 60
48
30
@ 100
64
40
P 120
80
50
` 140
96
60
p 160
112
70
1
0 0 0 1
SH 1
1
1
D1 21
17
11
! 41
33
21
1 61
49
31
A 101
65
41
Q 121
81
51
a 141
97
61
q 161
113
71
2
0 0 1 0
SX 2
2
2
D2 22
18
12
" 42
34
22
2 62
50
32
B 102
66
42
R 122
82
52
b 142
98
62
r 162
114
72
3
0 0 1 1
EX 3
3
3
D3 23
19
13
# 43
35
23
3 63
51
33
C 103
67
43
S 123
83
53
c 143
99
63
s 163
115
73
4
0 1 0 0
ET 4
4
4
D4 24
20
14
$ 44
36
24
4 64
52
34
D 104
68
44
T 124
84
54
d 144
100
64
t 164
116
74
5
0 1 0 1
EQ 5
5
5
NK 25
21
15
% 45
37
25
5 65
53
35
E 105
69
45
U 125
85
55
e 145
101
65
u 165
117
75
6
0 1 1 0
AK 6
6
6
SY 26
22
16
& 46
38
26
6 66
54
36
F 106
70
46
V 126
86
56
f 146
102
66
v 166
118
76
7
0 1 1 1
BL 7
7
7
EB 27
23
17
' 47
39
27
7 67
55
37
G 107
71
47
W 127
87
57
g 147
103
67
w 167
119
77
8
1 0 0 0
BS 10
8
8
CN 30
24
18
( 50
40
28
8 70
56
38
H 110
72
48
X 130
88
58
h 150
104
68
x 170
120
78
9
1 0 0 1
HT 11
9
9
EM 31
25
19
) 51
41
29
9 71
57
39
I 111
73
49
Y 131
89
59
i 151
105
69
y 171
121
79
10
1 0 1 0
LF 12
10
A
reverse question mark 32
26
1A
* 52
42
2A
: 72
58
3A
J 112
74
4A
Z 132
90
5A
j 152
106
6A
z 172
122
7A
11
1 0 1 1
VT 13
11
B
EC 33
27
1B
+ 53
43
2B
; 73
59
3B
K 113
75
4B
[ 133
91
5B
k 153
107
6B
{ 173
123
7B
12
1 1 0 0
FF 14
12
C
FS 34
28
1C
, 54
44
2C
< 74
60
3C
L 114
76
4C
\ 134
92
5C
l 154
108
6C
| 174
124
7C
13
1 1 0 1
CR 15
13
D
GS 35
29
1D
- 55
45
2D
= 75
61
3D
M 115
77
4D
] 135
93
5D
m 155
109
6D
} 175
125
7D
14
1 1 1 0
SO 16
14
E
RS 36
30
1E
. 56
46
2E
> 76
62
3E
N 116
78
4E
^ 136
94
5E
n 156
110
6E
~ 176
126
7E
15
1 1 1 1
SI 17
15
F
US 37
31
1F
/ 57
47
2F
? 77
63
3F
O 117
79
4F
_ 137
95
5F
o 157
111
6F
DT 177
127
7F
  C0 CODES GL CODES
(ASCII GRAPHICS)
KEY  
CHARACTER 
ESC 33
27
1B
 OCTAL
 DECIMAL
 HEX
Display Controls Font (Right Half)
8 9 10 11 12 13 14 15 COLUMN ROW
1  
  0
  0  
  0
 
1  
  0
  0  
  1
 
1  
  0
  1  
  0
 
1  
  0
  1  
  1
 
1  
  1
  0  
  0
 
1  
  1
  0  
  1
 
1  
  1
  1  
  0
 
1  
  1
  1  
  1
 
b8 BITS
b7
b6
b5
b4 b3 b2 b1
80 200
128
80
DC 220
144
90
A0 240
160
A0
° 260
176
B0
À 300
192
C0
Ð 320
208
D0
à 340
224
E0
ð 360
240
F0
0 0 0 0
0
81 201
129
81
P1 221
145
91
¡ 241
161
A1
± 261
177
B1
Á 301
193
C1
Ñ 321
209
D1
á 341
225
E1
ñ 361
241
F1
0 0 0 1
1
82 202
130
82
P2 222
146
92
¢ 242
162
A2
² 262
178
B2
 302
194
C2
Ò 322
210
D2
â 342
226
E2
ò 362
242
F2
0 0 1 0
2
83 203
131
83
SE 223
147
93
£ 243
163
A3
³ 263
179
B3
à 303
195
C3
Ó 323
211
D3
ã 343
227
E3
ó 363
243
F3
0 0 1 1
3
IN 204
132
84
CC 224
148
94
¤ 244
164
A4
´ 264
180
B4
Ä 304
196
C4
Ô 324
212
D4
ä 344
228
E4
ô 364
244
F4
0 1 0 0
4
NL 205
133
85
MW 225
149
95
¥ 245
165
A5
µ 265
181
B5
Å 305
197
C5
Õ 325
213
D5
å 345
229
E5
õ 365
245
F5
0 1 0 1
5
SS 206
134
86
SP 226
150
96
¦ 246
166
A6
266
182
B6
Æ 306
198
C6
Ö 326
214
D6
æ 346
230
E6
ö 366
246
F6
0 1 1 0
6
ES 207
135
87
EP 227
151
97
§ 247
167
A7
· 267
183
B7
Ç 307
199
C7
× 327
215
D7
ç 347
231
E7
÷ 367
247
F7
0 1 1 1
7
HS 210
136
88
98 230
152
98
¨ 250
168
A8
¸ 270
184
B8
È 310
200
C8
Ø 330
216
D8
è 350
232
E8
ø 370
248
F8
1 0 0 0
8
HJ 211
137
89
99 231
153
99
© 251
169
A9
¹ 271
185
B9
É 311
201
C9
Ù 331
217
D9
é 351
233
E9
ù 371
249
F9
1 0 0 1
9
VS 212
138
8A
9A 232
154
9A
ª 252
170
AA
º 272
186
BA
Ê 312
202
CA
Ú 332
218
DA
ê 352
234
EA
ú 372
250
FA
1 0 1 0
10
PD 213
139
8B
CS 233
155
9B
« 253
171
AB
» 273
187
BB
Ë 313
203
CB
Û 333
219
DB
ë 353
235
EB
û 373
251
FB
1 0 1 1
11
PU 214
140
8C
ST 234
156
9C
¬ 254
172
AC
¼ 274
188
BC
Ì 314
204
CC
Ü 334
220
DC
ì 354
236
EC
ü 374
252
FC
1 1 0 0
12
RI 215
141
8D
OS 235
157
9D
- 255
173
AD
½ 275
189
BD
Í 315
205
CD
Ý 335
221
DD
í 355
237
ED
ý 375
253
FD
1 1 0 1
13
S2 216
142
8E
PM 236
158
9E
® 256
174
AE
¾ 276
190
BE
Î 316
206
CE
Þ 336
222
DE
î 356
238
EE
þ 376
254
FE
1 1 1 0
14
S3 217
143
8F
AP 237
159
9F
¯ 257
175
AF
¿ 277
191
BF
Ï 317
207
CF
ß 337
223
DF
ï 357
239
EF
ÿ 377
255
FF
1 1 1 1
15
C1 CODES GR CODES
(ISO LATIN-1 SUPPLEMENTAL GRAPHIC)
 

Control Functions

Programmers use control functions to make the VT320 perform a range of special actions, from the simple (moving the cursor) to the complex (emulating another terminal). The way you enter control functions in an application depends on two factors: your computing system and the programming language you use.

There are two types of control functions, single-character and multiple-character. Single-character functions, called control characters, perform simpler functions. There are two groups of control characters, C0 and C1. C0 characters appear in columns 0 and 1 of the code tables. C1 characters appear in columns 8 and 9. C1 characters are not available in 7-bit systems. The next section lists the function of each control character.

Control functions can perform more complex functions. There are three types of multiple-character control functions: escape sequences, control sequences, and device control strings. Each type begins with a certain control character.

Escape Sequences

An escape sequence begins with the C0 character ESC, followed by one or more graphic characters from the ASCII set. The ESC character tells the system that the graphic characters are part of a control function, not characters to be displayed. For example,

ESC # 6

is an escape sequence that changes the current line of text to double-width characters. Escape sequences use only 7-bit characters, and can be used in 7-bit or 8-bit systems.

Control Sequences

A control sequence begins with the C1 character CSI, followed by one or more ASCII graphic characters. You can also express CSI as two 7-bit characters, ESC [. So you can express control sequences as escape sequences. For example, the following two sequences perform the same function -- they change the display from 80 to 132 columns per line.

CSI ? 3 h

ESC [ ? 3 h

Whenever possible use CSI instead of ESC [ to introduce a control sequence. You can only use CSI in 8-bit systems.

Device Control Strings

A device control string begins with the C1 character DCS, followed by one or more ASCII graphic characters, a data string, and the C1 character ST (string terminator). For an example of a device control string, see "Down-Line-Loading a Soft Character Set" in this appendix.

For 7-bit systems, you can express DCS as ESC P. You can express ST as ESC \.

C0 (7-Bit) Control Characters Recognized

Name Mnemonic Function
Null NUL Ignored.
Enquiry ENQ Sends the answerback message.
Bell BEL Sounds the bell tone if the bell is enabled in set-up.
Backspace BS Moves the cursor one character position to the left. If the cursor is at the left margin, no action occurs.
Horizontal tab HT Moves the cursor to the next tab stop. If there are no more tab stops, the cursor moves to the right margin. HT does not cause text to auto wrap.
Line feed LF Causes a line feed or a new line operation, depending on the setting of line feed/new line mode.
Vertical tab VT Treated as LF.
Form feed FF Treated as LF.
Carriage return CR Moves the cursor to the left margin on the current line.
Shift out
(Locking shift 1)
SO (LS1) Maps the G1 character set into GL. You designate G1 by using a select character set (SCS) sequence. See the VT320 Programmer Reference Manual, Chapter 5.
Shift in
(Locking shift 0)
SI (LS0) Maps the G0 character set into GL. You designate G0 by using a select character set (SCS) sequence. See the VT320 Programmer Reference Manual, Chapter 5.
Device control 1
(XON)
DC1 Also known as XON. If XON/XOFF flow control is enabled in set-up, DC1 clears DC3 (XOFF). This action causes the VT320 to continue sending characters.
Device control 3
(XOFF)
DC3 Also known as XOFF. If XON/XOFF flow control is enabled in set-up, DC3 causes the VT320 to stop sending characters. The terminal cannot resume sending characters until it receives a DC1 control character.
Cancel CAN Immediately cancels an escape sequence or control sequence in progress. The VT320 does not display any error characters.
Substitute SUB Immediately cancels an escape sequence or control sequence in progress. The VT320 displays a reverse question mark for an error character.
Escape ESC Introduces an escape sequence. ESC also cancels any escape sequence or control sequence in progress.
Delete DEL Ignored when received. DEL is not used as a fill character. Digital does not recommend using DEL as a fill character. Use NUL instead.

C1 (8-Bit) Control Characters Recognized

Name Mnemonic Function
* The VT320 ignores all following characters, until it receives an ST control character. ESC, CAN, and SUB no longer cancel device control strings.
Index IND Moves the cursor down one line in the same column. If the cursor is at the bottom margin, data on the screen scrolls up.
Next line NEL Moves the cursor to the first position on the next line. If the cursor is at the bottom margin, data on the screen scrolls up.
Horizontal tab set HTS Sets a horizontal tab stop at the column where the cursor is.
Reverse index RI Moves the cursor up one line in the same column. If the cursor is at the top margin, data on the screen scrolls down.
Single shift 2 SS2 Temporarily maps the G2 character set into GL, for the next graphic character. You designate the G2 set by using a select character set (SCS) sequence. See the VT320 Programmer Reference Manual, Chapter 5.
Single shift 3 SS3 Temporarily maps the G3 character set into GL, for the next graphic character. You designate the G3 set by using a select character set (SCS) sequence. See the VT320 Programmer Reference Manual, Chapter 5.
Device control string DCS Introduces a device control string.
Control sequence introducer CSI Introduces a control sequence.
String terminator ST Ends a control string. You use ST in combination with DCS, APC, OSC, PM, or SOS control strings.
Operating system command OSC Introduces an operating system command.*
Privacy message PM Introduces a privacy message string.*
Application program command APC Introduces an application program command.*

8-Bit Control Characters and Their 7-Bit Equivalents

Name 8-Bit Character 7-Bit Sequence
Index IND ESC D
Next line NEL ESC E
Horizontal tab set HTS ESC H
Reverse index RI ESC M
Single shift 2 SS2 ESC N
Single shift 3 SS3 ESC O
Device control string DCS ESC P
Control sequence introducer CSI ESC [
String terminator ST ESC \
Operating system command OSC ESC ]
Privacy message PM ESC ^
Application program command APC ESC _

3 Keyboard Codes

Codes Sent by Editing Keys

Key Code Sent
VT300 Mode VT100, VT52 Modes
Find CSI 1 ~ The editing keys do not send codes in these two modes.
Insert Here CSI 2 ~
Remove CSI 3 ~
Select CSI 4 ~
Prev Screen CSI 5 ~
Next Screen CSI 6 ~

Codes Sent by Arrow Keys

Key Cursor Key Mode Setting (DECCKM)
ANSI Mode* VT52 Mode*
Cursor Application Cursor or Application
* ANSI mode applies to VT300 and VT100 modes. VT52 mode is not compatible with ANSI mode.
Up CSI A SS3 A ESC A
Down CSI B SS3 B ESC B
Right CSI C SS3 C ESC C
Left CSI D SS3 D ESC D

Codes Sent by Numeric Keypad Keys

Key ANSI Mode* VT52 Mode*
Numeric Application Numeric Application
* ANSI mode applies to VT300 and VT100 modes. VT52 mode is not compatible with ANSI standards.
† The last character in the sequence is a lowercase L.
‡ You cannot use these sequences on a VT52 terminal.
§ Keypad numeric mode. Enter sends the same codes as Return. You can use line feed/new line mode (LNM) to change the code sent by Return. When LNM is reset, pressing Return sends one control character (CR). When LNM is set, pressing Return sends two control characters (CR, LF).
0 0 SS3 p 0 ESC ? p
1 1 SS3 q 1 ESC ? q
2 2 SS3 r 2 ESC ? r
3 3 SS3 s 3 ESC ? s
4 4 SS3 t 4 ESC ? t
5 5 SS3 u 5 ESC ? u
6 6 SS3 v 6 ESC ? v
7 7 SS3 w 7 ESC ? w
8 8 SS3 x 8 ESC ? x
9 9 SS3 y 9 ESC ? y
- (minus) - SS3 m - ESC ? m
, (comma) , SS3 l , ESC ? l†‡
. (period) . SS3 n . ESC ? n
Enter CR or CR LF§ SS3 M CR or CR LF§ ESC ? M
PF1 SS3 P SS3 P ESC P ESC P
PF2 SS3 Q SS3 Q ESC Q ESC Q
PF3 SS3 R SS3 R ESC R ESC R
PF4 SS3 S SS3 S ESC S ESC S

Codes Sent by the Top-Row Function Keys

Name on Legend Strip Key Number Code Sent
VT300 Modes VT100, VT52 modes
* These keys do not send codes. They are local function keys.
Hold Screen (F1)* -- --
Print Screen (F2)* -- --
Set-Up (F3)* -- --
F4 (F4)* -- --
Break (F5)* -- --
F6 F6 CSI 1 7 ~ --
F7 F7 CSI 1 8 ~ --
F8 F8 CSI 1 9 ~ --
F9 F9 CSI 2 0 ~ --
F10 F10 CSI 2 1 ~ --
F11 (ESC) F11 CSI 2 3 ~ ESC
F12 (BS) F12 CSI 2 4 ~ BS
F13 (LF) F13 CSI 2 5 ~ LF
F14 F14 CSI 2 6 ~ --
Help F15 CSI 2 8 ~ --
Do F16 CSI 2 9 ~ --
F17 F17 CSI 3 1 ~ --
F18 F18 CSI 3 2 ~ --
F19 F19 CSI 3 3 ~ --
F20 F20 CSI 3 4 ~ --

Keys Used to Send 7-Bit Control Characters

Control Character Mnemonic Code Table Position Key Pressed With Ctrl (All Modes) Dedicated Function Key
* 7-bit control characters sent in VT100 and VT52 modes only.
† 7-bit control codes sent only when XON/XOFF support is off.
NUL 0/00 2 or space bar --
SOH 0/01 A --
STX 0/02 B --
ETX 0/03 C --
EOT 0/04 D --
ENQ 0/05 E --
ACK 0/06 F --
BEL 0/07 G --
BS 0/08 H F12 (BS)*
HT 0/09 I Tab
LF 0/10 J F13 (LF)*
VT 0/11 K --
FF 0/12 L --
CR 0/13 M Return
SO 0/14 N --
SI 0/15 O --
DLE 1/00 P --
DC1 1/01 Q† --
DC2 1/02 R --
DC3 1/03 S† --
DC4 1/04 T --
NAK 1/05 U --
SYN 1/06 V --
ETB 1/07 W --
CAN