Guardian Programmer's Guide

Table Of Contents
Communicating With Terminals
Guardian Programmer’s Guide 421922-014
10 - 21
Setting the Interrupt Characters for Page Mode
Receipt of any interrupt character other than the configured page-termination character
has the following effect:
The system considers the operation to be complete.
The application program receives the page-termination character in the application
buffer along with the page image (if any).
The count-read parameter returned by the read operation includes the interrupt
character.
The following example shows the action of the interrupt characters when you
dynamically change from conversational mode to page mode and then back to
conversational mode. The configured line-termination character is a carriage return;
the configured page-termination character is also a carriage return. The terminal is
configured as a conversational-mode terminal.
LITERAL CHANGE^MODE = 8, !function for SETMODE; change
!transfer mode
CONV^MODE = 0, !parameter for SETMODE;
!conversational mode
PAGE^MODE = 1, !parameter for SETMODE; page mode
SET^INTCHARS = 9, !function for SETMODE; set
!interrupt characters
BS^CAN = %004030, !backspace, line cancel
HT^CR = %004415, !horizontal tab, carriage return
ETX^EOT = %001404; !end-of-text, end-of-transmission
.
.
First, open the terminal.
ERROR := FILE_OPEN_(TERM^NAME,
TERM^NUM);
IF ERROR <> 0 THEN ...
.
.
The terminal opens in conversational mode because it is configured that way. The
de
fault interrupt characters are now in force: backspace, line cancel, end of file,
carriage return.
Now call the SETMODE procedure with function 9 to change the interrupt characters
fo
r conversational mode:
CALL SETMODE(TERM^NUM,
SET^INTCHARS,
BS^CAN,
HT^CR);
IF <> THEN ...
.
.
The conversational-mode interrupt characters are now set to backspace, line cancel,
horizontal tab, and carriage return.