On Sat, 20 Feb 2016 22:15:48 +0100, Peter Hunkeler wrote:

>> That would be "F" for EBCDIC, IIRC '5' for ASCII.
>
>ASCII digits are x'30' to x'39' so the zone part is '3'

True, but IBM uses "USASCII-8". It is an 8-bit code, and they didn't 
extend it by simply adding a high-order 0 bit as you might expect. I 
had to dig out a S/360 POO again from Bitsavers. There are 3 at 
http://bitsavers.trailing-edge.com/pdf/ibm/360/princOps/ , a -0,-6,and 
-7. The references in all three say that 0101 is the preferred zone bit. 
All three show the digits as being x'50' to x'59'. The -6 and -7 editions 
both give more explanation of how USASCII-8 is derived.

In the -6 edition at 
http://bitsavers.trailing-edge.com/pdf/ibm/360/princOps/A22-6821-6_360PrincOpsJan67.pdf
 
on page 149, in Appendix F, it shows how the 7-bit ASCII is manipulated 
to come up with the 8-bit USASCII-8. I won't try to replicate the figure here, 
but it shows that the high bit, bit 7, is repeated between bits 5 and 6. So, 
for 
example, the 011 for the high three bits of numbers in the 7 bit code becomes 
0101 in USASCII-8. And the 100 0001 for "A" becomes 1010 0001.

ASCII was pretty new in 1964, when System/360 was first announced. 
According to Wikipedia https://en.wikipedia.org/wiki/Ascii the standard was 
first published less than a year earlier. It was strictly a 7-bit code and it 
is not 
at all clear to me where the USASCII-8 code came from.

It is also not clear how decimal data were to be processed in ASCII mode. 
When zoned decimal numbers are packed, the zone and digit nibbles are 
flipped, but a 5 zone digit would not become a valid sign for a packed 
decimal number. The description of PACK says nothing about how this 
would be handled.

Perhaps this explains why ASCII was dropped from s/370.

-- 
Tom Marchant

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to