Document revision date: 30 March 2001

## OpenVMS I/O User's Reference Manual

Previous | Contents | Index

## Chapter 5
Terminal Driver

This chapter describes the use of the terminal driver (TTDRIVER) and the LAT port driver (LTDRIVER). The terminal driver supports the asynchronous, serial line multiplexers listed in Table 5-1. The terminal driver also supports the console terminal. The LAT port driver accommodates I/O requests from application programs; for example to make connections to remote devices, such as a printer, on a server (see Section 5.4.4).

## 5.1 Supported Terminal Devices

In addition to the multiplexers listed in Table 5-1, the terminal driver supports serial line interfaces. At least one such interface is always provided and is used to attach the system console terminal. This interface does not allow the setting of multiple terminal speeds, parity, or any maintenance functions, with the exception of the interface included with the VAX 8200 processor. The terminal devices supported by the operating system for this interface are listed in Table 5-1.

The remote command terminal, used by the DCL command SET HOST, also makes use of the features listed in Section 5.2.

Table 5-1 Supported Terminal Devices
Terminal | No.of | Outout | Split |  | International
--- | --- | --- | --- | --- | ---
Interface | Lines | Silo | DMA | Speed | Bus | Modem Control
CXY08 | 8 | Yes 1 | Yes | Yes | Q-bus | Full
CXA16 | 16 | Yes 1 | Yes | Yes | Q-bus | No
CXB16 | 16 | Yes 1 | Yes | Yes | Q-bus | No
DZQ11 | 4 | No | No | Yes | Q-bus | No
DZQ11-CR | 4 | No | No | Yes | Q-bus | No
MicroVAX 2000 | 4 | No | No | Yes | None | No
MicroVAX 3100 | 4 | No | No | Yes | None | No
DZV11 | 4 | No | No | No | Q-bus | No
DHQ11 | 8 | Yes 1 | Yes | Yes | Q-bus | Full
DHU11 | 16 | Yes | Yes | Yes | UNIBUS | Full
DHV11 | 8 | No | Yes | Yes | Q-bus | Full
DMB32 | 8 | No | Yes | Yes | VAXBI bus | Full
DHB32 | 16 | No | Yes | Yes | VAXBI bus | Full
DSH32 | 8 | Yes | No | Yes | MicroVAX 2000, MicroVAX 3100 | No
DMF32 | 8 | Yes | Yes 2 | Yes 2 | UNIBUS | Yes
DMZ32 | 24 | Yes | Yes | Yes | UNIBUS | Full
DZ11 | 8/16 | No | No | No | UNIBUS | No
DZ32 | 8 | No | No | Limited | UNIBUS | No
LAT | 3 | No | Yes | 3 | N/A | 3
VAX 8200 serial lines | 4 | No | No | No 4 | None | No
VAXstation 3100 | 4 | No | No | Yes | None | No
VAXstation 4000 | 2 | No | No | Yes | None | No
DEC 2000 Model 300 | 2 | No | No | No | None | Full
DEC 2000 Model 300 7 | 4, 8 | Yes | No | No | EISA | Full
AlphaServer 2100 | 2 | No | No | No | None | Full
AlphaServer 7 | 4, 8 | Yes | No | No | EISA | Full
DEC 3000 Model 300 | 3 | No | Yes 5 | No | None | Full
DEC 3000 Model 400 | 4 | No | Yes 6 | No | None | Full
DEC 3000 Model 500 | 4 | No | Yes 6 | No | None | Full
DEC 4000 Model 600 | 2 | No | No | No | None | Full

1Depends on whether the DHV or DHU mode is selected when the board is installed.
2Lines 0 and 1.
3Server dependent.
4The operating system always supports the first serial line as a console interface. The first serial line and the remaining three serial lines are also supported as user terminal interfaces at a maximum speed of 1200 baud in configurations that can include a LAT terminal interface, but do not include other terminal interfaces.
5Communications only if not booted as alternate console.
6Communications only.
7Optional multifunctional serial/parallel PC4XD-AA adapter card. You can daisy-chain up to four boards in one system, resulting in 16, 32, or 64 ports.

## 5.2 Terminal Driver Features

The terminal driver provides the following features:

- Input processing
  - Command-line editing and command recall
  - Control characters and special keys
  - Input character validation (read verify)
  - American National Standard Institute (ANSI) escape sequence detection
  - Type-ahead feature
  - Specifiable or default input terminators
  - Special operating modes, such as NOECHO and PASTHRU
- Output processing
  - Efficiency
  - Limited full-duplex operation
  - Formatted or unformatted output
- Dialup support
  - Modem control
  - Hangup on logout
  - Preservation of process across hangups
- Miscellaneous
  - Terminal/mailbox interaction
  - Autobaud detection
  - Out-of-band control character handling

### 5.2.1 Input Processing

