Establishing a program interrupt shunt service

A program interrupt shunt routine is established by setting its address in the CAA (CEECAADMC). When the shunt address gains control, the AMODE is the AMODE at the time of the program interrupt. Setting an address in the CEECAADMC effectively cancels the previously established shunt routine, if any. Only one shunt routine can be in effect at a time. Language Environment does not provide any facility for stacking the shunt addresses. A save is not needed prior to establishing your own shunt routine.

The shunt routine is removed by removing its address from the CEECAADMC. A value of zero should be assigned to CEECAADMC as soon as possible. A shunt routine should be removed as soon as it is not needed. Information about the error is provided to the shunt routine through the CEECAAPRGCK field in the CAA, which is set to the value of the program interrupt code.

Usage Notes:
  1. R0 through R15 have the same value when the shunt routine gains control as they did when the program check occurred.
  2. The shunt routine cannot assume that the range of the base registers used at the time that the program check occurred extends to the shunt routine. The shunt routine might need to re-establish addressability upon entry.
  3. The CEECAADMC field should be cleared as soon as it is no longer needed.
  4. A shunt routine should never span a call statement. A shunt routine that gains control with another program's registers will usually fail on the first branch attempt. The routine that is called does not have to save the address of your shunt routine.
  5. The Language Environment condition manager clears the CEECAADMC field when the program interrupt shunt routine is called.