Guardian Programmer's Guide

Table Of Contents
Writing a Terminal Simulator
Guardian Programmer’s Guide 421922-014
24 - 9
Processing System Messages
! I/O is a WRITEREAD[X]; write message to terminal, wait
! for response, write response back to requester:
3 -> BEGIN
ERROR^RETURN := 0;
WCOUNT := BYTES^READ;
RCOUNT := BYTES^TO^RETURN;
CALL WRITEREADX(TERM^NUM,SBUFFER,WCOUNT,RCOUNT,
BYTES^READ);
IF <> THEN
CALL FILE_GETINFO_(TERM^NUM,ERROR^RETURN);
CALL REPLYX(SBUFFER,
BYTES^READ,
!count^written!,
!message^tag!,
ERROR^RETURN);
END;
!Any other I/O type is unexpected:
OTHERWISE -> BEGIN
.
.
END;
END;
END;
For more information about the REPLY[X] procedure, see Section 6 of this manual
Communicating With Processes, or the Guardian Procedure Calls Reference Manual.
Processing System Messages
A terminal-simulation process might receive system messages through its $RECEIVE
file. In particular, the process might receive these system messages:
The following paragraphs describe when these messages are sent to the terminal-
simulation process and discuss how the terminal-simulation process should respond
(except for system messages -147). For description of system message -147, refer to
the Guardian Procedure Errors and Messages Manual.
-32 Control message
-33 Setmode message
-37 Setparam message
-106 Request for device-type information (D-series format message)
-147 Request for device configuration information (G-series format message)