Graphic and Control Codes
Figure 1 gives the 8-bit codes for the EBCDIC graphics and controls. Figure 2 gives the 7-bit codes for the ASCII graphics and controls. The controls are tabulated and compared in Figure 3. The standard interpretation of the ASCII controls are given in Figure 4.
There are 4 ASCII codes which do not have a corresponding graphic or control in the EBCDIC code. The EBCDIC codes given to these codes are as follows:
| ASCII Symbol | ASCII (Hex) | EBCDIC (Hex) |
|---|---|---|
| DC3 | 13 | 3A |
| ` | 60 | 70 |
| \ | 5C | 71 |
| ^ | 5E | 72 |
There are 29 EBCDIC graphics codes and 19 EBCDIC control codes which do not have a corresponding graphic or control in the ASCII code. In addition, there are 84 other EBCDIC codes whose interpretation is unspecified. Four of these codes have been chosen to correspond to the ASCII control and ASCII graphics which do not have a corresponding EBCDIC code. When converting EBCDIC codes to ASCII codes, the remaining 80 codes plus the 29 EBCDIC graphics and 18 EBCDIC controls (not counting NL) are converted into the code X'FF'. The NL character is treated specially. The NL character, EBCDIC code X'15', is converted into the two character sequence CR LF, i.e., ASCII X'0D 0A'. As stated above, the code X'80' is transmitted as a prompting character whenever CP requests an input line.
On converting from ASCII to EBCDIC, if any code other than the 128 ASCII codes, or the interrupt code X'80', is received, it is converted to the code X'FF'. In addition, whenever the two ASCII characters CR LF are found sequentially in the input stream, they are converted into the single EBCDIC character NL.
[In Figure 1, positions shown as "[?]" cannot be printed in ASCII.]
Figure 1 — Extended Binary-Coded Decimal Interchange Code (EBCDIC)
0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
2 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
3 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
4567+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0000|NUL|DLE|DS | |SP | & | - | | | |[?]|[?]| | | | 0 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0001|SOH|DC1|SOS| | | | / | | a | j |[?]|[?]| A | J | | 1 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0010|STX|DC2|FS |SYN| | | | | b | k | s |[?]| B | K | S | 2 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0011|ETX|TM | | | | | | | c | l | t |[?]| C | L | T | 3 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0100|PF |RES|BYP|PN | | | | | d | m | u |[?]| D | M | U | 4 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0101|HT |NL |LF |RS | | | | | e | n | v |[?]| E | N | V | 5 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0110|LC |BS |ETB|UC | | | | | f | o | w |[?]| F | O | W | 6 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0111|DEL|IL |ESC|EOT| | | | | g | p | x |[?]| G | P | X | 7 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1000| |CAN| | | | | | | h | q | y |[?]| H | Q | Y | 8 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1001| |EM | | | | | | | i | r | z |[?]| I | R | Z | 9 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1010|SMM|CC |SM | |[1]| ! | | : | | | | | | | | |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1011|VT |CU1|CU2|CU3| . | $ | , | # | { | } |[?]|[?]| | | | |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1100|FF |IFS| |DC4| < | * | % | @ |[?]|[?]|[?]|[?]| | | | |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1101|CR |IGS|ENQ|NAK| ( | ) | _ | ' |[?]|[?]| [ | ] | | | | |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1110|SO |IRS|ACK| | + | ; | > | = |[?]|[?]|[?]|[?]| | | | |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1111|SI |IUS|BEL|SUB| | |[2]| ? | " |[?]|[?]|[?]|[?]| | | | |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+---+---+---+---+---+---+---+---+
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
+---+---+---+---+---+---+---+---+
Code Structure
Figure 1.
Figure 2 — USA Standard Code for Information Interchange (USASCII)
8 0 0 0 0 0 0 0 0
7 0 0 0 0 1 1 1 1
6 0 0 1 1 0 0 1 1
5 0 1 0 1 0 1 0 1
4321+---+---+---+---+---+---+---+---+
0000|NUL|DLE|SP | 0 | @ | P | ` | p |
+---+---+---+---+---+---+---+---+
0001|SOH|DC1| ! | 1 | A | Q | a | q |
+---+---+---+---+---+---+---+---+
0010|STX|DC2| " | 2 | B | R | b | r |
+---+---+---+---+---+---+---+---+
0011|ETX|DC3| # | 3 | C | S | c | s |
+---+---+---+---+---+---+---+---+
0100|EOT|DC4| $ | 4 | D | T | d | t |
+---+---+---+---+---+---+---+---+
0101|ENQ|NAK| % | 5 | E | U | e | u |
+---+---+---+---+---+---+---+---+
0110|ACK|SYN| & | 6 | F | V | f | v |
+---+---+---+---+---+---+---+---+
0111|BEL|ETB| ' | 7 | G | W | g | w |
+---+---+---+---+---+---+---+---+
1000|BS |CAN| ( | 8 | H | X | h | x |
+---+---+---+---+---+---+---+---+
1001|HT |EM | ) | 9 | I | Y | i | y |
+---+---+---+---+---+---+---+---+
1010|LF |SUB| * | : | J | Z | j | z |
+---+---+---+---+---+---+---+---+
1011|VT |ESC| + | ; | K | [ | k | { |
+---+---+---+---+---+---+---+---+
1100|FF |FS | , | < | L | \ | l | | |
+---+---+---+---+---+---+---+---+
1101|CR |GS | - | = | M | ] | m | } |
+---+---+---+---+---+---+---+---+
1110|SO |RS | . | > | N | ^ | n | ~ |
+---+---+---+---+---+---+---+---+
1111|SI |SU | / | ? | O | _ | o |DEL|
+---+---+---+---+---+---+---+---+
+---+---+---+---+---+---+---+---+---+---+---+---+
| 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
+---+---+---+---+---+---+---+---+
Code Structure
Figure 2.
Figure 3 — Control Functions Compared
| CAT | EBCDIC | ASCII | TTY | PTTC | Function |
|---|---|---|---|---|---|
| NUL | NUL | NULL | Null | ||
| CC | SOH | SOH | SOM | Start of Heading | |
| CC | STX | STX | EOA | EOA (D) | Start of Text |
| CC | ETX | ETX | EOM | End of Text | |
| DC | PF | PF | Punch Off | ||
| FE | HT | HT | H.TAB | TAB | Horizontal Tab |
| GR | LC | LC | Lower Case | ||
| DEL | DEL | RUBOUT | DEL | Delete | |
| SMM | Start of Manual Message | ||||
| FE | VT | VT | V.TAB | Vertical Tab | |
| FE | FF | FF | FORM | Form Feed | |
| FE | CR | CR | RETURN | Carriage Return | |
| GR | SO | SO | SO | Shift Out | |
| GR | SI | SI | SI | Shift In | |
| CC | DLE | DLE | DC0 | Data Link Escape | |
| DC | DC1 | DC1 | X-ON | Device Control 1 | |
| DC | DC2 | DC2 | TAPE ON | Device Control 2 | |
| TM | Tape Mark | ||||
| DC | RES | RES | Restore | ||
| FE | NL | New Line | |||
| FE | BS | BS | BS | Backspace | |
| IL | IL | Idle | |||
| CAN | CAN | FE0 | CAN | Cancel | |
| EM | EM | S1 | End of Medium | ||
| CC | Cursor Control | ||||
| CU | CU1 | Customer Use 1 | |||
| IS | IFS | FS | S4 | Info. Field Separator | |
| IS | IGS | GS | S5 | Info. Group Separator | |
| IS | IRS | RS | S6 | Info. Record Separator | |
| IS | IUS | US | S7 | Info Unit Separator | |
| ED | DS | Digit Select | |||
| ED | SOS | Start of Significance | |||
| ED | FS | Field Separator | |||
| DC | BYP | BYP | Bypass | ||
| FE | LF | LF | LF | LF | Line Feed |
| CC | ETB | ETB | LEM | EOB (B) | End of Text Block |
| ESC | ESC | S3 | PRE | Escape | |
| SM | Set Mode | ||||
| CU | CU2 | Customer Use 2 | |||
| CC | ENQ | ENQ | WRU | Enquiry | |
| CC | ACK | ACK | RU | (Y) | Acknowledge |
| BEL | BEL | BELL | Bell | ||
| CC | SYN | SYN | SYNC | Synchronous Idle | |
| DC | PN | PN | Punch On | ||
| DC | RS | RS | Reader Stop | ||
| GR | UC | UC | Upper Case | ||
| CC | EOT | EOT | EOT | EOT (C) | End of Transmission |
| CU | CU3 | Customer Use 3 | |||
| DC | DC4 | DC4 | TAPE OFF | Device Control 4 | |
| CC | NAK | NAK | ERROR | (N) | Negative Acknowledge |
| SUB | SUB | S2 | Substitute | ||
| DC | DC3 | X-OFF | Device Control 3 |
Figure 3 (Continued) — Categories of Control Functions
CC (Communication Control). A functional character intended to control or facilitate transmission of information over communication networks.
FE (Format Effector). A functional character which controls the layout or positioning of information in printing or display devices.
IS (Information Separator). A character which is used to separate and qualify information in a logical sense. There is a group of four such characters, which are to be used in a hierarchical order.
DC (Device Control). A functional character used for the control of ancillary devices associated with data processing of telecommunication systems, more especially switching devices "on" and "off".
ED (Edit and Mark). A control character used by the System/360 Edit and Mark (EDMK) instruction for the formatting of alphanumeric fields.
GB (Graphic Control). A control character indicating that the code combinations which follow are to be interpreted in a particular code table, depending upon the particular control character.
CU (Customer Use). A character excluded from future assignment by IBM. These "protected" codes are intended for use by customer systems so that their use will not conflict with a possible future IBM use.