Terminals - Overview

Terminals are those devices in the configuration file with an ALIAS starting with a "T". Terminals are supported using either a loadable driver (DOS) or by using a description in the "termcap".

The terminal device in PRO/5 is a multiple screen (window) device capable of performing many complex functions. These functions have an identical interface regardless of the capabilities of the terminal PRO/5 is actually working with. This allows the PRO/5 programmer considerable power in designing the software's user interface.

When a terminal is first OPENed, a window is created to the full size of the screen and the channel and device control modes are set to their default values. Successive OPENs of the terminal device will use the current window and modes. Multiple OPENs differ only in the channel control flags.

Window and Scroll Regions

The PRO/5 terminal driver allows you to define a number of display regions, commonly called windows, on the physical display of the terminal. Each of these windows retains its own set of display modes and function key loads, allowing you to move between windows without concern about character attributes, etc.

Additionally, the terminal driver allows you to restrict the display to a region in the current window. This is called a scroll region. A scroll region is a rectangular area contained within the current window outside of which no display may be performed. Any display changes made within the scroll region also affect the display of the window in which the region is contained.

Positioning the Cursor

The mnemonics @(col) and @(col,row) allow you to place the cursor on any position of the current scroll region. All references to a row or column are 0 based, (i.e., the upper left corner of the scroll region is 0,0). The @(col) mnemonic allows you to position to a particular column and the @(col,row) to any row or column of the scroll region. For the @(col) mnemonic, see the SETOPTS verb.

Within a scroll region, the upper-left corner is the 0,0 position. Any cursor positioning, with the exception of the 'WINDOW' and 'MOVE' mnemonics, from within the window or scroll region, will use the logical position within the window. The 'WINDOW' and 'MOVE' mnemonics will use the physical terminal row and column position.