Sample macros for prolog and epilog code are supplied in the SCCNSAM
data set. The SCCNSAM(CCNZGBL) macro contains assembler instructions
to declare all the Global Set Symbols to be referenced. You need to
copy the CCNZGBL macro into your prolog and epilog code.
Figure 1 shows the sample CCNZGBL macro.
Figure 1. SCCNSAM(CCNZGBL)
**********************************************************************
* *
* MACRO-NAME = CCNZGBL *
* DESCRIPTIVE-NAME = METAL C GLOBAL SET SYMBOLS *
* *
* USAGE = COPY CCNZGBL *
* *
**********************************************************************
GBLA &CCN_DSASZ DSA size of the function
GBLA &CCN_SASZ Save area size of this function
GBLA &CCN_ARGS Number of fixed parameters
GBLA &CCN_RLOW High GPR on STM/STMG
GBLA &CCN_RHIGH Low GPR on STM/STMG
GBLB &CCN_MAIN True if function is main
GBLB &CCN_LP64 True if compiled with LP64
GBLB &CCN_NAB True if NAB needed
.* &CCN_NAB is to indicate if there are called functions that depend on
.* stack space being pre-allocated. When &CCN_NAB is true you'll need
.* to add a generous amount to the size set in &CCN_DSASZ when you
.* otbain the stack space.
GBLB &CCN_ALTGPR(16) Altered GPRs by the function
GBLB &CCN_SASIG True to gen savearea signature
GBLC &CCN_PRCN Entry symbol of the function
GBLC &CCN_CSECT CSECT name of the file
GBLC &CCN_LITN Symbol name for LTORG
GBLC &CCN_BEGIN Symbol name for function body
GBLC &CCN_ARCHLVL n in ARCH(n) option
GBLC &CCN_ASCM A=AR mode P=Primary mode
GBLC &CCN_IASM_MACRO MACRO name for all insert_asm
GBLB &CCN_IASM_FRONT True if insert_asm at front
GBLC &CCN_NAB_OFFSET Offset to NAB pointer in DSA
GBLB &CCN_NAB_STORED True if NAB pointer stored
GBLC &CCN_PRCN_LONG Full func name up to 1024 chars
GBLB &CCN_STATIC True if function is static
GBLB &CCN_RENT True if compiled with RENT
GBLC &CCN_WSA_INIT WSA initialization function name
GBLC &CCN_WSA_TERM WSA termination function name
GBLB &CCN_APARSE True to parse OS PARM
GBLC &CCN_DSAUSER Offset to user field in DSA