On Tue, 22 Jan 2019 at 07:44, John Gateley <[email protected]> wrote:
> The link information in the 24-bit addressing mode consists of the > instruction-length code (ILC), the condition code (CC), the program-mask > bits, and the rightmost 24 bits of the updated instruction address. > > I have never given much thought to the high byte when using this instruction > and switched to BASR and BAS years ago. > > Just for personal interest, does anyone recall a program using the contents > of the link register other than as a return address? In S/360 and S/370 it was the only way for an unprivileged program to save the program mask. (IPM was introduced in XA, presumably because BALR can't be used for this in 31-bit mode.) So if you wanted to, say, temporarily change the (hex) floating point significance mask bit and be able to restore it, BALR is your instruction. Yes, I have seen programs that do this. And the SVC 10 version of GETMAIN/FREEMAIN uses the high bit of R1 to indicate GET vs FREE. This bit was set by using BAL R1,*+4 in the macro expansion vs LA or SR. These days that would be thought of as "tricky" code. Actually I see that for some paths through GETMAIN the trick is still used (z/OS 2.3). Tony H. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
