Current (pre-z17) POPs states:

"The preferred sign codes are 1100 for plus and 1101
for minus."
....
"Alternate sign codes are also recognized as valid in the sign position: 1010,
1110, and 1111 are alternate codes for plus, and 1011 is an alternate code for
minus. Alternate sign codes are accepted for any decimal source operand, but
are not generated in the completed result of a decimal-arithmetic instruction"


On Mon, 28 Apr 2025 12:16:59 -0400 Phil Smith III <li...@akphs.com> wrote:

:>A friend asked me about packed decimal sign nibbles, specifically x'0F'. I 
said "Unsigned" was what I'd always been told. He said he was finding varied 
answers, and then pointed me at SA22-7832-03 (PofOp, but an old version from 
2004) where, on page 8-2 (PDF page 1150) is the following table. It displays 
correctly in monospace font, so hopefully you can read it:
:>
:>         Recognized As
:> Code
:>(Binary) Digit    Sign
:>-------- -------  -------
:> 0000    0        Invalid
:> 0001    1        Invalid
:> 0010    2        Invalid
:> 0011    3        Invalid
:> 0100    4        Invalid
:> 0101    5        Invalid
:> 0110    6        Invalid
:> 0111    7        Invalid
:> 1000    8        Invalid
:> 1001    9        Invalid
:> 1010    Invalid  Plus
:> 1011    Invalid  Minus
:> 1100    Invalid  Plus (preferred)
:> 1101    Invalid  Minus (preferred)
:> 1110    Invalid  Plus
:> 1111    Invalid  Plus (zone)
:>
:>X'0A'? X'0B'?? X'0E'??? I'd only ever heard of x'0C', x'0D', and sometimes 
x'0F'. Is it just me? I certainly don't claim to be Mr. Packed Decimal, but I 
have encountered it off and on over the last 45 years, so I was very surprised.
:>
:>I do see the discussion of "zones" in that section of the book, but that 
doesn't clarify for me because zones have always been a mystery to me--never 
needed to grok them. And it still doesn't explain the other values.
:>
:>----------------------------------------------------------------------
:>For IBM-MAIN subscribe / signoff / archive access instructions,
:>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
Binyamin Dissen <bdis...@dissensoftware.com>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to