CSTKC: Get or set application stack frame pointer

Use this system macro to save the contents of the current application stack frame pointer in the entry control block (ECB). You also can use this macro to load the requested application stack frame pointer.

Last updated

Changed for PUT00.

Format

Read syntax diagramSkip visual syntax diagramlabelCSTKC GET= regget,TYPE=CURRENT,TYPE=CALLER ,NOTFOUND= label SET= regset
label
is a symbolic name that can be assigned to the macro statement.
GET=regget
specifies that the requested application stack frame pointer is obtained, where regget is the register that will contain the application stack frame pointer.
SET=regset
specifies that the current application stack frame pointer is saved in the ECB, where regset is the register that contains the current application stack frame pointer.
TYPE
specifies the stack frame to retrieve, where:
CURRENT
specifies that the current application stack frame pointer is retrieved from CE3STK2C.
CALLER
specifies that the application stack frame of the previous program is retrieved.
NOTFOUND
specifies a label to branch to if the application stack for the caller could not be found.

Entry requirements

Register (R9) must contain the address of the current ECB.

Return conditions

  • The register specified by the GET parameter contains the requested application stack frame pointer.
  • The ECB is updated with the current application stack frame pointer when you specify the SET parameter.

Programming considerations

  • For information about macro register conventions, see Register conventions.
  • This macro can be run on any I-stream.

Examples

  • The following example saves current application stack frame pointer in R13.
    CSTKC GET=R13
  • The following example gets the application stack frame pointer for the previous program and saves the pointer in R13.
    CSTKC GET=R13,TYPE=CALLER,NOTFOUND=ERROR    

Related information

None.