Re: Unsigned 64-bit numbers

2022-05-01 Thread Seymour J Metz
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" <0014e0e4a59b-dmarc-requ...@lis

Re: Unsigned 64-bit numbers

2022-05-01 Thread Robin Vowels
From: "Paul Gilmartin" <0014e0e4a59b-dmarc-requ...@listserv.uga.edu> Sent: Sunday, May 01, 2022 1:11 AM On Apr 30, 2022, at 08:50:04, Bob Raicer wrote: - begin snippet (from Paul Gilmartin) I believe what it intends to say is that the two's complement of the maximum negative

Re: Unsigned 64-bit numbers

2022-05-01 Thread Robin Vowels
From: "Martin Ward" Sent: Saturday, April 30, 2022 7:27 PM On Apr 29, 2022, at 12:08:22, Bob Raicer wrote: The two's complement of the maximum negative number cannot be represented in the same number of bits. ... I think you mean "the absolute value (or the positive value) of the maximum

Re: Unsigned 64-bit numbers

2022-05-01 Thread Robin Vowels
- Original Message - From: "Paul Gilmartin" <0014e0e4a59b-dmarc-requ...@listserv.uga.edu> To: 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

Re: Unsigned 64-bit numbers

2022-05-01 Thread Robin Vowels
From: "Bob Raicer" To: Sent: Saturday, April 30, 2022 4:08 AM There has been a lot of discussion about the representation of signed binary integers and the common operations of signed addition and subtraction on these items. Since the introduction of the S/360 and continuing on through

Re: Unsigned 64-bit numbers

2022-04-30 Thread Paul Gilmartin
On Apr 30, 2022, at 08:50:04, Bob Raicer wrote: > > - begin snippet (from Paul Gilmartin) > I believe what it intends to say is that the two's complement of > the maximum negative number is not its algebraic negation. > - end snippet > > I agree with you, Paul, about the

Re: Unsigned 64-bit numbers

2022-04-30 Thread Bob Raicer
-  begin snippet (from Paul Gilmartin) I believe what it intends to say is that the two's complement of the maximum negative number is not its algebraic negation. -  end snippet I agree with you, Paul, about the "algebraic negation" part of your reply.  However, as perceived by

Re: Unsigned 64-bit numbers

