gtps1m52System Macros

SLNKC-Control Program (CP) Save Link Data & Set Stack Pointer

Use this system macro to save the caller's registers and, optionally, push the stack pointer to provide the called routine with a save area and a work area with its corresponding DSECT and USING statements.

This macro is used with other standardized linkage macros such as the CLNKC, DLNKC, and RLNKC macros. See the following for more information about these macros:

Format




label
A symbolic name can be assigned to the macro call.

PUSH=YES|NO
Specifies whether or not the stack pointer will be pushed. DSECT and PUSH=NO are mutually exclusive. YES is the default.

DSECT=name|(name,G)
The name of the DSECT to be used in mapping a work area. The name must be no longer than 4 characters. If DSECT=(name,G) is coded, then space will be allocated on the stack for the DSECT, but no DSECT or USING statement will be generated. This allows multiple SLNKC macros in a given assembly to refer to the same DSECT. Specification of DSECT is optional. DSECT and PUSH=NO are mutually exclusive.

LOREG
This is NO or the lowest numbered register that is altered by the routine issuing this SLNKC macro. NO indicates that no registers are to be saved. All the registers from the one specified to R15 (except for the register specified by the BASE parameter) are saved on the stack. A self-defining term cannot be used to specify a register. R0 is the default.

BASE=R15|Ry
This means the base register of the routine issuing this SLNKC macro. A self-defining term cannot be specified. R0 and R13 must not be specified. R15 is the default.

Entry Requirements

Return Conditions

Programming Considerations

Examples

SLNKC DSECT=ABC,BASE=R10

In this example a USING statement and a DSECT named ABC will be generated, registers R0 through R9 and R11 through R15 will be saved, and R13 will be set to the appropriate stack address. The lines immediately following the invocation of SLNKC would typically look like the following.

ABC1     DS    F       1st field of DSECT ABC
 ...
 ...
ABCn     DS    F       Last field of DSECT ABC
         DLNKC ,       End of DSECT ABC, resumption of CSECT