HP Pascal/iX Programmer's Guide (31502-90023)
11- 12
31 Compatibility Mode floating-point divide by zero
30 Integer divide by zero
29 Compatibility Mode floating-point underflow
28 Compatibility Mode floating-point overflow
27 Integer Overflow
26 Compatibility Mode double precision overflow
25 Compatibility Mode double precision underflow
24 Compatibility Mode double precision divide by zero
23 Decimal Overflow (COBOL)
22 Invalid ASCII digit (COBOL)
21 Invalid decimal digit (COBOL)
20-19 Reserved
18 Decimal divide by zero
17 IEEE floating-point inexact result
16 IEEE floating-point underflow
15 IEEE floating-point overflow
14 IEEE floating-point divide by zero
13 IEEE floating-point invalid operation
12 Range error (subrange violations, etc)
11 NIL pointer dereference
10 Result of pointer arithmetic is misaligned or error
in conversion from long to short pointer
9 Unimplemented condition traps
8 Paragraph stack overflow (COBOL)
7-1 Reserved
0 Assertion Trap
plabel
32-bit integer, passed by value, which is the address of
the Arithmetic Trap Handler.
oldmask
32-bit integer, passed by reference, in which the old value
of
mask
is returned.
old plabel
32-bit integer, passed by reference, in which the old value
of
plabel
is returned.
On MPE/iX, declare XARITRAP as an external procedure this way:
PROCEDURE XARITRAP; INTRINSIC;
On HP-UX, declare XARITRAP as an external procedure this way:
$PUSH; UPPERCASE ON$
PROCEDURE XARITRAP ( Mask,
plabel : integer;
VAR OldMask,
OldPlabel : integer
); EXTERNAL;
$POP$
XARITRAP stores the address of the Arithmetic Trap Handler (
plabel
) so
that the system trap handler can find the routine to call if an error
occurs. The old value of
plabel
is returned in the parameter OldPLabel.
The only ways to leave a trap handler is by a normal return or by an
escape
. Your library trap handler cannot execute a nonlocal
goto
(a
goto
whose destination is outside the procedure).
NOTE This routine is available on both the MPE/iX and HP-UX operating
systems. On MPE/iX, it expects an MPE-style
plabel
; on
HP-UX, it expects
plabel
to be the actual address of your
Library Trap Handler. To make your program portable, use
baddress
(
Arithmetic_Trap_Handler_name
) as
plabel
.
IEEE floating-point numbers are the default (native) real numbers
in HP Precision Architecture. Compatibility Mode floating-point