Bit 32 means bit 32 of the 64 bit register (with bits numbered from 0-63),
which is the high order bit of the low order half of the register.
The upper half of R14 is irrelevant for BSM 0,14 when the target AMODE is 24
or 31. As stated in the architecture:
When the contents of general register R2 are used
and bit 63 of the register is zero, bit 31 of the current
PSW, the extended-addressing-mode bit, is set to
zero, bit 32 of the register specifies the new basic
addressing mode and replaces bit 32 of the PSW,
and the branch address is generated from the con-
tents of the register under the control of the new
addressing mode. The branch address replaces the
instruction address in the PSW.
"under control of the new addressing mode" is the important phrase.
I have tested LINKX and ATTACHX with all of the combinations of caller AMODE
and target module AMODE. The results can be summarized as follows, with "high
order bit" meaning the high order bit
of the low order half of the register.
When the caller is AMode 24, the high order bit of R14 is 0.
When the caller is AMode 31 or 64, the high order bit of R14 is 1 when the
target module is AMode 24 or 31, and 0 when the target module is AMode 64.
In other words, the high order bit of R14 contains PSW.32 (BA) of the caller,
except when the target module is AMODE(64), in which case the high order bit of
R14 contains 0.
I will submit a documentation update after I work out the exact wording with
Peter Relson. He designed and implemented the AMODE 64 and RMODE 64 support in
the z/OS BCP, so he continues to have as much influence
over the documentation as he is interested in having in retirement.
These are the detailed test results for LINKX. The target modules start with
DC H'0' so they immediately get a 0C1 abend. SVC 7A is the SVC for LINKX and
the data is from the system trace entry in the dump.
The rest of the data is from the symptom dump message.
24->24
SVC 7A 00000000_00008096
07851000 00000000
PSW AT TIME OF ERROR 078D1000 000081EA ILC 2 INTC 01
ACTIVE MODULE ADDRESS=00000000_000081E8 OFFSET=00000002
NAME=RMODE24
DATA AT PSW 000081E4 - 00000000 00000000 00000000
E: 00FEC8B0 F: 000081E8
24->31
SVC 7A 00000000_00008096
07851000 00000000
PSW AT TIME OF ERROR 078D1000 A2900002 ILC 2 INTC 01
ACTIVE MODULE ADDRESS=00000000_22900000 OFFSET=00000002
NAME=RMODE31
DATA AT PSW 228FFFFC - 00000000 00000000 00000000
E: 00FEC8B0 F: A2900000
24->64
SVC 7A 00000000_00008096
07851000 00000000
PSW AT TIME OF ERROR 07851001 80000000 00000050_00000002
ILC 2 INTC 01
ACTIVE MODULE ADDRESS=00000050_00000000 OFFSET=00000002
NAME=RMODE64
DATA AT PSW 0000004F_FFFFFFFC - ******** 00000000 00000000
E: 00FEC8B0 F: FFFFF000
31->24
SVC 7A 00000000_000080CA
07851000 80000000
PSW AT TIME OF ERROR 078D1000 000081EA ILC 2 INTC 01
ACTIVE MODULE ADDRESS=00000000_000081E8 OFFSET=00000002
NAME=RMODE24
DATA AT PSW 000081E4 - 00000000 00000000 00000000
E: 80FEC8B0 F: 000081E8
31->31
SVC 7A 00000000_000080CA
07851000 80000000
PSW AT TIME OF ERROR 078D1000 A2900002 ILC 2 INTC 01
ACTIVE MODULE ADDRESS=00000000_22900000 OFFSET=00000002
NAME=RMODE31
DATA AT PSW 228FFFFC - 00000000 00000000 00000000
E: 80FEC8B0 F: A2900000
31->64:
SVC 7A 00000000_000080CA
07851000 80000000
PSW AT TIME OF ERROR 07851001 80000000 00000050_00000002
ILC 2 INTC 01
ACTIVE MODULE ADDRESS=00000050_00000000 OFFSET=00000002
NAME=RMODE64
DATA AT PSW 0000004F_FFFFFFFC - ******** 00000000 00000000
E: 00FEC8B0 F: FFFFF002
64->24
SVC 7A 00000000_00008106
07851001 80000000
PSW AT TIME OF ERROR 078D1000 000081EA ILC 2 INTC 01
ACTIVE MODULE ADDRESS=00000000_000081E8 OFFSET=00000002
NAME=RMODE24
DATA AT PSW 000081E4 - 00000000 00000000 00000000
E: 80FEC8B0 F: 000081E8
64->31
SVC 7A 00000000_00008106
07851001 80000000
PSW AT TIME OF ERROR 078D1000 A2900002 ILC 2 INTC 01
ACTIVE MODULE ADDRESS=00000000_22900000 OFFSET=0000000
NAME=RMODE31
DATA AT PSW 228FFFFC - 00000000 00000000 00000000
E: 80FEC8B0 F: A2900000
64->64
SVC 7A 00000000_00008106
07851001 80000000
PSW AT TIME OF ERROR 07851001 80000000 00000050_00000002
ILC 2 INTC 01
ACTIVE MODULE ADDRESS=00000050_00000000 OFFSET=00000002
NAME=RMODE64
DATA AT PSW 0000004F_FFFFFFFC - ******** 00000000 00000000
E: 00FEC8B0 F: FFFFF004
Jim Mulder
-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Jon
Perryman
Sent: Monday, August 18, 2025 7:48 PM
To: [email protected]
Subject: Re: RMODE 64
On Mon, 18 Aug 2025 19:28:24 +0000, Peter Relson <[email protected]> wrote:
>I'm sure the team will properly update the doc to describe that the
>input R14 for AMODE 24 *and* AMODE 64 (not just AMODE 24) has bit 32 off.
>It follows that it can be used with BR and BSM.
Peter,
Sorry to be contrary but BSM used in AMODE31 and AMODE24 programs will be
confusing for lesser experienced programmers who will use a 72 byte savearea
instead of a 144 byte savearea. The upper half of R14 must be restored for BSM
to function correctly regardless of the AMODE but it's not obvious.
The original doc said "high order bit" which I took to mean bit 31 but you say
bit 32. Just mentioning in case this is passed to doc..
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN