Skip to main content

Creating and Editing Terminal Descriptions

With TERCAP option 1 (see The TERCAP Utility), you can enter the following properties for a terminal:

  • Terminal type name (or select from existing list)

  • Number of lines and columns

  • Boolean flags

  • Mnemonics (entering *D deletes, after a confirmation, the source and binary forms of the current mnemonic).

Terminal Names and Aliases

When a new terminal type (name) is entered at the first prompt, the program allows you to copy the initial description from another terminal. This is useful if the description you are creating is similar to an existing terminal description.

You can check for other terminal types by entering a question mark at the Terminal type prompt:

   DO tt^%CHARWIN
   Terminal type: ?
     Terminal
     Terminal Wide Characters
     Linux
     SCO ANSI
     vt100
     vt220
     vt320

Boolean Flag Descriptions

The following flags can be used:

Bit Meaning
1 Terminal has color capability.
2 Terminal has windowing firmware (eg., "Waytec").
4 Terminal is configured for auto-margin (or auto-wrap).
Writing to the last column automatically positions the cursor at the first column of the next line. This depends on how the terminal is configured, either by a local menu or by the initialization string. The system works either way, but if this flag is of (like the default for the VT terminals), you may write at the lower right hand corner of the screen without scrolling it. If this flag is on, we never write to the last column of the last line. If you see a blank when another character should be there, it is the expected behavior.
8 Terminal has PC-like video attributes.
For instance, it stores character attributes (blink and highlight) together with foreground and background colors in a single byte. When this flag is on, bit 1 should be off. Internally we store the attributes exactly like a PC video adapter card. This means that we spare the color byte without sacrificing the color capability. This results in less memory consumed and faster scrolls. This flag is intended for SCO UNIX® consoles (SCO ANSI and look alikes) and MS-DOS terminal emulators (Telix, Procomm, etc.).
16 The "erase character" operation
Writes blanks with no attributes on. It has been noted that some implementations, like the SCO ANSI, maintain the current attribute and color when executing the "ech" function. Others, like the VT terminals, use a "normal" (i.e., with all attributes off) blank. This flag lets the system correctly use the "ech" operation (followed by "cursor forward") to write a long sequence of blanks without disturbing the screen attributes.
32 Disable border mapping.
By default, the user must fill in a border map with the TERCAP utility. If the NLS output translation is being used, it may be desirable to perform the border mapping as part of this output translation. This flag thus disables the internal border mapping so that it can be done via the NLS output translation.

Mnemonics and Their Parameters

Mnemonics may be entered via the TERCAP utility and are loaded by /INIT. In most cases, parameters may be omitted, and default values are assumed. For example:

   WRITE /cup /sp /ed

is equivalent to:

   WRITE /cup(1,1) /sp(1) /ed(0)

Mnemonic

Description and parameters

aoff All attributes off
bell Ring the bell
boff Blinking off
bon Blinking on
clr Clear the screen
coff Cursor off (invisible)
con Cursor on (visible)
cs01 Switch from character set 0 to character set 1
cs02 Switch from character set 0 to character set 2
cs10 Switch from character set 1 to character set 0
cs20 Switch from character set 2 to character set 0
cub(n) Cursor backward n times
cud(n) Cursor down n times
cuf(n) Cursor forward n times
cup(l,c) Position cursor at (line, column), origin = (0,0).
cuu(n) Cursor up n times
dch(n) Delete n characters
dl1 Delete 1 line (idem)
dl(n) Delete n lines
ech(n) Erase n characters
ed0 Erase from cursor to end of screen
ed1 Erase from cursor to beginning of screen
ed2 Erase complete screen
el0 Erase from cursor to end of line
el1 Erase from cursor to beginning of line
el2 Erase complete line
end Termination string
fill(l,t,r,b,c) Fill a window with a character
l = left column (from 0)
t = top line (from 0)
r = right column
b = bottom line
c = character code
hoff Highlight off
hon Highlight on
ich(n) Insert n characters
il(n) Insert n lines
il1 Insert 1 line (useful if terminal does not have a generic "il")
ind(n) Index n times
init Initialization string
rep(c,n) Repeat character c, n times
ri(n) Reverse-index n times
roff Reverse video off
ron Reverse video on
uoff Underline off
uon Underline on
wbox(l,t,r,b,s) Draw box
l = left column (from 0)
t = top line (from 0)
r = right column
b = bottom line
s = border style (0=none, 1=single, 2=double)
wclose Close window
wlimits(l,t,r,b) Redefine window frame
l = left column (from 0)
t = top line (from 0)
r = right column
b = bottom line
wopen(l,t,r,b,s) Open window (for terminals with windowing firmware)
l = left column (from 0)
t = top line (from 0)
r = right column
b = bottom line
s = border style (0=none, 1=single, 2=double)
wuse(wid) Make wid the current (top) window
FeedbackOpens in a new tab