In the z/OS Assembler Services Guide (both v1.13 and V2.1) I see the
below-pasted info from chapter 12 concerning R15 contents on entry to a 64-bit
program.
Does anyone know if the "Addressing Mode Constant" names in table 12-1 exist as
EQU's or other defined symbols in a macro or copied member anywhere? I've
checked SYS1.MACLIB and SYS1.MODGEN and they do not seem to have them.
TIA for any info or RTFM you can provide.
Peter
12.4.2.4 Linkage conventions
In z/OS R2, program entry is in AMODE 31; therefore linkage conventions you
have used in S/390 apply, which means passing 4-byte parameter lists and a
72-byte savearea.
A older program changing into AMODE 64 to exploit z/Architecture instructions
should expect to receive 31-bit addresses and the 72-byte save area from its
callers. If you are running in AMODE 64 and want to use an address a caller has
passed to you, the high-order half of the GPR will probably not be cleared to
zeroes. As soon as you receive this address, use the Load Logical G Thirty One
Bits (LLGTR) instruction to change this 31-bit address into a 64-bit address
that you can use.
Register 15 contents on entry: In AMODE 64, an ATTACH provides control with
register 15 (R15) containing the "OR" value of the addessing-mode constants as
shown in the table below; it does not contain the module entry point address as
it did in AMODE 31.
Table 12-1. Register 15 Contents on Entry in AMODE=64
Addressing-mode Constant R15 Contains "OR" Value of:
AsaAmode64CallerAmode31 X'00000002'
AsaAmode64CallerAmode64 X'00000004'
AsaAmode64R15BASR_L X'FFFFF000' -- branch entered
AsaAmode64R15BASSM_L X'FFFFF001'
This message and any attachments are intended only for the use of the addressee
and may contain information that is privileged and confidential. If the reader
of the message is not the intended recipient or an authorized representative of
the intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication
in error, please notify us immediately by e-mail and delete the message and any
attachments from your system.