CRLF is used in /N
ESC not used, would be useful to control special
The Escape (ESC) character, represented by 1B in hexadecimal (or 27 in decimal), is part of the ASCII control characters. It is used to trigger or switch to special modes of operation in devices, programs, or protocols. Here are some of its common uses:
1. Terminal Control
In old text-based terminals, ESC is used to begin a control sequence (like changing text color, moving the cursor, or clearing the screen).
For example, in ANSI escape codes, the sequence ESC[31m (where ESC is the escape character) turns text red in terminal output.
2. Printer Commands
ESC is commonly used in printer control protocols to send commands to a printer, like adjusting paper settings or switching fonts. For example, ESC commands are used in ESC/P (Epson Standard Code for Printers) and PCL (Printer Command Language) for communication between computers and printers.
3. Modem Control
In some serial communication protocols, the ESC character is used to switch modes in modems or other devices.
4. Keyboard Input
The ESC key on keyboards sends the escape character. It is often used to exit or cancel an operation in many software applications.
5. Escape Sequences in Programming
In programming, the ESC character is used to introduce an escape sequence. Escape sequences allow for the inclusion of non-printable or special characters in strings. For example, in C/C++ and many other programming languages, the backslash \ is often used to introduce escape sequences, but it originates from the concept of the ESC character.
6. Network Protocols
ESC is used in some network protocols to indicate a change in data mode, signaling a switch from data to command mode or vice versa.
7. Custom Use
In embedded systems and low-level programming, the ESC character can be used to trigger specific actions, especially in custom protocols designed to handle hardware or software tasks.
fixed with /C
; ASCII codes 0000 ESC: EQU 1BH
0000 CR: EQU 0DH
0000 LF: EQU 0AH
CRLF is used in /N ESC not used, would be useful to control special
The Escape (ESC) character, represented by
1B
in hexadecimal (or27
in decimal), is part of the ASCII control characters. It is used to trigger or switch to special modes of operation in devices, programs, or protocols. Here are some of its common uses:1. Terminal Control
ESC[31m
(whereESC
is the escape character) turns text red in terminal output.2. Printer Commands
ESC
commands are used in ESC/P (Epson Standard Code for Printers) and PCL (Printer Command Language) for communication between computers and printers.3. Modem Control
4. Keyboard Input
5. Escape Sequences in Programming
\
is often used to introduce escape sequences, but it originates from the concept of the ESC character.6. Network Protocols
7. Custom Use