In article <NW0QA.75310$yk6....@fx06.iad>,
Scott Lurndal <
sl...@pacbell.net> wrote:
>>Yup. I got some of that when doing assembly language programming
>>for IBM 360 clones. Packed decimal fields had three acceptable zeros -
>>0c, 0d, and 0f - although the hardware would jam the sign to C after
>>any calculation (including ZAP).
>
>Burroughs medium systems used 'C' for positive and 'D' for negative, but
>the hardware would accept anything other than 'D' as positive (and
>update it to C in any results).
That was an artifact of EBCDIC and punch cards. Each card column had
two (conceptual) parts, a digit from 0-9 and two zone punches known
as 11 and 12. By convention, a plus sign was a zone 12 (top row)
overpunch and minus was zone 11. For text, the 12+1 to 12+9 were
the letters A-I and 11+1 to 11+9 were J-R. So if, say, your number
were positive 3, on a 360 and its successors thats 3C, which unpacks
as C3 which is the letter C which punches as 12+3. Minus 4 would
be 4B which unpacks to B4 which is the letter M which is 11+4. To
complete the kludge, EBCDIC for digits 0-9 is F0-F9, and an F sign
is positive.
It's a kludge, but one that greatly simplified coding in memory
constrained programs that used punch cards.
All the decimal arithemetic is alive and well on IBM's latest zSeries,
along with some johnny-come-lately instructions like Test Packed, to
see whether a decimal value is valid, and ASCII pack and unpack.
R's,
John