I agree. Of course, you still need base+displacement in two cases that I can
think of: (1) desire for an index register; and (2) to access dynamic storage
(STORAGE OBTAIN or LOADed module).
As an example of (1), I quite often do:
CALL PROGRAM,(PARM1,PARM2),VL
CHI R15,=Y(MAXENTRIES)
JH INVALID_RC
B *+4(R15)
START J RC0
J RC4
J RC8
MAXENTRIES EQU *-START/4
Of course, this ASSuMEs that R15 is a multiple of 4. I should possibly test for
that somehow.
--
John McKown
Systems Engineer IV
IT
Administrative Services Group
HealthMarkets(r)
9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone *
[email protected] * www.HealthMarkets.com
Confidentiality Notice: This e-mail message may contain confidential or
proprietary information. If you are not the intended recipient, please contact
the sender by reply e-mail and destroy all copies of the original message.
HealthMarkets(r) is the brand name for products underwritten and issued by the
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The
MEGA Life and Health Insurance Company.SM
> -----Original Message-----
> From: IBM Mainframe Assembler List [mailto:ASSEMBLER-
> [email protected]] On Behalf Of John Gilmore
> Sent: Friday, August 24, 2012 3:08 PM
> To: [email protected]
> Subject: Re: which instructions should I use?
>
> The comments are essential, and they should motivate (instead of
> describing) an instruction sequence.
>
> On the other hand, familiar instruction sequences don't have much
> charm for me. They are, I think, more likely to lull readers to sleep
> than to be 'more comprehensible'. I, at least, sit up when I see an
> unfamiliar instruction sequence.
>
> I strongly prefer jumps to branches for all of the obvious reasons.
> Retrofitting them into existing branch-based code is, as I have said
> before, a bootless undertaking; but new code should use them all but
> exclusively. The whole base-register-displacement scheme and its
> limitations should be chucked out, except in the very few special
> cases in which it is still needed.
>
> Elegance and brevity are finally more important than parsimony, and
> relative displacements are neater and cleaner than the old
> alternatives to them.
>
> --jg