F$Icpt

From NitrOS-9
Jump to: navigation, search
Intercept Sets a signal intercept trap
OS9 F$Icpt 103F 09

Entry Conditions

X address of the intercept routine

U starting address of the routine’s memory area

Exit Conditions

Signals sent to the process cause the intercept routine to be called instead of the process being killed.

Additional Information

  • Intercept tells NitrOS-9 to set a signal intercept trap. Then, whenever the process receives a signal, NitrOS-9 executes the process’s intercept routing.
  • Store the address of the signal handler routine in Register X and the base address of the routine’s storage area in Register U.
  • Once the signal trap is set, NitrOS-9 can execute the intercept routine at any time because a signal can occur at any time.
  • Terminate the intercept routine with an RTI instruction.
  • If a process has not used the Intercept system call to set a signal trap, the process terminates if it receives a signal.
  • This is the order in which F$Icpt operates:
  1. When the process receives a signal, NitrOS-9 sets Registers U and B as follows:

U starting address of the intercept routine’s memory area

B signal code (process’s termination status)

Note: The value of Register DP cannot be the same as it was when the Intercept call was made.

  1. After setting the registers, NitrOS-9 transfers execution to the intercept routine.

krnp2