China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-22 03:45
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » ASCII Code Table and Meanings View 2,964 Replies 2
Original Poster Posted 2003-03-31 00:00 ·  中国 广东 广州 电信
元老会员
★★★
Credits 1,468
Posts 407
Joined 2002-10-21 00:00
23-year member
UID 34
Gender Male
From 广州
Status Offline
1. Scope of use
The character code definitions here are used for ordinary information exchange among various information processing systems, communication systems, and related equipment.

2. Standard code
|----------------------------------------------------------------------|
\ b7 ------------>| 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
bit bx\ b6 ---------->| 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
\ b5 -------->| 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
|-----------------------------------------------|
column->| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|b4 |b3 |b2 |b1 | row | | | | | | | | |
+----------------------+-----------------------------------------------+
| 0 | 0 | 0 | 0 | 0 | NUL | DLE | SP | 0 | @ | P | ` | p |
|---|---|---|---|------|-----|-----|-----|-----|-----|-----|-----|-----|
| 0 | 0 | 0 | 1 | 1 | SOH | DC1 | ! | 1 | A | Q | a | q |
|---|---|---|---|------|-----|-----|-----|-----|-----|-----|-----|-----|
| 0 | 0 | 1 | 0 | 2 | STX | DC2 | " | 2 | B | R | b | r |
|---|---|---|---|------|-----|-----|-----|-----|-----|-----|-----|-----|
| 0 | 0 | 1 | 1 | 3 | ETX | DC3 | # | 3 | C | S | c | s |
|---|---|---|---|------|-----|-----|-----|-----|-----|-----|-----|-----|
| 0 | 1 | 0 | 0 | 4 | EOT | DC4 | $ | 4 | D | T | d | t |
|---|---|---|---|------|-----|-----|-----|-----|-----|-----|-----|-----|
| 0 | 1 | 0 | 1 | 5 | ENQ | NAK | % | 5 | E | U | e | u |
|---|---|---|---|------|-----|-----|-----|-----|-----|-----|-----|-----|
| 0 | 1 | 1 | 0 | 6 | ACK | SYN | & | 6 | F | V | f | v |
|---|---|---|---|------|-----|-----|-----|-----|-----|-----|-----|-----|
| 0 | 1 | 1 | 1 | 7 | BEL | ETB | ' | 7 | G | W | g | w |
|---|---|---|---|------|-----|-----|-----|-----|-----|-----|-----|-----|
| 1 | 0 | 0 | 0 | 8 | BS | CAN | ( | 8 | H | X | h | x |
|---|---|---|---|------|-----|-----|-----|-----|-----|-----|-----|-----|
| 1 | 0 | 0 | 1 | 9 | HT | EM | ) | 9 | I | Y | i | y |
|---|---|---|---|------|-----|-----|-----|-----|-----|-----|-----|-----|
| 1 | 0 | 1 | 0 | 10 | LF | SUB | * | : | J | Z | j | z |
|---|---|---|---|------|-----|-----|-----|-----|-----|-----|-----|-----|
| 1 | 0 | 1 | 1 | 11 | VT | ESC | + | ; | K |






















































________
Notes: (CC) communication control
(FE) format effector
(IS) information separator
Strictly speaking, DEL is not a control character. (See 5.2)
4.2 Graphic symbols
Column/row Symbol Name

2/0 SP space (usually a non-printing character)
2/1 ! exclamation mark
2/2 " quotation mark (diaeresis sign )
2/3 # number sign
2/4 $ dollar sign
2/5 % percent sign
2/6 & the sign-name for and
2/7 ' apostrophe (right single quote, accent sign )
2/8 ( left parenthesis
2/9 ) right parenthesis
2/10 * asterisk
2/11 + plus sign
2/12 , comma (cedilla )
2/13 - hyphen (minus sign)
2/14 . period
2/15 / slash
3/10 : colon
3/11 ; semicolon
3/12 greater than
3/15 ? question mark
4/0 @ commercial at
5/11
5/12 \ backslash
5/13 ] right square bracket
5/14 ^ circumflex
5/15 _ underline
6/0 ` grave accent (left single quote)
7/11 { left brace
7/12 | vertical line
7/13 } right brace
7/14 ~ tilde (Spanish pronunciation mark ; ordinary accent )

