VT102 User Guide

5 Received Character Processing

General

This chapter describes how the VT102 processes received characters. There are two types of received characters, display characters and control functions. The chapter covers all display characters and control functions used by the terminal.

Received Characters

The terminal processes characters according to American National Standards Institute (ANSI) standards X3.64-1979, X3.4-1977, and X3.41-1974. ANSI standard X3.4 defines the American Standard Code for Information Interchange (ASCII). Table 5-1 shows each ASCII character with its binary, octal, decimal, and hexadecimal values. ASCII corresponds to the International Standards Organization (ISO) Standard 646 and International Telegraph and Telephone Consultative Committee (CCITT) Alphabet 5.

The terminal processes a received character based on character types defined by ANSI. Position in the ASCII table tells you whether a character is a control function or display character. The ASCII table is 8 columns wide and 16 rows long. The control functions are in columns 0 and 1. The display characters are in columns 2 through 7. However, the terminal uses space (SP) as either an information separator control function or display character. Delete (DEL) is always a control function.

Table 5-1 ASCII Table
ASCII Table B7 B6 B5 B4 B3 B2 B1 BITS 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 COLUMN (XON) (XOFF) ESC 33271B OCTALDECIMALHEX ASCII CHARACTER KEY NUL 000 SOH 111 STX 222 ETX 333 EOT 444 ENQ 555 ACK 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F DLE 201610 DC1 211711 DC2 221812 DC3 231913 DC4 242014 NAK 252115 SYN 262216 ETB 272317 CAN 302418 EM 312519 SUB 32261A ESC 33271B FS 34281C GS 35291D RS 36301E US 37311F SP 403220 ! 413321 " 423422 # 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F @ 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A [ 133915B \ 134925C ] 135935D ^ 136945E _ 137955F ` 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A { 1731237B | 1741247C } 1751257D ~ 1761267E DEL 1771277F MA-7246

Display Characters

Display characters are received characters displayed on the screen. The actual character displayed depends on the character set selected. You select the character set by using control functions. See Character Sets and Selection in this chapter for more information.

Control Characters

These single-character control functions start, modify, or stop terminal operations; the control functions are not displayed. Table 5-2 defines the control characters recognized by the terminal. All other control characters are ignored.

Each control character in this chapter has a mnemonic, listed in Table 5-2. The mnemonic is an abbreviation of the control character name.

Table 5-2 Control Characters Recognized by VT102
Character Mnemonic Octal Code Function
Null NUL 000 Ignored when received (not stored in input buffer) and used as a fill character.
End of text ETX 003 Can be selected as a half-duplex turnaround character.
End of transmission EOT 004 Can be selected as a disconnect character or half-duplex turnaround character. When used as a turnaround character, the disconnect character is DLE-EOT.
Enquire ENQ 005 Transmits answerback message.
Bell BEL 007 Generates bell tone.
Backspace BS 010 Moves cursor to the left one character position; if cursor is at left margin, no action occurs.
Horizontal tab HT 011 Moves cursor to next tab stop, or to right margin if there are no more tab stops.
Linefeed LF 012 Causes a linefeed or a new line operation. (See Linefeed/New Line). Also causes printing if auto print operation is selected.
Vertical tab VT 013 Processed as LF.
Form feed FF 014 Processed as LF. FF can also be selected as a half-duplex turnaround character.
Carriage return CR 015 Moves cursor to left margin on current line. CR can also be selected as a half-duplex turnaround character.
Shift out SO 016 Selects G1 character set designated by a select character set sequence.
Shift in SI 017 Selects G0 character set designated by a select character set sequence.
Device control 1 DC1 021 Processed as XON. DC1 causes terminal to continue transmitting characters.
Device control 3 DC3 023 Processed as XOFF. DC3 causes terminal to stop transmitting all characters except XOFF and XON. DC3 can also be selected as a half-duplex turnaround character.
Cancel CAN 030 If received during an escape or control sequence, cancels the sequence and displays substitution character ( ).
Substitute SUB 032 Processed as CAN.
Escape ESC 033 Processed as a sequence introducer.

Escape and Control Sequences

Escape and control sequences provide additional control functions not provided by the single-character controls of the character set. These multiple-character sequences are not displayed; instead, they control terminal operation. Escape and control sequences are defined by ANSI X3.41-1977 and X3.64-1979. See Appendix D for more information about sequences and sequence formats.

The terminal provides upward and downward software compatibility. It can respond to control functions created to meet private DIGITAL standards and present ANSI standards. Therefore, you can use existing software designed for previous terminals (such as the VT52), or new software designed for ANSI standards. However, future video terminals may not accept private DIGITAL sequences. Therefore, all new software should use ANSI-compatible sequences.

The terminal uses VT52 mode to respond to private DIGITAL sequences like a VT52 terminal.

The terminal uses ANSI mode to respond to a subset of control functions specified by ANSI. All control functions not presently specified by ANSI are created to comply with the extensions permitted by ANSI standards. These sequences are considered ANSI private sequences.

The ANSI-compatible control functions in this user guide have a mnemonic assigned by ANSI. If the control function is an ANSI private control function (defined by DIGITAL), the mnemonic begins with DEC. The escape and control sequences shown here use ASCII characters. You must type the characters in the sequences exactly as shown (upper or lowercase). The text provides the octal equivalent of each character in the sequence as a second reference. See Table 5-1 for decimal and hexadecimal representations.

The following section groups sequences by software compatibility (ANSI or VT52) and function (Table 5-3). Appendix C summarizes all control functions.

Error Recovery

Current standards do not specify the action performed when the terminal receives a control function with an error. Errors are incorrect parameters, invalid control functions, or control characters embedded in control function sequences. The terminal usually recovers from these errors by performing as much of the function as possible. The specific error recovery procedures are as follows.

Table 5-3 Escape and Control Sequences
ANSI-Compatible Sequences
SET-UP Feature and Mode Selection
  • Set mode (SM) and reset mode (RM)
ANSI/VT52 Compatibility
  • ANSI/VT52 mode (DECANM)
Scrolling
  • Scroll mode (DECSCLM)
Scrolling Region
  • Set top and bottom margins (DECSTBM)
Origin
  • Origin mode (DECOM)
Cursor Positioning
  • Cursor up (CUU)
  • Cursor down (CUD)
  • Cursor forward (CUF)
  • Cursor backward (CUB)
  • Cursor position (CUP)
  • Horizontal and vertical position (HVP)
  • Index (IND)
  • Reverse index (RI)
  • Next line (NEL)
  • Save cursor (DECSC)
  • Restore cursor (DECRC)
Columns Per Line
  • Column mode (DECCOLM)
Auto Wrap
  • Auto wrap mode (DECAWM)
Screen Background
  • Screen mode (DECSCNM)
Linefeed/New Line
  • Linefeed/new line mode (LNM)
Keyboard Action
  • Keyboard action mode (KAM)
Auto Repeat
  • Auto repeat mode (DECARM)
Local Echo
  • Send-receive mode (SRM)
Cursor Key Character Selection
  • Cursor key mode (DECCKM)
Keypad Character Selection
  • Numeric keypad (DECKPNM)
  • Application keypad (DECKPAM)
Character Sets and Selection
  • Select character set (SCS)
  • Single shift 2 (SS2)
  • Single shift 3 (SS3)
Character Attributes
  • Select graphic rendition (SGR)
Tab Stops
  • Horizontal tab set (HTS)
  • Tabulation clear (TBC)
Line Attributes
  • Double-height line (DECDHL)
  • Single-width line (DECSWL)
  • Double-width line (DECDWL)
Erasing
  • Erase in line (EL)
  • Erase in display (ED)
