MPE/iX Intrinsics Reference Manual (32650-90905)

636 Chapter10
Command Definitions (QUIT-ZSIZE)
XARITRAP
XARITRAP
NM and CM callable (differences noted below).
Arms or disarms the user-written arithmetic trap handling procedure.
Syntax
I*V I32V I32 I32
XARITRAP(
mask,plabel,oldmask,oldplabel
);
NOTE By default, all traps except IEEE floating-point exceptions are enabled, and
the system trap handler is armed. Many floating-point operations result in an
inexact result. Most compiler libraries doing floating-point operations result
in an inexact trap if the IEEE inexact result trap is enabled. Therefore,
enable the IEEE inexact result trap only if absolutely necessary.
Parameters
mask
(NM) 32-bit signed integer by value (required)
(CM) 16-bit signed integer by value (required)
Determines which trap conditions, if enabled, invoke the user-written
software trap handler, and which do not.
The bits and their associated arithmetic errors are:
(NM)
Bits Value/Meaning
31:1 3000 mode floating-point divide by zero
30:1 Integer divide by zero
29:1 3000 mode floating-point underflow
28:1 3000 mode floating-point overflow
27:1 Integer overflow
26:1 3000 mode double-precision overflow
25:1 3000 mode double-precision underflow
24:1 3000 mode double-precision divide by zero
23:1 Decimal overflow
22:1 Invalid ASCII digit
21:1 Invalid decimal digit
19:2 Reserved for the operating system