John, I have been using a slightly different method.
I have been constructing local versions of various macros incorporating the following changes -- BAL instructions are replaced by BRAS instructions ; however, I have some concerns here in respect to what is saved in the register designated by the "R1" field (bits 08-11) ; BAS instructions are replaced by BRAS instructions ; BC instructions (Bxxx) are replaced by JC instructions (Jxxx); BCT instructions are replaced by BRCT instructions ; LA instructions which load constant values are replaced by LHI instructions ; LA instructions which reference operand locations are replaced by one of -- LA instruction (no change) if the operand is specified as '{"symbol" |"expression"}' and SYSSTATE ASCENV=P is in effect ; LA instruction (no change) if the operand is specified as '(S,{"symbol" | "expression"})' and SYSSTATE ASCENV=P is in effect ; LAY instruction if the operand is specified as '(SL,{"symbol" | "expression"})' and SYSSTATE ASCENV=P is in effect ; LAE instruction if the operand is specified as '{"symbol" |"expression"}' and SYSSTATE ASCENV=ASC is in effect ; LAE instruction if the operand is specified as '(S,{"symbol" | "expression"})' and SYSSTATE ASCENV=ASC is in effect ; LAEY instruction if the operand is specified as '(SL,{"symbol" | "expression"})' and SYSSTATE ASCENV=ASC is in effect ; LARL instruction of the operand is specified as '(SRL,{"symbol" | "expression"})'; in this case, the SYSSTATE ASCENV= setting is not currently considered John P. Baker -----Original Message----- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of McKown, John Sent: Tuesday, January 10, 2012 4:20 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Enhanced CALL macro? 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