Using standard macros

To communicate properly, assembler routines must preserve the use of certain registers and particular storage areas, in a way that is consistent with code from the C or C++ compiler. z/OS® XL C/C++ provides macros for use with assembler routines. These macros are in CEE.SCEEMAC. The High-Level Assembler for MVS & VM & VSE must be used when assembling with these macros. The macros are:
EDCPRLG
Generates the prolog for non-XPLINK assembler code
EDCEPIL
Generates the epilog for non-XPLINK assembler code
EDCXPRLG
Generates the prolog for XPLINK assembler code
EDCXCALL
Generates a call from XPLINK assembler code
EDCXEPLG
Generates the epilog for XPLINK assembler code
EDCDSAD
Accesses automatic memory in the non-XPLINK stack. For the XPLINK stack, use the CEEDSA macro, described in z/OS Language Environment Programming Guide.

EDCPROL, the old version of EDCPRLG, is shipped for compatibility with Version 1 of C/370™ and is unchanged. However, you should use EDCPRLG if you can.

The advantage of writing assembler code using these macros is that the assembler routine will then participate fully in the z/OS XL C/C++ environment, enabling the assembler routine to call z/OS XL C/C++ functions. The macros also manage automatic storage, and make the assembler code easier to debug because the z/OS Language Environment® control blocks for the assembler function will be displayed in a formatted traceback or dump. See the Debug Tool documentation, which is available at , for further information on z/OS Language Environment tracebacks and dumps:
http://www-01.ibm.com/software/awdtools/debugtool/library/