Movatterモバイル変換


[0]ホーム

URL:


Wikipedia

EBCDIC

(Redirected fromExtended Binary Coded Decimal Interchange Code)
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "EBCDIC" – news ·newspapers ·books ·scholar ·JSTOR
(January 2019) (Learn how and when to remove this message)

Extended Binary Coded Decimal Interchange Code[1][2] (EBCDIC;[1]/ˈɛbsɪdɪk/) is an eight-bitcharacter encoding used mainly onIBM mainframe andIBMmidrange computer operating systems. It descended from the code used withpunched cards and the correspondingsix-bit binary-coded decimal code used with most of IBM'scomputer peripherals of the late 1950s and early 1960s.[3] It is supported by various non-IBM platforms, such asFujitsu-Siemens'BS2000/OSD, OS-IV, MSP, and MSP-EX, theSDS Sigma series,UnisysVS/9, UnisysMCP andICLVME.

EBCDIC encoding family
Classification8-bitbasic Latin encodings (non‑ASCII)
Preceded byBCD

History

edit
 
Punched card with the Hollerith encoding of the 1964 EBCDIC character set. Contrast at the top is enhanced to show the printed characters. The "number" punches (0–9) directly translate to the lower 4 bits of EBCDIC, though the upper 4 bits of EBCDIC are more complex.

EBCDIC was devised in 1963 and 1964 byIBM and was announced with the release of theIBM System/360 line of mainframecomputers. It is an eight-bit character encoding, developed separately from the seven-bitASCII encoding scheme. It was created to extend the existingBinary-Coded Decimal (BCD) Interchange Code, orBCDIC, which itself was devised as an efficient means of encoding the twozone andnumber punches onpunched cards into six bits. The distinct encoding of 's' and 'S' (using position 2 instead of 1) was maintained from punched cards where it was desirable not to have hole punches too close to each other to ensure the integrity of the physical card.[4][failed verification]

While IBM was a chief proponent of the ASCII standardization committee,[5] the company did not have time to prepare ASCII peripherals (such as card punch machines) to ship with its System/360 computers, so the company settled on EBCDIC.[3] The System/360 became wildly successful, together with clones such asRCA Spectra 70,ICL System 4, and Fujitsu FACOM, thus so did EBCDIC.

All IBM's mainframeoperating systems, and itsIBM i operating system formidrange computers, use EBCDIC as their inherent encoding[6] (with toleration for ASCII, for example,ISPF inz/OS can browse and edit both EBCDIC and ASCII encoded files). Software can translate to and from encodings, and modern mainframes (such asIBM Z) include processor instructions, at the hardware level, to accelerate translation between character sets. Modern z/OS compilers for the C and C++ languages onIBM Z mainframes, and earlierOS/390 C and C++ compilers onIBM System/390 mainframes, support a POSIX-compatible execution environment that makes use of ASCII by default.[7]

Not all operating systems running on IBM hardware use EBCDIC;IBM AIX,Linux on IBM Z, andLinux on Power all use ASCII, as do all operating systems that run on theIBM Personal Computer and its successors.

Compatibility with ASCII

edit
This sectionneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources in this section. Unsourced material may be challenged and removed.(November 2022) (Learn how and when to remove this message)

There were numerous difficulties to writing software that would work in both ASCII and EBCDIC.

  • The gaps between letters made simple code that worked in ASCII fail on EBCDIC. For examplefor(c='A';c<='Z';++c)putchar(c); would print the alphabet from A to Z if ASCII is used, but print 41 characters (including a number of unassigned ones) in EBCDIC.
  • Sorting EBCDIC put lowercase letters before uppercase letters and letters before numbers, exactly the opposite of ASCII.
  • Most programming languages and file formats and network protocols designed for ASCII used available punctuation marks (such as carat^, tilde~, square brackets, and the curly braces{ and}) that did not exist in EBCDIC, making translation to EBCDIC systems difficult. Workarounds such astrigraphs were used.[8] Conversely EBCDIC had some characters such as¬ logical not,¢ (US cent) that were used on IBM systems and could not be translated to ASCII. The logical not character is used in thePL/I programming language, and some other IBM languages.
  • The EBCDIC character NL (next line) was best treated as the ASCII LF, but as EBCDIC also contains a character called LF this was not always done consistently.
  • If seven-bit ASCII was used, there was an "unused" high bit in 8-bit bytes, and many pieces of software stored other information there. Software would also pack the seven bits and discard the eighth, such as packing five seven-bit ASCII characters in a36-bit word.[9] On thePDP-11, bytes with the high bit set were treated as negative numbers, behavior that was copied toC, causing unexpected problems if the high bit was set. These all made it difficult to switch from ASCII to the 8-bit EBCDIC (and also made it difficult to switch to 8-bitextended ASCII encodings).

