VMS Help  —  MACRO  /ALPHA  Supplied Library Macros, $BEGIN EPILOGUE
    Marks the beginning of an epilogue instruction sequence.

    Format

      $BEGIN_EPILOGUE

1  –  Description

    $BEGIN_EPILOGUE marks the beginning of an epilogue instruction
    sequence that you code within a stack or register routine defined
    with the $ROUTINE macro.

    At each point where a stack or register routine returns to
    its caller, the routine must perform a sequence of operations
    to restore any saved registers and to perform stack frame
    management. This sequence is called the epilogue and is described
    in detail in the OpenVMS Calling Standard.

    You can use the $RETURN macro to generate a standard epilogue
    instruction sequence for you, or you can code your own sequence.
    If you code your own epilogue sequence, you must mark the
    beginning and end of the epilogue sequence with the $BEGIN_
    EPILOGUE and $END_EPILOGUE macros.

2  –  Notes

    o  You must not use $BEGIN_EPILOGUE for an epilogue instruction
       sequence generated by $RETURN. $RETURN automatically invokes
       $BEGIN_EPILOGUE and $END_EPILOGUE.

3  –  Example

                $ROUTINE MUMBLE, KIND=REGISTER, SAVE_FP=R1
                    :
                    :
                    :
                $BEGIN_EPILOGUE
                MOV     R1,FP               ; Restore caller's frame
                RET     (R26)               ; Return to caller
                $END_EPILOGUE
                    :
                    :
                    :
                $END_ROUTINE MUMBLE
Close Help