> -----Original Message-----
> From: IBM Mainframe Assembler List
> [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Robert
> A. Rosenberg
> Sent: Monday, June 04, 2012 11:33 PM
> To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
> Subject: Re: Base registers
>
<snip>
>
> By replacing the MYCSECT references with BYID+4 you can pick up some
> extra free addressability (at the expense of having the offsets
> non-zero based).
>
Back long ago, before I started writing "pure" or "reentrant" code, I would 
always start my routines:

MYCSECT CSECT
        USING *,R15
        SAVE (14,12),,*
        BAL  R1,AROUND
SAVEAREA DC  18A(0)
        ST R13,4(,R1)
        ST R1,8(,R13)
        LR R13,R1
        DROP R15
        USING SAVEAREA,R13
        L  R1,4(,R13)
        L  R1,20(,R1) RESTORE ORIGINAL R1
...

I don't do this any more, in most cases. Just to horrify some of you, I now 
generally code HLASM enabled code, using all the CEExxx macros.

===

A reason that my manager did not like the above was that if the base register 
points to the beginning of the CSECT, and you use the SAVE macro properly, you 
can look at the storage pointed to by the base register to see the "eyecatcher" 
of the program which abended. The SAVE would usually look something like:

      SAVE (14,12),,'&SYSECT &SYSCLOCK'

And he always used base registers in reverse order: R12, R11, R10, and so on.


--
John McKown
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone *
john.mck...@healthmarkets.com * 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

Reply via email to