Skip to main content

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 SymbolASCII (Hex)EBCDIC (Hex)
DC3133A
`6070
\5C71
^5E72

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​

CATEBCDICASCIITTYPTTCFunction
NULNULNULLNull
CCSOHSOHSOMStart of Heading
CCSTXSTXEOAEOA (D)Start of Text
CCETXETXEOMEnd of Text
DCPFPFPunch Off
FEHTHTH.TABTABHorizontal Tab
GRLCLCLower Case
DELDELRUBOUTDELDelete
SMMStart of Manual Message
FEVTVTV.TABVertical Tab
FEFFFFFORMForm Feed
FECRCRRETURNCarriage Return
GRSOSOSOShift Out
GRSISISIShift In
CCDLEDLEDC0Data Link Escape
DCDC1DC1X-ONDevice Control 1
DCDC2DC2TAPE ONDevice Control 2
TMTape Mark
DCRESRESRestore
FENLNew Line
FEBSBSBSBackspace
ILILIdle
CANCANFE0CANCancel
EMEMS1End of Medium
CCCursor Control
CUCU1Customer Use 1
ISIFSFSS4Info. Field Separator
ISIGSGSS5Info. Group Separator
ISIRSRSS6Info. Record Separator
ISIUSUSS7Info Unit Separator
EDDSDigit Select
EDSOSStart of Significance
EDFSField Separator
DCBYPBYPBypass
FELFLFLFLFLine Feed
CCETBETBLEMEOB (B)End of Text Block
ESCESCS3PREEscape
SMSet Mode
CUCU2Customer Use 2
CCENQENQWRUEnquiry
CCACKACKRU(Y)Acknowledge
BELBELBELLBell
CCSYNSYNSYNCSynchronous Idle
DCPNPNPunch On
DCRSRSReader Stop
GRUCUCUpper Case
CCEOTEOTEOTEOT (C)End of Transmission
CUCU3Customer Use 3
DCDC4DC4TAPE OFFDevice Control 4
CCNAKNAKERROR(N)Negative Acknowledge
SUBSUBS2Substitute
DCDC3X-OFFDevice 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.