RETURN (Return after Call) Macro

The RETURN macro restores the registers whose contents were saved and returns control to the calling program.

Format

Read syntax diagramSkip visual syntax diagramnameRETURN( r1, r2),RC=n(15)

Requirements for the caller

AMODE:
24 or 31
RMODE:
24 or ANY
ASC Mode:
Primary

Parameters

r1|(r1,r2)
Specify the range of the registers to be restored from the save area of the program that receives control. The operands are written as self-defining values. The operands cause the wanted registers in the range from 14 through 12 (14, 15, 0 through 12) to be restored from words 4 through 18 of the save area.

If r2 is omitted, only the register that is specified by r1 is restored. If you omit the whole operand, the contents of the registers are not changed.

To access this save area, the system requires that register 13 contains the save area address. Therefore, in your program, load the address of the save area into register 13 before you issue the RETURN macro.

RC=n | (15)
Indicates a user-specified return code to be passed to the calling program. n must be a number between 0 and 4095, which is placed right-adjusted in register 15.

If register notation is used, the register is loaded into register 15.

If RC is specified, register 15 is not restored from the save area.