The terminal driver defines many terminal characteristics and read function modifiers, which provide a wide range of options to an application program. These options allow multiple levels of control over the terminal driver's input process, ranging from the default of command line editing that provides a highly flexible user interface, to the PASTHRU mode, which inhibits input process interpretation of data.

#### 5.2.1.1 Command-Line Editing and Command Recall

The terminal driver input process defines a bounded set of line editing functions. You can access these functions with control keys on all keyboards, and with some special keys on certain keyboards as well. You can move the cursor in single-character increments (left arrow or Ctrl/D, right arrow or Ctrl/F) or in multicharacter increments, to the beginning of the line (Ctrl/H) or end of the line (Ctrl/E). The terminal driver supports both insert character and overstrike character modes. The insert or overstrike mode is the terminal's default characteristic1 at the beginning of a read operation, but you can change it with the toggle insert/overstrike key (Ctrl/A). You can delete characters in word increments (Ctrl/J or line feed) and beginning-of-the-line increments (Ctrl/U).

When you use the terminal driver's editing functions, the following restrictions result:

- You cannot move the cursor to a previous line after a line wrap.
- You cannot insert a character if the insertion would force a line wrap or if a tab follows the current cursor position.
- You cannot delete a word at the beginning of a line after a line wrap.
- You cannot assign the line editing function to other keys.

Command recall, initiated by Ctrl/B or the up arrow, returns the last line entered to the command-line buffer. At this point, you edit or reenter the line by pressing the Return key. DCL extends command recall to the last 20 commands by using the TRM$M_TM_NORECALL modifier to disable the terminal driver's recall mechanism.

Any control key that is not defined by line editing is ignored. For application programs that require control key input but do not perform QIO functions with special read modifiers, the SET TERMINAL/NOLINE_EDIT DCL command restores most of the terminal driver behavior described under OpenVMS Versions 3.0 through 3.7.

#### 5.2.1.2 Control Characters and Special Keys

A control character is a character that controls action at the terminal rather than passing data to a process. An ASCII control character has a code between 0 and 31, and 127 (hexadecimal 0 through 1F, and 7F); that is, all normal control characters plus DELETE. (Table C-1 lists the numeric values for all control characters.)

You enter some control characters at the terminal by simultaneously pressing the Ctrl key and a character key, such as Ctrl/x. Table 5-2 lists the terminal control characters. You can change control character echo strings (Ctrl/C, Ctrl/Y, Ctrl/O, and Ctrl/Z) on a systemwide basis (refer to the OpenVMS System Management Utilities Reference Manual). You enter special keys, such as Return, Line Feed, and Escape, by pressing a single key.

Several of the control characters do not function as described if the DCL command SET TERMINAL/LINE_EDIT is not specified. Refer to the OpenVMS DCL Dictionary for information on line editing function keys and the SET TERMINAL command.