2022-04-30 Thread Bob Raicer
- begin snippet (from Dave Clark) That's all well and good, but not germain to the issues being discussed in this thread. - end snippet No worries, Dave. My post was not intended to be a direct response to you. I'm also guessing you meant to use the word "germane" (but that's

Re: Unsigned 64-bit numbers

2022-04-30 Thread Martin Ward
On Apr 29, 2022, at 12:08:22, Bob Raicer wrote: The two's complement of the maximum negative number cannot be represented in the same number of bits. ... I think you mean "the absolute value (or the positive value) of the maximum negative number cannot be represented in the same number of

Re: Unsigned 64-bit numbers

2022-04-29 Thread Paul Gilmartin
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

Re: Unsigned 64-bit numbers

2022-04-29 Thread Robin Vowels
On 2022-04-30 05:10, Paul Gilmartin wrote: On Apr 29, 2022, at 12:08:22, Bob Raicer wrote: For the sake of clarity I am going to paraphrase some of the text found in the original S/360 Principles of Operation and the z/Architecture Principles of Operation. ... The two's complement of a

Re: Unsigned 64-bit numbers

2022-04-29 Thread Paul Gilmartin
On Apr 29, 2022, at 12:08:22, Bob Raicer wrote: > > For the sake of clarity I am going to paraphrase some of the text > found in the original S/360 Principles of Operation and the > z/Architecture Principles of Operation. > > ... The two's complement of > a number is obtained by forming the

Re: Unsigned 64-bit numbers

2022-04-29 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 04/29/2022 02:08:22 PM: > There has been a lot of discussion about the representation of > signed binary integers and the common operations of signed addition > and subtraction on these items. > > Since the introduction of the S/360 and continuing on

Re: Unsigned 64-bit numbers

2022-04-29 Thread Bob Raicer
There has been a lot of discussion about the representation of signed binary integers and the common operations of signed addition and subtraction on these items. Since the introduction of the S/360 and continuing on through all of its largely compatible successors, the representation of signed

Re: Unsigned 64-bit numbers

2022-04-29 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 04/28/2022 05:20:16 PM: > How did you do it in COBOL? I guess my statement could be a bit misleading. What I meant was that, in COBOL, I had taken this 8-byte file field (a binary timestamp) and turned it into a date/time for display purposes.

Re: Unsigned 64-bit numbers

2022-04-28 Thread Charles Mills
, 2022 4:12 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Unsigned 64-bit numbers Your mind is in the right place, but your text is not. You can LGF or LLGF a fullword into a full register. LG loads a doubleword, whether you point it at one or not. i.e. an LG Rx,=X'87654321' results in x

Re: Unsigned 64-bit numbers

2022-04-28 Thread Steve Smith
Your mind is in the right place, but your text is not. You can LGF or LLGF a fullword into a full register. LG loads a doubleword, whether you point it at one or not. i.e. an LG Rx,=X'87654321' results in x'87654321garbage'. There now exist LGH, LH, LLGH, LLH, LGB, LB, LLGC, and LLC for all

Re: Unsigned 64-bit numbers

2022-04-28 Thread Charles Mills
Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Gary Weinhold Sent: Thursday, April 28, 2022 3:00 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Unsigned 64-bit numbers When loading 8 bytes into an 64-bit register, you needn't worry about

Re: Unsigned 64-bit numbers

2022-04-28 Thread Gary Weinhold
When loading 8 bytes into an 64-bit register, you needn't worry about logical vs. arithmetic.  The sign only makes a difference if it's less than a doubleword being loaded.  An LG will load it.. On 2022-04-28 5:20 p.m., Schmitt, Michael wrote: How did you do it in COBOL? Gary Weinhold Senior

Re: Unsigned 64-bit numbers

2022-04-28 Thread Keith Moe
No need for logical loading of an 8 byte number. There is no sign propagation, so a simple LG will do. The, the arithmetic would use ALG, SLG, etc. Keith Moe BMC Software (retired in 33 days) On Thursday, April 28, 2022, 02:20:56 PM PDT, Schmitt, Michael wrote: How did you do it

Re: Unsigned 64-bit numbers

2022-04-28 Thread Paul Gilmartin
On Apr 28, 2022, at 15:20:16, Schmitt, Michael wrote: > ... >In case it makes a difference, this value is a timestamp (presumably > from the store-clock instruction) but it is stored in an 8-byte file field. > Now I need to take the file field and turn it into a date and a time

Re: Unsigned 64-bit numbers

2022-04-28 Thread Schmitt, Michael
How did you do it in COBOL? -Original Message- From: IBM Mainframe Assembler List On Behalf Of Dave Clark Sent: Tuesday, February 1, 2022 11:39 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Unsigned 64-bit numbers I previously asked about 32-bit unsigned numbers and that

Re: Unsigned 64-bit numbers

2022-02-01 Thread Dave Clark
I realized I didn't need the fourth STCM so now the code is as follows. It may be strange, but keep in mind that the output date content of R14 and R15 is already in character format (MMDD YYCC) and the output time content of R1 is already in packed format (0hhmmssC). I know

Re: Unsigned 64-bit numbers

2022-02-01 Thread Farley, Peter x23353
z114, just not the packed decimal variety. Peter -Original Message- From: IBM Mainframe Assembler List On Behalf Of Dave Clark Sent: Tuesday, February 1, 2022 4:41 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Unsigned 64-bit numbers "IBM Mainframe Assembler List" wrote on 02

Re: Unsigned 64-bit numbers

2022-02-01 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 02/01/2022 04:33:56 PM: > Not that they don't work as is, but I wonder if those STCM's and > UNPK could be replaced by Vector Packed Decimal instructions > (assuming you have hardware that supports them) Yes, GETIME returns the date in what I

Re: Unsigned 64-bit numbers

2022-02-01 Thread Farley, Peter x23353
Mainframe Assembler List On Behalf Of Dave Clark Sent: Tuesday, February 1, 2022 4:12 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Unsigned 64-bit numbers "IBM Mainframe Assembler List" wrote on 02/01/2022 12:29:45 PM: > Perhaps the following helps? > > LM 14,15,64-bi

Re: Unsigned 64-bit numbers

2022-02-01 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 02/01/2022 12:29:45 PM: > Perhaps the following helps? > > LM 14,15,64-bit-time-storage-area > GETIME STANDARD,LOCAL,CLOCK=YES Yes, that helped big time. Thank you very much. Your LM should be for R0 and R1, though. I used the following

Re: Unsigned 64-bit numbers

2022-02-01 Thread Farley, Peter x23353
Perhaps the following helps? LM 14,15,64-bit-time-storage-area GETIME STANDARD,LOCAL,CLOCK=YES Peter -Original Message- From: IBM Mainframe Assembler List On Behalf Of Dave Clark Sent: Tuesday, February 1, 2022 12:14 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Unsigned 64-bit

Re: Unsigned 64-bit numbers

2022-02-01 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 02/01/2022 11:50:07 AM: > You may want to investigate the STCKCONV macro. Not available on z/VSE. Thanks. Sincerely, Dave Clark -- Winsupply Group Services 3110 Kettering Boulevard Dayton, Ohio 45439 USA (937) 294-5331

Re: Unsigned 64-bit numbers

2022-02-01 Thread Farley, Peter x23353
You may want to investigate the STCKCONV macro. HTH Peter -Original Message- From: IBM Mainframe Assembler List On Behalf Of Dave Clark Sent: Tuesday, February 1, 2022 11:39 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Unsigned 64-bit numbers I previously asked about

Re: Unsigned 64-bit numbers

2022-02-01 Thread Paul Gilmartin
On Feb 1, 2022, at 09:38:58, Dave Clark wrote: > >I previously asked about 32-bit unsigned numbers and that opened > up some new instructions (new to me, anyway: LLGF, LLGH, etc) for loading > unsigned numbers into registers. But now I have need to load a 64-bit > unsigned value into

Re: Unsigned 64-bit numbers

2022-02-01 Thread Dave Clark
"IBM Mainframe Assembler List" wrote on 02/01/2022 11:42:56 AM: > This is just a LG, just like L for 32-bits. It doesn't matter > whether it's signed or unsigned. There's nowhere for a sign to be extended. Ah, I see. Got it. Thanks. Sincerely, Dave Clark -- int.ext: 91078

Re: Unsigned 64-bit numbers

2022-02-01 Thread Ngan, Robert (DXC Luxoft)
This is just a LG, just like L for 32-bits. It doesn't matter whether it's signed or unsigned. There's nowhere for a sign to be extended. Robert Ngan DXC Luxoft -Original Message- From: IBM Mainframe Assembler List On Behalf Of Dave Clark Sent: Tuesday, February 1, 2022 10:39 To: