Asynchronous Terminals and Printer Processes Programming Manual

TERMINAL PROGRAMMING CONSIDERATIONS
Modem Connections
LOOP:
IF NOT CALL^RECEIVED THEN
BEGIN
CALL AWAITIO ( LINE1^FNUM, ...., 0D );
IF = THEN CALL^RECEIVED := 1
ELSE
BEGIN
CALL FILEINFO ( LINE1^FNUM, ERROR );
IF ERROR <> TIMEOUT THEN ...; ! error
END;
END;
CONTROL 12 allows the modem to be disconnected without closing
the associated file. For switched lines, a call to the CLOSE
procedure implicitly performs a CONTROL 12 operation.
ERROR RECOVERY
In many cases, error recovery for terminals consists of simply
retrying the current operation. Certain errors involving timed
reads and the break feature require special consideration and are
discussed individually below.
You can obtain a brief description of most errors by entering
the command interpreter command ERROR with the error number. All
errors are described in the
System Messages Manual
.
Programming Errors
The following file-system error numbers indicate that you have
made an error in coding your program (such as specifying a count
parameter that exceeds the valid range):
2, 13, 14, 18, 20, 21, 22, 24, 25, 28, 29, 38, 49
For these errors, you must correct your program and then
recompile it.
System Resource and Hardware Problems
The following file-system error numbers indicate that the system
was unable to obtain a required resource or that there is some
type of hardware problem:
4-27