Skip to main content

Module c0

Module c0 

Source
Expand description

C0 control bytes (0x00..=0x1f).

§Category

C0 controls are the 7-bit single-byte control characters shared with ASCII: BEL, BS, HT, LF, CR, ESC, and related communication controls.

§7-bit escape conventions

ESC (0x1b) introduces 7-bit encodings of higher-level controls such as CSI (ESC [), OSC (ESC ]), and DCS (ESC P). Those two-byte introducers are emitted by the writer modules for the sequence family they control; they are not represented as distinct constants here.

§Mode interaction

Most C0 bytes are mode-independent, though terminals may interpret line-feed behavior according to line-feed/new-line mode (Mode::LINE_FEED_NEW_LINE).

Constants§

ACK
Acknowledge control byte 0x06.
BEL
Bell control byte 0x07; also terminates many OSC strings emitted by this crate.
BS
Backspace control byte 0x08; moves one column left in ordinary terminal output.
CAN
Cancel control byte 0x18; often aborts an in-progress escape sequence.
CR
Carriage Return control byte 0x0d; moves to the start of the current line.
DC1
Device Control 1 byte 0x11; commonly XON in software flow control.
DC2
Device Control 2 byte 0x12.
DC3
Device Control 3 byte 0x13; commonly XOFF in software flow control.
DC4
Device Control 4 byte 0x14.
DLE
Data Link Escape control byte 0x10.
EM
End of Medium control byte 0x19.
ENQ
Enquiry control byte 0x05; historically asks for terminal identification.
EOT
End of Transmission control byte 0x04.
ESC
Escape control byte 0x1b; introduces 7-bit escape sequences such as CSI (ESC [) and OSC (ESC ]).
ETB
End of Transmission Block control byte 0x17.
ETX
End of Text control byte 0x03.
FF
Form Feed control byte 0x0c.
FS
File Separator control byte 0x1c.
GS
Group Separator control byte 0x1d.
HT
Horizontal Tab control byte 0x09; advances to the next tab stop.
LF
Line Feed control byte 0x0a; moves down one line, with carriage behavior depending on terminal mode.
LS0
Locking Shift 0, alias for SI (0x0f); selects G0 for GL.
LS1
Locking Shift 1, alias for SO (0x0e); selects G1 for GL.
NAK
Negative Acknowledge control byte 0x15.
NUL
Null control byte 0x00; used as a padding or string terminator in some byte protocols.
RS
Record Separator control byte 0x1e.
SI
Shift In control byte 0x0f; invokes G0 into GL.
SO
Shift Out control byte 0x0e; invokes G1 into GL until shifted back.
SOH
Start of Heading control byte 0x01.
STX
Start of Text control byte 0x02.
SUB
Substitute control byte 0x1a; may also abort an in-progress escape sequence.
SYN
Synchronous Idle control byte 0x16.
US
Unit Separator control byte 0x1f.
VT
Vertical Tab control byte 0x0b.