Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Invoking a PC routine z/OS MVS Programming: Extended Addressability Guide SA23-1394-00 |
|
The PC instruction gives control to a PC routine. The PC number determines the specific PC routine that receives control. The entry table entry that corresponds to the PC number defines the PC routine's location and environment. To return to the caller, a stacking PC routine issues the PR instruction; a basic PC routine issues the PT instruction. Figure 1 shows the instruction
sequence needed to invoke a stacking PC routine. The stacking PC
automatically saves the user's environment. When the PC routine issues
the PR instruction to return control to the caller, the system restores
the caller's environment.
Note: Getting the LX sequence
number and putting it in the high-order half of register 15 is necessary
only for a reusable LXs, but it will not interfere with a non-reusable
LX. For more information on reusable LXs, see Reassigning LXs when the LX reuse facility is enabled.
Figure 1. Calling sequence for a stacking PC routine
Figure 2 shows the instruction sequence needed to invoke a basic PC routine. The calling program must save registers and its SASID before issuing the PC instruction. When the PC returns control, the caller must restore registers and the SASID. Figure 2. Calling sequence for a basic PC routine
To make it easier for the user to invoke a PC routine, the service provider can provide a macro that generates the needed instruction sequence. |
Copyright IBM Corporation 1990, 2014
|