THE ASCII (ISO646) CHARACTER-SET ENCODING This table gives details of the standard encoding of characters used by most non-IBM terminals and computer systems (often referred to as the "ASCII code"). The characters are classed as "graphic characters", corresponding to printable or displayable symbols, or as "control characters", intended to be used for various control functions (e.g. vertical or horizontal motion, flow-control, error-checking, etc.). In this table, the five columns show, for each character: (1,2) the 7-bit character codes (in decimal and hexadecimal form); (3) the official standard name for control characters, or the displayed or printed symbol for graphic characters; (4) the commonly-used name for the character; (5) for control characters, the combination of the Control key with the letter or other key that will (on most terminals) generate that code. From an assembler program, the simplest approach is to define a set of mnemonic names (NUL, SOH, ... etc ---------- ------------------------------- ------------ 2 Code value ISO Control-key (Dec)(Hex) name Common usage name combination ---------- ------------------------------- ------------ 0 00 NUL null 1 01 SOH start of heading Ctrl-A 2 02 STX start of text Ctrl-B 3 03 ETX end of text Ctrl-C 4 04 EOT end of transmission Ctrl-D 5 05 ENQ enquiry Ctrl-E 6 06 ACK acknowledge Ctrl-F 7 07 BEL bell Ctrl-G 8 08 BS backspace Ctrl-H 9 09 HT horizontal tabulation Ctrl-I 10 0a LF line feed Ctrl-J 11 0b VT vertical tabulation Ctrl-K 12 0c FF form feed Ctrl-L 13 0d CR carriage return Ctrl-M 14 0e SO shift-out Ctrl-N 15 0f SI shift-in Ctrl-O 16 10 DLE data link escape Ctrl-P 17 11 DC1 device control 1 (X-ON) Ctrl-Q 18 12 DC2 device control 2 Ctrl-R 19 13 DC3 device control 3 (X-OFF) Ctrl-S 20 14 DC4 device control 4 Ctrl-T 21 15 NAK negative acknowledge Ctrl-U 22 16 SYN synchronous idle Ctrl-V 23 17 ETB end of transmission block Ctrl-W 24 18 CAN cancel Ctrl-X 25 19 EM end of medium Ctrl-Y 26 1a SUB substitute character Ctrl-Z 27 1b ESC escape Ctrl-[ 28 1c FS file separator Ctrl-\ 29 1d GS group separator Ctrl-] 30 1e RS record separator Ctrl-^ 31 1f US unit separator Ctrl-_ 32 20 space (blank) 33 21 ! exclamation mark 34 22 " quotation mark (double quote) 35 23 # number sign (hash mark, sharp sign) 36 24 $ dollar sign 37 25 % percent sign 38 26 & ampersand (and sign) 39 27 ' apostrophe (single quote) 40 28 ( left parenthesis 41 29 ) right parenthesis 42 2a * asterisk (star) 43 2b + plus sign 44 2c , comma 45 2d - minus sign or hyphen 46 2e . period, full stop 47 2f / solidus (slash) 48 30 0 digit zero 49 31 1 digit one 50 32 2 digit two 51 33 3 digit three 52 34 4 digit four 53 35 5 digit five 54 36 6 digit six 55 37 7 digit seven 56 38 8 digit eight 57 39 9 digit nine 58 3a : colon 59 3b ; semicolon 60 3c < less-than sign 61 3d = equals sign 62 3e > greater-than sign 63 3f ? question mark 64 40 @ commercial at 65 41 A capital A 66 42 B capital B 67 43 C capital C 68 44 D capital D 69 45 E capital E 70 46 F capital F 71 47 G capital G 72 48 H capital H 73 49 I capital I 74 4a J capital J 75 4b K capital K 76 4c L capital L 77 4d M capital M 78 4e N capital N 79 4f O capital O 80 50 P capital P 81 51 Q capital Q 82 52 R capital R 83 53 S capital S 84 54 T capital T 85 55 U capital U 86 56 V capital V 87 57 W capital W 88 58 X capital X 89 59 Y capital Y 90 5a Z capital Z 91 5b [ left square bracket 92 5c \ reverse solidus (backslash) 93 5d ] right square bracket 94 5e ^ circumflex accent 95 5f _ low line (underscore) 96 60 ` grave accent 97 61 a small a 98 62 b small b 99 63 c small c 100 64 d small d 101 65 e small e 102 66 f small f 103 67 g small g 104 68 h small h 105 69 i small i 106 6a j small j 107 6b k small k 108 6c l small l 109 6d m small m 110 6e n small n 111 6f o small o 112 70 p small p 113 71 q small q 114 72 r small r 115 73 s small s 116 74 t small t 117 75 u small u 118 76 v small v 119 77 w small w 120 78 x small x 121 79 y small y 122 7a z small z 123 7b { left curly bracket (left brace) 124 7c | vertical line (bar, or sign) 125 7d } right curly bracket (right brace) 126 7e ~ tilde (wavy line) 127 7f DEL delete (rubout, DEL control char)