Thank you, yes, I fully intend to use the IBM-supplied macros. I'm a lazy
son-of-a-gun.
I had seen that example.
* EDCXPRLG macro with an ALIAS statement
ASMDLLEP EDCXPRLG DSASIZE=0,BASEREG=8,EXPORT=YES
ASMDLLEP ALIAS C'dllfunx'
* Symbolic Register Definitions and Usage
R3 EQU 3 Return value
*
WTO 'ADLLXEF1: Exported function dllfunx entered',ROUTCDE=11
*
RETURN DS 0H
SR R3,R3
EDCXEPLG
END ASMDLLEP
But I what I want to know is
- where do I save and restore registers? Do I need to? Which ones?
- are my incoming parameters in the registers 1 to 3, or pointed to by them? If
they are in the registers, what about the statement that the last parameter is
indicated by the high bit being on? Those two assertions are inconsistent.
- how do I define and reference automatic variables on the supplied DSA stack?
- I guess the example is saying "put the return code in R3 before invoking
EDCXEPLG." Is that right?
Charles
-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf
Of Jonathan Scott
Sent: Monday, April 21, 2025 2:05 PM
To: [email protected]
Subject: Re: XPLINK register conventions for called HLASM?
>From a little more searching, the standard way to write assembler programs
>called via XPLINK is to use the provided macros such as EDCXPRLG. These are
>documented with examples in the C/C++ Runtime Library Programming Guide here
>(where the URL may well get split by some part of the email to forum
>processing):
https://www.ibm.com/docs/en/zos/3.1.0?topic=SSLTBW_3.1.0/com.ibm.zos.v3r1.cbcpx01/cbc1p2183.html
Looking at the example mentioned, I had not anticipated that return would be to
R7+4. Probably best to use the documented tools.
Jonathan Scott