[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here 5.2 Terminal Driver Device Information
HP OpenVMS I/O User’s Reference Manual: OpenVMS Version 8.4 > Chapter 5 Terminal Driver

5.2 Terminal Driver Device Information

You can obtain information on terminal characteristics by using the Get Device/Volume Information ($GETDVI) system service. (See the HP OpenVMS System Services Reference Manual.) The sense mode function provides an alternative means to obtain terminal characteristics; see “Sense Mode and Sense Characteristics”.

$GETDVI returns terminal characteristics when you specify the item codes DVI$_DEVCHAR, DVI$_DEVDEPEND, and DVI$_DEVDEPEND2. Table 5-3, Table 5-4, and Table 5-5 list these characteristics. Terminal characteristics are normally set during system generation to any one of, or a combination of, the values listed in Table 5-4. DVI$_DEVDEPEND returns a longword field in which the three low-order bytes contain the device-dependent characteristics and the high-order byte contains the page length. Page length can have a value in the range of 0 through 255. The $DEVDEF macro defines the device-independent characteristics, the $TTDEF macro defines the device-dependent characteristics, and the $TT2DEF macro defines the extended device-dependent characteristics.

DVI$_DEVCLASS and DVI$_DEVTYPE return the device class and device type names, which are defined by the $DCDEF and $TTDEF macros, respectively. The device class for terminals is DC$_TERM. The terminal model determines the device type. For example, the device type for the VT240 is TT$_VT200_SERIES. DVI$_DEVBUFSIZ returns the page width, which can be a value in the range of 1 through 511. The driver does not accept a value of 0.

Table 5-3 Terminal Device-Independent Characteristics

CharacteristicMeaning

DEV$M_AVL

Terminal is on line and available.

DEV$M_CCL

Carriage control is enabled.

DEV$M_DET

Terminal is detached.

DEV$M_IDV

Terminal is capable of input.

DEV$M_ODV

Terminal is capable of output.

DEV$M_OPR

Terminal is enabled as an operator console.

DEV$M_REC

Device is record-oriented.

DEV$M_RTT

Terminal has remote terminal UCB extension.

DEV$M_SPL

Device is spooled.

DEV$M_TRM

Device is a terminal.

DEV$M_NET

Terminal line is allocated for DECnet use.

 

Table 5-4 Terminal Characteristics

Value[1]Meaning

TT$M_CRFILL

Terminal requires fill after the Return key is pressed (the fill type can be specified by the set mode function P4 argument).

TT$M_EIGHTBIT

Terminal uses the 8-bit ASCII character set (see Appendix C). Terminals without this characteristic use the 7-bit ASCII code. In this case, the eighth bit is masked out on received characters and is ignored on output characters. The eighth bit is meaningful only if TT$M_EIGHTBIT is set.

TT$M_ESCAPE

Terminal generates escape sequences (see “Escape and Control Sequences”). Escape sequences are validated for syntax.

TT$M_HALFDUP

Terminal is in half-duplex mode (see “Duplex Modes”). All read and write requests are executed sequentially.

TT$M_HOSTSYNC

The host system is synchronized to the terminal. Ctrl/Q and Ctrl/S are used to control data flow and thus keep the type-ahead buffer from filling. TT$M_HOSTSYNC should always be set on LAT terminals.

TT$M_LFFILL

Terminal requires fill after the line-feed character is processed. (The fill can be specified by the set mode P4 argument.)

TT$M_LOWER

Terminal has the lowercase character set. Unless the terminal is in the PASTHRU mode or IO$M_NOFORMAT is specified, all input and echoed lowercase characters (hexadecimal 61 to 7A) are converted to uppercase if TT$M_LOWER is not set. (The character ALTMODE (decimal 125 and 126, or hexadecimal 7D and 7E) converts to ESCAPE on terminals that do not have the lowercase characteristic TT$M_LOWER set.)

TT$M_MBXDSABL

Mailboxes associated with the terminal do not receive notification of unsolicited input or hangup (see “Dialup Support”). This bit can be set by the IO$M_DSABLMBX function modifier for read requests and cleared by the IO$M_ENABLMBX function modifier for write requests.

TT$M_MECHFORM

Terminal has mechanical form feed. The terminal driver passes form feeds directly to the terminal instead of expanding to line feeds.

TT$M_MECHTAB

Terminal has mechanical tabs and is capable of tab expansion. To accomplish correct line wrapping, the terminal driver assumes there are eight spaces between tab stops.

TT$M_MODEM

Terminal line is connected to a modem. If TT$M_MODEM is set, the terminal driver automatically handles modem control. If TT$M_MODEM is not set, all modem signals are ignored. If TT$M_MODEM is set and then cleared, a hangup is declared on the terminal line if that line is in the remote state (TT$M_REMOTE is set). If DTR and RTS are set with IO$_SETMODE!IO$M_SET_MODEM!IO$M_MAINT on a nonmodem port, DTR and RTS goes off and then back on when the port is set for modem.

TT$M_MODEM is not supported for LAT devices.

TT$M_NOBRDCST

Terminal does not receive any broadcast messages.

TT$M_NOECHO

Input characters are not echoed on this terminal line (see “Type-Ahead Feature”).

TT$M_NOTYPEAHD

Data must be solicited by a read operation. Data is lost if received in the absence of an outstanding read request (if it is unsolicited data). Disables type-ahead feature (see “Type-Ahead Feature”). If this characteristic is set, login attempts on this line are disabled. See “Modem Signal Control” for information on modem signal control.

TT$M_READSYNC

Read synchronization is enabled. The host explicitly solicits all read operations by entering a Ctrl/Q and terminates the operation by entering a Ctrl/S. TT$M_READSYNC is not applicable to LAT terminals.

TT$M_REMOTE

Dialup characteristic is enabled. The terminal returns to local mode when a hangup occurs on the terminal line (see Section “Dialup Support”). This characteristic cannot be changed; it is only informational.

TT$M_SCOPE

Terminal is a video screen display (CRT terminal), for example, the VT100 or VT240 terminals.

TT$M_TTSYNC

The terminal is synchronized to the host system. Output to the terminal is controlled by terminal-generated Ctrl/Q or Ctrl/S. TT$M_TTSYNC is not applicable to LAT terminals unless TT$M_PASTHRU is set and TT$M_TTSYNC is disabled, in which case the LAT session is placed in PASSALL mode.

TT$M_WRAP

A carriage-return/line-feed combination should be inserted if the cursor moves beyond the right margin. If TT$M_WRAP is not set, no carriage-return/line-feed combination is sent. The operating system does not support hardware-provided wrapping functions.

[1] Defined by the $TTDEF macro. The prefix can be TT$M_ or TT$V_. TT$M_ is a bit mask whose bit corresponds to the specific field; TT$V_ is a bit number.

 

Table 5-5 Extended Terminal Characteristics

Value[1] Meaning

TT2$M_ALTYPEAHD

Alternate type-ahead buffer size is enabled. Use the alternate type-ahead buffer size specified during system generation (see “Type-Ahead Feature”). If a type-ahead buffer already exists for a terminal line, there is no effect when this characteristic is set for that line. TT2$M_ALTYPEAHD should be set prior to using the terminal, such as in the startup command procedure. You can only set TT2$M_ALTYPEAHD; this characteristic cannot be cleared until the system is rebooted.

TT2$M_ANSICRT

ANSI CRT terminal is enabled. This characteristic is set by the SET TERMINAL command. TT2$M_ANSICRT is a subset of the ANSI standard with no DIGITAL private escape sequences (see Appendix C). It is also a subset of the VT100 family terminals (because TT2$M_ANSICRT is a subset of TT2$M_DECCRT) and the VT100. Terminals with this characteristic must provide a display of at least 24 lines, each with 80 columns.

TT2$M_APP_KEYPAD

Notifies application programs of state to set the keypad to when exiting.

TT2$M_AUTOBAUD

Automatic baud rate detection is enabled. This characteristic allows the baud rate to be set automatically when you log in. (The baud rate is set when one or more carriage returns are entered during the login procedure.) Terminals are set to a permanent speed of 9600 baud. If TT2$M_AUTOBAUD is specified, the permanent speed must not be changed while this characteristic is in use on a given terminal line. See “Autobaud Detection” for additional information on automatic baud rate detection.

TT2$M_AVO

Advanced video is enabled. This characteristic provides the terminal with blink, bold, and flashing fields as well as a full screen of 132 character lines. TT2$M_AVO is set by the SET TERMINAL command. Appendix C lists the valid escape sequences for terminals with the TT2$M_AVO characteristic.

TT2$M_BLOCK

Block mode is enabled. This characteristic is set by the SET TERMINAL command. TT2$M_BLOCK defines additional ANSI-defined and DIGITAL private escape sequences (see Appendix C). Terminals with this characteristic are capable of local editing and block mode transmission (XON/XOFF flow control must be honored), and have protected fields. If the terminal is used for large amounts of block input, TT2$M_ALTYPEAHD should also be specified.

TT2$M_BRDCSTMBX

Mailbox broadcasts messages. Broadcast messages are sent to an associated mailbox, if one exists.

TT2$M_COMMSYNC

Enables devices such as asynchronous printers to be connected to terminal ports. Flow control is handled by EIA modem signals instead of XON/XOFF. Setting TT2$M_COMMSYNC activates the DTR and RTS signals; data is sent once the DSR and CTS signals are also present. If either of these signals is not present, printing stops. When both signals are present again, printing resumes.

Do not set TT2$M_COMMSYNC on a line connected to a modem that is intended for interactive use. TT2$M_COMMSYNC disables the modem terminal characteristic that disconnects a user process from the terminal line in case of a modem phone line failure. With TT2$M_COMMSYNC set, the next call on the terminal line could be attached to the previous user's process. TT2$M_COMMSYNC should also not be used in combination with XON/XOFF, TT$M_TTSYNC, or TT$M_HOSTSYNC. TT2$M_COMMSYNC and TT$M_MODEM are mutually exclusive.

TT2$M_DECCRT

DIGITAL CRT terminal. This characteristic is set by the SET TERMINAL command for all terminals that are upward-compatible with VT100 family terminals. TT2$M_DECCRT is a superset of TT2$M_ANSICRT. Additional ANSI-defined as well as most DIGITAL private escape sequences are allowed for terminals with this characteristic (see Appendix C); maintenance modes, VT52 mode, and the use of the LED displays are not defined by TT2$M_DECCRT. Not all VT100 family terminals implement these features. The presence of the advanced video feature cannot be assumed because it is a VT100 option. This restricts the use of graphics attributes. However, the TT2$M_AVO characteristic can be used to determine whether additional graphic attributes are available.

TT2$M_DECCRT2

DIGITAL CRT terminal. This characteristic is set by the SET TERMINAL command for all terminals that are upward-compatible with VT200 family terminals. TT2$M_DECCRT2 is a superset of TT2$M_DECCRT.

TT2$M_DECCRT3

DIGITAL CRT terminal. This characteristic is set by the SET TERMINAL command for all terminals that are upward-compatible with VT300 family terminals. TT2$M_DECCRT3 is a superset of TT2$M_DECCRT2.

TT2$M_DECCRT4

DIGITAL CRT terminal. This characteristic is set by the SET TERMINAL command for all terminals that are upward-compatible with VT400 family terminals. TT2$M_DECCRT4 is a superset of TT2$M_DECCRT3.

TT2$M_DIALUP

Terminal is a dialup line. Used by LOGINOUT for the disable dialup control.

TT2$M_DISCONNECT

Allows terminal disconnect when a hangup occurs (that is, when modem signals are lost, when the DCL commands DISCONNECT or CONNECT/CONTINUE are entered, or when the BREAK key is pressed on a terminal that has the TT2$M_SECURE characteristic). These terminals are created as VTAn:. (See the description for the DCL command CONNECT/DISCONNECT in the HP OpenVMS DCL Dictionary.)

TT2$M_DMA

Direct memory access (DMA) mode. This characteristic enables the use of DMA mode for asynchronous DMA multiplexers. It is ignored by non-DMA controllers.

TT2$M_DRCS

Terminal supports loadable character fonts. This characteristic is set with the DCL command SET TERMINAL/SOFT_CHARACTERS.

TT2$M_EDIT

Terminal edit. This characteristic is set by the SET TERMINAL command for all terminals that support ANSI-defined advanced editing functions. These functions include the ability to insert or delete a line and the ability to insert or delete characters in an existing line. Terminals with this characteristic are a superset of TT2$M_DECCRT. Appendix Clists the valid escape sequences for terminals with the TT2$M_EDIT characteristic.

TT2$M_EDITING

Line editing is allowed.

TT2$M_FALLBACK[2]

Output is transformed from the 8-bit multinational character set to a 7-bit ASCII character set on terminals that do not support the 8-bit character set (see Appendix C).

TT2$M_HANGUP

Terminal hangup. Terminal lines connected through modems are hung up when a process logs out or is deleted. The state of this characteristic cannot be changed unless TT2$M_MODHANGUP is enabled or the process has either LOG_IO or PHY_IO privilege.

TT2$M_INSERT

Sets default mode for insert or overstrike at the beginning of each read operation.

TT2$M_LOCALECHO

Local echo. This characteristic is used with TT$M_NOECHO. If both characteristics are set, only terminators and special control characters are echoed. Use of this mode is restricted to command-line read operations. Application programs that use the IO$M_NOECHO function modifier will not necessarily work if TT2$M_LOCALECHO is set. Local echo is also not compatible with line editing (TT2$M_EDITING).

TT2$M_MODHANGUP

Modify hangup. If specified, TT2$M_HANGUP can be modified without privilege. Otherwise, logical or physical I/O privilege is required.

TT2$M_PASTHRU

Terminal is in PASTHRU mode; all input and output data is in 7- or 8-bit binary format (no data interpretation occurs). Data is terminated when the buffer is full or when the data that is read matches the specified terminator. If the characteristic TT$M_TTSYNC is set, Ctrl/S and Ctrl/Q interpretation does occur.

TT2$M_PRINTER

DIGITAL CRT terminal with a local printer port.

TT2$M_REGIS

ReGIS graphics. The terminal supports the ReGIS graphics instruction set.

TT2$M_SIXEL

SIXEL graphics. The terminal supports the SIXEL graphics instruction set.

TT2$M_SECURE

For use with nonmodem, nonautobaud lines. This characteristic guarantees that no process is connected to the terminal after the BREAK key is pressed. If TT2$M_SECURE is not set, BREAK is a null key.

TT2$M_SETSPEED

Set speed. If specified, either LOG_IO or PHY_IO privilege is required to change terminal speed. TT2$M_SETSPEED is not supported for LAT devices.

TT2$M_SYSPWD

System password. This characteristic specifies that the login procedure should require the system password before the user name prompt is displayed.

TT2$M_XON

XON/XOFF control. If a set mode function is performed on a terminal in the Ctrl/S state, and if TT2$M_XON is set, output is resumed. Users must note that the driver attempts to resume stopped (XOFF) output on the line. However, restarting the output may not be successful in all cases. The XON/XOFF feature does not work on all terminals, for example, the VT220.

[1] Defined by the $TT2DEF macro. The prefix can be TT2$M_ or TT2$V_. TT2$M_ is a bit mask in which the bit set corresponds to the specific field; TT2$V_ is a bit number.

[2] If an attempt is made to turn on TT2$V_FALLBACK for a disconnected virtual terminal (_VTAx:) or if the Terminal Fallback Facility (TFF) has not been activated, the status code SS$_BADPARAM is returned. For more information on TFF, see the OpenVMS Terminal Fallback Utility (available on the Documentation CD-ROM).

 

5.2.1 Terminal Characteristics Categories

The set mode and set characteristics functions (see “Set Mode”) and the DCL command SET TERMINAL are used to change terminal characteristics. The HP OpenVMS DCL Dictionary describes the SET TERMINAL command.

To customize terminal behavior and usage, the operating system divides terminal characteristics into the following categories:

  • Format effectors—The following characteristics allow you to specify terminal-dependent formatting requirements:

    TT$M_CRFILL

    TT$M_EIGHTBIT

    TT$M_LFFILL

    TT$M_LOWER

    TT2$M_LOCALECHO

    TT$M_MECHFORM

    TT$M_MECHTAB

    TT$M_NOECHO

    TT$M_SCOPE

    TT$M_WRAP

      

  • Generic terminal capabilities—The following characteristics specify generic terminal features available to applications programs:

    TT2$M_ANSICRT

    TT2$M_AVO

    TT2$M_BLOCK

    TT2$M_DECCRT

    TT2$M_DECCRT2

    TT2$M_DECCRT3

    TT2$M_DECCRT4

    TT2$M_DRCS

    TT2$M_EDIT

    TT2$M_PRINTER

    TT2$M_REGIS

    TT2$M_SIXEL

    Their use allows execution of these programs without knowledge of the actual terminal type. For example, a program should check for TT2$M_DECCRT rather than for VT100 or VT101.

  • Protocol—The following characteristics control protocols used by the terminal:

    TT$M_ESCAPE

    TT$M_HALFDUP

    TT$M_HOSTSYNC

    TT2$M_PASTHRU

    TT$M_TTSYNC

     

  • System management—The following characteristics, normally set only at system startup, allow the system manager to regulate terminal usage:

    TT2$M_ALTYPEAHD

    TT2$M_AUTOBAUD

    TT2$M_DIALUP

    TT2$M_DISCONNECT

    TT2$M_DMA

    TT2$M_HANGUP

    TT$M_MODEM

    TT$M_NOTYPEAHD

    TT2$M_MODHANGUP

    TT2$M_SECURE

    TT2$M_SETSPEED

    TT2$M_SYSPWD

    TT2$M_COMMSYNC

      

  • User preference—The following characteristics allow you to customize the terminal operating mode:

    TT2$M_APP_KEYPAD

    TT2$M_FALLBACK

    TT2$M_EDITING

    TT2$M_INSERT

    TT$M_NOBRDCST

     

  • Miscellaneous—The following characteristics provide greater program control of terminal operations:

    TT2$M_BRDCSTMBX

    TT$M_MBXDSABL

    TT2$M_XON