Asynchronous Terminals and Printer Processes Programming Manual

TERMINAL PROGRAMMING CONSIDERATIONS
Using Break (Multiple Processes per Terminal)
parameter-1
=
cpu,pin
, enable BREAK for process
cpu,pin
parameter-2
= 0, specify normal terminal access type
last-parameters
= last owner and last terminal access type on
return from SETMODE
SETMODE 11 returns ownership to the previous break owner as
follows:
operation
= 11, set break ownership and terminal access
type
parameter-1
= last owner
parameter-2
= last terminal access type
last-parameters
= last owner and last terminal access type on
return from SETMODE
When an application that requires the break feature runs through
the command interpreter (which also uses BREAK), the application
should get the CPU, process ID, and break access type of the
current owner when enabling BREAK for itself. The following
SETMODE command shows one way to do this:
INT LAST^OWNER [0:1],
LAST^MODE = LAST^OWNER [1];
.
.
CALL SETMODE ( HOME^TERM^NUM, SET^BREAK^OWNER, MYPID,
NORMAL^MODE, LAST^OWNER );
An internally defined integer that designates the last owner of
BREAK is returned in LAST^OWNER, and the type associated with the
last owner is returned in LAST^OWNER [1] (= LAST^MODE). Note
that the number returned in LAST^OWNER is not the
cpu,pin
of
the last owner of BREAK. If no process previously had BREAK
enabled, 0 is returned to LAST^OWNER. BREAK is now enabled for
this process.
When the application no longer needs to receive the break
message, use another SETMODE call to reenable BREAK for the last
owner (the command interpreter in this example):
CALL SETMODE ( HOME^TERM^NUM, SET^BREAK^OWNER, LAST^OWNER,
LAST^MODE );
4-18