Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 exptools 1/6/84; site ihuxj.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!ihuxj!rjh From: rjh@ihuxj.UUCP (Randolph J. Herber) Newsgroups: net.unix,net.arch Subject: Re: Does C depend on ASCII? Message-ID: <491@ihuxj.UUCP> Date: Wed, 9-May-84 14:22:53 EDT Article-I.D.: ihuxj.491 Posted: Wed May 9 14:22:53 1984 Date-Received: Thu, 10-May-84 00:32:19 EDT Organization: AT&T Bell Labs, Naperville, IL Lines: 62 >>Well, I don't know how dependent Unix really is on ASCII, but the folks >>at Amdahl probably thought it was dependent enough that they use ASCII, >>even though the underlying IBM-370 architecture is geared towards >>EBCDIC. >>-- >> Barry Margolin >> ARPA: barmar@MIT-Multics >> UUCP: ..!genrad!mit-eddie!barmar >This response should really be in net.arch, but I don't >agree that the IBM machine is really geared toward EBCDIC. >What is EBCDIC are the line printers, the card punches >and readers, and terminals, or, in other words, the >peripherals. If you could get your C compiler typed in in >ASCII and compiled, then the IBM compare instruction >works just fine on ASCII. Its all a big conspiracy >and a long chain of source text bootstrapping EBCDIC >along. > Joseph L. Wood, III > AT&T Information Systems > Laboratories, Holmdel > (201) 834-3759 > ariel!jlw >My recollection of the only 370 EBCDIC dependencies in the HARDWARE >are some instructions for converting strings to packed decimal internal >representation. Some floating point conversion algorithms may use >these instructions to good effect... > -- Alan Robertson > ihnp4!drutx!alanr > AT&T Information Systems > 11900 N Pecos > Denver, Colorado 80020 IAW GA22-6821 IBM System/360 Principles of Operation: "The sign and zone codes generated for all decimal arithmetic results differ for the extended binary-coded-decimal interchange code (EBCDIC) and the American Standard code for information (ASCII). The choice between the two codes is determined by bit 12 of the PSW. When bit 12 is zero the preferred EBCDIC codes are generated, which are plus, 1100; minus, 1101; and zone 1111. When bit 12 is one, the preferred ASCII codes are generated which are plus 1010; minus 1011; and zone 0101." IAW GA22-7000-8 IBM System/370 Principles of Operation: "COMPATIBILITY BETWEEN SYSTEM/360 AND SYSTEM/370" System/370 is forward-compatible from System/360. A program written for the System/360 will run on the System/370 provided that it:" "2. Does not use PSW bit 12 as an ASCII bit ...." BTW, PSW bit 12 is used in IBM System/370 to control the PSW format. When the bit is zero, the machine and PSW format is in Basic Control mode. When the bit is one, the machine and PSW format is in Extended Control mode. It is my understanding that the main reasons for using ASCII in Amdahl's UTS are efficiency and program reliability. Many programs are coded assuming the characteristics of the ASCII character set. Further details on this topic I do not have. Randolph J. Herber, Amdahl Senior Systems Engineer, ..!ihnp4!ihuxj!rjh, (312) 979-6554, or Cornet Indian Hill x6554, Amdahl Corp., Suite 250, 6400 Shafer, Rosemont, IL 60018, (312) 692-7520