gtpi1m0e | System Installation Support Reference |
This section lists the conditions and considerations when using user
exits.
The following entry conditions apply to all user exit routines unless
specified in the individual exit point interface descriptions.
- Register 15 will contain the base address of the user exit routine.
- Register 13 will contain the address of a stack area which can be used by
the user processing to save registers or other data.
- To preserve the integrity of the stack, user processing must
not issue an SVC macro, since this would cause the stack register
to be re-initialized and the current saved data to be lost.
- The stack at the address pointed to by register 13 will contain the
contents of linkage registers 14 and 15 when the test for the user exit is
performed.
- Register 14 is the linkage register and contains the NSI return address
from the user exit routine to the exit point in the control program.
- Registers 11 and 12 contain the fixed base register values.
- The contents of registers 0 through 10 are not modified by the user exit
interface. Their contents and meaning are not predictable and are
dependent on the routine that caused the exit point to be executed.
The following return conditions apply to all exit routines unless specified
otherwise in the individual exit point interface descriptions.
- All registers (for example, general purpose, floating point, control
point, and others) which are modified by user exit processing must be restored
before returning to NSI in the user exit interface.
- The system state, mask, protection key, and address space must be set
exactly the same as on entry to the user exit routine.
- If the user exit processing does not return to NSI in
the user exit interface (for example, the ECB is suspended), it is your
responsibility to cause control to be passed to the CPU loop (Task Dispatcher)
with the following conditions:
- The fixed base registers must be set to the proper value.
- The system must be in supervisor state.
- The protect key must be 0.
- Follow proper linkage conventions. You are not required to use the
linkage macros when coding the user exit routines, but the linkage conventions
must be adhered to. The following shows an example of
linkage macros in a user exit routine:
* User Exit routine
UCCXXX DS 0H
SLNKC LOREG=0,DSECT=SA01
DLNKC
.
. (User Processing)
. Can contain CLNKC calls to other user
. routines/subroutines
.
RLNKC LOREG=0 returns to exit point
- Registers 13, 14, and 15 should not be used by user exit
processing.
- If required, user exit processing may increase the system mask only (for
example, reduce the type of interrupts allowed).
- When a user exit is activated from the ISO-C environment, the following
conditions apply:
- The data save area (DSA) pointer (R13) is saved in an ECB.
- R13 is set to the CP stack address.
- The contents of R8-R12 (at the time of the user exit) are saved on
the CP stack.
- R8, R11 and R12 are set to common interface conditions.
- The CP stack is pushed to point to the second stack frame.