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

    Format

      $END_EPILOGUE

1  –  Description

    You can use the $END_EPILOGUE macro to mark the end of an
    epilogue instruction sequence that you code yourself 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. Alternatively, 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, respectively.

    Note that you must not use $END_EPILOGUE for an epilogue
    instruction sequence generated by $RETURN. $RETURN invokes
    $BEGIN_EPILOGUE and $END_EPILOGUE for you.

    You may omit the invocation of $END_EPILOGUE if your epilogue
    sequence occurs at the end of the routine. The $END_ROUTINE macro
    invokes $END_EPILOGUE for you if you invoke the $BEGIN_EPILOGUE
    macro without a matching invocation of the $END_EPILOGUE macro.
    You must invoke $END_EPILOGUE with epilogue sequences that occur
    in the middle of your routine.

2  –  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