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

176 Chapter8
Intrinsics Reference
FCONTROL(16, 17)
Before subsystem break can be successfully enabled,
your program must call the XCONTRAP intrinsic,
which arms a special trap procedure referred to as the
[CTRL]Y Trap. The external label of a user written
procedure is specified as the value of the plabel
parameter in the call to XCONTRAP.
The procedure specified must define the steps that will
be taken if subsystem break is entered during
execution of your program.
Once the
[CTRL]Y Trap has been armed by XCONTRAP,
the terminal user can successfully invoke the
subsystem break function.
Whenever a subsystem break is entered, the
[CTRL]Y
Trap is automatically disarmed. Your program must
call the RESETCONTROL intrinsic to re-arm the trap
when it is ready to allow another subsystem break to
occur. If RESETCONTROL is not called after a
subsystem break, it is not possible to enter another
subsystem break.
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. (This is usually done in the user written
subsystem break handling procedure.)
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.