I like this idea. But regs are rarely a problem for me. I always use a couple for code and a couple for storage. Try to keep prog size small. Use small routines which store work regs at begin of routine, then restore at routine exit. Same way with using if an area is used almost everywhere using goes at top. Other than that I put my using at begin of routine, then drop at end. So have never needed baseless. But the idea below sounds very good.
On Mon, Dec 20, 2010 at 8:03 AM, David Bond <[email protected]> wrote: > 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 >
