VT220 Programmer Reference Manual

2 Character Encoding

2.1 General

This chapter describes the character encoding concepts for the VT220 when operating in text mode. The chapter also describes the VT220 character sets and provides an overview of the control functions. You must have a basic understanding of the coding concepts described in this chapter before using the control functions described in Chapters 3 and 4.

2.2 Coding Standards

The VT220 uses an 8-bit character encoding scheme and a 7-bit code extension technique that are compatible with the following ANSI and ISO standards. ANSI (American National Standards Institute) and ISO (International Organization for Standardization) specify the current standards for character encoding used in the communications industry.

Standard Description
ANSI X3.4 – 1977 American Standard Code for Information Interchange (ASCII)
ISO 646 – 1977 7-Bit Coded Character Set for Information Processing Interchange
ANSI X3.41 – 1974 Code Extension Techniques for Use with the 7-Bit Coded Character Set of American National Code Information Interchange
ISO Draft International Standard 2022.2 7-Bit and 8-Bit Coded Character Sets – Code Extension Techniques
ANSI X3.32 – 1973 Graphic Representation of the Control Characters of American National Code for Information Interchange
ANSI X3.64 – 1979 Additional Controls for Use with American National Standard for Information Interchange
ISO Draft International Standard 6429.2 Additional Control Functions for Character Imaging Devices

2.3 Code Table

A code table is a convenient way to represent 7-bit and 8-bit characters, because you can see groupings of characters and their relative codes clearly.

2.3.1 7-Bit ASCII Code Table

Table 2-1 is the 7-bit ASCII code table. There are 128 positions corresponding to 128 character codes, arranged in a matrix of 8 columns and 16 rows.

Each row represents a possible value of the four least significant bits of a 7-bit code (Figure 2-1). Each column represents a possible value of the three most significant bits.

Table 2-1 shows the octal, decimal, and hexadecimal code for each ASCII character. You can also represent any character by its position in the table. For example, the character H (column 4, row 8) can be represented as 4/8. This column/row notation is used to represent characters and codes throughout this manual. For example:

1/11 2/3 3/6
ESC   #   6

means that the ESC character is at column 1, row 11; the character # is at column 2, row 3; and the character 6 is at column 3, row 6.

The VT220 processes received characters based on two character types defined by ANSI, graphic characters and control characters.

Graphic characters are characters you can display on a video screen. The ASCII graphic characters are in positions 2/1 through 7/14 of Table 2-1. They include all American and English alphanumeric characters, plus punctuation marks and various text symbols. Examples are: C, n, ", !, +, and $ (the English pound sign is not an ASCII graphic character).

Control characters are not displayed. They are single-byte codes that perform specific functions in data communications and text processing. The ASCII control characters are in positions 0/0 through 1/15 (columns 0 and 1) of Table 2-1. The SP character (space, 2/0) may act as a graphic character or a control character, depending on the context. DEL (7/15) is always a control character.

Control character codes and functions are standardized by ANSI. Examples of ASCII control characters with their ANSI-standard mnemonics are: CR (carriage return), FF (form feed), CAN (cancel).

Table 2-1 7-Bit ASCII Code Table
ASCII Table ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 # 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F @ 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A [ 133915B \ 134925C ] 135935D ^ 136945E _ 137955F ` 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A { 1731237B | 1741247C } 1751257D ~ 1761267E DEL 1771277F 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893A-83
Figure 2-1 7-Bit Code

2.3.2 8-Bit Code Table

In general, the conventions for 7-bit character encoding also apply to 8-bit character encoding for the VT220. Table 2-2 shows the 8-bit code table. It has twice as many columns as the 7-bit table, because it contains 256 (versus 128) code values.

As with the 7-bit table, each row represents a possible value of the four least significant bits of an 8-bit code (Figure 2-2). Each column represents a possible value of the four most significant bits.

All codes on the left half of the 8-bit table (columns 0 through 7) are 7-bit compatible; their eighth bit is not set, and can be ignored or assumed to be 0. You can use these codes in a 7-bit or an 8-bit environment. All codes on the right half of the table (columns 8 through 15) have their eighth bit set. You can use these codes only in an 8-bit compatible environment.

The 8-bit code table (Table 2-2) has two sets of control characters, C0 (control zero) and C1 (control one). The table also has two sets of graphic characters, GL (graphic left) and GR (graphic right).

