Whoosh!

Complementing 80000000 yields 7FFFFFFF.

Adding 1 yields 80000000.

So leaving the register unchanged matches both what Paul claimed and what PoOps 
describes.




--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf 
of Robin Vowels [robi...@dodo.com.au]
Sent: Sunday, May 1, 2022 3:30 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Unsigned 64-bit numbers

----- Original Message -----
From: "Paul Gilmartin" <00000014e0e4a59b-dmarc-requ...@listserv.uga.edu>
To: <ASSEMBLER-LIST@LISTSERV.UGA.EDU>
Sent: Saturday, April 30, 2022 6:34 AM
Subject: Re: Unsigned 64-bit numbers


> On Apr 29, 2022, at 14:07:58, Robin Vowels wrote:
>>
>> On 2022-04-30 05:10, Paul Gilmartin wrote:
>>>    ...
>>> That's exactly what the LCR instruction does.
>>
>> No it doesn't.  RTM.  The value in the register is unchanged
>> in this case.
>>
> "RTM" doesn't tell me.  The hardware could do any of:
> o Complement every bit and add 1.
> o Detect x'80000000' and do nothing.

RTM.  The POP manual says:
    "An overflow condition occurs when the maximum negative
    "number is complemented; the number remains unchanged."

> o Subtract from a hardwired 0.

Did you know that to subtract from zero, the hardware complements the second
operand and adds 1, and then adds to zero?

RTM.  LCR certainly does not do that.

> o ...
> The result is thee same in each case.  The first is
> probably the simplest and cheapest since the hardware
> exists to handle the general case.  It may be the
> fastest unless it causes pipelining to reserve a
> register.  The PoOps specifies only the result of
> each instruction;

RTM.  The POP specifies what the instruction does.
Carefully  read, for example, what EDMK does.

> the implementation detail is moot.
>
> Unless you have privileged knowledge of the hardware
> implementation you are not entitled to advocate for
> or against any of the possibilities with equivalent
> outcomes.

RTM.  It is clear what the instruction does.

Incidentally, I have been familiar with hardware implentations
of complementing for several decades.

---
This email has been checked for viruses by Avast antivirus software.
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fantivirus&amp;data=05%7C01%7Csmetz3%40gmu.edu%7Ca8062f6c8f6a461173cc08da2b447113%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C637869870205403630%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=dIe8eYcwXhkRuSm9O2xx9QpETUzPKHvsHa6nQewHO84%3D&amp;reserved=0

Reply via email to