Guardian Programmer's Guide

Table Of Contents
Writing a Terminal Simulator
Guardian Programmer’s Guide 421922-014
24 - 5
Allowing the Requester to Call SETPARAM
If the terminal-simulation process allows requesters to specify the last-params
parameter, the process must remember the previous parameter values for SETMODE
functions. Furthermore, the process must return this information to the requester when
responding to Setmode messages.
Reading and responding to Setmode messages is discussed in detail later in this
section.
To allow a requester to include the last-params parameter on SETMODE calls,
assign 1 to bit 15 of param1 in a SETMODE function 80 call:
PARAM1.<15> := 1;
CALL SETMODE(REQ^NUM,80,PARAM1);
Allowing the Requester to Call SETPARAM
A terminal-simulation process can call SETMODE function 80 to specify whether the
requester can call the SETPARAM procedure against the terminal-simulation process.
A requester that communicates with a real terminal can call SETPARAM to control the
operation of the terminal. Most SETPARAM functions are related to data
communication; however, SETPARAM function 3 specifies the owner of the BREAK
key. (SETPARAM function 3 works like SETMODE function 11, except that
SETPARAM function 3 can also specify a BREAK tag.) When a requester
communicates with a terminal-simulation process, by default it cannot call the
SETPARAM procedure. However, the terminal-simulation process can call SETMODE
function 80 to allow requesters to call the SETPARAM procedure.
If a terminal-simulation process allows requesters to call SETPARAM, a Setparam
message is sent to the process when the requester calls SETPARAM. The process
must read and respond to Setparam messages. The response to the Setparam
message must include the previous parameter values for the particular SETPARAM
function.
Reading and responding to Setparam messages is discussed in detail later in this
sect
ion.
To allow a requester to call SETPARAM, assign 1 to bit 14 of the param1 p
arameter in
a SETMODE function 80 call:
PARAM1.<14> := 1;
CALL SETMODE(REQ^NUM,80,PARAM1);
Processing I/O Requests
A terminal-simulation process accepts and responds to I/O requests from one or more
requesters. I/O requests are received through the $RECEIVE file.
Immediately after receiving a message from $RECEIVE, the process should check the
condition code. If a CCG condition code is returned, then the process should call the
FILE_GETINFO_ procedure to retrieve the file-system error number. File-system error