Accessing Terminals
Developing TACL Programs
107365 Tandem Computers Incorporated
2–25
Sending Escape
Sequences to a Terminal
The 6530 terminal and devices that emulate the 6530 terminal recognize a set of escape
characters that allow you to control cursor position, set the size and video attributes of
characters displayed on the screen, and perform other operations. Most escape
sequences have the following format:
escape-character number [number]
The escape character is the 27th character in the ASCII character set. To specify an
escape sequence, store binary values as their decimal equivalents in a STRUCT or
DELTA variable. The easiest way to send these values to your terminal is to use
#OUTPUT.
The following examples use STRUCT variables to store escape sequences. To specify
an escape sequence in a STRUCT variable, set a BYTE value to the decimal value of the
escape character and the numbers that perform the desired operation.
To define an escape sequence using #DELTA, specify a decimal number followed by
the I command; for information about #DELTA, see the TACL Reference Manual.
Use the macro in Figure 2-11,
display
, to define several escape sequences and send
them to the home terminal. To run this macro, load the file and type
display
. The
macro displays a series of lines with different display attributes.
Figure 2-11. Sending Special Characters to a Screen (Page 1 of 2)
?SECTION display MACRO
#FRAME
== Define escape sequences
[#DEF ascii STRUCT
BEGIN
BYTE byt0 VALUE 7;
CHAR bell REDEFINES byt0;
BYTE byt1 VALUE 27;
CHAR esc REDEFINES byt1;
BYTE byt2a VALUE 36;
CHAR dollar REDEFINES byt2a;
BYTE byt2 VALUE 37;
CHAR perc REDEFINES byt2;
BYTE byt3 VALUE 38;
CHAR amp REDEFINES byt3;
BYTE byt4 VALUE 64;
CHAR at REDEFINES byt4;
BYTE byt5 (0:1) VALUE 27 73; == clear screen
CHAR clr (0:1) REDEFINES byt5; == escape sequence
END;
] == End ascii