Guardian Programmer's Guide

Table Of Contents
Writing a Terminal Simulator
Guardian Programmer’s Guide 421922-014
24 - 3
Assigning a Name to the
Terminal-Simulation Process
Assigning a Name to the
Terminal-Simulation Process
A terminal-simulation process must be a named process. You assign a name to the
process when you call the PROCESS_CREATE_ procedure to create the process or
type the TACL RUN command. The following example creates a process named
“$T1.”
OBJFILE ':=' "TERMFILE" -> @S^PTR;
OBJFILENAME^LENGTH := @S^PTR ‘-’ @OBJFILE;
NAME^OPTION := ZSYS^VAL^PCREATOPT^NAMEINCALL;
PROCESS^NAME ':=' "$T1";
PROCESS^NAME^LENGTH := 3;
ERROR := PROCESS_CREATE_(OBJFILE:OBJFILENAME^LENGTH,
!library^file:length!,
!swap^file:length!,
!ext^swap^file:length!,
!priority!,
!processor!,
PROCESS^HANDLE,
!error^detail!,
NAME^OPTION,
PROCESS^NAME:PROCESS^NAME^LENGTH,
PROCESS^DESCRIPTOR:MAXLEN,
PROCESS^DESCRIPTOR^LENGTH);
See Section 16, Creating and Managing Processes, for more details on creating
named processes.
Accepting System Messages
Through $RECEIVE
A terminal-simulation process must accept system messages in its $RECEIVE file.
The process might receive a variety of system messages. Among these are:
Requests for device-type information
Setmode messages
Setparam messages
Control messages
To receive and reply to these messages, you must specify that the terminal-simulation
process accepts system messages.
The system messages listed above are sent to $RECEIVE when a FILE_OPEN_ call is
executed. The system messages cannot be blocked. By default, bit 15 is set to the