Code page layout

edit
Further information:EBCDIC code pages

There are hundreds of EBCDIC code pages based on the original EBCDIC character encoding; there are a variety of EBCDICcode pages intended for use in different parts of the world, including code pages for non-Latin scripts such as Chinese, Japanese (e.g., EBCDIC 930, JEF, and KEIS), Korean, and Greek (EBCDIC 875). There is also a huge number of variations with the letters swapped around for no discernible reason.[citation needed]

The table below shows the "invariant subset"[10] of EBCDIC, which are characters thatshould have the same assignments on all EBCDIC code pages that use the Latin alphabet. (This includes most of theISO/IEC 646 invariant repertoire, except theexclamation mark.) It also shows (in gray) missing ASCII and EBCDIC punctuation, located where they are in Code Page 37 (one of the code page variants of EBCDIC). The blank cells are filled with region-specific characters in the variants, but the characters in gray are often swapped around or replaced as well. Like ASCII, the invariant subset works only for languages using only theISO basic Latin alphabet, such as English.

EBCDIC
0123456789ABCDEF
0xNULSOHSTXETXSELHTRNLDELGESPSRPTVTFFCRSOSI
1xDLEDC1DC2DC3RES/
ENP
NLBSPOCCANEMUBSCU1IFSIGSIRSIUS/
ITB
2xDSSOSFSWUSBYP/
INP
LFETBESCSASFESM/
SW
CSPMFAENQACKBEL
3xSYNIRPPTRNNBSEOTSBSITRFFCU3DC4NAKSUB
4xSP¢.<(+|
5x&!$*);¬
6x-/¦,%_>?
7x`:#@'="
8xabcdefghi±
9xjklmnopqr
Ax~stuvwxyz
Bx^[]
Cx{ABCDEFGHI
Dx}JKLMNOPQR
Ex\STUVWXYZ
Fx0123456789EO

Definitions of non-ASCII EBCDIC controls

edit

Following are the definitions of EBCDIC control characters which either do not map onto theASCII control characters, or have additional uses. When mapped to Unicode, these are mostly mapped to C1 control character codepoints in a manner specified by IBM's Character Data Representation Architecture (CDRA).[11][12]

Although the default mapping of New Line (NL) corresponds to the ISO/IEC 6429 Next Line character (NEL, U+0085, the behaviour of which is also specified, but not required, in Unicode Annex 14),[13] most of these C1-mapped controls match neither those in theISO/IEC 6429 C1 set, nor those in other registered C1 control sets such asISO 6630.[14] Although this effectively makes the non-ASCII EBCDIC controls a unique C1 control set, they are not among the C1 control sets registered in theISO-IR registry,[15] meaning that they do not have an assigned control set designation sequence (as specified byISO/IEC 2022, and optionally permitted inISO/IEC 10646 (Unicode)).[16]

Besides U+0085 (Next Line), the Unicode Standard does not prescribe an interpretation of C1 control characters, leaving their interpretation to higher level protocols (it suggests, but does not require, their ISO/IEC 6429 interpretations in the absence of use for other purposes),[17] so this mapping is permissible in, but not specified by, Unicode.

MnemonicEBCDICCDRA pairing[11][12]NameDescription[18]
SEL04009CSelectDevice control character taking a single-byte parameter.
PFPunch OffListed in this location byGOST 19768-93.[19]
RNL060086Required New LineLine-break resettingIndent Tab mode
LCLower CaseListed in this location byGOST 19768-93.[19]
GE080097Graphic EscapeNon-locking shift that changes the interpretation of the following character (see e.g.Code page 310). Compare ISO/IEC 6429'sSS2 (008E).
SPS09008DSuperscriptBegin superscript or undo subscript. Compare ISO/IEC 6429'sPLU (008C).
RPT0A008ERepeatSwitch to an operation mode repeating a print buffer
SMMStart of Manual MessageListed in this location byGOST 19768-93.[19]
RES/ENP14009DRestore, Enable PresentationResume output (afterBYP/INP)
NL150085 (000A)New LineLine break. Default mapping (0085) matches ISO/IEC 6429'sNEL. Mappings sometimes swapped with Line Feed (EBCDIC 0x25) in accordance with UNIX line breaking convention.[11]
POC170087Program Operator CommunicationFollowed by two one-byte operators that identify the specific function, for example a light or function key. Contrast with ISO/IEC 6429'sCSI (009B),OSC (009D) andAPC (009F).
ILIdleListed in this location byGOST 19768-93.[19]
UBS1A0092Unit BackspaceA fractional backspace.
CCCursor ControlListed in this location byGOST 19768-93.[19]
CU11B008FCustomer Use OneNot used by IBM; for customer use.
IUS/ITB1F001FInterchange Unit Separator, Intermediate Transmission BlockEither used as an information separator to terminate a block called a "unit" (asin ASCII; see alsoIR), or used as a transmission control code to delimit the end of an intermediate block.
DS200080Digit SelectUsed by S/360 CPU edit (ED) instruction
SOS210081Start of SignificanceUsed by S/360 CPU edit (ED) instruction. (Note: different from ISO/IEC 6429'sSOS; where distinguishing them is necessary, IBM abbreviates Start of Significance asSOS. (with a dot) and Start of String asSOS, otherwise they are abbreviated the same.)[20]
FS,[18] FDS[19]220082Field SeparatorUsed by S/360 CPU edit (ED) instruction. (Note:(Interchange) File Separator, as abbreviated FS in ASCII, is at 0x1C and abbreviated IFS.)[18]
WUS230083Word UnderscoreUnderscores the immediately preceding word. Contrast with ISO/IEC 6429'sSGR.
BYP/INP240084Bypass, Inhibit PresentationDe-activates output, i.e. ignores all graphical characters and control characters besides transmission control codes and RES/ENP, until the nextRES/ENP.
SA280088Set AttributeMarks the beginning of a fixed-length device specific control sequence. Deprecated in favour ofCSP.
SFE290089Start Field ExtendedMarks the beginning of a variable-length device specific control sequence. Deprecated in favour ofCSP.
SM/SW2A008ASet Mode, SwitchDevice specific control that sets a mode of operation, such as a buffer switch.
CU22B008BCustomer Use TwoThis appears in some specifications, such asGOST 19768-93;[19] newer IBM specifications for EBCDIC control codes list only CU1 and CU3 as customer-use, and use this position forCSP.[18]
CSPControl Sequence PrefixMarks the beginning of a variable-length device specific control sequence. Followed by a class byte specifying a category of control function, a count byte giving the sequence length (including count and type bytes, but not the class byte or initial CSP), a type byte identifying a control function within that category, and zero or more parameter bytes. Contrast with ISO/IEC 6429'sDCS (0090) andCSI (009B).
MFA2C008CModify Field AttributeMarks the beginning of a variable-length device specific control sequence. Deprecated in favour ofCSP.
300090(reserved)Reserved for future use by IBM
310091(reserved)Reserved for future use by IBM
IR330093Index ReturnEither move to start of next line (see alsoNL), or terminate an information unit (see alsoIUS/ITB).
PP340094Presentation PositionFollowed by two one-byte parameters (firstly function, secondly number of either column or line) to set the current position. Contrast with ISO/IEC 6429'sCUP and HVP.
PNPunch OnListed in this location byGOST 19768-93.[19]
TRN350095TransparentFollowed by one byte parameter that indicates the number of bytes of transparent data that follow.
RSTReader StopListed in this location byGOST 19768-93.[19]
NBS360096Numeric BackspaceMove backward the width of one digit.
UCUpper CaseListed in this location byGOST 19768-93.[19]
SBS380098SubscriptBegin subscript or undo superscript. Compare ISO/IEC 6429'sPLD (008B).
IT390099Indent TabIndents the current and all following lines, untilRNL orRFF is encountered.
RFF3A009ARequired Form FeedPage-break resettingIndent Tab mode.
CU33B009BCustomer Use ThreeNot used by IBM; for customer use.
3E009E(reserved)Reserved for future use by IBM
EOFF009FEight OnesAll ones character used as filler

Code pages with Latin-1 character sets

edit

The following code pages have the fullLatin-1 character set (ISO/IEC 8859-1). The first column gives the original code page number. The second column gives the number of the code page updated with theeuro sign (€) replacing the universalcurrency sign (¤) (or in the case of EBCDIC 924, with the set changed to matchISO 8859-15)

Different countries have different code pages because these code pages originated as code pages with country-specific character repertoires, and were later expanded to contain the entire ISO 8859-1 repertoire, meaning that a given ISO 8859-1 character may have differentcode point values in different code pages. They are known asCountry Extended Code Pages (CECPs).[21]

CCSIDEuro
update
Countries
0371140Australia, Brazil, Canada, New Zealand, Portugal, South Africa, USA
2731141Austria, Germany
2771142Denmark, Norway
2781143Finland, Sweden
2801144Italy
2841145Latin America, Spain
2851146Ireland, United Kingdom
2971147France
5001148International
8711149Iceland
1047924Open Systems (MVSC compiler)

Criticism and humor

edit
This sectionappears to contradict another section of this article. Please see thetalk page for more information.(May 2024)

Open-source software advocate and software developerEric S. Raymond writes in hisJargon File that EBCDIC was loathed by hackers, by which he meant[22] members of a subculture of enthusiastic programmers. The Jargon File 4.4.7 gives the following definition:[23]

EBCDIC: /eb´s@·dik/, /eb´see`dik/, /eb´k@·dik/, n.[abbreviation, Extended Binary Coded Decimal Interchange Code] An alleged character set used on IBM dinosaurs. It exists in at least six mutually incompatible versions, all featuring such delights as non-contiguous letter sequences and the absence of several ASCII punctuation characters fairly important for modern computer languages (exactly which characters are absent varies according to which version of EBCDIC you're looking at). IBM adapted EBCDIC from punched card code in the early 1960s and promulgated it as a customer-control tactic (seeconnector conspiracy), spurning the already established ASCII standard. Today, IBM claims to be anopen-systems company, but IBM's own description of the EBCDIC variants and how to convert between them is still internally classified top-secret, burn-before-reading. Hackers blanch at the veryname of EBCDIC and consider it a manifestation of purest evil.

— The Jargon file 4.4.7

EBCDIC design was also the source of many jokes. One such joke, found in the Unixfortune file of4.3BSD Reno (1990)[24] went:

Professor: "So the American government went to IBM to come up with anencryption standard, and they came up with—"
Student: "EBCDIC!"

References to the EBCDIC character set are made in the 1979 computer game seriesZork. In the "Machine Room" inZork II, EBCDIC is used to imply an incomprehensible language:

This is a large room full of assorted heavy machinery, whirring noisily. The room smells of burned resistors. Along one wall are three buttons which are, respectively, round, triangular, and square. Naturally, above these buttons are instructions written in EBCDIC...

In 2021, it became public that a Belgian bank was still using EBCDIC internally in 2019. A customer insisted that the correct spelling of his surname included anumlaut, which the bank omitted, and the customer filed a complaint citing the guarantee in theGeneral Data Protection Regulation of the right to timely "rectification of inaccurate personal data." The bank's argument included the fact that their system used EBCDIC, as well as that it did not support letters withdiacritics (or lower case, for that matter). The appeals court ruled in favor of the customer.[25][26]

See also

edit

References

edit
  1. ^abMackenzie, Charles E. (1980).Coded Character Sets, History and Development(PDF). The Systems Programming Series (1 ed.).Addison-Wesley Publishing Company, Inc.ISBN 0-201-14460-3.LCCN 77-90165. Retrieved2022-04-06.
  2. ^Donovan, John J. (1972).Systems Programming. McGraw-Hill. p. 65.ISBN 0-07-085175-1.
  3. ^abBemer, Bob."EBCDIC and the P-Bit (The Biggest Computer Goof Ever) - Computer History Vignettes". Archived fromthe original on 2018-05-13. Retrieved2013-07-02....but their printers and punches were not ready to handle ASCII, and IBM just HAD to announce.
  4. ^"Doug Jones's punched card codes".homepage.cs.uiowa.edu. Retrieved2023-01-14.
  5. ^"X3.4-1963". 1963. p. 4. (NB. IBM had four staff members on the final 21-member ASA X3.2 sub-committee.)
  6. ^IBMnt (2008)."IBM confirms the use of EBCDIC in their mainframes as a default practice". Archived fromthe original on 2013-01-03. Retrieved2008-06-16.
  7. ^"Enhanced ASCII".z/OS UNIX System Services Planning. 2024-08-28.
  8. ^"Rationale for International Standard – Programming Languages – C"(PDF). Revision 5.10. April 2003. § MSE.4: Support for invariant ISO/IEC 646.Archived(PDF) from the original on 2016-06-06. Retrieved2022-11-24.
  9. ^PDP-10 Reference Handbook, Book 2: Assembling the Source Program(PDF).Digital Equipment Corporation. p. 221.
  10. ^"Invariant character set".IBM Knowledge Center. 2018-08-14.
  11. ^abcUmamaheswaran, V.S. (1999-11-08)."3.3 Step 2: Byte Conversion".UTF-EBCDIC.Unicode Consortium. Unicode Technical Report #16.The 64 control characters...the ASCII DELETE character (U+007F)...are mapped respecting EBCDIC conventions, as defined in IBM Character Data Representation Architecture, CDRA, with one exception -- the pairing of EBCDIC Line Feed and New Line control characters are swapped from their CDRA default pairings to ISO/IEC 6429 Line Feed (U+000A) and Next Line (U+0085) control characters
  12. ^abSteele, Shawn (1996-04-24)."cp037_IBMUSCanada to Unicode table".Microsoft/Unicode Consortium.
  13. ^Heninger, Andy (2019-02-15)."NL: Next Line (A) (Non-tailorable)".Unicode Line Breaking Algorithm. Revision 43.Unicode Consortium. Unicode Standard Annex #14.
  14. ^ISO/TC 46 (1986-02-01).Additional Control Functions for Bibliographic Use according to International Standard ISO 6630(PDF). ITSCJ/IPSJ.ISO-IR-124.{{citation}}: CS1 maint: numeric names: authors list (link)
  15. ^ISO/IEC International Register of Coded Character Sets To Be Used With Escape Sequences(PDF), ITSCJ/IPSJ, ISO-IR
  16. ^ISO/IEC JTC 1/SC 2 (2017). "12.4: Identification of control function set".Information technology — Universal Coded Character Set (UCS) (5th ed.).ISO. pp. 19–20. ISO/IEC 10646.For other C0 or C1 sets, the final octet F shall be obtained from the International Register of Coded Character Sets....If such an escape sequence appears within a code unit sequence conforming to this International Standard, it shall be padded in accordance with Clause 11.{{citation}}: CS1 maint: numeric names: authors list (link)
  17. ^Unicode Consortium (2019). "23.1: Control Codes".The Unicode Standard(PDF) (12.0.0 ed.). pp. 868–870.ISBN 978-1-936213-22-1.
  18. ^abcd"Appendix G-1. EBCDIC control character definitions".Character Data Representation Architecture.IBM Corporation. Archived fromthe original on 2018-09-11.
  19. ^abcdefghijGOST (1993)."Информационная технология. Наборы 8-битных кодированных символов. Двоичный код обработки информации" [Information technology. 8-bit coded character sets. Binary code for information processing] (in Russian). GOST 19768-93.
  20. ^IBM."Character Data Representation Architecture (CDRA)".IBM. p. 327.The mnemonic for the Start of Significance control character in EBCDIC has been modified to include a dot (.) at the end (SOS.). This has been done to distinguish it from the SOS mnemonic used in ISO-8 for the Start of String control character. The dot does not alter the property of the control in any way.
  21. ^"iso8859.txt".Kermit project /Columbia University.
  22. ^Raymond, Eric S. (1997)."The New Hacker's Dictionary". p. 310.
  23. ^"EBCDIC".Jargon File.Archived from the original on 2018-05-13. Retrieved2018-05-13.
  24. ^4.3BSD-Reno/share/games/fortune/fortunes
  25. ^"Court of Appeal of Brussels - 2019/AR/1006 - GDPRhub".
  26. ^Eden, Terence (2021-10-25)."EBCDIC is incompatible with GDPR – Terence Eden's Blog".

External links

edit

[8]ページ先頭

©2009-2025 Movatter.jp