Guardian Programmer's Guide

Table Of Contents
Communicating With Terminals
Guardian Programmer’s Guide 421922-014
10 - 17
Controlling Forms Movement
SBUFFER ':=' ["Denote blanks by b.",%015] -> @S^PTR;
CALL WRITEX(TERMNUM,
SBUFFER,
@S^PTR ‘-’ @SBUFFER);
IF <> THEN ...
CALL DELAY(TWO^TENTHS^OF^SECOND);
CALL SETMODE(TERMNUM,
SET^SPACE,
SPACE);
IF <> THEN ...
SBUFFER ':=' " / " -> @S^PTR;
CALL WRITEX(TERMNUM,
SBUFFER,
@S^PTR '-' @SBUFFER);
IF <> THEN ...
The example prints the text “Denote blanks by b.” and then overstrikes the “b” with the
slash character (/).
Because the application program is supplying the carriage return character, a delay
(dependent on the particular terminal involved) might be needed to give the terminal
enough time to complete the carriage return operation. You can accomplish this by
writing some null characters to the terminal or by calling the DELAY procedure.
Controlling Form Feed
Use CONTROL operation 1 to perform form feed or vertical tabulation operations. The
CONTROL parameters for these operations are:
0 for form feed
1 or greater for vertical tabulation
The following example causes an advance to the top of the form for a hard-copy
terminal:
LITERAL FORMS^CONTROL = 1,
FORM^FEED = 0;
.
.
CALL CONTROL(TERMNUM,
FORMS^CONTROL,
FORM^FEED);
The system automatically delays subsequent access to the same terminal for a
configured period of time after performing forms control through the CONTROL
procedure.
If the configured delay is not suitable, the application program can issue a form feed
(%14) or vertical tabulation (%13) character through a WRITE procedure call.