________
Notes:
2 The distinct uses of the marks at positions 2/2, 2/7, 2/12, 5/14, /6/0, and 7/14 are described in Appendix A, A5.2.
3 Without prior agreement between sender and receiver, these characters must not be used for international information exchange. (See Appendix B4)
4 In applications where the # symbol is not used, position 2/3 may be used to represent the British currency sign.
5. Definitions
5.1 Overview
(CC) communication control: used to control or assist the transmission of information over communication networks.
(FE) format effector: used to control the layout of information in printing or display.
(IS) information separator: used to separate and delimit information according to logical definitions. There are four such characters in this group, used for different levels.
5.2 Control characters
NUL (null character): this character, with all bits 0, may be used in information exchange to fill idle time and medium length.
SOH (start of heading): a communication control character used to indicate the start of transmission of heading information; heading information refers to a character stream containing machine identification addresses and routing information. The STX character serves to end transmission of heading information.
STX (start of text): a communication control character used to indicate the start of transmission of text; text is a character stream, the information entity transmitted to the final destination. STX is also sometimes used to end the transmission of heading information started by SOH.
ETX (end of text): a communication control character used to end text transmission started by STX.
EOT (end of transmission): a communication control character used to indicate the end of one information transmission; one information transmission may contain one or more texts and related headings.
ENQ (enquiry): a communication control character used in data communication systems to request a response from a remote station. ENQ may represent a "WRU" (Who are you) message to identify a remote station, or may be used to obtain status information from a remote station, or may represent both meanings at once.
ACK (acknowledge): a communication control character sent by the responding side to indicate a positive response to the enquiring side.
BEL (bell): this character is used where it is necessary to attract attention; it can be used to control alarms or other warning devices.
BS (backspace): a format character that controls the print position by moving it back one position on the print line. (Also applies to display devices).
HT (horizontal tab): a format character controlling movement of the print position; the print position moves horizontally to the next preset position, and there are multiple preset positions on one line. (Also valid for display devices, and has a skip function for punched cards).
LF (line feed): a format character controlling movement of the print position; the print position moves to the next line. (Also usable for display devices). In some cases, LF may also mean "new line" (NL), where "new line" means moving the print position to the first printing position of the next line. Of course, use of this convention—new line—requires agreement by both sender and receiver.
VT (vertical tab): a format character controlling movement of the print position; the print position moves to the next preset line. (Also valid for display devices).
FF (form feed): a format character controlling movement of the print position to the first line of the next page. (Also valid for display devices).
CR (carriage return): a format character controlling movement of the print position to the first position of the current line. (Also used for display devices).
SO (Shift Out): a control character indicating that characters following SO use a code definition outside the standard code table, until the SI character appears.
SI (Shift In): a control character indicating that characters following SI are standard code.
DLE (data link escape): a communication control character that can change the meaning of a certain number of following consecutive characters. It is specifically used to provide auxiliary network communication control.
DC1, DC2, DC3, DC4 (device control): these characters are used to control auxiliary devices in data processing systems or communication systems, especially switching devices on and off. (If a separate "stop" control is required to interrupt or turn off an auxiliary device, DC4 is the preferred device control character.
NAK (negative acknowledge): a communication control character; the receiving side sends NAK to the sending side to indicate negative acknowledgment.
SYN (synchronous idle): a communication control character used by synchronous transmission systems when no other character provides a synchronization mechanism as a signal for completion or reservation.
ETB (end of transmission block): a communication control character indicating the end of a communication data block. The format of a data block is not necessarily related to process format.
CAN (cancel): a control character used to indicate data error or disregard.
EM (end of medium): a control character related to transmitted data, indicating the physical end of the medium, or the end of a data record on part of the medium being used or required.
(The position of this character need not correspond to the physical end position of the medium.
SUB (substitute): may be used to replace an invalid character.
ESC (escape character (Escape)): a control character providing code extension (additional characters) for information exchange. ESC is the prefix of a certain number of consecutive characters.
FS (file separator), GS (group separator), RS (record separator), and US (unit separator): these information separators may be used in data of any format. Their inclusion relationship is as follows: FS has the largest scope, then GS, then RS, and US the smallest. (The content and length of file, group, record, and unit are not specified).
DEL (delete): this character is used to remove erroneous or unwanted characters on punched tape. (Strictly speaking, DEL is not a control character).
5.3 Graphic characters
SP (space): a common non-printing character used to separate words. It is also a format character used to control movement of the print position; for each SP, the print position moves forward one position.
6. Consensus
6.1 This standard does not define any physical storage method for codes, nor does it include redundancy or error-control correction. In addition, this standard does not define the structure of data communication characters, communication formats, character extension techniques, or control characters used for graphic display.
6.2 If codes other than the standard code are used for data exchange, all communicating parties must agree.

6.3 The arranged code table is ordered in binary sequence.

6.4 Other than the graphic characters known to users, the code table defines no other characters for graphic control. Furthermore, the standard does not define different printing and display type styles, though in some applications different type styles may be convenient for users. For example, the characters at code table positions 2/1 and 5/15 are often related to logical OR (|) and logical NOT (NOT--252).
欢迎大家观临我的个人主页:

http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/


EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
Floor 2 Posted 2004-06-23 00:00 ·  中国 天津 电信
中级用户
Credits 297
Posts 44
Joined 2004-06-15 00:00
22-year member
UID 26749
Gender Male
Status Offline
Floor 3 Posted 2009-09-20 21:43 ·  中国 山东 临沂 联通
新手上路
Credits 4
Posts 2
Joined 2009-09-20 02:24
16-year member
UID 152313
Gender Male
Status Offline
Forum Jump: