XPLINK Assembler prolog

Use the EDCXPRLG macro to generate XPLINK assembler prolog code at the start of assembler routines.

Read syntax diagramSkip visual syntax diagram
>>-+------+--EDCXPRLG--DSASIZE=len--+------------------+-------><
   '-name-'                         +-PARMWRDS=numwrds-+   
                                    +-ENTNAME=epname---+   
                                    +-BASEREG=register-+   
                                    +-PSECT=pname------+   
                                    +-GT2KSTK=YES------+   
                                    '-EXPORT=NO--------'   

name
If ENTNAME=epname is specified then name is used as the name of the XPLINK entry marker, else name is the name of the entry point and name#C is used as the name of the XPLINK entry marker.
DSASIZE=len
Specifies automatic storage requirements (in bytes). Specify a len of 0 if the XPLINK assembler routine is a leaf routine with no automatic storage requirements. XPLINK leaf routines must preserve registers 4,6, and 7 throughout their execution. This is a required parameter, the minimum size of an XPLINK DSA (80 bytes) or more must be specified if DSASIZE is not zero. The length will be rounded up, if necessary, to a multiple of 32-bytes.
PARMWRDS=numwrds
Specifies the number of 4-byte words in the input parameter list. If this is omitted, then the routine will be treated as vararg, and it will adversely affect performance if the call to this routine results in a stack overflow. This parameter is required if mixing XPLINK and non-XPLINK routines so that the glue code that switches between linkage conventions on a call can correctly pass the parameters. If this is omitted, then a call from a non-XPLINK caller to an XPLINK Assembler routine will abend with message CEE3584E.
ENTNAME=epname
Is the optional name of the XPLINK assembler routine entry point.
BASEREG=register
Designates the required base register. The macro generates code needed for setting the value of the register and for establishing addressability. The default is register 8. If register equals NONE, no code is generated for establishing addressability.
PSECT=pname
Is the name to be assigned to the XPLINK assembler routine PSECT area. For more information about the PSECT area see HLASM Language Reference.
GT2KSTK=YES
If GT2KSTK=YES is specified, then an unconditional "large stack frame" prolog will be used that checks for the XPLINK stack floor in the CAA, instead of depending on the write-protected guard page. This parameter must be specified if the len on the DSASIZE parameter is greater than 2048 (ie. 2K).
EXPORT=NO
If EXPORT=NO is specified, then this function is not exported. In this case, this function can be called only from other functions that are link-edited in the same program object with this function.
If EXPORT=YES is specified, then this function is to be exported when link-edited into a DLL. With this function exported from the DLL, it can be called from functions outside of the containing program object. If you want the exported name to be a long name and/or mixed case, follow the EDCXPRLG macro with an ALIAS statement. For example:
Figure 1. EDCXPRLG macro with an ALIAS statement
*  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        
Note: If you specify EXPORT=YES, then you must use the GOFF assembler option. For the entry point to be available as an exported DLL function, you must specify the DYNAM(DLL) binder option, and the resulting program object must reside in a PDSE or the UNIX file system.