On the VT220, the basic functions of the C0 and C1 codes are defined by ANSI. C0 codes represent the ASCII control characters described earlier. The C0 codes are 7-bit compatible. The C1 codes represent 8-bit control characters that let you perform additional functions beyond those possible with the C0 codes. You can only use C1 codes directly in an 8-bit environment. Some C1 code positions are blank, because their functions are not yet standardized.

NOTE: The VT220 does not recognize all C0 and C1 codes. Chapter 4 identifies and describes the codes it does recognize; all others are simply ignored. (That is, no action is taken).

The GL and GR sets of codes are reserved for graphic characters. There are 94 GL codes in positions 2/1 through 7/14, and 94 GR codes in positions 10/1 through 15/14. By ANSI standards, positions 10/0 and 15/15 are not used. You can use GL codes in 7-bit or 8-bit environments. You can use GR codes only in an 8-bit environment.

Table 2-2 8-Bit Code Table
Figure 2-2 8-Bit Code

2.4 Character Sets

You cannot change the functions of the C0 or C1 codes. However, you can map different sets of graphic characters into the GL and/or GR codes. The sets are stored in the terminal as a graphic repertoire. But you cannot use these graphics character sets until you map them into the GL or GR codes. Chapter 4 describes the commands for mapping graphic character sets into GL or GR.

The terminal's graphic repertoire consists of the following character sets, described in the following sections.

2.4.1 DEC Multinational Character Set

By factory default, when you power up or reset the terminal, the DEC multinational character set (Table 2-3) is mapped into the 8-bit code matrix (columns 0 through 15).

The 7-bit compatible left half of the DEC multinational set is the ASCII graphics set. The C0 codes are the ASCII control characters, and the GL codes are the ASCII graphics set.

The 8-bit compatible right half of the DEC multinational set includes the C1 8-bit control characters in columns 8 and 9. The GR codes are the DEC supplemental graphics set. The DEC supplemental graphics 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 terminal can work with over a dozen national (Western European) keyboards. All keyboards assume the default DEC multinational character set mapping. The code descriptions in the rest of this manual also assume this mapping. Various characters from the DEC supplemental graphics set appear as standard (printing character) keys on different keyboards.

The DEC supplemental graphics character set is not available in VT52 and VT100 modes.

Table 2-3 DEC Multinational Character Set (Left Half – C0 and GL Codes)
ASCII Table ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b8 b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) C0 CODES GL CODES (ASCII GRAPHIC) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 # 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F @ 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A [ 133915B \ 134925C ] 135935D ^ 136945E _ 137955F ` 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A { 1731237B | 1741247C } 1751257D ~ 1761267E DEL 1771277F 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893-83
Table 2-3 DEC Multinational Character Set (Right Half – C1 and GR Codes)
DEC Supplemental Graphic Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b8 b7 b6 b5 b4 b3 b2 b1 BITS 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 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 C1 CODES GR CODES (DEC SUPPLEMENTAL GRAPHIC) 000 111 222 333 IND 444 NEL 555 SSA 666 ESA 777 HTS 1088 HTJ 1199 VTS 1210A PLD 1311B PLU 1412C RI 1513D SS2 1614E SS3 1715F DCS 201610 PU1 211711 PU2 221812 STS 231913 CCH 242014 MW 252115 SPA 262216 EPA 272317 302418 312519 32261A CSI 33271B ST 34281C OSC 35291D PM 36301E APC 37311F 403220 ¡ 413321 ¢ 423422 £ 433523 443624 ¥ 453725 463826 § 473927 ¤ 504028 © 514129 ª 52422A « 53432B 54442C 55452D 56462E 57472F ° 604830 ± 614931 ² 625032 ³ 635133 645234 µ 655335 665436 · 675537 705638 ¹ 715739 º 72583A » 73593B ¼ 74603C ½ 75613D 76623E ¿ 77633F À 1006440 Á 1016541  1026642 à 1036743 Ä 1046844 Å 1056945 Æ 1067046 Ç 1077147 È 1107248 É 1117349 Ê 112744A Ë 113754B Ì 114764C Í 115774D Î 116784E Ï 117794F 1208050 Ñ 1218151 Ò 1228252 Ó 1238353 Ô 1248454 Õ 1258555 Ö 1268656 Œ 1278757 Ø 1308858 Ù 1318959 Ú 132905A Û 133915B Ü 134925C Ÿ 135935D 136945E ß 137955F à 1409660 á 1419761 â 1429862 ã 1439963 ä 14410064 å 14510165 æ 14610266 ç 14710367 è 15010468 é 15110569 ê 1521066A ë 1531076B ì 1541086C í 1551096D î 1561106E ï 1571116F 16011270 ñ 16111371 ò 16211472 ó 16311573 ô 16411674 õ 16511775 ö 16611876 œ 16711977 ø 17012078 ù 17112179 ú 1721227A û 1731237B ü 1741247C ÿ 1751257D 1761267E 1771277F 8 1 0 0 0 9 1 0 0 1 10 1 0 1 0 11 1 0 1 1 12 1 1 0 0 13 1 1 0 1 14 1 1 1 0 15 1 1 1 1 MA-0894-83

