Video Attributes

To correctly configure attributes for a terminal, you must first determine which style of attribute setting (ANSI or magic cookie) it uses. You can do this most easily by typing the sequence to turn on reverse video at your terminal. If the cursor moves one character and a reverse-video bar appears, then you have a magic cookie style of terminal. If nothing happens, then type some characters. These should show up in reverse video. If they do, then you have an ANSI style terminal that allows for independent attributes for each screen position. If you do not get reverse-video at all, then you did something wrong.

If you include RV, UL, BL, RU, or RB in your terminal database file entry, then the HI and LO functions must be included. These two functions set the terminal to normal video/high intensity and normal video/low intensity, respectively. If intensity is not being used, then these should both just set normal video.

On all machines except Windows, the runtime system ignores the difference between high-intensity spaces and low-intensity spaces when the background color is black. If your terminal is set up to run with black-on-white characters (reverse video) as its default, you should add the entry VB (visible background) to the description of that terminal. This causes spaces to be handled consistently.

If a magic cookie style terminal is being used, then HI and LO should not set normal video, but should just set the appropriate intensity. The function NM should be added to set normal video instead. Also, the function sg must be included to tell the Terminal Manager that this is a "magic cookie" type terminal. The sg setting does not take a value, it just has to be present.

A few "magic cookie" terminals ignore HI and LO, so that reverse video fields appear the same regardless of which intensity is used. If you are experiencing this situation, add RA to the terminal's description. This sets the terminal into reverse video using the terminal's alternate intensity (usually low intensity). If RA is used, then RV sets reverse video in the terminal's default intensity.

The function DL should be included in a definition if the default intensity for the terminal is low-intensity. This function is not set to a value, it is just included in the terminal definition.

On some terminals, a clear screen operation uses the currently selected video attribute. For example, if reverse-video were the current attribute, then a clear screen would cause the entire screen to become reverse-video. If the terminal has this property, then AC should be included to indicate this. ACUCOBOL-GT will use this to optimize certain screen displays.

Continuing the example, the VT-100 allows the independent setting of each attribute. It cannot independently reset the attributes, but that is not required by the Terminal Manager. Low-intensity, normal-video can be set with ESC[m. High-intensity can be set with ESC[1m. Reverse video is initiated by sending ESC[7m, underline with ESC[4m and blink with ESC[5m. The terminal normally runs in low-intensity, so the DL flag is used. All of these modes can be combined by placing the appropriate attribute numbers together in one command string and separating them with semicolons. Our new entry becomes:

vt100|vt-100|DEC VT-100 :\

Note the setting of \E[0;1m for HI. The initial zero ensures that the terminal is set to normal modes before the high-intensity mode is set.