Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)
Chapter 5 113
Using Subsystem Break
Subsystem Break Intrinsics
Subsystem Break Intrinsics
When you want to make subsystem break processing available in a
program there are several intrinsics that you must call. These
intrinsics enable subsystem break and set up the procedure that will
execute if the subsystem break character is entered while the program
is running.
You use the XCONTRAP intrinsic to specify the address of the break
handler subroutine that will execute when the user presses subsystem
break. This subroutine is called the
[CTRL]Y trap procedure, and the
call to XCONTRAP is referred to as “arming the
[CTRL]Y trap”. No
subsystem break processing can occur unless this trap is armed by your
program through a call to XCONTRAP. Only one
[CTRL]Y trap handler
can be active at any given time for a process.
You use the FCONTROL intrinsic to enable subsystem break
processing. You must issue a call to FCONTROL with a controlcode
value of 17 for the subsystem break signal to be recognized by the
program. This is true even if the
[CTRL]Y trap is already armed.
You use the RESETCONTROL intrinsic to reset the trap procedure
after a subsystem break has occurred. Once subsystem break is
invoked, the program will not respond to another subsystem break
signal until RESETCONTROL is called.
There are also several other intrinsics that you can use to control how
subsystem break processing occurs.
When you enable transparent editing mode, either through a call to
FCONTROL with a controlcode value of 41, or FDEVICECONTROL
using a control directive of 15, you are required to enter a value for the
subsystem break character through one of the parameters of the call.
You can specify any character not otherwise recognized as a special
character in transparent mode as the new subsystem break character,
including
[CTRL]Y. (If you use a value of 0 for the subsystem break
character, subsystem break processing will be disabled.)
You can also specify a new character to be used as the subsystem break
character in either standard or transparent editing mode by calling
FDEVICECONTROL using a control directive of 41.
Finally, you can call FDEVICECONTROL using a control directive of 57
to determine the current value of the subsystem break character. This
FDEVICECONTROL function provides Read access only.
Refer to Chapter 8, “Intrinsics Reference,” in this manual, for
descriptions of the syntax and parameters of each of these intrinsics, as
well as for additional information regarding their use.