2.4.2 DEC Special Graphics Character Set

The terminal's graphic repertoire includes the DEC special graphics set (also known as the VT100 line drawing character set). This character set (Table 2-4) has about two-thirds of the ASCII graphic characters. It also has special symbols and short line segments. The line segments let you create a limited range of pictures while still using text mode.

Commands described in Chapter 4 let you map the DEC special graphics set into either GL or GR, replacing either the ASCII graphics set or the DEC supplemental graphics set. Digital recommends that you switch between ASCII and DEC special graphics in GL, because the latter has most of the ASCII graphic characters. Also, this mapping is compatible with a VT100 terminal.

Table 2-4 DEC Special Graphics Character Set
Special Characters and Line Drawing Character Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b8 b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) C0 CODES GL CODES (DEC SPECIAL GRAPHIC) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 # 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F @ 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A [ 133915B \ 134925C ] 135935D ^ 136945E 137955F 1409660 1419761 1429862 1439963 14410064 14510165 14610266 14710367 15010468 15110569 1521066A 1531076B 1541086C 1551096D 1561106E 1571116F 16011270 16111371 16211472 16311573 16411674 16511775 16611876 16711977 17012078 17112179 1721227A 1731237B 1741247C 1751257D 1761267E 1771277F (BLANK) SCAN 1 SCAN 3 SCAN 5 SCAN 7 SCAN 9 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893C-83

2.4.3 National Replacement Character Sets (NRC sets)

The terminal's graphic character repertoire includes national replacement character sets (Tables 2-5 through 2-15). These sets are available when you select national mode. Only one national character set is available for use at any one time. The NRC set used depends on the keyboard selection in set-up as outlined below.

