Good idea. But does not free up the base register currently being used, for other purposes. I have "cheated" again. I created a __LA macro which looks at the first character of the name. If it is not a !, I generate the code for a normal LA instruction. If it is a !, I strip it off and generate an LARL instruction. I then use !symbol in my CALL for symbols in the current CSECT.
<code> MACRO &LBL __LA &OP1,&OP2 AIF ('&OP2'(1,1) EQ '!').LARL &LBL _LA &OP1,&OP2 MEXIT .LARL ANOP LCLA &K LCLC &OP2X &K SETA K'&OP2 &K SETA &K-1 &OP2X SETC '&OP2'(2,&K) &LBL LARL &OP1,&OP2X MEND _LA OPSYN LA LA OPSYN __LA </code> Unfortunately, my attempts to replace my L instructions with LRL instructions result in an S0C1 on my z9BC. I may "cheat" similarly on them as well. But I don't like replacing one instruction with two. Decisions, decisions. -- 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 > -----Original Message----- > From: IBM Mainframe Assembler List > [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Gord Tomlin > Sent: Tuesday, January 10, 2012 3:41 PM > To: ASSEMBLER-LIST@LISTSERV.UGA.EDU > Subject: Re: Enhanced CALL macro? > > What we do for this is use multiple location counters and code in our > prolog/epilog macros to automatically set up a base register for the > part of the CSECT containing the constants. The using range > of the base > register is automatically defined to cover only the constants > so that no > code inadvertently uses base/displacement branching. The code > referring > to constants "just works". > > -- > > Regards, Gord Tomlin > Action Software International > (a division of Mazda Computer Corporation) > Tel: (905) 470-7113, Fax: (905) 470-6507 > > On 2012-01-10 16:20, McKown, John wrote: > > I could use an enhanced CALL macro. I am writing RENT code > and trying to be "baseless". For the RENT, I am using CALL > with MF=(E,(1)) and GPR1 pointing to an array of fullwords in > dynamic storage. The parameters within the CALL are a mixture > of locations within the CSECT (these are read-only > "constants") and areas in dynamic storage. Basically the CALL > uses an "LA 0,..." to load the address of the parameter into > GPR0 followed by a "ST 0,n(0,1)" to save the address in the > parameter area. I wish that there were a way to tell the CALL > to use a LARL instruction to address the parameters which are > within the CSECT. Even if I had to do it on a parameter by > parameter indicator, such as prefixing the symbol with an > "invalid" character. For instance, a !. So my CALL would look > like: CALL (15),(!IN_CSECT,IN_DYN),MF=(E,(1)) . So that CALL would use > > > > LARL 0,IN_CSECT > > ST 0,0(0,1) > > LA 0,IN_DYN > > ST 0,4(0,1) > > BALR 14,15 > > > > This would eliminate almost all base+index instructions in > my current code. Well, I still have a few MVCs and CLCs left too. > > > > Am I going too crazy? I'm a bit "register poor" because I > really love to keep values in registers, rather than do > redundant loads and stores. > > > > > > -- > > 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 > > > > > >