Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)

Chapter 9 283
Intrinsics Reference (cont)
XCONTRAP
trap handler can be any procedure in the program or in the libraries to
which the program is bound. The
[CTRL]Y trap handler has no
parameters.
The following summarizes subsystem break processing and the
intrinsics involved:
1. A user written procedure must be provided to define how the
program should act upon receiving a subsystem break.
2. A call to XCONTRAP must be included in the program, specifying
the external label of the procedure written in Step 1 as the value of
plabel. This arms the
[CTRL]Y Trap.
3. A call to FCONTROL(17) must be included in the program to enable
the subsystem break function.
4. If the subsystem break character is received during execution of the
program, the procedure specified in the call to XCONTRAP is
executed.
5. A call to RESETCONTROL must be executed when the program is
ready to receive another subsystem break.
6. A new subsystem break character may be defined through
FCONTROL(41), if the terminal is placed in transparent mode or
through FDEVICECONTROL
7. If desirable at any time, FCONTROL(16) may be called to disable
subsystem break. A call to FCONTROL(17) enables it again.
Parameters
plabel bit signed integer passed by value
(required)
Passes the plabel of your [CTRL]Y trap handling
procedure. This plabel can be either an NM or a CM
plabel. If this value is 0, XCONTRAP disarms
[CTRL]Y
traps for the process.
How you obtain the external plabel of your NM trap
handling procedure depends on your programming
language. In Pascal/iX, for example, you can obtain the
plabel by using the baddress or waddress function.
Supply the name of your
[CTRL]Y trap handler as an
argument to baddress or waddress.
If a program executes only in native mode, it should
have a native mode
[CTRL]Y trap handler. Programs
executing in compatibility mode must have a
compatibility mode
[CTRL]Y trap handler.