Computer Editing
  • Delete character (DCH)
  • Insert line (IL)
  • Delete line (DL)
Inserting and Replacing Characters
  • Insertion-replacement mode (IRM)
Printing
  • Media copy (MC)
Printer Extent
  • Printer extent mode (DECPEX)
Print Termination Character
  • Printer form feed mode (DECPFF)
Reports
  • Device status report (DSR)
  • Cursor position report (CPR)
  • Device attributes (DA)
  • Identify terminal (DECID)
Reset
  • Reset to initial state (RIS)
Tests
  • Invoke confidence test (DECTST)
Adjustments
  • Screen alignment display (DECALN)
Keyboard indicator
  • Load LED (DECLL)
VT52-Compatible Sequences
Modes
ANSI/VT52 Compatibility
  • ANSI mode (DECANM)
Cursor Positioning
  • Cursor up
  • Cursor down
  • Cursor right
  • Cursor left
  • Cursor to home
  • Direct cursor address
  • Reverse linefeed
Keypad Character Selection
  • Application keypad mode
  • Numeric keypad mode
Character Sets and Selection
  • Enter graphics mode
  • Exit graphics mode
Erasing
  • Erase to end of line
  • Erase to end of screen
Printing
  • Auto print
  • Print controller
  • Print cursor line
  • Print screen
Reports
  • Identify

ANSI-Compatible Sequences

ANSI-compatible sequences meet ANSI standards X3.64-1979 and X3.41-1974. This section describes the ANSI control functions used by the terminal. You can select ANSI compatibility from the keyboard in SET-UP (Chapter 3) or have the computer use a sequence. (See VT52-Compatible Sequences in this chapter).

SET-UP Feature and Mode Selection

SET-UP features change how the terminal operates. You can select these features from the keyboard in SET-UP. The computer can select some SET-UP features by using control functions. However, features selected by the computer are stored in operating memory. The computer cannot store feature selections in user memory. (See Chapter 3 for more information about SET-UP feature memories).

Some SET-UP features are modes. A mode affects terminal operation. The terminal uses the selected mode until you or the computer change the selection. Table 5-4 lists SET-UP features and modes. The computer changes modes by using set mode (SM) and reset mode (RM) sequences. Set and reset the terminal modes by using the following sequences.

NOTE: Ps represents a variable parameter selected from a list of parameters. A series of asterisks (***) represent the parameter in the octal sequence. The parameter is transmitted using ASCII characters. When you set several modes with a single SM or RM sequence, a semicolon (;, octal 073) separates parameters.

Set Mode