Table 5-2 Terminal Control Characters
Control Character | Meaning
--- | ---
Cancel (Ctrl/C---F6 1) | Gains the attention of the enabling process if the user program has enabled a Ctrl/C AST. If a Ctrl/C AST is not enabled, Ctrl/C is converted to Ctrl/Y (see Section 5.4.3.2). The terminal performs a carriage-return/line-feed combination (carriage return followed by a line feed), echoes CANCEL, and performs another carriage-return/line-feed combination. If the terminal has the ReGIS characteristic or if Ctrl/Y is pressed, the cancel ReGIS escape sequence is sent. Additional consequences of Ctrl/C are as follows: The type-ahead buffer is emptied. Ctrl/S and Ctrl/O are reset. All queued and in-progress write operations and all in-progress read operations are successfully completed. The status return is SS$_CONTROLC, or SS$_CONTROLY if Ctrl/C is converted to Ctrl/Y.
Delete character (DELETE) | Removes the last character entered from the input stream. DELETE (decimal 127 or hexadecimal 7F) is ignored if there are currently no input characters. Hardcopy terminals echo the deleted character enclosed in backslashes. For example, if the character z is deleted, \z\ is echoed (the second backslash is echoed after the next non-DELETE character is entered). Terminals that have the TT$M_SCOPE characteristic echo DELETE by removing the character.
Delete line (Ctrl/U) | Purges current input data. When Ctrl/U is entered before the end of a read operation, the current input line is deleted. (In the case of a line wrap, Ctrl/U deletes only a line at a time.) If line editing is enabled (SET TERMINAL/LINE_EDIT is specified), the data from the beginning of the line to the current cursor position is deleted.
Delete word (Ctrl/J or F13) (Line feed) | Deletes the word before the cursor. Word terminators are all control characters, space, comma, dash, period, and ! " # $ & ' ( ) + @ [ \ ] ^ { | ~ / : ; <> = ? (see Appendix C).
Discard output (Ctrl/O) | Discards output. Action is immediate. All output is discarded until the next read operation, the next write operation with a IO$M_CANCTRLO modifier, or the receipt of the next Ctrl/O. The terminal echoes OUTPUT OFF. The current write operation (if any) and write operations performed while Ctrl/O is in effect are completed with a status return of SS$_CONTROLO. A second Ctrl/O, which reenables output, echoes OUTPUT ON. Ctrl/C, Ctrl/Y, and Ctrl/T cancel Ctrl/O.
End of line (Ctrl/E) | Moves the cursor to the end of the line.
Exit (Ctrl/Z or F10) | Echoes EXIT when Ctrl/Z is entered as a read terminator. By convention, Ctrl/Z constitutes end-of-file.
Interrupt (Ctrl/Y) | Ctrl/Y is a special interrupt or attention character that is used to invoke the command interpreter for a logged-in process. Ctrl/Y can be enabled with an IO$M_CTRLYAST function modifier to a IO$_SETCHAR or IO$_SETMODE function code. The command interpreter's Ctrl/Y AST handler always takes precedence over a user program's Ctrl/Y AST handler. Entering Ctrl/Y results in an AST to an enabled process to signify that the user entered Ctrl/Y from the terminal. The terminal performs a carriage-return/line-feed combination, echoes INTERRUPT, and performs another carriage-return/line-feed combination if the AST and echo are enabled. Ctrl/Y is ignored (and not echoed) if the process is not enabled for the AST. Additional consequences of Ctrl/Y are as follows: The type-ahead buffer is flushed. Ctrl/S and Ctrl/O are reset. All queued and in-progress write operations and all in-progress read operations are successfully completed with a 0 transfer count. The status return is SS$_CONTROLY. The cancel ReGIS escape sequence is sent.
Move cursor left (Ctrl/D <-) | Moves the cursor one position to the left.
Move cursor right (Ctrl/F ->) | Moves the cursor one position to the right.
Move cursor to beginning of line (Ctrl/H or F12) (Backspace) | Moves the cursor to the beginning of the line.
Purge type-ahead (Ctrl/X) | Purges the type-ahead buffer and performs a Ctrl/U operation. Action is immediate. If a read operation is in progress, the operation is equivalent to Ctrl/U.
Recall (Ctrl/B or up arrow) | Recalls the last command entered. DCL extends recall to several commands.
Redisplay input (Ctrl/R) | Redisplays current input. When Ctrl/R is entered during a read operation, a carriage-return/line-feed combination is echoed on the terminal, and the current contents of the input buffer are displayed. If the current operation is a read with prompt (IO$_READPROMPT) operation, the current prompt string is also displayed. Ctrl/R has no effect if the characteristic TT$M_NOECHO is set.
Restart output (Ctrl/Q) | Controls data flow; used by terminals and the driver. Restarts data flow to and from a terminal if previously stopped by Ctrl/S. The action occurs immediately with no echo. Ctrl/Q is also used to solicit read operations. Ctrl/Q is meaningless if the line does not have the characteristic TT$M_TTSYNC, the characteristic TT$M_READSYNC, or is not currently stopped by Ctrl/S.
RET (Return) | If used during a read (input) operation, RET echoes a carriage-return/line-feed combination. All carriage returns are filled on terminals with TT$M_CRFILL specified.
Stop output (Ctrl/S) | Controls data flow; used by both terminals and the terminal driver. Ctrl/S stops all data flow; the action occurs immediately with no echo. Ctrl/S is also used to stop read operations. Ctrl/S is meaningful only if the terminal has either the TT$M_TTSYNC characteristic or the TT$M_READSYNC characteristic.
TAB (Ctrl/I) | Tabs horizontally. Advances to the next tab stop on terminals with the characteristic TT$M_MECHTAB, but the terminal driver assumes tab stops on MODULO 8 (multiples of 8) cursor positions. On terminals without this characteristic, enough spaces are output to move the cursor to the next MODULO 8 position.
Status (Ctrl/T) | Displays the current time. Ctrl/T also displays the current node and user name, the name of the image that is running, and information about system resources that have been used during the current terminal session.
Toggle insert/overstrike (Ctrl/A or F14) | Changes current edit mode from insert to overstrike, or from overstrike to insert. The default mode (as set with SET TERMINAL/LINE_EDIT) is reset at the beginning of each line.

1F6 on the LK201 is Interrupt/Cancel.

#### 5.2.1.3 Read Verify

The read verify instructions provided by the terminal driver allow validation of data as each character is entered. Invalid characters are not echoed and terminate the operation. The terminal driver does not support full function field processing. Large data entry applications should use one of the DECforms, FMS, or TDMS layered products, which support the entire data entry environment. Section 5.4.1.4 describes the supported primitives.

Note ##### 1 Compaq suggests that new users specify overstrike mode.

Previous | Next | Contents | Index

| privacy and legal statement |
6136PRO_015.HTML