The Control Characters
The first 32 values are non-printing control characters, such as Return and Line feed. You generate these characters on the keyboard by holding down the Control key while you strike another key. For example, Bell is value 7, Control plus G, often shown in documents as ^G. Notice that 7 is 64 less than the value of G (71); the Control key subtracts 64 from the value of the keys that it modifies.
Control Characters
Char | Oct | Dec | Hex | Control-Key | Control Action |
---|---|---|---|---|---|
NUL | 0 | 0 | 0 | ^@ | Null character |
SOH | 1 | 1 | 1 | ^A | Start of heading, = console interrupt |
STX | 2 | 2 | 2 | ^B | Start of text, maintenance mode on HP console |
ETX | 3 | 3 | 3 | ^C | End of text |
EOT | 4 | 4 | 4 | ^D | End of transmission, not the same as ETB |
ENQ | 5 | 5 | 5 | ^E | Enquiry, goes with ACK; old HP flow control |
ACK | 6 | 6 | 6 | ^F | Acknowledge, clears ENQ logon hand |
BEL | 7 | 7 | 7 | ^G | Bell, rings the bell... |
BS | 10 | 8 | 8 | ^H | Backspace, works on HP terminals/computers |
HT | 11 | 9 | 9 | ^I | Horizontal tab, move to next tab stop |
LF | 12 | 10 | a | ^J | Line Feed |
VT | 13 | 11 | b | ^K | Vertical tab |
FF | 14 | 12 | c | ^L | Form Feed, page eject |
CR | 15 | 13 | d | ^M | Carriage Return |
SO | 16 | 14 | e | ^N | Shift Out, alternate character set |
SI | 17 | 15 | f | ^O | Shift In, resume defaultn character set |
DLE | 20 | 16 | 10 | ^P | Data link escape |
DC1 | 21 | 17 | 11 | ^Q | XON, with XOFF to pause listings; ":okay to send". |
DC2 | 22 | 18 | 12 | ^R | Device control 2, block-mode flow control |
DC3 | 23 | 19 | 13 | ^S | XOFF, with XON is TERM=18 flow control |
DC4 | 24 | 20 | 14 | ^T | Device control 4 |
NAK | 25 | 21 | 15 | ^U | Negative acknowledge |
SYN | 26 | 22 | 16 | ^V | Synchronous idle |
ETB | 27 | 23 | 17 | ^W | End transmission block, not the same as EOT |
CAN | 30 | 24 | 17 | ^X | Cancel line, MPE echoes !!! |
EM | 31 | 25 | 19 | ^Y | End of medium, Control-Y interrupt |
SUB | 32 | 26 | 1a | ^Z | Substitute |
ESC | 33 | 27 | 1b | ^[ | Escape, next character is not echoed |
FS | 34 | 28 | 1c | ^\ | File separator |
GS | 35 | 29 | 1d | ^] | Group separator |
RS | 36 | 30 | 1e | ^^ | Record separator, block-mode terminator |
US | 37 | 31 | 1f | ^_ | Unit separator |
Printing Characters
Char | Octal | Dec | Hex | Description |
---|---|---|---|---|
SP | 40 | 32 | 20 | Space |
! | 41 | 33 | 21 | Exclamation mark |
" | 42 | 34 | 22 | Quotation mark (" in HTML) |
# | 43 | 35 | 23 | Cross hatch (number sign) |
$ | 44 | 36 | 24 | Dollar sign |
% | 45 | 37 | 25 | Percent sign |
& | 46 | 38 | 26 | Ampersand |
` | 47 | 39 | 27 | Closing single quote (apostrophe) |
( | 50 | 40 | 28 | Opening parentheses |
) | 51 | 41 | 29 | Closing parentheses |
* | 52 | 42 | 2a | Asterisk (star, multiply) |
+ | 53 | 43 | 2b | Plus |
, | 54 | 44 | 2c | Comma |
- | 55 | 45 | 2d | Hyphen, dash, minus |
. | 56 | 46 | 2e | Period |
/ | 57 | 47 | 2f | Slant (forward slash, divide) |
0 | 60 | 48 | 30 | Zero |
1 | 61 | 49 | 31 | One |
2 | 62 | 50 | 32 | Two |
3 | 63 | 51 | 33 | Three |
4 | 64 | 52 | 34 | Four |
5 | 65 | 53 | 35 | Five |
6 | 66 | 54 | 36 | Six |
7 | 67 | 55 | 37 | Seven |
8 | 70 | 56 | 38 | Eight |
9 | 71 | 57 | 39 | Nine |
: | 72 | 58 | 3a | Colon |
; | 73 | 59 | 3b | Semicolon |
< | 74 | 60 | 3c | Less than sign (< in HTML) |
= | 75 | 61 | 3d | Equals sign |
> | 76 | 62 | 3e | Greater than sign (> in HTML) |
? | 77 | 63 | 3f | Question mark |
@ | 100 | 64 | 40 | At-sign |
A | 101 | 65 | 41 | Uppercase A |
B | 102 | 66 | 42 | Uppercase B |
C | 103 | 67 | 43 | Uppercase C |
D | 104 | 68 | 44 | Uppercase D |
E | 105 | 69 | 45 | Uppercase E |
F | 106 | 70 | 46 | Uppercase F |
G | 107 | 71 | 47 | Uppercase G |
H | 110 | 72 | 48 | Uppercase H |
I | 111 | 73 | 49 | Uppercase I |
J | 112 | 74 | 4a | Uppercase J |
K | 113 | 75 | 4b | Uppercase K |
L | 114 | 76 | 4c | Uppercase L |
M | 115 | 77 | 4d | Uppercase M |
N | 116 | 78 | 4e | Uppercase N |
O | 117 | 79 | 4f | Uppercase O |
P | 120 | 80 | 50 | Uppercase P |
Q | 121 | 81 | 51 | Uppercase Q |
R | 122 | 82 | 52 | Uppercase R |
S | 123 | 83 | 53 | Uppercase S |
T | 124 | 84 | 54 | Uppercase T |
U | 125 | 85 | 55 | Uppercase U |
V | 126 | 86 | 56 | Uppercase V |
W | 127 | 87 | 57 | Uppercase W |
X | 130 | 88 | 58 | Uppercase X |
Y | 131 | 89 | 59 | Uppercase Y |
Z | 132 | 90 | 5a | Uppercase Z |
[ | 133 | 91 | 5b | Opening square bracket |
\ | 134 | 92 | 5c | Reverse slant (Backslash) |
] | 135 | 93 | 5d | Closing square bracket |
^ | 136 | 94 | 5e | Caret (Circumflex) |
_ | 137 | 95 | 5f | Underscore |
` | 140 | 96 | 60 | Opening single quote |
a | 141 | 97 | 61 | Lowercase a |
b | 142 | 98 | 62 | Lowercase b |
c | 143 | 99 | 63 | Lowercase c |
d | 144 | 100 | 64 | Lowercase d |
e | 145 | 101 | 65 | Lowercase e |
f | 146 | 102 | 66 | Lowercase f |
g | 147 | 103 | 67 | Lowercase g |
h | 150 | 104 | 68 | Lowercase h |
i | 151 | 105 | 69 | Lowercase i |
j | 152 | 106 | 6a | Lowercase j |
k | 153 | 107 | 6b | Lowercase k |
l | 154 | 108 | 6c | Lowercase l |
m | 155 | 109 | 6d | Lowercase m |
n | 156 | 110 | 6e | Lowercase n |
o | 157 | 111 | 6f | Lowercase o |
p | 160 | 112 | 70 | Lowercase p |
q | 161 | 113 | 71 | Lowercase q |
r | 162 | 114 | 72 | Lowercase r |
s | 163 | 115 | 73 | Lowercase s |
t | 164 | 116 | 74 | Lowercase t |
u | 165 | 117 | 75 | Lowercase u |
v | 166 | 118 | 76 | Lowercase v |
w | 167 | 119 | 77 | Lowercase w |
x | 170 | 120 | 78 | Lowercase x |
y | 171 | 121 | 79 | Lowercase y |
z | 172 | 122 | 7a | Lowercase z |
{ | 173 | 123 | 7b | Opening curly brace |
| | 174 | 124 | 7c | Vertical line |
} | 175 | 125 | 7d | Cloing curly brace |
~ | 176 | 126 | 7e | Tilde (approximate) |
DEL | 177 | 127 | 7f | Delete (rubout), cross-hatch box |
Programming code Source http://academic.evergreen.edu/projects/biophysics/technotes/program/ascii_ctrl.htm
Programming
ASCII Control Codes
ASCII Standard Character Set
Notes
Programming
ASCII Control Codes
Control | Code | To Enter With | Echo | ||||||
Abbreviation | Full Name | Dec | Hex | Alt-Key | Ctrl-Key | ||||
NUL | Null | 0 | 00 | Ctrl-@ | ^@ | ||||
SOH | Start of heading | 1 | 01 | Alt-1 | Ctrl-A | ^A | |||
STX | Start of text | 2 | 02 | Alt-2 | Ctrl-B | ^B | |||
ETX | End of text | 3 | 03 | Alt-3 | Ctrl-C | ^C | |||
EOT | End of transmission | 4 | 04 | Alt-4 | Ctrl-D | ^D | |||
ENQ | Enquiry | 5 | 05 | Alt-5 | Ctrl-E | ^E | |||
ACK | Acknowledge | 6 | 06 | Alt-6 | Ctrl-F | ^F | |||
BEL | Bell | 7 | 07 | Alt-7 | Ctrl-G | ^G | |||
BS | Backspace | 8 | 08 | Alt-8 | Ctrl-H | ^H | |||
HT | Horizontal tab | 9 | 09 | Alt-9 | Ctrl-I | ^I | |||
LF | Line feed | 10 | 0A | Alt-10 | Ctrl-J | ^J | |||
VT | Vertical tab | 11 | 0B | Alt-11 | Ctrl-K | ^K | |||
FF | Form feed | 12 | 0C | Alt-12 | Ctrl-L | ^L | |||
CR | Carriage return | 13 | 0D | Alt-13 | Ctrl-M | ^M | |||
SO | Shift out | 14 | 0E | Alt-14 | Ctrl-N | ^N | |||
SI | Shift in | 15 | 0F | Alt-15 | Ctrl-O | ^O | |||
DLE | Data line escape | 16 | 10 | Alt-16 | Ctrl-P | ^P | |||
DC1 | Device control 1 | 17 | 11 | Alt-17 | Ctrl-Q | ^Q | |||
DC2 | Device control 2 | 18 | 12 | Alt-18 | Ctrl-R | ^R | |||
DC3 | Device control 3 | 19 | 13 | Alt-19 | Ctrl-S | ^S | |||
DC4 | Device control 4 | 20 | 14 | Alt-20 | Ctrl-T | ^T | |||
NAK | Negative acknowledge | 21 | 15 | Alt-21 | Ctrl-U | ^U | |||
SYN | Synchronous idle | 22 | 16 | Alt-22 | Ctrl-V | ^V | |||
ETB | End transmission block | 23 | 17 | Alt-23 | Ctrl-W | ^W | |||
CAN | Cancel | 24 | 18 | Alt-24 | Ctrl-X | ^X | |||
EM | End of medium | 25 | 19 | Alt-25 | Ctrl-Y | ^Y | |||
SUB | Substitute | 26 | 1A | Alt-26 | Ctrl-Z | ^Z | |||
ESC | Escape | 27 | 1B | Alt-27 | Ctrl-[ | ^[ | |||
FS | File separator | 28 | 1C | Alt-28 | Ctrl-\ | ^\ | |||
GS | Group separator | 29 | 1D | Alt-29 | Ctrl-] | ^] | |||
RS | Record separator | 30 | 1E | Alt-30 | Ctrl-^ | ^^ | |||
US | Unit separator | 31 | 1F | Alt-31 | Ctrl-_ | ^_ |
ASCII Standard Character Set
Char | Ctrl | Dec | Hex | Char | Dec | Hex | Char | Dec | Hex | Char | Dec | Hex | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NUL | ^@ | 0 | 00 | 32 | 20 | @ | 64 | 40 | ` | 96 | 60 | ||||
SOH | ^A | 1 | 01 | ! | 33 | 21 | A | 65 | 41 | a | 97 | 61 | |||
STX | ^B | 2 | 02 | " | 34 | 22 | B | 66 | 42 | b | 98 | 62 | |||
ETX | ^C | 3 | 03 | # | 35 | 23 | C | 67 | 43 | c | 99 | 63 | |||
EOT | ^D | 4 | 04 | $ | 36 | 24 | D | 68 | 44 | d | 100 | 64 | |||
ENQ | ^E | 5 | 05 | % | 37 | 25 | E | 69 | 45 | e | 101 | 65 | |||
ACK | ^F | 6 | 06 | & | 38 | 26 | F | 70 | 46 | f | 102 | 66 | |||
BEL | ^G | 7 | 07 | ' | 39 | 27 | G | 71 | 47 | g | 103 | 67 | |||
BS | ^H | 8 | 08 | ( | 40 | 28 | H | 72 | 48 | h | 104 | 68 | |||
HT | ^I | 9 | 09 | ) | 41 | 29 | I | 73 | 49 | i | 105 | 69 | |||
LF | ^J | 10 | 0A | * | 42 | 2A | J | 74 | 4A | j | 106 | 6A | |||
VT | ^K | 11 | 0B | + | 43 | 2B | K | 75 | 4B | k | 107 | 6B | |||
FF | ^L | 12 | 0C | , | 44 | 2C | L | 76 | 4C | l | 108 | 6C | |||
CR | ^M | 13 | 0D | - | 45 | 2D | M | 77 | 4D | m | 109 | 6D | |||
SO | ^N | 14 | 0E | . | 46 | 2E | N | 78 | 4E | n | 110 | 6E | |||
SI | ^O | 15 | 0F | / | 47 | 2F | O | 79 | 4F | o | 111 | 6F | |||
DLE | ^P | 16 | 10 | 0 | 48 | 30 | P | 80 | 50 | p | 112 | 70 | |||
DC1 | ^Q | 17 | 11 | 1 | 49 | 31 | Q | 81 | 51 | q | 113 | 71 | |||
DC2 | ^R | 18 | 12 | 2 | 50 | 32 | R | 82 | 52 | r | 114 | 72 | |||
DC3 | ^S | 19 | 13 | 3 | 51 | 33 | S | 83 | 53 | s | 115 | 73 | |||
DC4 | ^T | 20 | 14 | 4 | 52 | 34 | T | 84 | 54 | t | 116 | 74 | |||
NAK | ^U | 21 | 15 | 5 | 53 | 35 | U | 85 | 55 | u | 117 | 75 | |||
SYN | ^V | 22 | 16 | 6 | 54 | 36 | V | 86 | 56 | v | 118 | 76 | |||
ETB | ^W | 23 | 17 | 7 | 55 | 37 | W | 87 | 57 | w | 119 | 77 | |||
CAN | ^X | 24 | 18 | 8 | 56 | 38 | X | 88 | 58 | x | 120 | 78 | |||
EM | ^Y | 25 | 19 | 9 | 57 | 39 | Y | 89 | 59 | y | 121 | 79 | |||
SUB | ^Z | 26 | 1A | : | 58 | 3A | Z | 90 | 5A | z | 122 | 7A | |||
ESC | ^[ | 27 | 1B | ; | 59 | 3B | [ | 91 | 5B | { | 123 | 7B | |||
FS | ^\ | 28 | 1C | < | 60 | 3C | \ | 92 | 5C | | | 124 | 7C | |||
GS | ^] | 29 | 1D | = | 61 | 3D | ] | 93 | 5D | } | 125 | 7D | |||
RS | ^^ | 30 | 1E | > | 62 | 3E | ^ | 94 | 5E | ~ | 126 | 7E | |||
US | ^_ | 31 | 1F | ? | 63 | 3F | _ | 95 | 5F | 127 | 7F |
Notes
- ASCII (American Standard Code for Information Interchange)
- is
a 7-bit character code that was introduced by American National
Standards Institute (ANSI) and is used by most U.S. personal and
workstation computers. -
- Other Common Alphanumeric Codes