Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!uwm.edu!bionet!agate!ucbvax!AWIIMC12.BITNET!REICHETZ From: REICHETZ@AWIIMC12.BITNET (Christian Reichetzeder) Newsgroups: comp.lang.asm370 Subject: Re: Why use an LA instruction? Message-ID: <9103050050.AA15241@ucbvax.Berkeley.EDU> Date: 5 Mar 91 00:50:09 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: IBM 370 Assembly Programming Discussion List Distribution: inet Organization: The Internet Lines: 14 X-Unparsable-Date: Mon, 4 Mar 91 17:16:55 SET On Mon, 4 Mar 91 10:38:14 GMT Pete Gifford said: >..starting with the instructions below. I understand all of it but the LA. >Can someone shed some light on its purpose? >PROGRAM BALR 4,0 load base register > BCTR 4,0 back off one byte to point > BCTR 4,0 to label at start of program > LA 4,0(0,4) ??????? Whoever wrote this had something in mind - there're rumors that there's been a time when one of the major goals in software writing was "just to confuse the Russians". Well, the LA clears bits 0-7 (24bit mode) or bit 0 (31bit mode) to zeroes. Still this could be done without the BCTR instruction (given that you are happy with the base register offset 2 bytes from the entry point). Christian