Owen,
I assume we are talking current HW (z-Series)
MSG multiply single grande
LG R1,TODTIME_END
LG R2,TODTIME_START
SRG R1,R2
SRLG R1,R1,12 get rid of lower bits
MSG R1,=FD'10' times 10
--
Martin
Pi_cap_CPU - all you ever need around MWLC/SCRT/CMT in z/VSE
more at htt
On a z, use the entire 64 bit register and use the MSGx instruction.
STCK DOUBLEWORD
LG R6,DOUBLEWORD
LR7,MULIPLIER
MSGR R6,R7
* RESULT OF 64 BIT R6 TIMES 32 BIT R7 IN 64-BIT R6.
On Mon, 2011-04-04 at 06:31 -0400, Joe Owens wrote:
> I have need to multiply a
John,
LR7,MULIPLIER
MSGR R6,R7
Would you realy do that?
I am sure (and the comment shows that) you ment
LR7,MULIPLIER
MSGFR R6,R7
or
LR7,MULIPLIER
LHH R7,=H'0'
MSG R6,R7
just to show one variant to clear high order word.
;-)
-
On Mon, 4 Apr 2011 06:31:49 -0400 Joe Owens
wrote:
:>I have need to multiply a STCK duration, ie STCK2-STCK1 by a variable
:>factor, say from 5% to 1000%.
OK.
:>I would like the result to be a STCK duration too, suitable for STIMER
:>MICVL=
Makes sense.
:>I suspect the best answer is to do FP
Thanks for the replies, much appreciated.
We do have current processors, just my knowledge that is out of date :)
The factor might not be a whole number, which is why I thought of FP, but
I can see I can follow the multiply by a 64 bit divide by 100 to get a
percentage.
I take it the 'G' instruct
> -Original Message-
> From: IBM Mainframe Assembler List
> [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Martin Trübner
> Sent: Monday, April 04, 2011 6:14 AM
> To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
> Subject: Re: Best way to multiply doublewords?
>
> John,
>
>LR7,MULIPLI
Supervisor assisted linkage saves 64 bit registers. If yours is a main routine
and not a subroutine called by other routines, then you likely don't need to
worry. If you are worried, you might want to consider using the BAKR
instruction because it saves the entire 64 bit registers in the linkage
On 4/4/2011 6:01 AM, Joe Owens wrote:
Thanks for the replies, much appreciated.
We do have current processors, just my knowledge that is out of date :)
The factor might not be a whole number, which is why I thought of FP, but
I can see I can follow the multiply by a 64 bit divide by 100 to get a
Working off the standards laid out in the Assembler Services Guide as copied
here:
Unless otherwise defined by the individual interface, the calling program should
expect, upon return, that
v The low halves (Bits 32-63) of GPRs 2 through 13 are unchanged
v The high halves (Bits 0-31) of GPRs 2 th
On 4 April 2011 08:01, Joe Owens wrote:
> One question occurs - must I now use extended save areas, as I am doing
> something to the top halves of the GPRs, or will the system take care of
> that for me? (There are no amode 64 progs on the calling chain).
Perhaps it's obvious, but... You don't n
On Apr 4, 2011, at 09:09, Tony Harminc wrote:
> On 4 April 2011 08:01, Joe Owens wrote:
>
>> One question occurs - must I now use extended save areas, as I am doing
>> something to the top halves of the GPRs, or will the system take care of
>> that for me? (There are no amode 64 progs on the call
On 4 April 2011 11:23, Paul Gilmartin wrote:
> On Apr 4, 2011, at 09:09, Tony Harminc wrote:
>
>> On 4 April 2011 08:01, Joe Owens wrote:
>>
>>> One question occurs - must I now use extended save areas, as I am doing
>>> something to the top halves of the GPRs, or will the system take care of
>>>
On Mon, 4 Apr 2011 06:31:49 -0400, Joe Owens wrote:
>I have need to multiply a STCK duration, ie STCK2-STCK1 by a variable
>factor, say from 5% to 1000%.
>I would like the result to be a STCK duration too, suitable for STIMER
>MICVL=
>I suspect the best answer is to do FP arithmetic. I've never don
Hi all,
Due to a requirement by my client, I have developped a module in two
languages: HL-ASSEMBLER and ENTERPRISE-COBOL-4.2. The module has a lot of
mathematic operations and calls a variable number of times to CSF to cipher,
but there is NO ACCESS to FILES. It is coded as RENT in two languages.
> .but at the end... COBOL wins.
>
> has anyone any experience or suggestion about?
>
> Thanks a lot. Regards
Please post the code.
2011/4/4 Angel Luis DomÃnguez :
> Unfortunately, the code is copyrighted at this moment by mi client. Probably
> could bee free in the future, but not now.
>
> The post and the question was in a general sense because I was surprised.
>
> Thanks a lot anyway.
>
Are both the COBOL and Assembler pro
The only thing that occurs to me is that COBOL tends to use the simplier, older
instructions. Are you using the more powerful z instructions? An example that I
was told about is that MVC in a loop is generally faster than MVCL and both are
faster than MVCLE. So, in many case, a simple loop is be
Long ago (and far away now) when there was a MAJOR rewrite of COBOL for VS
COBOL II, IBM spent significant resources in developing a lot of
"optimization" techniques. Some of these would be "obvious" to Assembler
programmers and many were not.
Therefore, I can well imagine that COBOL would do som
The other thing that can affect performance a great deal is instruction
sequencing. Loading a register to use in the next instruction can cause a 1 or
more cycle delay. Loading a register to use as a base register in the
following instruction can cause a 5 or more cycle delay. IE doing
L
Are both the assembler and COBOL version invoked the same way (i.e., regardless
of which version of the program is chosen, are both either statically linked to
the main program or are they link-edited as discrete load modules)?
Keven Hall | keh...@informatica.com
Software Operative
Office: 512-7
Another thing to consider is the number of cache faults the code incurs.
In general, you are better off using more instructions if they are
register-to-register than a smaller number of instructions that touch
storage one or more times. Its not how many instructions an operation
takes, its how much
Thanks every body for clues.
Some answers
1) Both assembler and cobol are sub-programs. They were called directly from
a main program builded in cobol to test. This main programa does measure of
CPU before and after calling.
2) I have made a revision of assembler generated by cobol but there are
This is already over, but aside of instruction sequence and use of
newer instructions vs older..here is what I thought:
qualification of the COBOL-coder vs. the q of the HLASM-person
--
Martin
Pi_cap_CPU - all you ever need around MWLC/SCRT/CMT in z/VSE
more at http://www.picapcpu.de
23 matches
Mail list logo