Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Program return (PR) instruction z/OS MVS Programming: Extended Addressability Guide SA23-1394-00 |
|||||
The PR instruction
performs several actions on the current entry in the linkage
stack — the current entry being the entry formed by the most recent
BAKR or stacking PC instruction:
The PR instruction can execute in either primary or AR mode. The following example shows the PR instruction and a use of the BAKR instruction.
In the example, the BALR branches to subroutine SUBR. When SUBR receives control, it uses BAKR to save the caller's status on the linkage stack. The BAKR saves the contents of register 14, which the calling program loaded with the address of the instruction after the BALR, on the linkage stack. Zero, as the second operand, means that the status information is saved and no branch occurs. The PR instruction in SUBR restores the caller's status, restores the contents of register 14, removes the current linkage stack entry, and returns to the instruction after the BALR in the calling program. This use of the BAKR instruction is consistent with the MVS™ convention in which the called program saves the status of the caller. This convention is described in the section on linkage conventions in z/OS MVS Programming: Assembler Services Guide. |
Copyright IBM Corporation 1990, 2014
|