Thanks Peter.  I do understand that R15 when entering an AMODE64 program from 
ATTACH(X), etc., will not be the address of the entered routine.  I was just 
hoping for some IBM-supplied equates with which to test the R15 contents to 
determine the AMODE of the caller without having to write the equates in my own 
code.

May I assume you will get the manual corrected, or should I submit an RCF 
attaching your reply?

Peter

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of Peter Relson
Sent: Wednesday, July 16, 2014 1:56 PM
To: [email protected]
Subject: Re: AMODE 64 addressing-mode constant names for R15 on entry?

I'll admit that I have never found my way to this section of this book 
before. It's not something I would have approved.

>AsaAmode64CallerAmode31 
>(etc)

I'm afraid that those names were not supposed to be in the book.
They are not provided as assembler equates in any IBM-supplied macro.

The intent was for the table to be description and value, not "constant 
name" and value. And it applies to more than ATTACH.

It should be something like this 

In AMODE 64, ATTACH(X), LINK(X), SYNCH(X), and XCTL(X) provide control to 
the target routine with register 15 (R15) containing the "OR" value of 
x'00000000FFFFF000' with the addressing-mode values as shown in the table 
below; it does not contain the module entry point address as it did in 
AMODE 31. 

Table 21. Register 15 Contents on Entry in AMODE=64 
Macro issuer's addressing-mode  R15 Contains x'00000000FFFFF000' "OR'd" 
with
31                                    X'00000002'
64                              X'00000004'

(and the BASSM line with FFFFF001 really does not apply, since there is no 
relative-branch BASSM.)

It is only when dealing with parameters that the invoker's AMODE is 
typically relevant.

The general rule is that an AMODE 64 target should not expect that 
register 15 contains a value that can be used as an address.

Peter Relson
z/OS Core Technology Design

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.

Reply via email to