HP 3000 Manuals

MPE XL Software Library Traps [ Trap Handling Programmer's Guide ] MPE/iX 5.0 Documentation


Trap Handling Programmer's Guide

Chapter 5  MPE XL Software Library Traps 

The software library trap reacts to errors that occur during execution of
procedures from the compiler libraries.  You can arm or disarm the
user-written software library trap handing procedure by calling the
XLIBTRAP intrinsic.

When a program begins execution, the user-written library trap handler is
disarmed automatically.  If armed by the XLIBTRAP intrinsic, and
subsequently activated by an error, the user-written software library
trap handler executes.

This trap handler, in turn, returns to your program four words containing
the stack marker created when the library procedure was called by your
program.  In addition, the trap handling procedure returns an integer
representing the error number.  Although you define the trap handling
procedure, it must conform to the special format discussed in the HP 3000 
Compiler Library Reference (30000-90028).


NOTE Upon exiting most trap handling procedures, control returns to the instruction following the one that activated the trap. In the case of the library trap, however, you can specify that the process be aborted when control exits from the trap handling procedure.
A discussion of the XLIBTRAP intrinsic follows.


MPE/iX 5.0 Documentation