HPlogo MPE/iX Intrinsics Reference Manual > Chapter 10 Command Definitions (QUIT-ZSIZE)

XLIBTRAP

MPE documents

Complete PDF
Table of Contents
Index

Edition 7 E0701 ♥
Edition 7 E0300
Edition 6 E0195

NM and CM callable (differences noted below).

Enables or disables a user-written software library trap handling procedure.

Syntax



            I*V     I*
  XLIBTRAP (plabel, oldplabel);


NOTE: Any user trap handler cannot perform a GOTO out of that procedure. Performing an ESCAPE (Pascal) or completing the trap handling procedure are the only valid ways to return. The state of the process and the program results are not predictable after a non-local GOTO statement.

Parameters


plabel

(NM) 32-bit signed integer by value (required)

(CM) 16-bit signed integer by value (required)

Passes the external-type label of the trap handling procedure. If the value is 0, the trap handler is disabled.

oldplabel

(NM) 32-bit signed integer by reference (required)

(CM) 16-bit signed integer by reference (required)

Returns the plabel of the process's previous software library trap handler. If no plabel was previously configured, 0 is returned.

Operation Notes


When a program begins execution, the user-written software library trap handler is disabled automatically. When enabled by the XLIBTRAP intrinsic, and subsequently activated by an error, the user-written software library trap handler assumes control.

This trap handler can be enabled or disabled by calling the XLIBTRAP intrinsic.

Condition Codes


CCE (2)Request granted. Trap enabled.
CCG (0)Request granted. Trap disabled.
CCL (1)Request denied. An illegal plabel was specified.

Related Information


Intrinsics XARITRAP, XCONTRAP, XSYSTRAP
Manuals Trap Handling Programmer's Guide




XCONTRAP


XSYSTRAP