C0 and C1 control codes

(Redirected from C0)

The C0 and C1 control code sets define control codes for use in text. C0, originally defined in ISO 646, defines codes in the range 00HEX-1FHEX. C1, originally defined in ISO 6429, defines codes in the range 80HEX-9FHEX. The C0 codes are used with ASCII and most encodings based on it. The C1 codes were included in the ISO-8859-n series of encodings and Unicode but are rarely used.

Contents

C0 (ascii and derivatives)

SeqDecHexAbbrCharacter nameDescription/notes
^@000x00NULNullOriginally used to allow gaps to be left on paper tape for edits. Later used for padding after a code that might take a terminal some time to process (e.g. a carrage return or line feed on a priniting terminal). Now often used as a string terminator, especially in C.
^A010x01SOHStart of Heading
^B020x02STXStart of Text
^C030x03ETXEnd of TextOften used as a "break" character (Ctrl-C).
^D040x04EOTEnd of TransmissionUsed to represent the end-of-file in Unix. However, MS-DOS uses ^Z for end-of-file.
^E050x05ENQEnquiry
^F060x06ACKAcknowledge
^G070x07BELBellOriginally used to sound a bell on the terminal. Later used for a beep on systems that didn't have a physical bell. May also quickly turn on and off reverse video (a visual bell).
^H080x08BS BackspaceDeletes the character to the left and moves the cursor left.
^I090x09HT Horizontal TabGenerally referred to as simply "tab".
^J100x0ALF Line FeedOn typewriters, printers, and some terminal emulators, moves the cursor down one row without affecting its column position. On Unix, used as to mark end-of-line.
^K110x0BVT Vertical Tab
^L120x0CFF Form FeedOn printers, load the next page. Treated as whitespace by Python, and may be used to separate logical divisions in code.
^M130x0DCR Carriage ReturnOriginally used to move the cursor to column zero. On Mac OS (pre-Mac OS X), used to mark end-of-line.
^N140x0ESO Shift OutSwitch to an alternate character set.
^O150x0FSI Shift In
^P160x10DLEData Link EscapeCause the following data to be interpreted as raw data, not control codes.
^Q170x11DC1Device Control 1/XOFFResume transmission. Used for software flow control.
^R180x12DC2Device Control 2
^S190x13DC3Device Control 3/XONSuspend transmission. Used for software flow control.
^T200x14DC4Device Control 4
^U210x15NAKNegative Acknowledge
^V220x16SYNSynchronous Idle
^W230x17ETBEnd of Transmission Block
^X240x18CANCancel
^Y250x19EM End of Medium
^Z260x1ASUBSubstituteOn MS-DOS systems with files opened in text mode, "end of text" or "end of file" is marked by the Ctrl-Z character (code 26, "Substitute"), instead of ^C or ^D common on other operating systems.
^[270x1BESCEscape
^\280x1CFS File Separator
^]290x1DGS Group Separator
^^300x1ERS Record Separator
^_310x1FUS Unit Separator
1270x7FDELRubout/DeleteOriginally used to mark deleted characters on paper tape, since any character could be changed to all ones by punching holes everywhere. In modern systems, used to delete the character to the right of the cursor.

C1 (ISO-8859 and unicode)

DecHexAbbrCharacter nameDescription/notes
1280x80PADPadding Character
1290x81HOPHigh Octet Preset
1300x82BPHBreak Permitted Here
1310x83NBHNo Break Here
1320x84INDIndex
1330x85NELNext LineUsed to mark end-of-line on some IBM mainframes.
1340x86SSAStart of Selected Area
1350x87ESAEnd of Selected Area
1360x88HTSHorizontal Tab Set
1370x89HTJHorizontal Tab Justified
1380x8AVTSVertical Tab Set
1390x8BPLDPartial Line Forward
1400x8CPLUPartial Line Backward
1410x8DRI Reverse Line Feed
1420x8ESS2Single-Shift 2
1430x8FSS3Single-Shift 3
1440x90DCSDevice Control String
1450x91PU1Private Use 1
1460x92PU2Private Use 2
1470x93STSSet Transmit State
1480x94CCHCancel Character
1490x95MW Message Waiting
1500x96SPAStart of Protected Area
1510x97EPAEnd of Protected Area
1520x98SOSStart of String
1530x99SGCISingle Graphic Char Intro
1540x9ASCISingle Char Intro
1550x9BCSIControl Sequence Intro
1560x9CST String Terminator
1570x9DOSCOS Command
1580x9EPM Private Message
1590x9FAPCApp Program Command

References