Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!aplcen!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!wuarchive!psuvax1!psuvm!CCFVX3!SEB1525 From: SEB1525@CCFVX3.DRAPER.COM (Steve Bacher (Batchman)) Newsgroups: bit.listserv.ibm-main Subject: RE: Base Registers Message-ID: <9002101926.AA17957@rutgers.edu> Date: 10 Feb 90 17:49:00 GMT Sender: IBM Mainframe Discussion list Reply-To: IBM Mainframe Discussion list Lines: 22 Approved: NETNEWS@PSUVM.BITNET Gateway X-Vms-To: IN%"IBM-MAIN@rutvm1.rutgers.edu" Comments: To: IBM-MAIN@rutvm1.rutgers.edu >The following statement > > MVSPTL1 LA R2,MVSSIZE*8(R2) <= MVSSIZE needs base reg R2 (?) > >should be rewritten as follows: > > MVSPTL1 LA R2,MVSSIZE*8(,R2) > >As written, it is using an index register for addressability instead >of a base register. Such inelegance stands out like a sore thumb in >a dump. The code will work perfectly as written, but it is ugly to >use an index register when a base register is called for. (As previous >responders have pointed out, the LA instruction does *not* depend on >the USING because MVSSIZE is an absolute symbol.) Not only is it ugly, but if you're using access registers under MVS/ESA and register 2 is actually referencing areas in another data space with the help of access register 2, the first statement above will be WRONG. ESA with access registers requires use of the base register and not the index register with effective addresses; otherwise the address computation won't work.