h6. [[OS SWI Calls]] h6(. » OS_ExitAndDie h2. OS_ExitAndDie h5. (SWI &50) |_<^{width:3em}. Entry | | |<^. R0|<^. Pointer to [[SWI Error Block|error block]] | |<^. R1|<^. "ABEX" (&58454241) If Return code and error block provided | |<^. R2|<^. Return code | |<^. R3|<^. Pointer to module name | |_<^{width:3em}. Exit | | |\2<^. Never returns | h4. Use The purpose of this call is to pass control over to the most recent [[Exit Handler|exit handler]], and kill the module as pass by R3. h4. Notes This SWI provides the same functionality as [[OS_Exit]] but in addition kills the module as passed by R3. If R1 <> "ABEX", or R0 does not appear to be a valid error pointer, then Sys$ReturnCode is set to 0. If R1 = "ABEX", and 0 <= R2 <= Sys$RCLimit, then Sys$ReturnCode is set to R2. If R1 = "ABEX" and R2 is outside this range, then Sys$ReturnCode is still set to R2, and the error pointer given in R0 is passed to [[OS_GenerateError]]. This has the effect of causing the [[Error Handler]] to be invoked, rather than the exit handler. h4. See also * [[Exit Handler]] * [[SWI Error Block]] * [[OS_Exit]]