David, No, I'm not trying to use LARL for everything. I just want to use it for the case when a code developer specifies a symbol that references a storage area that can only be referenced by using LARL. That is, no base register. Some of my macro usage would be for a particular symbol to "usually" be a constant, but would not have to be a constant. For example, I have a macro that generated the parameter list to IEANTCR. The LEVEL that is passed is usually a constant, but it wouldn't have to be. If it's a constant within the CSECT and the CSECT does not have a base register, LARL would be the only way to obtain the address of the LEVEL. In all other cases, a LA would work.
John -----Original Message----- From: IBM Mainframe Assembler List [mailto:[email protected]] On Behalf Of David Bond Sent: Monday, December 20, 2010 11:03 AM To: [email protected] Subject: Re: Baseless vs Based My advice is to do what most assembler programmers and most compilers do. Use base registers for data and relative addressing for instructions. Since most data access instructions require a base register, most data areas will have a base register and USING established before a macro is invoked. Yes, it is possible to use LARL to set up a temporary base register before every data access instruction. e.g. LARL R14,TARGET LARL R15,SOURCE MVC 0(L'TARGET,R14),0(R15) But it is impractical and pipeline hostile to do so. A good use for LARL is to set up the base register for the constants - and maybe the modifiable data area if the program is not reentrant. LARL can even be used to get the address of other control sections. But I think you are trying to use LARL for everything. David Bond On Mon, 20 Dec 2010 10:46:43 -0500, Bodoh John Robert wrote: >David, > >I cannot assume anything, except that the CPU on which the program is >running supports baseless instructions. So, the phrase "in general" >doesn't apply. > >The fact is, a program could specify a symbol on a macro and the symbol >could reference storage anywhere. It could be a based symbol or a >baseless symbol addressable by relative addressing instructions. >Relative addressing is NOT restricted to branching. LARL is not a >branch. > >John
