Registers
On entry to the called program, the following registers are defined:
- R0
- For call type X'05', the address of a 6-word extended PLIST (see Extended PLISTs) and, in the high-order bit, an indication
of the invocation type.
For call types X'01', X'0B', X'02', and X'06', the address of an extended PLIST (see Extended PLISTs).
- R1
- The address of a tokenized PLIST.
- R2
- User word (meaningful only for non-SVC invocation).
- R13
- The address of a 24-word save area.
The byte that follows the save area specifies the call type.
For SVC invocations, the SVC handler provides the save area and sets register 13.
- R14
- The return address.
For SVC invocations, the SVC handler sets this register.
- R15
- The entry point address.
For SVC invocations, the SVC handler sets this register.
On return to the Assembler program, the following register is defined:
- R15
- The return code.
For call type X'05', this is the return code produced by the last operation that set the return code during execution of the REXX program. The value specified in the RETURN or EXIT instruction is passed back by means of the 6-word extended PLIST.
For all other call types, this is the return code specified on the RETURN or EXIT instruction.