The text of a manual · part 30 of 46
TE 2000 VT/ANSI Terminal Emulation Programmer's Guide: Chapter 6: Programming, pages 248 to 256
Pages 248 to 256 of 400, from TE 2000 VT/ANSI Terminal Emulation Programmer's Guide
The original document is the PDF (3.1 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec 5020
Page 248
6
Programming
This chapter describes programming for the terminals and contains the following information: S The received codes the terminals support. Received codes include C0 and C1 control characters, character sets, and terminal modes (page 233). S The transmitted keyboard codes generated by the terminals’ keys and sent to the host computer (page 258). S The capability of the terminals to emulate VT/ANSI terminal top-row function, main keypad, editing, and auxiliary keys (page 259). S VT340 applications supported by the terminals. Applications include working in local editing and interactive modes, and creating text forms (page 255).
TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide
223
Page 249
Chapter 6, Programming
Character Encoding The implementation of VT/ANSI terminal emulation supports both 7-bit and 8-bit communications environments. The implementation consists of an 8-bit asynchronous character encoding scheme and a 7-bit code extension technique so that the terminal is compatible with ANSI and ISO standards. All 8-bit codes can be referenced by using two-byte ESCape sequences in accordance with ANSI standard X3.41 -- 1974. The document commonly referred to when ANSI is mentioned is ANSI X3.64 -- 1979, Additional Controls for Use With American National Standard for Information Interchange. The ANSI X3.64 standard controls character imaging devices such as the VT200 terminal. ANSI and ISO determine the current standards for character encoding in the communications industry.
Character Sets The terminal processes most characters it receives from the host computer based on characters whose codes and functions are defined and standardized by ANSI. The types are 7-bit and 8-bit character codes.
Multinational Character Set The DEC multinational character set consists of C0, GL, C1, and GR codes.
C0 and GL Codes The left half of the multinational character set consists of control characters (C0 codes) and graphic characters (GL codes). Control characters are 7-bit compatible, nondisplayable single-byte characters that perform specific functions during communications and text processing. C0 codes range from 00 to 1F hexadecimal, and include 7F hexadecimal (DEL) and can be used in a 7- or 8-bit environment. Graphic characters are 7-bit compatible, displayable characters that represent various alphanumeric characters, punctuation marks, and symbols that appear in the terminal’s display. GL codes range from 21 to 7E hexadecimal. They can be used in a 7-bit or an 8-bit environment. The space character (20 hexadecimal) may be a graphic character or a control character, depending on the context. The table on the next page shows the C0 and and GL codes recognized by the terminal. Ignored codes are parsed (removed) from the data stream with no action taken by the terminal. Codes that the terminal ignores are also indicated in the table. The “C0 Control Characters and Terminal Action” table starting on page 225 describes the action taken by the terminal when it receives a C0 code.
224
TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide
Page 250
Chapter 6, Programming
C0 and GL Codes row
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
0000
NUL
0 00
1
0001
SOH
1 01
2
0010
STX
2 02
3
0011
ETX
4
0100
5 column
DLE
16 10
SP
32 20
0
48 30
@
64 40
P
80 50
‘
96 60 p
112 70
DC1
17 11
!
33 21
1
49 31
A
65 41
Q
81 51 a
97 61 q
113 71
DC2
18 12
I
34 22
2
50 32
B
66 42
R
82 52 b
98 62 r
114 72
3 03
DC3
19 13
#
35 23
3
51 33
C
67 43
S
83 53 c
99 63 s
115 73
EOT
4 04
DC4
20 14
$
36 24
4
52 34
D
68 44
T
84 54 d
100 64 t
116 74
0101
ENQ
5 05
NAK
21 15
%
37 25
5
53 35
E
69 45
U
85 55 e
101 65 u
117 75
6
0110
ACK
6 06
SYN
22 16
&
38 26
6
54 36
F
70 46
V
86 56 f
102 66 v
118 76
7
0111
BEL
7 07
ETB
23 17
’
39 27
7
55 37
G
71 47
W
87 57 g
103 67 w
119 77
8
1000
BS
8 08
CAN
24 18
(
40 28
8
56 38
H
72 48
X
88 58 h
104 68 x
120 78
9
1001
HT
9 09
EM
25 19
)
41 29
9
57 39
I
73 49
Y
89 59 i
105 69 y
121 79
A
1010
LF
10 0A
SUB
26 1A
*
42 2A
:
58 3A
J
74 4A
Z
90 5A j
106 6A z
122 7A
B
1011
VT
11 0B
ESC
27 1B
+
43 2B
;
59 3B
K
75 4B
[
91 5B k
107 6B
{
123 7B
C
1100
FF
12 0C
FS
28 1C
,
44 2C
<
60 3C
L
76 4C
\
92 5C l
108 6C
124 7C
D
1101
CR
13 0D
GS
29 1D
--
45 2D
=
61 3D
M
77 4D
]
93 5D m
109 6D
}
125 7D
E
1110
SO
14 0E
RS
30 1E
.
46 2E
>
62 3E
N
78 4E
^
94 5E n
110 6E
~
126 7E
F
1111
SI
15 0F
US
31 1F
/
47 2F
?
63 3F
O
79 4F
_
95 5F o
111 6F
DEL
127 7F
(XON)
(XOFF)
C0 Codes
GL Codes (ASCII Graphics Character Set)
Legend: decimal
ENQ 505 hexadecimal code recognized by the terminal decimal NUL 000 hexadecimal code ignored by the terminal
C0 Control Characters and Terminal Action Mnemonic Hex
Name
Action
NUL
00
Null
Ignored.
SOH
01
Start of heading
Ignored.
STX
02
Start of text
Ignored.
ETX
03
End of text
Ignored.
EOT
04
End of transmission
Ignored.
TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide
225
Page 251
Chapter 6, Programming
C0 Control Characters and Terminal Action (continued) Mnemonic Hex
Name
Action
ENQ
05
Enquiry
Generates Answerback message. Set number of characters in the message (0–30) through the terminal’s firmware. If the terminal is operating in ANSI mode, it ignores this character.
ACK
06
Acknowledge
Ignored.
BEL
07
Bell
Generates bell tone if bell is enabled.
BS
08
Backspace
Moves cursor one column to the left. If cursor is in Column 1, takes no action.
HT
09
Horizontal tab
Moves cursor to predetermined tab stop. Moves cursor to right margin if there are no tab stops.
LF
0A
Line feed
Causes a line feed or new line operation, depending on how the LNM received code is set.
VT
0B
Vertical tab
Processes as LF (line feed).
FF
0C
Form feed
Processes as LF (line feed).
CR
0D
Carriage return
Moves cursor to Column 1 of the current row.
SO (LS1)
0E
Shift out (Lock shift G1)
Invokes G1 character set into GL.
SI (LS0)
0F
Shift in (Lock shift G0)
Invokes G0 character set into GL.
DLE
10
Data link escape
Ignored.
DC1 (XON) 11
Device control 1
Clears DC3 if XOFF support is enabled, which causes the terminal to continue sending characters (keyboard unlocks).
DC2
12
Device control 2
Ignored.
DC3 (XOFF) 13
Device control 3
If XOFF support is enabled, causes the terminal to stop sending characters until it receives a DC1 control character.
DC4
14
Device control 4
Ignored.
NAK
15
Negative acknowledgment Ignored.
SYN
16
Synchronous table
Ignored.
ETB
17
End transmission block
Ignored.
CAN
18
Cancel
Terminates and cancels any sequence in progress.
EM
19
End of medium
Ignored.
SUB
1A
Substitute
Terminates, cancels escape or control sequence, or terminates the device control string and displays reverse question mark.
ESC
1B
Escape
Processes as escape sequence introducer. Terminates any escape, control, or device control sequence in process.
FS
1C
File separator
Ignored.
GS
1D
Group separator
Ignored.
RS
1E
Record separator
If Guarded Area Transfer Mode (GATM) is reset, the record separator is processed as a protected field entry.
US
1F
Unit separator
Ignored.
DEL
7F
Delete
Ignored; it cannot be used as a fill character.
226
TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide
Page 252
Chapter 6, Programming
C1 and GR Codes The right half of the DEC multinational character set consists of eight-bit control codes (C1 codes) and supplemental graphic characters (GR codes). C1 codes are nondisplayable codes that perform additional functions beyond those possible with C0 codes. C1 codes range 80–9F hexadecimal. The supplemental graphic characters set (GR codes) range from A0 hexadecimal to FF hexadecimal. The set has alphabetic characters with accents and diacritical marks that appear in the major Western European alphabets. It also has other symbols not included in the ASCII graphics set. The following table shows the C1 control characters and GR codes recognized by the terminal. Ignored codes are parsed (removed) from the data stream with no terminal action taken. Ignored codes are also indicated in the table. Note that some letters that are normally in uppercase are converted into lowercase. The hexadecimal values for the converted letters are C0, C1, C2, C8, CA, CB, CC, CD, CE, CF, D9, DA, and DB. (These values may be supported correctly in later versions.) 8
9
1 0 0 0
10
1 0 0 1
11
1 0 1 0
12
1 0 1 1
128 80
DCS
144 90
NBSP
160 A0
129 81
PU1
145 91
¡
161 A1 d
±
13
1 1 0 0
14
1 1 0 1
15
1 1 1 0 column row b8 bits b7 b6 b5 b4 b3 b2 b1
1 1 1 1
176 B0
à
192 C0
Ð
208 D0
à
224 E0
ð
240 F0
0000
0
177 B1
á
193 C1
Ñ
209 D1
á
225 E1
ñ
241 F1
0001
1
178 B2
â
194 C2
Ò
210 D2
â
226 E2
ò
242 F2
0010
2
Ó
211 D3
ã
227 E3
ó
243 F3
0011
3
¢
162 A2
2
STS
147 93
£
163 A3
3
179 B3
Ã
195 C3
132 84
CCH
148 94
¤
164 A4
‘
180 B4
Ä
196 C4
Ô
212 D4
ä
228 E4
ô
244 F4
0100
4
NEL
133 85
MW
149 95
¥
165 A5
µ
181 B5
Å
197 C5
Õ
213 D5
å
229 E5
õ
245 F5
0101
5
SSA
134 86
SPA
150 96
¦
166 A6
¶
182 B6
Æ
198 C6
Ö
214 D6
æ
230 E6
ö
246 F6
0110
6
ESA
135 87
EPA
151 97
§
167 A7
·
183 B7
Ç
199 C7
X
215 D7
ç
231 E7
247 F7
0111
7
HTS
136 88
152 98
I
168 A8
,
184 B8
è
200 C8
Ø
216 D8
è
232 E8
ø
248 F8
1000
8
HTJ
137 89
153 99
E
169 A9
1
185 B9
É
201 C9
ù
217 D9
é
233 E9
ù
249 F9
1001
9
VTS
138 8A
154 9A
ª
170 AA
º
186 BA
ê
202 CA
ú
218 DA
ê
234 EA
ú
250 FA
1010
A
PLD
139 8B
CSI
155 9B
«
171 AB
»
187 BB
ë
203 CB
û
219 DB
ë
235 EB
û
251 FB
1011
B
PLU
140 8C
ST
156 9C
¬
172 AC
188 BC
ì
204 CC
Ü
220 DC
ì
236 EC
ü
252 FC
1100
C
RI
141 8D
OSC
157 9D, 173 AD
189 BD
í
205 CD
Ý
221 DD
í
237 ED
ÿ
253 FD
1101
D
SS2
142 8E
PM
158 9E
R
174 AE
190 BE
î
206 CE
Þ
222 DE
î
238 EE
Þ
254 FE
1110
E
SS3
143 8F
APC
159 9F, 175 AF
191 BF
ï
207 CF
ß
223 DF
ï
239 EF
ÿ
255 FF
1111
F
130 82
PU2
146 92
131 83
IND
C1 Codes Legend:
¿
GR Codes (DEC Supplemental Graphics)
decimal IND 132 84 code recognized by the terminal decimal HTJ 137 89 code ignored by the terminal hexadecimal hexadecimal
TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide code not yet standardized by ANSI and ignored by the terminal
227
Page 253
Chapter 6, Programming
The following table describes the terminal action when it receives a C1 control code. C1 Control Characters and Terminal Action Mnemonic Hex
Name
80–83
Action Ignored.
IND
84
Index
Moves cursor down one line in same column. If cursor is at bottom margin, display performs a scroll up.
NEL
85
Next line
Moves cursor to first position on next line. If cursor is at bottom margin, display performs a scroll up.
SSA
86
Start of selected area
Selects which current page characters the terminal can send to the host.
ESA
87
End of selected area
Ends the selected area that is sent to the host when forms are created for VT340 terminal emulation.
HTS
88
Horizontal tab set
Sets one horizontal tab stop at column with cursor.
HTJ
89
Horizontal tab w/justify
Ignored.
VTS
8A
Vertical tabulation set
Ignored.
PLD
8B
Partial line down
Ignored.
PLU
8C
Partial line up
Ignored.
RI
8D
Reverse index
Moves cursor up one line in same column. If cursor is at top margin, display performs a scroll down.
SS2
8E
Single shift 2
Temporarily invokes G2 character set into GL for the next graphic character. G2 is designated by a select character set (SCS) sequence.
SS3
8F
Single shift 3
Temporarily invokes G3 character set into GL for the next graphic character. G3 is designated by an SCS sequence.
DCS
90
Device control string
Processes as opening delimiter of a device control string for device control use.
PU1
91
Private use 1
Ignored.
PU2
92
Private use 2
Ignored.
STS
93
Set transmit state
Ignored.
CCH
94
Cancel character
Ignored.
MW
95
Message waiting
Ignored.
SPA
96
Start of protected area
Starts the protected area in page memory that cannot be edited when forms are created from the host.
EPA
97
End of protected area
Ends the protected area in page memory that cannot be edited when forms are created from the host.
98–9A
Ignored.
CSI
9B
Ctrl sequence introducer
Processes as control sequence introducer.
ST
9C
String terminator
Processes as the string closing delimiter opened by DCS and processes code as the EOL of extended command characters.
OSC
9D
O/S command
Ignored.
PM
9E
Privacy message
Ignored.
APC
9F
App program command
Processes code as the SOL of extended command characters.
228
TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide
Page 254
Chapter 6, Programming
Display Controls Mode The terminal does not support the VT/ANSI terminal display controls mode, which displays control codes as graphic characters for debugging.
Dynamically Redefinable Character Set The terminal does not support the dynamically redefinable character set (DRCS), which is a 94-character set created on the VT/ANSI terminal and down-line loaded into the terminal DRCS buffer.
Special Graphics Character Set The terminal supports most of the DEC special graphics character set. The set contains ASCII C0 codes and most of the GL codes. It also has special symbols and short line segments. You would normally use these characters to create a limited range of drawings while working in text mode. This table shows special graphics characters recognized by the terminal. Ignored codes are parsed (removed) from the data stream with no action taken by the terminal. Ignored and unsupported codes are also indicated. 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
0000
NUL
00
1
0001
SOH
01 row column
DLE
10
SP
20
0
30
@
40
P
50
60
DC1
11
!
21
1
31
A
41
Q
51
61
(XON)
70
--
71
SCAN 5
2
0010
STX
02
DC2
12
I
22
2
32
B
42
R
52
62
72
3
0011
ETX
03
DC3
13
#
23
3
33
C
43
S
53
63
73
(XOFF)
Legend: 5F
4
0100
EOT
04
DC4
14
$
24
4
34
D
44
T
54
64
74
5
0101
ENQ
05
NAK
15
%
25
5
35
E
45
U
55
65
75
6
0110
ACK
06
SYN
16
&
26
6
36
F
46
V
56
66
⊥
76
7
0111
BEL
07
ETB
17
’
27
7
37
G
47
W
57
67
T
77
8
1000
BS
08
CAN
18
(
28
8
38
H
48
X
58
68
78
9
1001
HT
09
EM
19
)
29
9
39
I
49
Y
59
69
79
A
1010
LF
0A
SUB
1A
*
2A
:
3A
J
4A
Z
5A
6A
7A
B
1011
VT
0B
ESC
1B
+
2B
;
3B
K
4B
[
5B
6B
7B
C
1100
FF
0C
FS
1C
,
2C
<
3C
L
4C
\
5C
6C
7C
D
1101
CR
0D
GS
1D
--
2D
=
3D
M
4D
]
5D
6D
7D
E
1110
SO
0E
RS
1E
.
2E
>
3E
N
4E
^
5E
+
6E
7E
F
1111
SI
0F
US
1F
/
2F
?
3F
O
4F
6F
7F
C0 Codes (ASCII Nondisplayable Control Character Set)
5F
GL Codes (DEC Special Graphics Character Set)
code not supported and character displayed may change without notice
TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide
229
Page 255
Chapter 6, Programming
National Replacement Character Sets The terminal supports the 7-bit national replacement character (NRC) sets for European languages. The NRC sets are similar to the 7-bit ASCII set, except for a few characters. You designate the character sets as hard using escape sequence formats as on page 231. This table lists characters in each NRC set that are different from the ASCII set. The terminal does not support “¾” (40 hexadecimal) in the Dutch NRC set. Hexadecimal Character Set
23
40
5B 5C
5D 5E
5F
60
7B 7C
7D 7E
ASCII
#
@
[
\
]
^
_
‘
{
|
}
~
British
£
@
[
\
]
^
_
‘
{
|
}
~
Dutch
£
ÿ
½
|
^
_
‘
¨
ƒ
¼
’
Finnish
#
@
Ä
Ö
Å
Ü
_
é
ä
ü
å
ü
French
£
à
º
ç
§
^
_
‘
é
ù
è
¨
French Canadian
#
à
â
ç
ê
î
_
ô
é
ù
è
û
German
#
§
Ä
Ö
Ü
^
_
‘
ä
ö
ü
ß
Italian
£
§
º
ç
é
^
_
ù
à
ò
è
ì
Norwegian/Danish
#
@
Æ
Ø
Å
^
_
‘
æ
ø
å
~
Portuguese
#
@
Ã
Ç
Ô
^
_
‘
ã
ç
õ
~
Spanish
£
§
í
Ñ
¿
^
_
‘
’
º
ñ
ç
Swedish
#
Ê
Ä
Ö
Å
Ü
_
é
ä
ö
å
ü
Swiss
ù
à
é
ç
ê
î
è
ô
ä
ö
ü
û
Greek National Replacement Character Set (6400, 5020, 5055, 59XX, 17XX, 11XX, Terminals) row column b8 bits b7 b6 b5 b4 b3 b2 b1
230
0
1
2
3
4
5
6
7
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
20
D
30
³
40
Π
50
à
60
Π
70
‘
21
±
31
Α
41
Ρ
51
α
61
ρ
71
’
22
2
32
Β
42
52
β
62 j
72
£
23
β
33
Γ
43
Σ
53
Υ
63
σ
73
14
24
′
34
∆
44
Τ
54
δ
64
τ
74
05
15
25
µ
35
Ε
45
Υ
55
ε
65
υ
75
0110
06
16
¦
26
¶
36
Ζ
46
Φ
56 j
66
φ
76
7
0111
07
17
§
27
·
37
Η
47
Χ
57
η
67
χ
77
8
1000
08
18
¨
28
¸
38
Θ
48
Ψ
58
θ
68
Ψ
78
9
1001
09
19
E
29
¹
39
Ι
49
Ω
59
ι
69
ω
79
A
1010
0A
1A
2A
º
3A
Κ
4A
Ϊ
5A
κ
6A
ϊ
7A
B
1011
0B
1B
«
2B
»
3B
Λ
4B
Ϋ
5B
λ
6B
ϋ
7B
C
1100
0C
1C
¬
2C
¼
3C
Μ
4C
Ü
5C m
6C
ü
7C
D
1101
0D
1D
SHΥ
2D
½
3D
Ν
4D
Ý
5D
ν
6D
ý
7D
E
1110
0E
1E
2E
¾
3E
Ξ
4E
Þ
5E
ξ
6E
þ
7E
F
1111
0F
1F
2F
¿
3F
Ο
4F
ι
5F
ο
6F
0
0000
00
10
1
0001
01
11
2
0010
02
12
3
0011
03
13
4
0100
04
5
0101
6, 7F
TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide
Page 256
Chapter 6, Programming
Character Set Selection The terminal supports hard character sets. It does not support designating soft (down-line loadable) character sets.
Designating Hard Character Sets Designate hard character sets using the escape sequence format in the following table. Hard Character Set Escape Sequences Escape Sequence
Designated As
Supplemental and special graphics sets: 1B hexadecimal ESC (
28 hexadecimal (Final)
G0
1B hexadecimal ESC )
29 hexadecimal (Final)
G1
1B hexadecimal ESC *
2A hexadecimal (Final)
G2
1B hexadecimal ESC +
2B hexadecimal (Final)
G3
1B hexadecimal ESC -
2D hexadecimal (Final)
G1
1B hexadecimal ESC .
2E hexadecimal (Final)
G2
1B hexadecimal ESC /
2F hexadecimal (Final)
G3
NRC sets:
TE 2000 VT/ANSI Terminal Emulation Programmer’s Guide
231