Guardian Application Conversion Guide

Using Terminal I/O Operations
Converting Other Parts of an Application
8–16 096047 Tandem Computers Incorporated
Converting BREAK Key
Handling
BREAK key handling might involve taking ownership of the BREAK key and sending
and receiving system message -20 (Break).
Taking BREAK Key Ownership
If your existing program calls the SETMODE 11 procedure to take BREAK key
ownership, do not use the MYPID procedure to set
parameter-1
. for SETMODE 11.
Instead, set
parameter-1
to any positive value. For more information about
converting a SETMODE 11 procedure call, refer to the subsection about converting a
program to run at a high PIN in the respective section for the language you are using
(Sections 3 through 6).
Receiving the Break-on-Device System Message
If your existing program issues the SETMODE 11 call and the BREAK key is pressed,
the system sends C-series system message -20 (Break) to your program. Convert your
program to receive the D-series system message -105 (Break-on-device). The format of
this message is:
sysmsg[0] -105
sysmsg[1] File number of the receiver's open file for the terminal that
indicated the break, or -1 if the file number is unavailable
(for example, from a C-series system)
sysmsg[2] FOR 2 Break tag value specified with a SETPARAM (if used)
Sending a Break-on-Device Message to a High-PIN Process
Your existing program might send a Break-on-device system message to a process
using the SENDBREAKMESSAGE procedure:
error := SENDBREAKMESSAGE (process^id,
break^tag);
To send a Break-on-device system message to a high-PIN process, convert your
program to use the BREAKMESSAGE_SEND_ procedure.
BREAKMESSAGE_SEND_ requires a process handle rather than a process ID to
identify the process. The
receiver^file^number
parameter is the file number in
the process that indicates which of the files in the process generated the break.
Usually, a program saves this number when it opens the process.
An example of the BREAKMESSAGE_SEND_ procedure is:
error := BREAKMESSAGE_SEND_(process^handle,
receiver^file^number,
break^tag);