HP 3000 Manuals

XCONTRAP [ MPE/iX Intrinsics Reference Manual ] MPE/iX 5.0 Documentation


MPE/iX Intrinsics Reference Manual

XCONTRAP 

NM and CM callable (difference noted below).

Arms or disarms user-written subsystem break trap handling procedure.

Syntax 
_____________________________________
|                                   |
|               I*V     I*          |
|     XCONTRAP(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) The plabel of the subsystem break trap handling procedure. It can be either an NM or a CM plabel. If the value is 0, the subsystem break trap handler is disarmed for the process. Obtaining external plabels for the NM trap handling procedure depends on the programming language. In Pascal/XL, for example, obtain the plabel by using the waddress function. Supply the name of your subsystem break trap handler as an argument to waddress. To pass a CM plabel, set it up as follows: 1. Obtain the 16-bit external CM plabel of the CM subsystem break trap handler. One way to do this is by using the LOADPROC intrinsic. 2. Pass this 16-bit plabel in the following 32-bit format: (NM) Bits Value/Meaning 31:1 Set to 1 30:1 Set to 0 29:1 Set to 1 16:13 Set to 0 0:16 16-bit external CM plabel (CM) Bits Value/Meaning 0:16 16-bit external CM plabel oldplabel (NM) 32-bit signed integer passed by reference (required) (CM) 16-bit signed integer passed by reference (required) Returns the plabel of the process's previous subsystem break trap handler. It can be either a CM or NM plabel, as described above. If no plabel was previously configured, oldplabel returns 0. Operation Notes Call XCONTRAP to arm a user-written subsystem break trap handling procedure. This trap handler is invoked when an enabled subsystem break signal is received during an interactive session. Calling XCONTRAP from a job results in an error. On most terminals, transmit the subsystem break signal by pressing CTRLY (the default for sending a subsystem break signal). Subsystem break traps are also referred to as control-Y traps. Only one process in a session can receive a subsystem break trap at any one time. The process that called XCONTRAP most recently receives the next subsystem break trap. Once a process has received a subsystem break trap, it cannot receive another until it calls the RESETCONTROL intrinsic to reenable the subsystem break trap. Only processes running in a session can enable subsystem break traps. The trap handler can be any procedure in the program or in the libraries to which the program is bound. The subsystem break trap handler has no parameters. Condition Codes CCE (2) Request granted. Trap enabled. CCG (0) Request granted. Trap disabled. CCL (1) Request denied. An illegal plabel or XCONTRAP was called from a job. Related Information Intrinsics FCONTROL, FDEVICECONTROL, RESETCONTROL Commands None Manuals Trap Handling Programmer's Guide (32650-90026) and Point-to-Point Workstation I/O Reference (30000-90250)


MPE/iX 5.0 Documentation