Selecting and Defining Terminal Types

mvBase has a System Cursor Definition utility that allows you to select up to 26 different terminal types at once, and define your own terminal types if they are not defined by the operating system. The System Cursor Definition utility is a menu-driven mvBASIC program, accessed by the DEFINE-CURSOR command. The utility provides an editor, a selection process, and a compiler. The example below (under Option 1) shows the System Cursor Definition menu.

The menu displays a list of all currently defined terminals. An asterisk indicates those terminals which are currently selected for your system. Using the menu you can:

The following options are available on the System Cursor Definition menu:

Option 1: Create a Terminal Definition

When you select option 1, Create Definition, you are prompted to enter the name of the terminal to be defined. If the terminal already exists, you can choose to modify it. This procedure is described in the next section, Option 2: Modify a Terminal Definition.

If you enter the name of a new terminal, you can use a copy of an existing definition as a template and modify it. This simplifies the defining process in cases where the new terminal is similar to a terminal that is already defined. If you do not specify a template to modify, you are prompted to enter each parameter of the new definition in turn. The following responses are possible:

newdata

Enters a new parameter value.

?

Displays a help screen with a brief explanation of the parameter line.

ENTER

Leaves the field empty.

SPACE

Leaves the field empty. You can enter any number of spaces.

When all parameters are as you want them, you are prompted to confirm that they are correct. If you answer N at the prompt, you can either go back and make changes to them, or you can exit without making any changes. If you answer Y, your new parameters will be compiled. If errors are detected during compilation, you can correct them by returning to the modification process.

After the new definition has been compiled, you can then add it to the list of selected definitions for your system.

Option 2: Modify a Terminal Definition

When you select option 2, Modify Definition, you are prompted to enter the name of the terminal definition to be modified. If the name does not exist, you can choose to create it as a new terminal definition. The procedure would then continue as described in the previous option 1.

If the definition exists, a list of terminal parameters is displayed in page-sized blocks. For example, if you entered ADDS at the prompt, the screen below would appear:

After each block of parameters is displayed, this prompt appears:

Modify lines?

If you type N, the next block of parameters is displayed. If you type Y, you are prompted to enter the numbers of the parameter lines you want to change. Enter as many numbers as you like, separated by commas.

Each parameter line is then displayed in turn, allowing you to enter new data. The following responses are possible:

ENTER

Leaves the current data unchanged.

SPACE

Deletes the current data and leaves the field empty. You can enter any number of spaces.

?

Displays a help screen with a brief explanation of the parameter line.

newdata

Enters a new parameter value.

After you have responded to all the prompts for the lines you selected, the whole block of parameters is redisplayed with the new values, allowing you to review them and make further changes if necessary.

When all changes are as you want them, you are prompted to confirm that they are correct. If you answer N at the prompt, you can either return to the modification process or you can exit without making any changes. If you answer Y, your new parameters will be compiled. If errors are detected during compilation, you can correct them by returning to the modification process.

After the modified definition has been compiled, you can then add it to the list of selected definitions for your system.

Option 3: Delete a Terminal Definition

When you select option 3, Delete Definition, you are prompted to enter the name of the terminal definition to be deleted. After you enter the name, you are prompted to confirm that you want to delete the definition. Type Y to delete it; type N to cancel the deletion and return to the menu.

Option 4: Select a Terminal Definition for Your System

When you choose option 4, Add Terminal, you are prompted to enter the name of the terminal you want to add to the list of terminals selected for your system. The terminal type (parameter 1 of the terminal definition) of the terminal you want to select is checked against the terminal types of all currently selected terminals to see if another terminal is already defined as that type. If it is not, then the terminal is added to the list of selected terminals. If it is, then you have the option to clear (deselect) the currently selected terminal and select the new terminal in its place.

Option 5: Unselect a Terminal Definition

When you choose option 5, Delete Terminal, you are prompted to enter the name of the terminal you want to remove from the list of terminals selected for your system. After you enter the name, the terminal is unselected.

See Also

Configuring and Using Terminals

Setting Terminal Characteristics

The CURSOR File

Defining Your Own Terminal Types

Cursor Addressing Codes

Cursor Code Strings

Customizing the Cursor Definitions

Troubleshooting Problems with Terminals