RFC 183

EBCDIC Codes and Their Mapping to ASCII

πŸ“… published July 1971, from ietf

RFC 183: The EBCDIC Codes and Their Mapping to ASCII πŸ’–

okay bestie, this one is from July 21, 1971 πŸŽ€ It was written by J.M. Winett at Lincoln Laboratory, and it sits in the Network Working Group with NIC number 7127. The categories are D.2 and D.3, and it's related to RFCs 109, 110, 105, and 158 ✨ The title block doesn't list any RFCs it obsoletes or updates.

Abstract πŸ¦‹

okay so the big goal is making ASCII codes map to EBCDIC codes in one consistent way across the whole ARPA Network 🌐 This RFC defines the IBM Standard Extended BCD Interchanged Code to do exactly that. ✨

Introduction 🌸

the IBM Corporate Systems Standard, Extended BCD Interchanged Code (EBCDIC), defines 8-bit graphic and control codes (see Figure 1) 🧚 The basic EBCDIC set has 54 controls (space included) and 88 graphics. It gets extended with 10 special graphics and 1 special control (EO). Those special graphics come from the 7-bit hollerith code and include 6 ASCII graphics πŸ’œ It's extended even more with the publishing and printing graphics option, which specifies 52 graphics. Of those, 32 show up on the IBM TN print chain. Four of them are duals with graphics that aren't on the TN print chain, and one graphic (degree) is dual with a graphic in the basic code's special graphics set (tilde) 🫢

It's really desirable to map ASCII codes to their EBCDIC counterparts in a consistent way across the ARPA network, no cap πŸ’…

Here's the lay of the land: each of the 34 ASCII controls (space and delete included) has a matching BDCDIC control, like ASCII control DC3 going to EBCDIC X'13' πŸ“ For 85 of the 94 ASCII graphics there's a matching graphic in the basic EBCDIC set. The other 9 ASCII graphics can be mapped in three different ways, which is where the fun (and the decisions) start 😭

I. IBM Correspondence πŸ‘‘

a) okay so IBM recommends these ASCII duals with the basic EBCDIC graphics πŸ’–

ASCII                   EBCDIC                  Code
[                       [cent sign]             X'4A'
]                       !                       X'5A'
!                       l                       X'4F'
[carrot sign]           [upper right corner]    X'5F'

ngl, the EBCDIC graphic for exclamation point (!) is not the one picked to match ASCII exclamation point (!). That would've been the sensible choice, but it means another code has to be used to represent this graphic πŸ™ˆ

b) for the other ASCII graphics, special EBCDIC graphics would be used instead πŸŽ€

Graphic                         Code
l                               X'6A'
l                               X'79'
[diagonal slash]                X'A1'
~                               X'E0'
[diagonal slash]                XC0'
{                               XD0'
}

II. Publishing Correspondence 🌈

a) these special EBCDIC graphics get paired with their matching ASCII graphics 🧚

Graphic                         Code
[carrot]                        X'71'
[                               X'AD'
]                               X'BD'
{                               X'8B'
}                               X'9B'

the codes for open bracket and close bracket were chosen because these graphics show up on the TN print chain πŸ¦‹ The codes for left brace and right brace were chosen over the special graphics set codes for opening and closing brace, respectively, because those graphics look similar and also appear on the TN print chain. main character energy for the TN print chain, honestly πŸ’…

III. Graphical Correspondence ✨

a) these basic EBCDIC graphics get matched with the ASCII graphics that look most like them πŸ‘€

|                       X'4F'           with |
                                              |

[upper right corner]    X'5F'           with ~

b) the basic EBCDIC graphic for cent gets matched with the ASCII graphic for reverse slash πŸ”₯

[cent]          X'4A'           with [diagonal slash]

this one's giving logic: the cent graphic isn't an ASCII graphic, and it's the only graphic in the basic EBCDIC set that wouldn't otherwise be linked to any ASCII graphic 🫢

c) the special EBCDIC grave accent graphic gets associated with its matching ASCII graphic 🌸

