I know what XPLINK means. Is XPLINK a standard? Then is XPLINK linkage 
non-standard? That was my "whatever that means." Is XPLINK a standard for 
non-standard linkage? 

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of Tom Marchant
Sent: Friday, June 9, 2017 11:38 AM
To: [email protected]
Subject: Re: Save areas (not XPLINK).

On Fri, 9 Jun 2017 08:59:02 -0700, Charles Mills wrote:

>31-bit C can use non-standard (whatever that means) XPLINK linkage.

Standard linkage uses register 13 to hold the address of a 72-byte save area 
when a program is caller. The called program uses the area pointed to by 
register 13 to save its caller's registers. Registers 14 and 15 contain the 
return and entry point address. Register 1 contains the address of a parameter 
list.

XPLINK uses different registersDetails ire in the LE Vendor Interfaces manual.
>
>64-bit C only uses XPLINK.

Yes.

>-----Original Message-----
>From: IBM Mainframe Assembler List 
>[mailto:[email protected]] On Behalf Of Swarbrick, Frank
>Sent: Friday, June 9, 2017 8:54 AM
>To: [email protected]
>Subject: Re: Save areas (not XPLINK).
>
>>You say "COBOL, and other LE languages, use only standard linkage". 
>>Is this true for 64-bit C/C++ and PL/I?  

You are correct. C and C++ use XPLINK (if AMODE 31) or XPLINK-64 (if AMODE 64). 
I don't know for sure if 31-bit C programs can be made to use standard linkage 
upon entry. AMODE 64 PL/I uses XPLINK-64.

And, BTW, LE uses a modified standard linkage, with the NAB (address of the 
Next Available Byte) in the word immediately following the 72-byte save area. 
The NAB is used upon entry to provide the called program with an address for it 
to use for its own save area after saving the caller's registers.

>>Isn't the pragma linkage in C and the extern "linkage specifier" used to 
>>specify alternative linkages?

Yes. That is used when calling a program that uses standard linkage.

--
Tom Marchant

Reply via email to