Guardian Programmer's Guide

Table Of Contents
Writing a Terminal Simulator
Guardian Programmer’s Guide 421922-014
24 - 4
Specifying How to Process System Messages
default value 0 of the options parameter in the FILE_OPEN_ call that opens
$RECEIVE:
FILE^NAME ':=' "$RECEIVE" -> @S^PTR;
LENGTH := @S^PTR '-' @FILE^NAME;
OPTIONS.<15> := 0;
ERROR := FILE_OPEN_(FILE^NAME:LENGTH,
RECV^NUM);
See Section 6, Communicating With Processes, for more information about opening
$RECEIVE.
Specifying How to Process System Messages
A terminal-simulation process can specify how certain system messages are to be
handled. To do this, the process must call SETMODE function 80.
Using SETMODE function 80, the terminal-simulation process can do the following:
Specify whether a requester can include the last-params parameter in
SETMODE procedure calls
Specify whether a requester can call the SETPARAM procedure
Specify whether the terminal-simulation process accepts cancellation messages
The following paragraphs discuss allowing the last-params parameter in SETMODE
procedure calls and allowing SETPARAM calls. For a discussion of accepting
cancellation messages, see Section 6, Communicating With Processes.
Allowing the Requester to Specify the last-params Parameter
A terminal-simulation process can call SETMODE function 80 to specify whether a
requester can specify the last-params parameter in SETMODE procedure calls
made against the terminal-simulation process.
When a requester communicates with a real terminal, the requester can call the
SETMODE procedure to control the operation of the real terminal. The requester can
specify the last-params parameter when calling SETMODE. The system uses
last-params to return to the requester the parameter values specified with the last
SETMODE call that specified the same function as the current SETMODE call.
When a requester communicates with a terminal-simulation process, its SETMODE
calls cause Setmode messages to be sent to the terminal-simulation process. The
process must read, process, and reply to these messages.
When a requester communicates with a terminal-simulation process, by default it
cannot include the last-params parameter in its SETMODE calls. However, the
terminal-simulation process can call SETMODE function 80 to allow requesters to
include the last-params parameter in SETMODE calls.