# ANSI Table
AKA the **C1** Control Codes, an 8-bit extension of 7-bit [[ASCII]]'s [[ASCII Table#Control Characters|Control Characters]].
While these are part of the ANSI standard (as a superset of [[#ISO 8859]], [[#ISO 6429]], and others). I don't know how many of them were ever really used as designed, but with modern terminals the few still in use have actually been replaced by their [[#Escape Sequence]] equivalent.
See [[ANSI - Control Codes|ANSI Control Codes]] for their usage with common [[Terminals]].
| Name | Abbr | ESC+ | BInary | Oct | Dec | Hex |
| :------------------------------------------ | :--- | ---- | -------- | --- | --- | --- |
| Padding Character | PAD | @ | 10000000 | 200 | 128 | 80 |
| High Octet Preset | HOP | A | 10000001 | 201 | 129 | 81 |
| Break Permitted Here | BPH | B | 10000010 | 202 | 130 | 82 |
| No Break Here | NBH | C | 10000011 | 203 | 131 | 83 |
| Index | IND | D | 10000100 | 204 | 132 | 84 |
| Next Line | NEL | E | 10000101 | 205 | 133 | 85 |
| Start of Selected Area | SSA | F | 10000110 | 206 | 134 | 86 |
| End of Selected Area | ESA | G | 10000111 | 207 | 135 | 87 |
| Horizontal Tabulation Set | HTS | H | 10001000 | 210 | 136 | 88 |
| Horizontal Tabulation<br>With Justification | HTJ | I | 10001001 | 211 | 137 | 89 |
| Vertical Tabulation Set | VTS | J | 10001010 | 212 | 138 | 8A |
| Partial Line Down | PLD | K | 10001011 | 213 | 139 | 8B |
| Partial Line Up | PLU | L | 10001100 | 214 | 140 | 8C |
| Reverse Index | RI | M | 10001101 | 215 | 141 | 8D |
| Single-Shift 2 | SS2 | N | 10001110 | 216 | 142 | 8E |
| Single-Shift 3 | SS3 | O | 10001111 | 217 | 143 | 8F |
| Device Control String | DCS | P | 10010000 | 220 | 144 | 90 |
| Private Use 1 | PU1 | Q | 10010001 | 221 | 145 | 91 |
| Private Use 2 | PU2 | R | 10010010 | 222 | 146 | 92 |
| Set Transmit State | STS | S | 10010011 | 223 | 147 | 93 |
| Cancel character | CCH | T | 10010100 | 224 | 148 | 94 |
| Message Waiting | MW | U | 10010101 | 225 | 149 | 95 |
| Start of Protected Area | SPA | V | 10010110 | 226 | 150 | 96 |
| End of Protected Area | EPA | W | 10010111 | 227 | 151 | 97 |
| Start of String | SOS | X | 10011000 | 230 | 152 | 98 |
| Single Graphic Character Introducer | SGC | Y | 10011001 | 231 | 153 | 99 |
| Single Character Introducer | SCI | Z | 10011010 | 232 | 154 | 9A |
| Control Sequence Introducer | CSI | [ | 10011011 | 233 | 155 | 9B |
| String Terminator | ST | \| | 10011100 | 234 | 156 | 9C |
| Operating System Command | OSC | ] | 10011101 | 235 | 157 | 9D |
| Privacy Message | PM | ^ | 10011110 | 236 | 158 | 9E |
| Application Program Command | APC | _ | 10011111 | 237 | 159 | 9F |
## Escape Sequence
Similar to [[ASCII Table#Caret Notation|Caret Notation]] for **C0** Control Characters, there is a facility to encode these **C1** Control Codes. Instead of holding control, it uses the escape (or alt) key.
In the standard scheme the value `1` (excluding the top bit) is paired with letter `A`. So to insert an `OSC` character, you would press **esc-]**.
# Control Code Details
## Control Sequence Introducer
The `CSI` is still used for [[ANSI Escape Sequences VT-100]].
## String Terminator
Terminates a string started by `DCS`, `SOS`, `OSC`, `PM` or `APC`.
Some terminals support using [[ASCII Table|BEL]] (`0x07`) instead of `ST` (`0x9C`).
# RFC 1345
First published in 1992. https://www.rfc-editor.org/info/rfc1345
Contains the four control characters missing from [[#ECMA-48]]. Unsure if they were introduced here because there is no commentary on them whatsoever.
# ISO 6429
Supposedly the first version was a merger of [[#ECMA-48]] and [[#ANSI X3.64]]. But after 1986, it should be identical to [[#ECMA-48]].
# ANSI X3.64
First approved in 1979. Withdrawn in 1994 in deference of the ISO/IEC standard.
Doesn't seem to contain a specific character set at all.
# ECMA-48
First published in 1976. https://ecma-international.org/publications-and-standards/standards/ecma-48/
The only differences between ECMA-48's character set and the common table are that four characters were left undefined.
| Name | Abbr | ESC+ | BInary | Oct | Dec | Hex |
| :---------- | :--- | ---- | -------- | --- | --- | --- |
| *Undefined* | | @ | 10000000 | 200 | 128 | 80 |
| *Undefined* | | A | 10000001 | 201 | 129 | 81 |
| *Undefined* | | D | 10000100 | 204 | 132 | 84 |
| *Undefined* | | Y | 10011001 | 231 | 153 | 99 |
# References
- http://justsolve.archiveteam.org/wiki/C1_controls
- https://en.wikipedia.org/wiki/ANSI_escape_code
- https://en.wikipedia.org/wiki/C0_and_C1_control_codes
- https://en.wiktionary.org/wiki/Appendix:Control_characters