Keyboard Selection NRC Set
British British
Danish Norwegian/Danish
Dutch Dutch
Finnish Finnish
Flemish French
French/Belgian French
French Canadian French Canadian
German German
Italian Italian
Norwegian Norwegian/Danish
Spanish Spanish
Swedish Swedish
Swiss (French) Swiss
Swiss (German) Swiss
Table 2-5 British NRC Set (British Keyboard Selection)
UK National Character Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b8 b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 £ 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F @ 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A [ 133915B \ 134925C ] 135935D ^ 136945E _ 137955F ` 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A { 1731237B | 1741247C } 1751257D ~ 1761267E DEL 1771277F 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893B-83
Table 2-6 Dutch NRC Set (Dutch Keyboard Selection)
Dutch NRC Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 £ 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F ¾ 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A ij 133915B ½ 134925C | 135935D ^ 136945E _ 137955F ` 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A ¨ 1731237B f 1741247C £ 1751257D ¼ 1761267E DEL 1771277F 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893-83F
Table 2-7 Finnish NRC Set (Finnish Keyboard Selection)
Finnish NRC Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 # 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F @ 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A Ä 133915B Ö 134925C Å 135935D Ü 136945E _ 137955F é 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A ä 1731237B ö 1741247C å 1751257D ü 1761267E DEL 1771277F 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893-83N
Table 2-8 French NRC Set (Flemish and French/Belgian Keyboard Selections)
French NRC Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 £ 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F à 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A ° 133915B ç 134925C § 135935D ^ 136945E _ 137955F ` 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A é 1731237B ù 1741247C è 1751257D ¨ 1761267E DEL 1771277F 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893-83E
Table 2-9 French Canadian NRC Set (French Canadian Keyboard Selection)
French Canadian NRC Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 # 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F à 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A â 133915B ç 134925C ê 135935D î 136945E _ 137955F ô 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A é 1731237B ù 1741247C è 1751257D û 1761267E DEL 1771277F 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893-83H
Table 2-10 German NRC Set (German Keyboard Selection)
German NRC Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 # 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F § 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A Ä 133915B Ö 134925C Ü 135935D ^ 136945E _ 137955F ` 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A ä 1731237B ö 1741247C ü 1751257D ß 1761267E DEL 1771277F 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893-83K
Table 2-11 Italian NRC Set (Italian Keyboard Selection)
Italian NRC Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 £ 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F § 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A ° 133915B ç 134925C é 135935D ^ 136945E _ 137955F ù 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A à 1731237B ò 1741247C è 1751257D ì 1761267E DEL 1771277F 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893-83P
Table 2-12 Norwegian/Danish NRC Set (Danish and Norwegian Keyboard Selections)
Norwegian/Danish NRC Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 # 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F Ä 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A Æ 133915B Ø 134925C Å 135935D Ü 136945E _ 137955F ä 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A æ 1731237B ø 1741247C å 1751257D ü 1761267E DEL 1771277F 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893-83G
Table 2-13 Spanish NRC Set (Spanish Keyboard Selection)
Spanish NRC Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 £ 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F § 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A ¡ 133915B Ñ 134925C ¿ 135935D ^ 136945E _ 137955F ` 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A ° 1731237B ñ 1741247C ç 1751257D ~ 1761267E DEL 1771277F 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893-83M
Table 2-14 Swedish NRC Set (Swedish Keyboard Selection)
Swedish NRC Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 # 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F É 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A Ä 133915B Ö 134925C Å 135935D Ü 136945E _ 137955F é 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A ä 1731237B ö 1741247C å 1751257D ü 1761267E DEL 1771277F 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893-83L
Table 2-15 Swiss NRC Set (Swiss/French and Swiss/German Keyboard Selections)
Swiss NRC Set ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b7 b6 b5 b4 b3 b2 b1 BITS 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 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 (XON) (XOFF) NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 ù 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F à 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A é 133915B ç 134925C ê 135935D î 136945E è 137955F ô 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A ä 1731237B ö 1741247C ü 1751257D û 1761267E DEL 1771277F 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893-83J

2.4.4 Down-Line-Loadable Character Set

The terminal provides for a 94-character down-line-loadable graphic character set. You can define this character set and map it into either GL or GR, as described in Chapter 4. This feature is available only in VT200 mode.

2.5 Control Functions

You use control functions in your program to specify how the terminal should handle data. There are many uses for control functions. Here are some examples.

You can use all control functions in text mode and express them as single-byte or multibyte codes.

The single-byte codes are the C0 and C1 control characters. Your program can perform a limited number of functions using C0 characters. C1 characters give you a few more functions, but your program can use them directly only in an 8-bit environment.

Multibyte control codes represent far more functions, because they have more possible code combinations. These codes are called escape sequences, control sequences, and device control strings. Some sequences are ANSI standardized and used throughout the industry; others are private sequences created by manufacturers like Digital for specific families of products. Private sequences, like ANSI standardized sequences, follow ANSI standards for character code composition.

2.5.1 Escape Sequences

An escape sequence starts with the C0 character ESC (1/11), followed by one or more ASCII graphic characters. For example,

1/11 2/3 3/6
ESC   #   6

is an escape sequence that changes the current line of text to double-width characters.

Because escape sequences use only 7-bit characters, you can use them in 7-bit or 8-bit environments.

NOTE: When using escape or control sequences, remember that it is the code that defines a sequence -- not the graphic representation of the characters. The characters are shown for readability only and presume the DEC multinational character set mapping (ASCII graphics set in GL and DEC supplemental graphics set in GR).

One important use of escape sequences is extending the capability of 7-bit control functions. ANSI lets you use 2-byte escape sequences as 7-bit code extensions to express each of the C1 control codes. This is a valuable feature when your application must be compatible with a 7-bit environment. For example, the C1 characters CSI, SS3, and IND can be expressed as follows.

C1 Character 7-Bit Code Extension Equivalent
(Escape Sequence)
9/11
CSI
1/11  5/11
ESC    [
8/15
SS3
1/11  4/15
ESC    O
8/4
IND
1/11  4/4
ESC    D

In general, you can use the above code extension technique in two ways.

  1. You can express any C1 control character as a 2-character escape sequence whose second character has a code that is 40 (hexadecimal) and 64 (decimal) less than that of the C1 character.
  2. You can make any escape sequence whose second character is in the range of 4/0 through 5/15 one byte shorter by removing the ESC and adding 40 (hexadecimal) to the code of the second character. This generates an 8-bit control character.

2.5.2 Control Sequences

A control sequence starts with CSI (9/11), followed by one or more ASCII graphic characters. But CSI (9/11) can also be expressed as the 7-bit code extension ESC [ (1/11, 5/11). So you can express all control sequences as escape sequences whose second character code is [ (5/11). For example, the following two sequences are equivalent sequences that perform the same function. (They cause the display to use 132 columns per line rather than 80).

9/11 3/15 3/3 6/8
CSI   ?    3    h

1/11 5/11 3/15 3/3 6/8
ESC   [    ?    3   h

Whenever possible, you should use CSI instead of ESC [ to introduce a control sequence. CSI uses one less byte than ESC [, so you gain processing speed. However, you can only use a sequence starting with CSI in an 8-bit environment (because CSI is a C1 control character).

2.5.3 Device Control Strings

A device control string (DCS) is a delimited string of characters used in a data stream as a logical entity for control purposes. It consists of an opening delimiter (a device control string introducer), a command string (data), and a closing delimiter (a string terminator).

You use device control strings to down-line-load character sets and definitions for user-defined keys.

The VT220 uses the following device control string format.

9/0
DCS
..........
Data
9/12
ST
Device Control String (opening delimiter)
  • UDK
  • Character Set
String Terminator (closing delimiter)

DCS is an 8-bit control character. You can also express it as ESC P (1/11, 5/0) when coding for a 7-bit environment.

ST is an 8-bit control character. You can also express it as ESC \ (1/11, 5/12) when coding for a 7-bit environment.

2.6 Working with 7-Bit and 8-Bit Environments

There are two requirements for using the terminal's 8-bit character set. Your program and communication environment must be 8-bit compatible, and the terminal must operate in a VT200 mode. When operating in VT100 or VT52 mode, you are limited to working in a 7-bit environment. The following sections describe conventions that apply in VT200 mode.

2.6.1 Conventions for Codes Received by the Terminal

The terminal expects to receive character codes in a form consistent with 8-bit coding. Your application can use the C0 and C1 control codes, as well as the 7-bit C1 code extensions, if necessary. The terminal always interprets these codes correctly. Chapter 4 describes all code extensions you may need to use, and their equivalent C1 control codes.

When your program sends GL or GR codes, the terminal interprets the codes according to the graphic character mapping currently in use. The factory-default mapping (which is set when you power up or reset the terminal) is the DEC multinational character set. This mapping assumes the current terminal mode is one of the VT200 modes.

2.6.2 Conventions for Codes Sent by the Terminal

Codes sent by the terminal to a program can come directly from the keyboard or in response to commands issued from the host (application program or operating system). In a VT200 mode, the terminal always sends all GL and GR graphic codes to the application exactly as they are generated, regardless of whether the application handles 8-bit codes correctly or not. If, however, a 7-bit communications line is used, C1 controls are sent as escape sequences and the terminal does not allow the generation of 8-bit graphic codes.

Most function keys on the keyboard generate multibyte control codes. Many of these codes start with either CSI (9/11) or SS3 (8/15), which are C1 characters. If your application environment cannot handle 8-bit codes, you can make the terminal automatically convert all C1 codes to their equivalent 7-bit code extensions before sending them to the application. To convert C1 codes, you use the DECSCL commands described in Chapter 4.

By default, the terminal is set to automatically convert all C1 codes sent to the application to 7-bit code extensions. However, to ensure the correct mode of operation, always use the appropriate DECSCL commands described in Chapter 4.

NOTE: New programs should accept both 7-bit and 8-bit forms of the C1 controls.

2.7 Display Controls Mode

The terminal has a display controls mode that lets you display control codes as graphic characters for debugging purposes (rather than executing them). You can select this mode by changing the "Interpret/Display Controls" field in the Set-Up Display screen. You cannot use an escape sequence or invoke this mode from the host computer.

When the terminal is in a VT200 mode, selecting the set-up "Display Controls" field temporarily loads C0, GL, C1, and GR as shown in Table 2-16. All characters are displayed in the font shown for C0, GL, C1, and GR.

When the terminal is in a VT52 or VT100 mode, selecting the set-up "Display Controls" field temporarily loads C0 and GL as shown in Table 2-16. All characters are displayed in the font shown for C0 and GL. (C1 and GR are meaningless in VT52 or VT100 modes).

When you select the "Display Controls" field, the terminal displays all control functions and prevents most from executing. There are only two exceptions. LF, FF, and VT cause a new line (CR LF), and XOFF (DC3) and XON (DC1) maintain flow control if enabled. LF, FF, and VT are displayed before CRLF is executed, and DC1 and DC3 are displayed after execution.

Table 2-16 Display Controls Font (Left Half)
Display Controls Font (Left Half) ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b8 b7 b6 b5 b4 b3 b2 b1 BITS 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 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 C0 CODES GL CODES (ASCII GRAPHICS) NL 000 SH 111 SX 222 EX 333 ET 444 EQ 555 AK 666 BL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DL 201610 D1 211711 D2 221812 D3 231913 D4 242014 NK 252115 SY 262216 EB 272317 CN 302418 EM 312519 ? 32261A EC 33271B FS 34281C GS 35291D RS 36301E US 37311F 403220 ! 413321 " 423422 # 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F @ 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A [ 133915B \ 134925C ] 135935D ^ 136945E _ 137955F ` 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A { 1731237B | 1741247C } 1751257D ~ 1761267E DT 1771277F 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 3 0 0 1 1 4 0 1 0 0 5 0 1 0 1 6 0 1 1 0 7 0 1 1 1 ESC 33271B OCTALDECIMALHEX CHARACTER KEY MA-0893D-83
Table 2-16 Display Controls Font (Right Half)
Display Controls Font (Right Half) ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 COLUMN b8 b7 b6 b5 b4 b3 b2 b1 BITS 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 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 C1 CODES GR CODES (DEC SUPPLEMENTAL GRAPHICS) 80 000 81 111 82 222 83 333 84 444 85 555 86 666 87 777 88 1088 89 1199 8A 1210A 8B 1311B 8C 1412C 8D 1513D 8E 1614E 8F 1715F 90 201610 91 211711 92 221812 93 231913 94 242014 95 252115 96 262216 97 272317 98 302418 99 312519 9A 32261A 9B 33271B 9C 34281C 9D 35291D 9E 36301E 9F 37311F A0 403220 ¡ 413321 ¢ 423422 £ 433523 A4 443624 ¥ 453725 A6 463826 § 473927 ¤ 504028 © 514129 ª 52422A « 53432B AC 54442C AD 55452D AE 56462E AF 57472F ° 604830 ± 614931 ² 625032 ³ 635133 B4 645234 µ 655335 665436 · 675537 B8 705638 ¹ 715739 º 72583A » 73593B ¼ 74603C ½ 75613D BE 76623E ¿ 77633F À 1006440 Á 1016541  1026642 à 1036743 Ä 1046844 Å 1056945 Æ 1067046 Ç 1077147 È 1107248 É 1117349 Ê 112744A Ë 113754B Ì 114764C Í 115774D Î 116784E Ï 117794F D0 1208050 Ñ 1218151 Ò 1228252 Ó 1238353 Ô 1248454 Õ 1258555 Ö 1268656 Œ 1278757 Ø 1308858 Ù 1318959 Ú 132905A Û 133915B Ü 134925C Ÿ 135935D DE 136945E ß 137955F à 1409660 á 1419761 â 1429862 ã 1439963 ä 14410064 å 14510165 æ 14610266 ç 14710367 è 15010468 é 15110569 ê 1521066A ë 1531076B ì 1541086C í 1551096D î 1561106E ï 1571116F F0 16011270 ñ 16111371 ò 16211472 ó 16311573 ô 16411674 õ 16511775 ö 16611876 œ 16711977 ø 17012078 ù 17112179 ú 1721227A û 1731237B ü 1741247C ÿ 1751257D FE 1761267E 1771277F 8 1 0 0 0 9 1 0 0 1 10 1 0 1 0 11 1 0 1 1 12 1 1 0 0 13 1 1 0 1 14 1 1 1 0 15 1 1 1 1 MA-0894A-83