
Why use an LA instruction?
On Mon, 4 Mar 91 10:38:14 GMT Pete Gifford said:
Quote:
>..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