Return External (RTX)


Op Code (Hex) Operand 1


02A1 Return point


Operand 1: Signed binary(2) scalar or null.

Description  The instruction terminates execution of the invocation in which the instruction is specified. The automatic storage frame is deallocated.

A Return External instruction can be specified within an invocation's subinvocation, and no exception is signaled.

If a higher invocation exists in the invocation hierarchy, the instruction causes execution to resume in the preceding invocation in the thread hierarchy at an instruction location indirectly specified by operand 1. If operand 1 is binary 0 or null, the next instruction following the Call External instruction from which control was relinquished in the preceding invocation in the hierarchy is given execution control. If the value of operand 1 is not 0, the value represents an index into the instruction definition list (IDL) specified as the return list operand in the Call External instruction, and the value causes control to be passed to the instruction referenced by the corresponding IDL entry. The first IDL entry is referenced by a value of one. If operand 1 is not 0 and no return list was specified in the Call External instruction, or if the value of operand 1 exceeds the number of entries in the IDL, or if the value is negative, a return point invalid  (hex 2C02) exception is signaled.

In the initial thread of a process, if a higher invocation does not exist, the Return External instruction causes termination of the current process state. If operand 1 is not 0 and is not null, the return point invalid  (hex 2C02) exception is signaled.

If the returning invocation has received control to process an event, then control is returned to the point where the event handler was invoked. In this case, if operand 1 is not 0 and is not null, then a return point invalid  (hex 2C02) exception is signaled.

If the returning invocation has received control from the machine to process an exception, the return instruction invalid  (hex 2C01) exception is signaled.

If the returning invocation has an activation, the invocation count in the activation is decremented by 1.

If the returning invocation currently has an invocation exit set, the invocation exit is not given control and is implicitly cleared.

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

10 Damage Encountered

1C Machine-Dependent

20 Machine Support

22 Object Access

24 Pointer Specification

2C Program Execution

2E Resource Control Limit

36 Space Management

44 Protection Violation