Unwinds the procedure call stack. Format SYS$UNWIND [depadr] ,[newpc] C Prototype int sys$unwind (unsigned int *depadr, void *newpc);
1 – Arguments
depadr OpenVMS usage:longword_unsigned type: longword (unsigned) access: read only mechanism: by reference Depth to which the procedure call stack is to be unwound. The depadr argument is the address of a longword value. The value 0 specifies the call frame of the procedure that was executing when the condition occurred (that is, no call frames are unwound); the value 1 specifies the caller of that frame; the value 2 specifies the caller of the caller of that frame, and so on. If depadr specifies the value 0, no unwind occurs and $UNWIND returns a successful condition value in R0. If you do not specify depadr (or with some languages you specify an address of 0), $UNWIND unwinds the stack to the call frame of the procedure that called the procedure that established the condition handler that is calling the $UNWIND service. This is the default and the normal method of unwinding the procedure call stack. newpc OpenVMS usage:address type: longword (unsigned) access: read only mechanism: by value New value for the program counter (PC); this value replaces the current value of the PC in the call frame of the procedure that receives control when the unwinding operation is complete. The newpc argument is a longword value containing the address at which execution is to resume. Execution resumes at this address when the unwinding operation is complete. If you do not specify newpc, execution resumes at the location specified by the PC in the call frame of the procedure that receives control when the unwinding operation is complete.