`  X'79'

d) these publishing EBCDIC graphics get matched with their corresponding ASCII graphics πŸŽ€

[carrot]        X'71'
[               X'AD'
]               X'BD'
{               X'8B'
}               X'9B'

same tea as before: the open and close bracket codes were picked since these graphics appear on the TN print chain, and the left and right brace codes were picked over the special graphics set codes for opening and closing brace because they look similar and also show up on the TN print chain πŸ’–

Standards: πŸ’œ

okay so, for the ASCII-to-EBCDIC and EBCDIC-to-ASCII mapping to become a real standard, I'd love comments on all of this from every site whose operating system uses EBCDIC as its internal code πŸ™

Telnet Codes: 🧚

for sites that want to offer TELNET services communicating with an EBCDIC code, a standard code has to be specified 🫢 The codes in Figure 1 can form the basis for that standard. The TELNET control codes need specific codes too, and these are the ones I suggest πŸ’…

                                   Hex Code
           sync                    38
           break                   39
           NOP                     3A
           Return to ASCII         FF
           No echo                 14
           Echo                    23
           Hide input              24

and now for the tea 🍡 To stop one code from being used for two graphics, I propose that the TN graphics get linked to their corresponding codes. The graphic tilde (~) could go to code X'E1' instead of staying paired with degree. This wouldn't change anything if the Graphical Correspondence is used for the EBCDIC-to-ASCII mapping with code X'5F' for logical not linked to tilde. The other publishing and printing graphics (Double Acute, Inferior Hook, Macron, and Inferior Comma) aren't on the TN print chain, but they share codes with TN print chain graphics, so they wouldn't count as part of the standard EBCDIC code 😭

πŸŽ€ that's part 1 of 2! part 2 has the EBCDIC questionnaire, the figures, and the full control code table, so stay tuned, bestie πŸ¦‹βœ¨
   30                                       (Reserved)
   31                                       (Reserved)
   32            CC            SYN          Synchronous Idle
   33                                       (Reversed)
   34            DC            PN           Punch On
   35            DC            RS           Reader Stop
   36            GR            UC           Upper Case
   37            CC            EOT          End of Transmission
   38                                       (Reserved)
   39                                       (Reserved)
   3A                                       (Reserved)
   3B            CU            CU3          Customer Use 3
   3C            DC            DC4          Device Control 4
   3D            CC            NAK          Negative Acknowledge
   3E                                       (Reserved)
   3F            GR            SUB          Substitute

                    Figure 3: EBCDIC Control Functions

Okay so here's the vibe for the control character categories, bestie πŸ’… Each one gets its own little job description, and I'm obsessed with how organized it is ✨

CC ([illegible] Control) is a functional character [illegible] to control or facilitate transmission of introducing [illegible] communication networks. πŸ“‘

FB (Format Bisector) is a functional character that controls the layout of positioning or information in printing or display devices. πŸŽ€

IS (Information Separator) is a character used to separate and qualify information in a logical sense. There's a group of four of these, and they're meant to be used in a hierarchical order. 🌸

DC (Device Control) is a functional character used for controlling ancillary devices associated with data processing or telecommunication systems, more especially switching devices "on" and "off". πŸ”Œ

ED (Edit and Mark) is a control character used by the System/[illegible]...and Mark ([illegible]) instruction for formatting alphanumeric fields. πŸ’–

GH (Graphic Control) is a control character indicating that the core combinations which follow are to be [illegible] in a particular code table, depending on the particular control character. πŸ¦‹

CU (Customer Use) is a character excluded from future assignment by IBM. These "protected" codes are meant for customer systems, so their use won't clash with a possible future IBM use. πŸ”’

                                 Figure 4
                      Categories of Control Functions

      Hex Code             Graphic                 Name
   *   6A                  |                       Vertical Line
                           |
   *   79                  [diagonal slash]        Grave Accent
   *   A1                  ~                       Tilde
   *   C0                  {                       Opening Brace
       CC                  [hook]                  Hook
       CE                  [fork]                  Fork
   *   D0                  }                       Closing Brace
   *   E0                  /                       Reverse Slant
       EC                  [chair]                 Chair
       FA                  |                       Long Vertical Line
       FF                  EO                      Eight Ones

                     Figure 5: Special EBCDIC Graphics

   *ASCII Graphic

        Hex Code   Graphic                 Name
   **      A0      -                       Superscript Minus
   *       A1      [degree]                Degree
   *       B0      [superscript 0]         Superscript Zero
   *       B1      [superscript 1]         Superscript One
   *       B2      [superscript 2]         Superscript Two
   *       B3      [superscript 3]         Superscript Three
           B4      [superscript 4]         Superscript Four
           B5      [superscript 5]         Superscript Five
           B6      [superscript 6]         Superscript Six
           B7      [superscript 7]         Superscript Seven
           B8      [superscript 8]         Superscript Eight
           B9      [superscript 9]         Superscript Nine

           SB      {                       Left Brace
           SC      [equal or less than]    Equal or Less Than
           SD      [superscript (]         Superscript Left Parenthesis
           SE      [superscript +]         Superscript Plus Sign
           SF      +                       Plotting Cross
           9B      }                       Right Brace
           9C      [lozenge]               Lozenge
           9D      [superscript )]         Superscript Right Parenthesis
           9E      [plus or minus]         Plus or Minus
           9F      [histogram]             Histogram
           AB      [lower left corner]     Lower Left Corner
           AC      [upper left corner]     Upper Left Corner
           AD      [                       Open Square Bracket
           AE      [= or >]                Equal or Greater Than
           AF      [bullet]                Bullet (Plotting Circle)
           EB      [lower right corner]    Lower Right Corner
           EC      [upper right corner]    Upper Right Corner
           ED      ]                       Close Square Bracket
           EE      [not equal]             Not equal
           EF      ---                     Entended Dash

                Figure 6: Publishing and Printing Graphics
                          Also on the TN Print Chain

   **      Dual with the special EBCDIC graph c tilde
   *       Dual with another graphic which is not on the TN print chain

       Hex Code    Graphic                 Name
           70      [Scandinavian accent]   Scandinavian Accent
           71      [carrot]                Circumflex
           72      [diaeresis]             Diaeresis
           73      /                       Diacritical Virgule
           74      '                       Acute Accent
           75      [superior .]            Superior Dot
           76      ,                       Cedilla
           77      [breve]                 Breve
           78      [caron]                 Caron
           8A      [up arrow]              Up Arrow
           9A      [dagger]                Dagger

   *       B0      "                       Double Acute
   *       B1      '                       Inferior Hook
   *       B2      -                       Macron
   *       B3      ,                       Inferior Comma

           CD      '                       Open Quote
           DB      [pound sign]            Pound Sign
           DC      [section sign]          Section Sign
           DD      [paragraph sign]        Paragraph Sign
           ED      '                       Close Quote

             Figure 7: Publishing and Printing Graphics
                       not on the TN Print Chain

   *       Dual with another graphic which is on the TN print chain
   Name        Graphic    Hex Code     Graphic       Name
   Tilde           ~       A1         [degree]       Degree
   Double Acute    "       B0        [superscript 0] Superscript Zero
   Inferior Hook   '       B1        [superscript 1] Superscript One
   Macron  -               B2        [superscript 2] Superscript Two
   Inferior Comma ,        B3        [superscript 3] Superscript Three

                      Figure 8: Graphic Duals
   __________________________________________________________________

   Codes           Graphics               Name
   AF--75             .                   Bullet--Superior Dot
   8B--C0             {                   Left Brace--Opening Brace
   9B--D0             }                   Right Brace--Closing Brace
   61--73             /                   Slash--Diacritical Virgule
   A1--7.0         [degree]               Degree--Scandinavian Accent
   4F--FA             |                   Logical Or--Long Vertical Mark
   6B--76--B3         ,                   Comma--Cedilla-Inferior Comma
   60--B2             -                   Dash--Macron

                       Figure 9: Similar Graphics
   ____________________________________________________________________

   Name            Control  Hex Code  Graphic      Name
   Group Mark        GM      4F          |         Logical or
   Mode Change       MC      5F      [upper right corner] Logical Not
   Plus Zero         PZ      C0          {         Opening Brace
   Minus Zero        MZ      D0          }         Closing Brace
   Record Mark       RM      E0          \        Reverse Slant
   Word Separator    WS      6D          __        Underscore
   Segment Mark      SM      6F           ?        Question Mark
   Substitute Blank  SB      7A           :        Colon
   Tape Mark         TM      7F           "        Quotation Marks

                     Figure 10: Graphic Control Duals
   ____________________________________________________________________

This material has not been reviewed for public release and is intended only for use with the ARPA network. It should not be quoted or cited in any publication not related to the ARPA network. 🫢
πŸ“¦ where this page comes from