ESC  [  Ps   ;  ...  ;  Ps   h
033 133 *** 073     073 *** 150

Sets one or more modes specified by selective parameters (Ps) in the parameter string.

Reset Mode (RM)

ESC  [  Ps   ;  ...  ;  Ps   l
033 133 *** 073     073 *** 154

Resets one or more modes specified by selective parameters (Ps) in the parameter string.

Table 5-4 SET-UP Features and Modes
SET-UP Feature or Mode Change from Computer Change from Keyboard in SET-UP
On/off line No Yes
Screen brightness No Yes
Columns per line Yes (DECCOLM) Yes
Tab stops Yes (HTS/TBC)* Yes
Scroll Yes (DECSCLM) Yes
Auto repeat Yes (DECARM) Yes
Screen background Yes (DECSCNM) Yes
Cursor No Yes
Margin bell No Yes
Keyclick No Yes
ANSI/VT52 Yes (DECANM) Yes
Auto XON/XOFF No Yes
US/UK character set Yes (SCS)* Yes
Auto wrap Yes (DECAWM) Yes
Linefeed/new line Yes (LNM) Yes
Local echo Yes (SRM) Yes
Print termination character Yes (DECPFF) Yes
Printer extent Yes (DECPEX) Yes
One or two stop bits No Yes
Receive parity No Yes
Break enable No Yes
Disconnect character enable No Yes
Disconnect delay No Yes
Auto answerback enable No Yes
Initial direction No Yes
Auto turnaround No Yes
Power No Yes
WPS terminal No Yes
Clock No Yes
Modem data/parity bits No Yes
Transmit speed No Yes
Receive speed No Yes
Modem control No Yes
Turnaround/​disconnect character No Yes
Printer data/​parity bits No Yes
Transmit/​receive speed No Yes
Application keypad mode/numeric keypad mode Yes (DECKPAM/​DECKPNM)* No
Cursor key mode Yes (DECCKM) No
Origin mode Yes (DECOM) No
Insertion-replacement mode Yes (IRM) No
* These features are not changed using the set mode (SM) and reset mode (RM) sequences.

Table 5-5 lists the ANSI-specified modes and their selective parameters (Ps). Table 5-6 lists the ANSI-compatible private modes and their selective parameters. When you change ANSI-compatible private modes, the first character in the parameter string is a question mark (?, octal 077). All parameters in the sequence are interpreted as ANSI compatible private parameters. This chapter explains each mode in detail and provides the sequences to set and reset each mode.

The following example shows the use of the question mark (used with ANSI private parameters) and semicolon (used with multiple parameters). The sequence sets both column and scroll modes.

ESC  [   ?   3   ;   4   h
033 133 077 063 073 064 150

Table 5-7 describes modes specified in ANSI X3.64-1979 that are permanently set, permanently reset, or not applicable. See the ANSI standard for more information about these modes.

Table 5-5 ANSI-Specified Modes
Name Mnemonic Parameter (Ps)
Error (ignored) - 0
Keyboard action KAM 2
Insertion-replacement IRM 4
Linefeed/new line LNM 20
Table 5-6 ANSI-Compatible Private Modes
Name Mnemonic Parameter (Ps)
Error (ignored) - 0
Cursor key DECCKM 1
ANSI/VT52 DECANM 2
Column DECCOLM 3
Scroll DECSCLM 4
Screen DECSCNM 5
Origin DECOM 6
Auto wrap DECAWM 7
Auto repeat DECARM 8
Printer form feed DECPFF 18
Printer extent DECPEX 19

NOTE: The application keypad and numeric keypad modes are selected using dedicated sequences, not set and reset mode sequences. See Keypad Character Selection in this chapter for more information.

Table 5-7 Permanently Selected Modes
Name Mnemonic Selection Function
Control representation CRM Reset Terminal performs control functions with displaying a character to represent control function received.
Editing boundary EBM Reset Characters moved outside the margins are lost; terminal does not perform erasing and cursor positioning functions outside the margins. This does not affect horizontal and vertical position (HVP) and cursor position (CUP) sequences.
Erasure ERM Set All characters displayed can be erased.
Format effector action FEAM Reset Terminal immediately performs control functions that affect the screen display.
Format effector tranfer FETM N/A -
Guarded area transfer GATM N/A -
Horizontal editing HEM N/A -
Multiple area transfer MATM N/A -
Positioning unit PUM Reset Terminal specifies horizontal and vertical positioning parameters in control functions in units of characters position.
Selected area transfer SATM N/A -
Status reporting transfer SRTM Reset Terminal transmits status reports by using device status report (DSR) sequence.
Tabulation stop TSM Reset Tab stop selections apply to corresponding screen columns for all lines.
Transfer termination TTM N/A -
Vertical editing VEM N/A -
ANSI/VT52 Compatibility

ANSI/VT52 Compatibility

The terminal is compatible with both ANSI and private DIGITAL standards. Therefore, you can use new software that meets both ANSI standards, and existing software designed for previous terminals (such as the VT52).

ANSI-compatible sequences meet ANSI standards X3.64-1979 and X3.41-1974. You select ANSI compatibility by using the ANSI/VT52 mode (DECANM) sequence in VT52 mode. See VT52-Compatible Sequences in this chapter for details on selecting ANSI sequence compatibility. In ANSI mode, the following sequence selects compatibility with private DIGITAL sequences (VT52 mode).

Features and modes selected in ANSI mode are also used in VT52 mode. However, these features and modes usually cannot change in VT52 mode.

VT52 Mode (DECANM)

ESC  [   ?   2   l
033 133 077 062 154

In ANSI mode, reset selects private DIGITAL sequence compatibility. In VT52 mode, the terminal responds like a VT52 to private DIGITAL sequences.

Scrolling

Scrolling

Scrolling is the upward or downward movement of existing lines on the screen. This makes room for more display lines at either the top or bottom of the scrolling region. There are two methods of scrolling, jump scroll and smooth scroll. Select the type of scrolling by using the following sequences.

NOTE: In full-duplex communication, the auto XON/XOFF SET-UP feature prevents the loss of received characters when using smooth scroll. If auto XON/XOFF is not used, fill characters are needed.

Scroll Mode (DECSCLM)

ESC  [   ?   4   h
033 133 077 064 150

Set selects smooth scroll. Smooth scroll lets the terminal add 6 lines per second to screen (power feature = 60 Hz), or 5 lines per second (power feature = 50 Hz).

ESC  [   ?   4   l
033 133 077 064 154

Reset selects jump scroll. Jump scroll lets the terminal add lines to the screen as fast as possible.

Scrolling Region

Scrolling Region

This region is the area of the screen between the top and bottom margins. The margins determine which screen lines move during scrolling. Characters added outside the scrolling region do not cause the screen to scroll. The minimum size of the scrolling region is two lines. Therefore, the line number of the top margin must be less than the number of the bottom margin. The origin mode selects line numbers.

After the margins are selected, the cursor moves to the home position. The origin mode feature also selects the home position. Select the top and bottom margins of the scrolling region by using the following sequence.

NOTES: When you power up or use the Reset command, the scrolling region becomes the full screen.

Pt and Pb represent variable numeric parameters. The parameters are decimal numbers transmitted to the terminal as ASCII characters. Asterisks (***) represent one or more variable numeric parameters in the octal sequence.

Set Top and Bottom Margins (DECSTBM)

ESC  [  Pt   ;  Pb   r
033 133 *** 073 *** 162

Selects top and bottom margins, defining the scrolling region. Pt is line number of first line in the scrolling region. Pb is line number of bottom line. If Pt and Pb are not selected, the complete screen is used (no margins).

Origin

Origin

This mode determines if the cursor can move outside the scrolling region (the area between the top and bottom margins). You can move the cursor outside the margins with the cursor position (CUP) and horizontal and vertical position (HVP) sequences.

Lines on the screen are numbered according to the location of the home position. Home position is always line 1, column 1. The cursor moves to the new home position whenever origin mode is selected. Select origin mode by using the following sequences.

NOTE: When you power up or use the Reset command, origin mode resets.

Origin Mode (DECOM)

ESC  [   ?   6   h
033 133 077 066 150

Set selects home position in scrolling region. Line numbers start at top margin of scrolling region. The cursor cannot move out of scrolling region.

ESC  [   ?   6   l
033 133 077 066 154

Reset selects home position in upper-left corner of screen. Line numbers are independent of the scrolling region (absolute). Use CUP and HVP sequences to move cursor out of scrolling region.

Cursor Positioning

Cursor Positioning

The cursor indicates the active screen position where the next character will appear. The cursor moves:

You can also move the cursor by using the following sequences.

NOTE: Pn represents a variable numeric parameter. The parameter is a decimal number transmitted to the terminal by using ASCII characters. If you select no parameter or 0, the terminal assumes the parameter equals 1. Asterisks (***) represent one or more characters in the octal sequence.

Cursor Up (CUU)

ESC  [  Pn   A
033 133 *** 101

Moves cursor up Pn lines in same column. Cursor stops at top margin.

Cursor Down (CUD)

ESC  [  Pn   B
033 133 *** 102

Moves cursor down Pn lines in same column. Cursor stops at bottom margin.

Cursor Forward (CUF)

ESC  [  Pn   C
033 133 *** 103

Moves cursor right Pn columns. Cursor stops at right margin.

Cursor Backward (CUB)

ESC  [  Pn   D
033 133 *** 104

Moves cursor left Pn columns. Cursor stops at left margin.

NOTE: Pl and Pc represent variable numeric parameters. The parameter is a decimal number that represents one or more characters transmitted to the terminal as ASCII characters. Asterisks (***) represent the variable parameter in the octal sequence.

Cursor Position (CUP)

ESC  [  Pl   ;  Pc   H
033 133 *** 073 *** 110

Moves cursor to line Pl, column Pc. If Pl or Pc are not selected or selected as 0, the cursor moves to first line or column, respectively. Origin mode (DECOM) selects line numbering and ability to move cursor into margins.

NOTE: CUP operates the same as the horizontal and vertical position (HVP) sequence.

Cursor Position (Home) (CUP)

ESC  [   H
033 133 110

Moves cursor to home position, selected by origin mode (DECOM).

Horizontal and Vertical Position (HVP)

ESC  [  Pl   ;  Pc   f
033 133 *** 073 *** 146

Moves cursor to line Pl, column Pc. If Pl or Pc are not selected or selected as 0, the cursor moves to first line or column, respectively. Origin mode (DECOM) selects line numbering and ability to move the cursor into margins.

NOTE: HVP operates the same as the cursor position (CUP) sequence.

Horizontal and Vertical Position (Home) (HVP)

ESC  [   f
033 133 146

Cursor moves to home position selected by origin mode (DECOM).

Index (IND)

ESC  D
033 104

Moves cursor down one line in same column. If cursor is at bottom margin, screen performs a scroll-up.

Reverse Index (RI)

ESC  M
033 115

Moves cursor up one line in same column. If cursor is at top margin, screen performs a scroll-down.

Next Line (NEL)

ESC  E
033 105

Moves cursor to first position on next line. If cursor is at bottom margin, screen performs a scroll-up.

Save Cursor (DECSC)

ESC  7
033 067

Saves cursor position, character attribute (graphic rendition), character set, and origin mode selection. (See restore cursor).

Restore Cursor (DECRC)

ESC  8
033 070

Restores previously saved cursor position, character attribute (graphic rendition), character set, and origin mode selection. If none were saved, the cursor moves to home position.

Columns Per Line

Columns Per Line

This mode selects the number of columns in a display line, 80 or 132. With either selection, the screen can display 24 lines. Select the number of columns per line by using the following sequences.

NOTE: When you change the number of columns per line, the screen is erased. This also sets the scrolling region for full screen (24 lines).

Column Mode (DECCOLM)

ESC  [   ?   3   h
033 133 077 063 150

Set selects 132 columns per line.

ESC  [   ?   3   l
033 133 077 063 154

Reset selects 80 columns per line.

Auto Wrap

Auto Wrap

This mode selects where a received character will appear when the cursor is at the right margin. Select auto wrap by using the following sequences.

NOTE: Regardless of the auto wrap SET-UP feature selection, the tab character never moves the cursor to the next line.

Auto Wrap Mode (DECAWM)

ESC  [   ?   7   h
033 133 077 067 150

Set selects auto wrap. Any display characters received when cursor is at right margin appear on next line. The display scrolls up if cursor is at end of scrolling region.

ESC  [   ?   7   l
033 133 077 067 154

Reset turns auto wrap off. Display characters received when cursor is at right margin replace previously displayed character.

Screen Background

Screen Background

This mode selects either light (reverse) or dark display background on the screen. Select screen mode by using the following sequences.

Screen Mode (DECSCNM)

ESC  [   ?   5   h
033 133 077 065 150

Set selects reverse screen, a white screen background with black characters.

ESC  [   ?   5   l
033 133 077 065 154

Reset selects normal screen, a black screen background with white characters.

Linefeed/New Line

Linefeed/New Line

This mode selects the control character(s) transmitted by RETURN. Linefeed/new line also selects the action taken by the terminal when receiving linefeed, form feed, and vertical tab. Table 5-8 provides a summary of the feature. Select linefeed/new line mode by using the following sequences.

Linefeed/New Line Mode (LNM)

ESC  [   2   0   h
033 133 062 060 150

Set causes a received linefeed, form feed, or vertical tab to move cursor to first column of next line. RETURN transmits both a carriage return and linefeed. This selection is also called new line option.

ESC  [   2   0   l
033 133 062 060 154

Reset causes a received linefeed, form feed, or vertical tab to move cursor to next line in current column. RETURN transmits a carriage return.

Table 5-8 Linefeed/New Line Feature
Feature Selection Key Pressed - Character Sent Character Received - Function
Off RETURN - CR CR - Cursor moves to left margin
Off LINE FEED - LF LF, FF, VT - Cursor moves to next line but stays in same column
On RETURN - CR LF CR - Cursor moves to left margin
On LINE FEED - LF LF, FF, VT - Cursor moves to left margin of next line
Keyboard Action (FDX)

Keyboard Action (FDX)

This mode is only used during full-duplex, not half-duplex communication. Keyboard action lets the computer turn the keyboard on or off. This mode always resets when you enter SET-UP. Select keyboard action mode by using the following sequences.

Keyboard Action Mode (KAM)

ESC  [   2   h
033 133 062 150

Set turns off keyboard and turns on KBD LOCKED.

ESC  [   2   l
033 133 062 154

Reset turns on keyboard and turns off KBD LOCKED.

Auto Repeat

Auto Repeat

This mode selects automatic key repeating. A key pressed for more than one-half second automatically repeats the transmission of the character. Key repeating does not affect SET-UP, ESC, RETURN, ENTER, NO SCROLL, and CTRL. Select auto repeat mode by using the following sequences.

Auto Repeat Mode (DECARM)

ESC  [   ?   8   h
033 133 077 070 150

Set selects auto repeat. A key pressed for more than one-half second automatically repeats.

ESC  [   ?   8   l
033 133 077 070 154

Reset turns off auto repeat. Keys do not automatically repeat.

Local Echo (Keyboard Send-Receive)

Local Echo (Keyboard Send-Receive)

This mode selects local echo, which causes every character transmitted by the terminal to automatically appear on the screen. Therefore, the computer does not have to transmit (echo) the character back to the terminal for display. When local echo is off, the terminal only transmits characters to the computer. The computer must echo the characters back to the terminal for display. Select send-receive mode by using the following sequences.

Send-Receive Mode (SRM)

ESC  [   1   2   h
033 133 061 062 150

Set turns off local echo. The terminal transmits characters to the computer, which must echo characters for display on screen.

ESC  [   1   2   l
033 133 061 062 154

Reset selects local echo. Characters transmitted to the computer automatically appear on the screen.

Cursor Key Character Selection

Cursor Key Character Selection

In application keypad mode (DECKPAM), cursor key mode selects the set of characters transmitted by the cursor keys. In numeric keypad mode (DECKPNM), cursor key mode resets and cannot change. See Table 5-9 for the codes transmitted by the cursor keys. Select cursor key mode by using the following sequences.

NOTE: When you power up or use a Reset command, cursor key mode resets. This mode also resets during a communication line connection in all communication except full-duplex no modem control (FDX A). See Chapter 6 for more information about communication.

Cursor Key Mode (DECCKM)

ESC  [   ?   1   h
033 133 077 061 150

Set selects cursor keys to generate control (application) functions.

ESC  [   ?   1   l
033 133 077 061 154

Reset selects cursor keys to generate ANSI cursor control sequences.

Table 5-9 ANSI Cursor Control Key Codes
Cursor Key Cursor Key Mode Reset Cursor Key Mode Set
ESC  [  A
033 133 101
ESC  O  A
033 117 101
ESC  [  B
033 133 102
ESC  O  B
033 117 102
ESC  [  C
033 133 103
ESC  O  C
033 117 103
ESC  [  D
033 133 104
ESC  O  D
033 117 104
Keypad Character Selection

Keypad Character Selection

The numeric keypad generates either numeric characters or control functions. Selecting application or numeric keypad mode determines the type of characters. The keypad mode also affects the cursor keys. See Cursor Key Character Selection in this chapter for more information. The program function (PF) keys generate the same characters regardless of the keypad character selection. See Table 5-10 for the characters generated by the keypad. Select the keypad mode by using the following sequences.

NOTE: When you power up or use a Reset command, the terminal selects numeric keypad mode. This mode is also selected during communication line connections, except full-duplex no modem control (FDX A). See Chapter 6 for more information about communication line connections.

Application Keypad Mode (DECKPAM)

ESC  =
033 075

Selects application keypad mode. Keypad generates control functions. Cursor key mode (DECCKM) selects type of characters generated by cursor keys.

Numeric Keypad Mode (DECKPNM)

ESC  >
033 076

Selects numeric keypad mode. Keypad generates characters that match the numeric, comma, period, and minus sign keys on main keyboard. Cursor keys generate ANSI cursor control sequences.

Table 5-10 ANSI Keypad Codes
Key Numeric Keypad Mode Application Keypad Mode
0 0
060
ESC  O   p
033 117 160
1 1
061
ESC  O   q
033 117 161
2 2
062
ESC  O   r
033 117 162
3 3
063
ESC  O   s
033 117 163
4 4
064
ESC  O   t
033 117 164
5 5
065
ESC  O   u
033 117 165
6 6
066
ESC  O   v
033 117 166
7 7
067
ESC  O   w
033 117 167
8 8
070
ESC  O   x
033 117 170
9 9
071
ESC  O   y
033 117 171
- (minus) - (minus)
055
ESC  O   m
033 117 155
, (comma) , (comma)
054
ESC  O   l
033 117 154
. (period) . (period)
056
ESC  O   n
033 117 156
ENTER* CR or CR LF
015 or 015 012
ESC  O   M
033 117 115
PF1
ESC  O   P
033 117 120
ESC  O   P
033 117 120
PF2
ESC  O   Q
033 117 121
ESC  O   Q
033 117 121
PF3
ESC  O   R
033 117 122
ESC  O   R
033 117 122
PF4
ESC  O   S
033 117 123
ESC  O   S
033 117 123

NOTE: In ANSI mode, if the codes are echoed back to the terminal or if the terminal is off-line, the last character of the sequence appears on the screen; for example, PF4 appears as an "S".

* In numeric keypad mode, ENTER generates the same characters as RETURN. You can change the RETURN key character code with the line feed/new line feature. When off, this feature causes the key to generate a single control character (CR, octal 015). When on, this feature causes the key to generate two characters (CR, octal 015 and LF, octal 012).

Character Sets and Selection

Character Sets and Selection

The terminal can display up to 254 different characters; however, the terminal only holds 127 display characters in basic read only memory (ROM). You must install an alternate character set ROM for the remaining 127 display characters.

The terminal can select only 94 characters (one character set) at a time. Therefore, the terminal uses the following five character sets, with some characters appearing in more than one set.

Tables 5-11 through 5-13 show the character sets. The United States and United Kingdom character sets meet the standard of the "ISO international register of character sets to be used with escape sequences". The space (SP) and control characters are the same in all sets.

The terminal uses two active character sets at any one time. The computer designates these sets as G0 and G1, using the select character set (SCS) sequence. Then a single control character can switch between sets. Shift In (SI, octal 017) invokes the G0 character set; shift out (SO, octal 016) invokes the G1 character set.

Table 5-11 United Kingdom Character Set
United Kingdom Character Set B7 B6 B5 B4 B3 B2 B1 BITS 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 COLUMN (XON) (XOFF) ESC 33271B OCTALDECIMALHEX ASCII CHARACTER KEY NUL 000 111 222 ETX 333 EOT 444 ENQ 555 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F 201610 DC1 211711 221812 DC3 231913 242014 252115 262216 272317 CAN 302418 312519 SUB 32261A ESC 33271B 34281C 35291D 36301E 37311F SP 403220 ! 413321 " 423422 £ 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F @ 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A [ 133915B \ 134925C ] 135935D ^ 136945E _ 137955F ` 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A { 1731237B | 1741247C } 1751257D ~ 1761267E 1771277F MA-7248A
Table 5-12 United States Character Set
United States Character Set B7 B6 B5 B4 B3 B2 B1 BITS 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 COLUMN (XON) (XOFF) ESC 33271B OCTALDECIMALHEX ASCII CHARACTER KEY NUL 000 111 222 ETX 333 EOT 444 ENQ 555 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F 201610 DC1 211711 221812 DC3 231913 242014 252115 262216 272317 CAN 302418 312519 SUB 32261A ESC 33271B 34281C 35291D 36301E 37311F SP 403220 ! 413321 " 423422 # 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F @ 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A [ 133915B \ 134925C ] 135935D ^ 136945E _ 137955F ` 1409660 a 1419761 b 1429862 c 1439963 d 14410064 e 14510165 f 14610266 g 14710367 h 15010468 i 15110569 j 1521066A k 1531076B l 1541086C m 1551096D n 1561106E o 1571116F p 16011270 q 16111371 r 16211472 s 16311573 t 16411674 u 16511775 v 16611876 w 16711977 x 17012078 y 17112179 z 1721227A { 1731237B | 1741247C } 1751257D ~ 1761267E 1771277F MA-7247C
Table 5-13 Special Characters and Line Drawing Character Set
Special Characters and Line Drawing Character Set B7 B6 B5 B4 B3 B2 B1 BITS 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 ROW 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 COLUMN (XON) (XOFF) ESC 33271B OCTALDECIMALHEX ASCII CHARACTER KEY NUL 000 111 222 ETX 333 EOT 444 ENQ 555 666 BEL 777 BS 1088 HT 1199 LF 1210A VT 1311B FF 1412C CR 1513D SO 1614E SI 1715F 201610 DC1 211711 221812 DC3 231913 242014 252115 262216 272317 CAN 302418 312519 SUB 32261A ESC 33271B 34281C 35291D 36301E 37311F SP 403220 ! 413321 " 423422 # 433523 $ 443624 % 453725 & 463826 ' 473927 ( 504028 ) 514129 * 52422A + 53432B , 54442C - 55452D . 56462E / 57472F 0 604830 1 614931 2 625032 3 635133 4 645234 5 655335 6 665436 7 675537 8 705638 9 715739 : 72583A ; 73593B < 74603C = 75613D > 76623E ? 77633F @ 1006440 A 1016541 B 1026642 C 1036743 D 1046844 E 1056945 F 1067046 G 1077147 H 1107248 I 1117349 J 112744A K 113754B L 114764C M 115774D N 116784E O 117794F P 1208050 Q 1218151 R 1228252 S 1238353 T 1248454 U 1258555 V 1268656 W 1278757 X 1308858 Y 1318959 Z 132905A [ 133915B \ 134925C ] 135935D ^ 136945E 137955F 1409660 1419761 1429862 1439963 14410064 14510165 14610266 14710367 15010468 15110569 1521066A 1531076B 1541086C 1551096D 1561106E 1571116F 16011270 16111371 16211472 16311573 16411674 16511775 16611876 16711977 17012078 17112179 1721227A 1731237B 1741247C 1751257D 1761267E 1771277F (BLANK) SCAN 1 SCAN 3 SCAN 5 SCAN 7 SCAN 9 MA-7249A

The designated character sets are active until the terminal receives another SCS sequence. You can use the SCS sequence as often as needed to designate G0 and G1. Designate G0 by using the following sequences.

NOTE: The terminal uses the character set selected in SET-UP after all communication line connections, except full-duplex no modem control (FDX A). See Chapter 6 for more information about communication line connections.

Select Character Set (SCS)

ESC  (   A
033 050 101

Designates the UK character set as G0.

ESC  (   B
033 050 102

Designates the US character set as G0.

ESC  (   0
033 050 060

Designates the special characters and line drawing character set as G0.

ESC  (   1
033 050 061

Designates the alternate ROM character set as G0.

ESC  (   2
033 050 062

Designates the alternate ROM special characters character set as G0.

Designate G1 by using the following sequences.

Select Character Set (SCS)

ESC  )   A
033 051 101

Designates the UK character set as G1.

ESC  )   B
033 051 102

Designates the US character set as G1.

ESC  )   0
033 051 060

Designates the special characters and line drawing character set as G1.

ESC  )   1
033 051 061

Designates the alternate ROM character set as G1.

ESC  )   2
033 051 062

Designates the alternate ROM special characters character set as G1.

The terminal also has G2 and G3 character sets. However, these are always the default (selected in SET-UP) character sets. You select G2 and G3 for only one character at a time. The terminal returns to the previous character set after displaying a single character. Select G2 and G3 for one character by using the following sequences.

Single Shift 2 (SS2)

ESC  N
033 116

Selects G2 (default) character set for one character. You select G2 in SET-UP.

Single Shift 3 (SS3)

ESC  O
033 117

Selects G3 (default) character set for one character. You select G3 in SET-UP.

The terminal can transmit characters displayed on the screen to the optional serial printer. When transmitting characters to the printer, the terminal attempts to select the correct character set. If the printer does not support multiple character sets, using multiple character sets causes unexpected characters to print. Remember the following rules when the terminal transmits characters from more than one character set.

Before transmitting characters to the printer, the terminal must determine the character set selected. If the character is not in the currently selected G0 character set, the character sets are searched as follows.

  1. US/UK (selected in SET-UP)
  2. US/UK (not selected in SET-UP)
  3. Special characters and line drawing
  4. Alternate ROM
  5. Alternate ROM special characters

NOTE: The substitute character appears on the screen when the terminal receives a parity error, the SUB or CAN control characters, and the (octal 141) character in the special character and line drawing character set. The terminal always transmits the substitute character to the printer as the SUB (octal 032) character.

Character Attributes

Character Attributes

The terminal can display the following character attributes that change the character display without changing the character.

You can select one or more character attributes at one time. Selecting an attribute does not turn off other attributes already selected. After you select an attribute, all characters received by the terminal appear with that attribute. If you move the characters by scrolling, the attribute moves with the characters. Select the character attributes by using the following sequences.

Select Graphic Rendition (SGR)

ESC  [   m   or  ESC  [   0   m
033 133 155      033 133 060 155

Turns off character attributes.

ESC  [   1   m
033 133 061 155

Selects bold (increased intensity).

ESC  [   4   m
033 133 064 155

Selects underline.

ESC  [   5   m
033 133 065 155

Selects blink.

ESC  [   7   m
033 133 067 155

Selects reverse video.

Tab Stops

Tab Stops

You select tab stop positions on the horizontal lines of the screen. The cursor advances (tabs) to the next tab stop when the terminal receives a horizontal tab (HT, octal 011). If no tab stops are set, horizontal tab moves the cursor to the right margin. Set and clear the tab stops by using the following sequences.

Horizontal Tabulation Set (HTS)

ESC  H
033 110

Sets a horizontal tab stop at cursor position.

Tabulation Clear (TBC)

ESC  [   g   or  ESC  [   0   g
033 133 147      033 133 060 147

Clears a horizontal tab stop at cursor position.

ESC  [   3   g
033 133 063 147

Clears all horizontal tab stops.

Line Attributes

Line Attributes

These are display features that affect a complete display line. The cursor selects the line affected by the attribute. The cursor stays in the same character position when the attribute changes. However, if the attribute would move the cursor past the right margin, the cursor stops at the right margin. When you move lines on the screen by scrolling, the attribute moves with the line. Select line attributes by using the following sequences.

NOTE: If you erase an entire line by using the erase in display (ED) sequence, the line attribute changes to single-height and single-width.

Double-Height Line (DECDHL)

Top Half:      Bottom Half:
ESC  #   3     ESC  #   4
033 043 063    033 043 064

Makes the line with the cursor the top or bottom half of a double-height, double-width line. Sequences work in pairs on adjacent lines. The same character must be used on both lines to form full characters. If the line was single-width, single-height, all characters to the right of center are lost.

Single-Width Line (DECSWL)

ESC  #   5
033 043 065

Makes the line with the cursor single-width, single-height. This is line attribute for all new lines on screen.

Double-Width Line (DECDWL)

ESC  #   6
033 043 066

Makes the line with the cursor double-width, single-height. If the line was single-width, single-height, all characters to the right of center screen are lost.

Erasing

Erasing

Erasing removes characters from the screen without affecting other characters on the screen. Erased characters are lost. The cursor position does not change when erasing characters or lines.

If you erase a line by using the erase in display (ED) sequence, the line attribute becomes single-height, single-width. If you erase a line by using the erase in line (EL) sequence, the line attribute is not affected.

Erasing a character also erases any character attribute of the character. Erase characters by using the following sequences.

Erase In Line (EL)

ESC  [   K   or  ESC  [   0   K
033 133 113      033 133 060 113

Erases from cursor to end of line, including cursor position.

ESC  [   1   K
033 133 061 113

Erases from beginning of line to cursor, including cursor position.

ESC  [   2   K
033 133 062 113

Erases complete line.

Erase In Display (ED)

ESC  [   J   or  ESC  [   0   J
033 133 112      033 133 060 112

Erases from cursor to end of screen, including cursor position.

ESC  [   1   J
033 133 061 112

Erases from beginning of screen to cursor, including cursor position.

ESC  [   2   J
033 133 062 112

Erases complete display. All lines are erased and changed to single-width. Cursor does not move.

Computer Editing

Computer Editing

Editing allows the computer to insert or delete characters and lines of characters at the cursor position. The cursor position does not change when inserting or deleting lines. Delete characters or insert and delete lines by using the following sequences.

NOTE: Insertion-replacement mode (IRM) selects how characters are added to the screen. See Inserting and Replacing Characters in this chapter for more information.

Delete Character (DCH)

ESC  [  Pn   P
033 133 *** 120

Deletes Pn characters, starting with the character at cursor position. When a character is deleted, all characters to the right of cursor move left. This creates a space character at right margin. This character has same character attribute as the last character moved left.

Insert Line (IL)

ESC  [  Pn   L
033 133 *** 114

Inserts Pn lines at line with cursor. Lines displayed below cursor move down. Lines moved past the bottom margin are lost. This sequence is ignored when cursor is outside scrolling region.

Delete Line (DL)

ESC  [  Pn   M
033 133 *** 115

Deletes Pn lines, starting at line with cursor. As lines are deleted, lines displayed below cursor move up. Lines added to bottom of screen have spaces with same character attributes as last line moved up. This sequence is ignored when cursor is outside scrolling region.

Inserting and Replacing Characters

Inserting and Replacing Characters

The terminal displays received characters at the cursor position. This mode determines how the terminal adds characters to the screen. Insert mode displays the character and moves previously displayed characters to the right. Replace mode adds characters by replacing the character at the cursor position. Select insertion-replacement mode by using the following sequences.

NOTE: This mode resets after a communication line connection in all communication except full-duplex no modem control (FDX A). See Chapter 6 for more information about communication line connections.

Insertion-Replacement Mode (IRM)

ESC  [   4   h
033 133 064 150

Set selects insert mode and turns INSERT on. New display characters move old display characters to the right. Characters moved past the right margin are lost.

ESC  [   4   l
033 133 064 154

Reset selects replace mode and turns INSERT off. New display characters replace old display characters at cursor position. The old character is erased.

Printing

Printing

The terminal has a serial printer interface for local printing. The computer can select all print operations by using sequences. You can only select two of the print operations from the keyboard, auto print and print screen.

When you print characters from the screen, terminal and printer tab stops are ignored. Print characters are spaced with the space (SP, octal 040) character. The terminal transmits a carriage return (CR, octal 015) and linefeed (LF, octal 012) after the last printable character of a line -- but not a space character.

A line of double-height characters prints as two identical lines of single-width characters. Double-width characters print as single-width characters on a single line.

Before selecting a print operation, check the printer status by using the printer status report (DSR) in ANSI mode. Do not select a print operation if the serial printer is not ready to print. Select print operations by using the following sequences.

Media Copy (Auto Print On) (MC)

ESC  [   ?   5   i
033 133 077 065 151

Turns on auto print. A display line prints after you move cursor off the line, using a linefeed, form feed, or vertical tab (also transmitted to printer).

The line also prints during an auto wrap. Auto wrap lines end with a CR, LF.

Media Copy (Auto Print Off) (MC)

ESC  [   ?   4   i
033 133 077 064 151

Turns off auto print.

NOTE: Printer controller has a higher priority than auto print. Therefore, you can select printer controller and print characters during auto print.

Media Copy (Printer Controller On) (MC)

ESC  [   5   i
033 133 065 151

Turns on printer controller. The terminal transmits received characters to printer without displaying them. The terminal does not insert or delete spaces, provide line delimiters, or select the correct printer character set.

Media Copy (Printer Controller Off) (MC)

ESC  [   4   i
033 133 064 151

Turns off printer controller. Always move printhead to left margin before turning off printer controller.

Media Copy (Print Cursor Line) (MC)

ESC  [   ?   1   i
033 133 077 061 151

Prints display line with cursor. Cursor position does not change. Print cursor line ends when line prints.

Media Copy (Print Screen) (MC)

ESC  [   i   or  ESC  [   0   i
033 133 151      033 133 060 151

Prints the screen. Printer extent (DECEXT) selects full screen or scrolling region to print. Select scrolling region by using the set top and bottom margins (DECSTBM) sequence. Print screen ends when screen prints.

Printer Extent

Printer Extent

This mode selects the full screen or the scrolling region to print during a print screen. Select printer extent mode by using the following sequences.

Printer Extent Mode (DECPEX)

ESC  [   ?   1   9   h
033 133 077 061 071 150

Set selects the full screen to print during a print screen.

ESC  [   ?   1   9   l
033 133 077 061 071 154

Reset selects the scrolling region to print during a print screen.

Print Termination Character

Print Termination Character

This mode determines if the terminal should transmit a print termination character after a print screen. The form feed (octal 014) control character serves as the print termination character. Select printer form feed mode by using the following sequence.

Printer Form Feed Mode (DECPFF)

ESC  [   ?   1   8   h
033 133 077 061 070 150

Set selects form feed as print termination character. The terminal transmits this character to printer after each print screen.

ESC  [   ?   1   8   l
033 133 077 061 070 154

Reset selects no termination character.

Reports

Reports

The terminal transmits reports in response to computer requests. Reports determine terminal type and status, and cursor position. The report requests and responses are as follows.

NOTE: The terminal does not respond to the DSR, DA, or DECID sequences during printer controller operation.

Device Status Report (DSR)

ESC  [   5   n
033 133 065 156

Computer requests a status report (using a DSR sequence).

ESC  [   0   n
033 133 060 156

Terminal response: Ready, no malfunctions detected.

ESC  [   3   n
033 133 063 156

Terminal response: Malfunction, error in self-test. Reset and retry.

ESC  [   ?   1   5   n
033 133 077 061 065 156

Computer requests a printer status report. Terminal checks status of printer. This report should be requested before any printer operation.

ESC  [   ?   1   3   n
033 133 077 061 063 156

Printer not connected to terminal. Data terminal ready (DTR) signal of the printer has not been on since terminal turned on.

ESC  [   ?   1   1   n
033 133 077 061 061 156

Printer not ready to print. Printer DTR was on, but is now off.

ESC  [   ?   1   0   n
033 133 077 061 060 156

Printer ready to print. Printer DTR is on.

ESC  [   6   n
033 133 066 156

Computer requests a cursor position report from terminal.

Cursor Position Report (CPR)

ESC  [  Pl   ;  Pc   R
033 133 *** 073 *** 122

Terminal reports cursor position in response to DSR sequence request from computer. Pl indicates line and Pc indicates column. No parameters, or parameters of 0, indicate cursor is at home position. Origin mode (DECOM) selects line numbering.

Device Attributes (DA)

ESC  [   c   or  ESC  [   0   c
033 133 143      033 133 060 143

Computer requests terminal identify itself.

Identify Terminal (DECID)

ESC  Z
033 132

Computer requests terminal to identify itself. Terminal uses device attributes (DA) to respond. Future DIGITAL terminals may not support this sequence. Therefore, new software should use device attributes.

Device Attributes (DA)

ESC  [   ?   6   c
033 133 077 066 143

Terminal response: VT102.

Reset

Reset

Reset initializes the terminal and causes it to perform the internal power-up self-test, erase the input buffer, and use the SET-UP selections in user memory. Characters received during a reset are lost. To prevent this, the computer may act in one of two ways.

  1. (With auto XON/XOFF) Immediately after sending the reset sequence, the computer should assume an XOFF from terminal. The computer stops sending characters until it receives XON. The terminal transmits XON only after it completes the reset.
  2. (Without auto XON/XOFF) Use a delay of no less than 10 seconds to allow the terminal to complete the function. This method, however, does not guarantee against loss of characters when a reset error is detected.

The terminal disconnects from the communication line during a reset. After a reset, the terminal selects keypad numeric mode (DECKPNM) and resets origin mode (DECOM). The terminal also selects the top and bottom margins (scrolling region) for the full screen (DECSTBM). Reset the terminal by using the following sequence.

Reset to Initial State (RIS)

ESC  c
033 143

Resets the terminal to its initial state.

Tests

Tests

DECTST selects the self-tests used to verify terminal operation. Self-tests provide error indications on the keyboard indicators or screen. See Chapter 9 for the meaning of the displayed errors. The terminal reports the test results (pass or fail) to the computer by using a device status report (DSR) sequence.

The terminal loses received characters while performing the test. To prevent this, the computer may act in one of two ways.

  1. (With auto XON/XOFF) Immediately after sending the invoke confidence test sequence, the computer should assume an XOFF from terminal. The computer stops sending characters until it receives XON. The terminal transmits XON only after it completes the test.
  2. (Without auto XON/XOFF) Use a delay of no less than 10 seconds to allow the terminal to complete the test. This method, however, does not guarantee against loss of characters when an error is detected.

Select terminal self-tests by using the following sequences.

Invoke Confidence Test (DECTST)

ESC  [   2   ;   1   y
033 133 062 073 061 171

Power-up test. Terminal resets and performs power-up test.

ESC  [   2   ;   2   y
033 133 062 073 062 171

Data loopback test. Uses test connector on modem interface connector.

ESC  [   2   ;   4   y
033 133 062 073 064 171

EIA loopback test. Uses test connector on modem interface connector.

ESC  [   2   ;   1   6   y
033 133 062 073 061 066 171

Printer loopback test. Uses test connector on printer interface connector.

ESC  [   2   ;   9   y
033 133 062 073 071 171

Repeats power-up test continuously until failure or power turned off.

ESC  [   2   ;   1   0   y
033 133 062 073 061 060 171

Repeats data loopback test continuously until failure or power turned off. Uses test connector on the modem interface connnector.

ESC  [   2   ;   1   2   y
033 133 062 073 061 062 171

Repeats EIA loopback test continuously until failure or power turned off. Uses test connector on modem interface connector.

ESC  [   2   ;   2   4   y
033 133 062 073 062 064 171

Repeats printer loopback test continuously until failure or power turned off. Uses test connector on printer interface.

Adjustments

Adjustments

The terminal has a screen alignment pattern that lets Field Service personnel adjust the screen. Display the screen alignment pattern by using the following sequence.

Screen Alignment Display (DECALN)

ESC  #   8
033 043 070

Fills screen with uppercase E’s for screen focus and alignment. This command is used by DIGITAL Manufacturing and Field Service personnel.

Keyboard Indicator

Keyboard Indicator

You can program the L1 indicator (LED) for specific applications. Turn L1 on or off by using the following sequences.

Load LED (DECLL)

ESC  [   0   q
033 133 060 161

Turns L1 off.

ESC  [   1   q
033 133 061 161

Turns L1 on.

VT52-Compatible Sequences

VT52-compatible sequences meet private DIGITAL standards. Therefore, the terminal can use existing software designed for previous terminals (such as the VT52). You can select VT52 compatibility from the keyboard in SET-UP (Chapter 3), or the computer can use a sequence. (See ANSI-Compatible Sequences in this chapter).

Modes

Modes

In VT52 mode, you cannot select most terminal features by using sequences. You can, however, select the following three modes by using sequences: ANSI mode, application keypad mode on, and application keypad mode off (numeric keypad mode on).

ANSI/VT52 Compatibility

ANSI/VT52 Compatibility

The terminal is compatible with both ANSI and private DIGITAL standards. Therefore, the terminal can use new software that meets ANSI standards and existing software designed for previous terminals (such as the VT52). ANSI-compatible sequences meet standards X3.64-1979 and X3.41-1974. You use ANSI mode to select most terminal features; the terminal uses the same features when it switches to VT52 mode. You cannot, however, change most of these features in VT52 mode. Select ANSI compatibility by using the following sequence.

ANSI Mode (DECANM)

ESC  <
033 074

The terminal interprets all sequences according to ANSI standards X3.64-1979 and X3.41-1974. The VT52 escape sequences described in this chapter are not recognized.

Cursor Positioning

Cursor Positioning

The cursor indicates the active screen position where the next character will appear. You must select the margins for VT52 mode in ANSI mode. If you do not select margins, the terminal uses the complete screen. The cursor moves:

You can also move the cursor by using the following sequences.

Cursor Up

ESC  A
033 101

Moves cursor up one line in same column. Cursor stops at top margin.

Cursor Down

ESC  B
033 102

Moves cursor down one line in same column. Cursor stops at bottom margin.

Cursor Right

ESC  C
033 103

Moves cursor one column to right. Cursor stops at right margin.

Cursor Left

ESC  D
033 104

Moves cursor one column to left. Cursor stops at left margin.

Cursor to Home

ESC  H
033 110

Moves cursor to home position.

Direct Cursor Address

ESC  Y   line  column
033 131  ***   ***

Moves cursor to specified line and column. Line and column numbers are ASCII character whose codes are their octal value plus octal 037. For example, line 1 column 8 parameters are octal 040 (first line) and octal 050 (eighth column).

Reverse Linefeed

ESC  I
033 111

Moves cursor up one line in same column. If cursor is at top margin, screen performs scroll-down.

Keypad Character Selection

Keypad Character Selection

The numeric keypad generates either numeric characters or control functions. Select application keypad mode to generate control functions. Exit application keypad mode (select numeric keypad mode) to generate numeric characters. See Table 5-14 for the characters generated by the keypad. Enter and exit application keypad mode by using the following sequences.

NOTE: When you power up or use a Reset command, the terminal exits application keypad mode (selects numeric keypad mode). This mode is also selected during communication line connections, except full-duplex no modem control (FDX A). See Chapter 6 for more information about communication line disconnects.

Enter Application Keypad Mode

ESC  =
033 075

Keypad generates sequences used by the applications program.

Exit Application Keypad Mode (Numeric Keypad Mode)

ESC  >
033 076

Keypad generates characters that match the numeric, comma, period, and minus sign keys on main keyboard.

Table 5-14 VT52 Keypad Codes
Key Application Keypad Mode Off (Numeric Keypad Mode) Application Keypad Mode On
0 0
060
ESC  ?   p
033 077 160
1 1
061
ESC  ?   q
033 077 161
2 2
062
ESC  ?   r
033 077 162
3 3
063
ESC  ?   s
033 077 163
4 4
064
ESC  ?   t
033 077 164
5 5
065
ESC  ?   u
033 077 165
6 6
066
ESC  ?   v
033 077 166
7 7
067
ESC  ?   w
033 077 167
8 8
070
ESC  ?   x
033 077 170
9 9
071
ESC  ?   y
033 077 171
- (minus) - (minus)
055
ESC  ?   m
033 077 155*
, (comma) , (comma)
054
ESC  ?   l
033 077 154*
. (period) . (period)
056
ESC  ?   n
033 077 156
ENTER CR or CR LF
015 or 015 012
ESC  ?   M
033 077 115
PF1
ESC  P
033 120
ESC  P
033 120
PF2
ESC  Q
033 121
ESC  Q
033 121
PF3
ESC  R
033 122
ESC  R
033 122
PF4
ESC  S
033 123
ESC  S
033 123

* These sequences are not generated by the VT52.

† In numeric keypad mode (application keypad mode off), ENTER generates the same characters as RETURN. You can change the RETURN character code with the line feed/new line feature. When off, this feature causes the key to generate a single control character (CR, octal 015). When on, this feature causes the key to generate two characters (CR, octal 015 and LF, octal 012).

Character Sets and Selection

Character Sets and Selection

In VT52 mode, the terminal uses either the US/UK character set selected in SET-UP or the special characters and line drawing character set. Tables 5-11 and 5-12 show the United Kingdom and United States character sets. Table 5-13 shows the special characters and line drawing character set. Table 5-15 compares the special characters and line drawing character set to VT52 graphics mode (character set). Select the character sets by using the following sequences.

NOTE: The character set selected in SET-UP is used after all communication line connections, except full-duplex no modem control (FDX A). See Chapter 6 for more information about communication.

Enter Graphics Mode

ESC  F
033 106

Selects the special characters and line drawing character set.

Exit Graphics Mode

ESC  G
033 107

Selects the character set selected in SET-UP.

Table 5-15 Special Characters and Line Drawing Set and VT52 Graphics Mode Comparison
Octal Code US or UK Set Special Characters and Line Drawing Set VT52 Graphics Mode (Not Available in VT102)
137 _ Blank Blank
140 ` Diamond Reserved
141 a Checkerboard (error indication) Solid rectangle
142 b Horizontal tab 1/
143 c Form feed 3/
144 d Carriage return 5/
145 e Linefeed 7/
146 f Degree symbol Degrees
147 g Plus/minus Plus or minus
150 h New line Right arrow
151 i Vertical tab Ellipsis (dots)
152 j Lower-right corner Divide by
153 k Upper-right corner Down arrow
154 l Upper-left corner Bar at scan 0
155 m Lower-left corner Bar at scan 1
156 n Crossing lines Bar at scan 2
157 o Horizontal line - scan 1 Bar at scan 3
160 p Horizontal line - scan 3 Bar at scan 4
161 q Horizontal line - scan 5 Bar at scan 5
162 r Horizontal line - scan 7 Bar at scan 6
163 s Horizontal line - scan 9 Bar at scan 7
164 t Left “T” Subscript 0
165 u Right “T” Subscript 1
166 v Bottom “T” Subscript 2
167 w Top “T” Subscript 3
170 x Vertical bar Subscript 4
171 y Less than or equal to Subscript 5
172 z Greater than or equal to Subscript 6
173 { Pi Subscript 7
174 | Not equal to Subscript 8
175 } UK pound sign Subscript 9
176 ~ Centered dot Paragraph
Erasing

Erasing

Erasing removes characters from the screen. Erased characters are lost. Erase characters by using the following sequences.

Erase to End of Line

ESC  K
033 113

Erases all characters from cursor to end of current line, including cursor position. Cursor does not move.

Erase to End of Screen

ESC  J
033 112

Erases all characters from cursor to end of screen, including cursor position. Cursor does not move.

Printing

Printing

The terminal has a serial printer interface for local printing. The computer can select all print operations by using sequences. You can only select two print operations from the keyboard, auto print and print screen.

When you print characters from the screen, terminal and printer tab stops are ignored. Characters printed are spaced with the space (SP, octal 040) character. The terminal transmits a carriage return and linefeed - but not a space character - after the last printable character of a line.

A line of double-height characters prints as two identical lines of single-width characters. Double-width characters print as single-width characters on a single line.

Before selecting a print operation, check the printer status by using the printer status report (DSR) in ANSI mode. Do not select a print operation if the serial printer is not ready to print. Select print operations by using the following sequences.

Auto Print

ESC  ^
033 136

Turns on auto print. A display line prints after you move cursor off the line, using a linefeed, form feed, or vertical tab (also transmitted to printer).

The line also prints during an auto wrap. Auto wrap lines end with CR, LF.

ESC  _
033 137

Turns off auto print.

NOTE: Printer controller has a higher priority than auto print. Therefore, you can select printer controller and print characters during auto print.

Print Controller

ESC  W
033 127

Turns on printer controller. The terminal transmits received characters to printer without displaying them. The terminal does not insert or delete spaces, provide line delimiters, or select printer character set.

ESC  X
033 130

Turns off printer controller. Always move printhead to left margin before turning off printer controller.

Print Cursor Line

ESC  V
033 135

Prints display line with cursor. Cursor position does not change. Print cursor line ends when the line prints.

Print Screen

ESC  ]
033 126

Prints the screen. Printer extent (DECPEX) selects full screen or scrolling region to print. Select scrolling region by using DECSTBM sequence. Print screen ends when screen prints.

Reports

Reports

The terminal transmits reports in response to computer requests. The terminal generates only one report in VT52 mode. The report requests and responses are as follows.

Identify

ESC  Z
033 132

Terminal sends an identify sequence to computer.

ESC  /   Z
033 057 132

VT102 response to identify sequence. (Same as VT52).