aboutsummaryrefslogtreecommitdiffstats
path: root/DOCS/vt102-ug/chapter5.html
diff options
context:
space:
mode:
Diffstat (limited to 'DOCS/vt102-ug/chapter5.html')
-rw-r--r--DOCS/vt102-ug/chapter5.html1148
1 files changed, 1148 insertions, 0 deletions
diff --git a/DOCS/vt102-ug/chapter5.html b/DOCS/vt102-ug/chapter5.html
new file mode 100644
index 0000000..ea937b2
--- /dev/null
+++ b/DOCS/vt102-ug/chapter5.html
@@ -0,0 +1,1148 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<HTML>
+<HEAD>
+<TITLE>VT100.net: Digital VT102 User Guide</TITLE>
+<LINK HREF="vt102-ug.css" TYPE="text/css" REL="stylesheet">
+</HEAD>
+<BODY>
+<DIV CLASS="navbar"><A HREF="http://vt100.net/"><IMG CLASS="button" SRC="vt100.net-logo.png" ALT="VT100.net" HEIGHT="16" WIDTH="102"></A> VT102 User Guide<TABLE WIDTH="100%">
+<COL SPAN="3" WIDTH="33%">
+<TBODY>
+<TR>
+<TD ALIGN="LEFT"><A HREF="chapter4.html">Chapter 4</A></TD>
+<TD ALIGN="CENTER"><A HREF="contents.html">Contents</A></TD>
+<TD ALIGN="RIGHT"><A HREF="chapter6.html">Chapter 6</A></TD>
+</TR>
+</TBODY>
+</TABLE>
+<HR></DIV>
+<H1 ID="S5"><SPAN CLASS="chapnum">5</SPAN> Received Character Processing</H1>
+<H2 ID="S5.1">General</H2>
+<P>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.</P>
+<H2 ID="S5.2">Received Characters</H2>
+<P>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). <A HREF="table5-1.html">Table&nbsp;5-1</A> 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.</P>
+<P>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.</P>
+<H2 ID="S5.3">Display Characters</H2>
+<P>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 <A HREF="#S5.5.2.16">Character Sets
+and Selection</A> in this chapter for more information.</P>
+<H2 ID="S5.4">Control Characters</H2>
+<P>These single-character control functions start, modify, or stop terminal
+operations; the control functions are not displayed. <A HREF="table5-2.html">Table&nbsp;5-2</A> defines the
+control characters recognized by the terminal. All other control characters
+are ignored.</P>
+<P>Each control character in this chapter has a mnemonic, listed in <A HREF="table5-2.html">Table&nbsp;5-2</A>.
+The mnemonic is an abbreviation of the control character name.</P>
+<H2 ID="S5.5">Escape and Control Sequences</H2>
+<P>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 <A HREF="appendixd.html">Appendix&nbsp;D</A> for more information about sequences
+and sequence formats.</P>
+<P>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.</P>
+<P>The terminal uses VT52 mode to respond to private DIGITAL sequences
+like a VT52 terminal.</P>
+<P>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.</P>
+<P>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 <A HREF="table5-1.html">Table&nbsp;5-1</A> for decimal and hexadecimal representations.</P>
+<P>The following section groups sequences by software compatibility (ANSI
+or VT52) and function (<A HREF="table5-3.html">Table&nbsp;5-3</A>). <A HREF="appendixc.html">Appendix&nbsp;C</A> summarizes all control
+functions.</P>
+<H3 ID="S5.5.1">Error Recovery</H3>
+<P>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.</P>
+<UL>
+<LI>Unrecognized control functions are usually ignored.</LI>
+<LI>Unsupported control functions (valid control functions not listed in
+this user guide) are usually ignored, but may produce unexpected results.</LI>
+<LI>If a control character is received within a sequence, the terminal performs
+the function of the control character, followed by the function
+of the sequence.</LI>
+<LI>If cancel (CAN, octal 030) or substitute (SUB, octal 032) is received
+during a sequence, the current sequence is aborted. The terminal
+displays the substitute character, followed by characters in the sequence
+received after CAN or SUB.</LI>
+</UL>
+<H3 ID="S5.5.2">ANSI-Compatible Sequences</H3>
+<P>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
+(<A HREF="chapter3.html">Chapter&nbsp;3</A>) or have the computer use a sequence. (See <A HREF="#S5.5.3">VT52-Compatible
+Sequences</A> in this chapter).</P>
+<H4 ID="S5.5.2.1">SET-UP Feature and Mode Selection</H4>
+<P>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 <A HREF="chapter3.html">Chapter&nbsp;3</A> for more information about SET-UP feature memories).</P>
+<P>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. <A HREF="table5-4.html">Table&nbsp;5-4</A> 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.</P>
+<P CLASS="note">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.</P>
+<P><STRONG>Set Mode</STRONG></P>
+<PRE CLASS="code">ESC [ Ps ; ... ; Ps h
+033 133 *** 073 073 *** 150</PRE>
+<P>Sets one or more modes specified by selective parameters (Ps) in the parameter
+string.</P>
+<P><STRONG>Reset Mode (RM)</STRONG></P>
+<PRE CLASS="code">ESC [ Ps ; ... ; Ps l
+033 133 *** 073 073 *** 154</PRE>
+<P>Resets one or more modes specified by selective parameters (Ps) in the
+parameter string.</P>
+<P><A HREF="table5-5.html">Table&nbsp;5-5</A> lists the ANSI-specified modes and their selective parameters
+(Ps). <A HREF="table5-6.html">Table&nbsp;5-6</A> 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.</P>
+<P>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.</P>
+<PRE CLASS="code">ESC [ ? 3 ; 4 h
+033 133 077 063 073 064 150</PRE>
+<P><A HREF="table5-7.html">Table&nbsp;5-7</A> 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.</P>
+<H4 ID="S5.5.2.2">ANSI/VT52 Compatibility</H4>
+<P>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).</P>
+<P>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 <A HREF="#S5.5.3">VT52-Compatible Sequences</A> in this
+chapter for details on selecting ANSI sequence compatibility. In ANSI
+mode, the following sequence selects compatibility with private DIGITAL
+sequences (VT52 mode).</P>
+<P>Features and modes selected in ANSI mode are also used in VT52 mode.
+However, these features and modes usually cannot change in VT52
+mode.</P>
+<P><STRONG>VT52 Mode (DECANM)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 2 l
+033 133 077 062 154</PRE>
+<P>In ANSI mode, reset selects private DIGITAL sequence compatibility. In
+VT52 mode, the terminal responds like a VT52 to private DIGITAL sequences.</P>
+<H4 ID="S5.5.2.3">Scrolling</H4>
+<P>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.</P>
+<P CLASS="note">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.</P>
+<P><STRONG>Scroll Mode (DECSCLM)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 4 h
+033 133 077 064 150</PRE>
+<P>Set selects smooth scroll. Smooth scroll lets the terminal add 6 lines per
+second to screen (power feature = 60&nbsp;Hz), or 5 lines per second (power
+feature = 50&nbsp;Hz).</P>
+<PRE CLASS="code">ESC [ ? 4 l
+033 133 077 064 154</PRE>
+<P>Reset selects jump scroll. Jump scroll lets the terminal add lines to the
+screen as fast as possible.</P>
+<H4 ID="S5.5.2.4">Scrolling Region</H4>
+<P>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.</P>
+<P>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.</P>
+<P CLASS="note">NOTES: When you power up or use the Reset command, the scrolling
+region becomes the full screen.</P>
+<P CLASS="note">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.</P>
+<P><STRONG>Set Top and Bottom Margins (DECSTBM)</STRONG></P>
+<PRE CLASS="code">ESC [ Pt ; Pb r
+033 133 *** 073 *** 162</PRE>
+<P>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).</P>
+<H4 ID="S5.5.2.5">Origin</H4>
+<P>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.</P>
+<P>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.</P>
+<P CLASS="note">NOTE: When you power up or use the Reset command, origin mode resets.</P>
+<P><STRONG>Origin Mode (DECOM)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 6 h
+033 133 077 066 150</PRE>
+<P>Set selects home position in scrolling region. Line numbers start at top
+margin of scrolling region. The cursor cannot move out of scrolling region.</P>
+<PRE CLASS="code">ESC [ ? 6 l
+033 133 077 066 154</PRE>
+<P>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.</P>
+<H4 ID="S5.5.2.6">Cursor Positioning</H4>
+<P>The cursor indicates the active screen position
+where the next character will appear. The cursor moves:</P>
+<UL>
+<LI>One column to the right when a character appears</LI>
+<LI>One line down after a linefeed (LF, octal 012), form feed (FF, octal
+014) or vertical tab (VT, octal 013) (Linefeed/new line may also
+move the cursor to the left margin)</LI>
+<LI>To the left margin after a carriage return (CR, octal 015)</LI>
+<LI>One column to the left after a backspace (BS, octal 010)</LI>
+<LI>To the next tab stop (or right margin if no tabs are set) after a horizontal
+tab character (HT, octal 011)</LI>
+<LI>To the home position when the top and bottom margins of the scrolling
+region (DECSTBM) or origin mode (DECOM) selection changes.</LI>
+</UL>
+<P>You can also move the cursor by using the following sequences.</P>
+<P CLASS="note">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.</P>
+<P><STRONG>Cursor Up (CUU)</STRONG></P>
+<PRE CLASS="code">ESC [ Pn A
+033 133 *** 101</PRE>
+<P>Moves cursor up Pn lines in same column. Cursor stops at top margin.</P>
+<P><STRONG>Cursor Down (CUD)</STRONG></P>
+<PRE CLASS="code">ESC [ Pn B
+033 133 *** 102</PRE>
+<P>Moves cursor down Pn lines in same column. Cursor stops at bottom
+margin.</P>
+<P><STRONG>Cursor Forward (CUF)</STRONG></P>
+<PRE CLASS="code">ESC [ Pn C
+033 133 *** 103</PRE>
+<P>Moves cursor right Pn columns. Cursor stops at right margin.</P>
+<P><STRONG>Cursor Backward (CUB)</STRONG></P>
+<PRE CLASS="code">ESC [ Pn D
+033 133 *** 104</PRE>
+<P>Moves cursor left Pn columns. Cursor stops at left margin.</P>
+<P CLASS="note">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.</P>
+<P><STRONG>Cursor Position (CUP)</STRONG></P>
+<PRE CLASS="code">ESC [ Pl ; Pc H
+033 133 *** 073 *** 110</PRE>
+<P>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.</P>
+<P CLASS="note">NOTE: CUP operates the same as the horizontal and vertical position
+(HVP) sequence.</P>
+<P><STRONG>Cursor Position (Home) (CUP)</STRONG></P>
+<PRE CLASS="code">ESC [ H
+033 133 110</PRE>
+<P>Moves cursor to home position, selected by origin mode (DECOM).</P>
+<P><STRONG>Horizontal and Vertical Position (HVP)</STRONG></P>
+<PRE CLASS="code">ESC [ Pl ; Pc f
+033 133 *** 073 *** 146</PRE>
+<P>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.</P>
+<P CLASS="note">NOTE: HVP operates the same as the cursor position (CUP) sequence.</P>
+<P><STRONG>Horizontal and Vertical Position (Home) (HVP)</STRONG></P>
+<PRE CLASS="code">ESC [ f
+033 133 146</PRE>
+<P>Cursor moves to home position selected by origin mode (DECOM).</P>
+<P><STRONG>Index (IND)</STRONG></P>
+<PRE CLASS="code">ESC D
+033 104</PRE>
+<P>Moves cursor down one line in same column. If cursor is at bottom margin,
+screen performs a scroll-up.</P>
+<P><STRONG>Reverse Index (RI)</STRONG></P>
+<PRE CLASS="code">ESC M
+033 115</PRE>
+<P>Moves cursor up one line in same column. If cursor is at top margin,
+screen performs a scroll-down.</P>
+<P><STRONG>Next Line (NEL)</STRONG></P>
+<PRE CLASS="code">ESC E
+033 105</PRE>
+<P>Moves cursor to first position on next line. If cursor is at bottom margin,
+screen performs a scroll-up.</P>
+<P><STRONG>Save Cursor (DECSC)</STRONG></P>
+<PRE CLASS="code">ESC 7
+033 067</PRE>
+<P>Saves cursor position, character attribute (graphic rendition), character
+set, and origin mode selection. (See restore cursor).</P>
+<P><STRONG>Restore Cursor (DECRC)</STRONG></P>
+<PRE CLASS="code">ESC 8
+033 070</PRE>
+<P>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.</P>
+<H4 ID="S5.5.2.7">Columns Per Line</H4>
+<P>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.</P>
+<P CLASS="note">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).</P>
+<P><STRONG>Column Mode (DECCOLM)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 3 h
+033 133 077 063 150</PRE>
+<P>Set selects 132 columns per line.</P>
+<PRE CLASS="code">ESC [ ? 3 l
+033 133 077 063 154</PRE>
+<P>Reset selects 80 columns per line.</P>
+<H4 ID="S5.5.2.8">Auto Wrap</H4>
+<P>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.</P>
+<P CLASS="note">NOTE: Regardless of the auto wrap SET-UP feature selection, the tab
+character never moves the cursor to the next line.</P>
+<P><STRONG>Auto Wrap Mode (DECAWM)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 7 h
+033 133 077 067 150</PRE>
+<P>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.</P>
+<PRE CLASS="code">ESC [ ? 7 l
+033 133 077 067 154</PRE>
+<P>Reset turns auto wrap off. Display characters received when cursor is at
+right margin replace previously displayed character.</P>
+<H4 ID="S5.5.2.9">Screen Background</H4>
+<P>This mode selects either light (reverse) or dark
+display background on the screen. Select screen mode by using the following
+sequences.</P>
+<P><STRONG>Screen Mode (DECSCNM)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 5 h
+033 133 077 065 150</PRE>
+<P>Set selects reverse screen, a white screen background with black characters.</P>
+<PRE CLASS="code">ESC [ ? 5 l
+033 133 077 065 154</PRE>
+<P>Reset selects normal screen, a black screen background with white characters.</P>
+<H4 ID="S5.5.2.10">Linefeed/New Line</H4>
+<P>This mode selects the control character(s) transmitted
+by <SPAN CLASS="keyname">RETURN</SPAN>. Linefeed/new line also selects the action taken by the
+terminal when receiving linefeed, form feed, and vertical tab. <A HREF="table5-8.html">Table&nbsp;5-8</A>
+provides a summary of the feature. Select linefeed/new line mode by using
+the following sequences.</P>
+<P><STRONG>Linefeed/New Line Mode (LNM)</STRONG></P>
+<PRE CLASS="code">ESC [ 2 0 h
+033 133 062 060 150</PRE>
+<P>Set causes a received linefeed, form feed, or vertical tab to move cursor
+to first column of next line. <SPAN CLASS="keyname">RETURN</SPAN> transmits both a carriage return and
+linefeed. This selection is also called new line option.</P>
+<PRE CLASS="code">ESC [ 2 0 l
+033 133 062 060 154</PRE>
+<P>Reset causes a received linefeed, form feed, or vertical tab to move cursor
+to next line in current column. <SPAN CLASS="keyname">RETURN</SPAN> transmits a carriage return.</P>
+<H4 ID="S5.5.2.11">Keyboard Action (FDX)</H4>
+<P>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.</P>
+<P><STRONG>Keyboard Action Mode (KAM)</STRONG></P>
+<PRE CLASS="code">ESC [ 2 h
+033 133 062 150</PRE>
+<P>Set turns off keyboard and turns on KBD LOCKED.</P>
+<PRE CLASS="code">ESC [ 2 l
+033 133 062 154</PRE>
+<P>Reset turns on keyboard and turns off KBD LOCKED.</P>
+<H4 ID="S5.5.2.12">Auto Repeat</H4>
+<P>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 <SPAN CLASS="keyname">SET-UP</SPAN>, <SPAN CLASS="keyname">ESC</SPAN>, <SPAN CLASS="keyname">RETURN</SPAN>,
+<SPAN CLASS="keyname">ENTER</SPAN>, <SPAN CLASS="keyname">NO SCROLL</SPAN>, and <SPAN CLASS="keyname">CTRL</SPAN>. Select auto repeat mode by using
+the following sequences.</P>
+<P><STRONG>Auto Repeat Mode (DECARM)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 8 h
+033 133 077 070 150</PRE>
+<P>Set selects auto repeat. A key pressed for more than one-half second
+automatically repeats.</P>
+<PRE CLASS="code">ESC [ ? 8 l
+033 133 077 070 154</PRE>
+<P>Reset turns off auto repeat. Keys do not automatically repeat.</P>
+<H4 ID="S5.5.2.13">Local Echo (Keyboard Send-Receive)</H4>
+<P>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.</P>
+<P><STRONG>Send-Receive Mode (SRM)</STRONG></P>
+<PRE CLASS="code">ESC [ 1 2 h
+033 133 061 062 150</PRE>
+<P>Set turns off local echo. The terminal transmits characters to the computer,
+which must echo characters for display on screen.</P>
+<PRE CLASS="code">ESC [ 1 2 l
+033 133 061 062 154</PRE>
+<P>Reset selects local echo. Characters transmitted to the computer automatically
+appear on the screen.</P>
+<H4 ID="S5.5.2.14">Cursor Key Character Selection</H4>
+<P>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 <A HREF="table5-9.html">Table&nbsp;5-9</A> for the codes transmitted
+by the cursor keys. Select cursor key mode by using the following sequences.</P>
+<P CLASS="note">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
+<A HREF="chapter6.html">Chapter&nbsp;6</A> for more information about communication.</P>
+<P><STRONG>Cursor Key Mode (DECCKM)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 1 h
+033 133 077 061 150</PRE>
+<P>Set selects cursor keys to generate control (application) functions.</P>
+<PRE CLASS="code">ESC [ ? 1 l
+033 133 077 061 154</PRE>
+<P>Reset selects cursor keys to generate ANSI cursor control sequences.</P>
+<H4 ID="S5.5.2.15">Keypad Character Selection</H4>
+<P>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 <A HREF="#S5.5.2.14">Cursor Key Character Selection</A> in this chapter
+for more information. The program function (PF) keys generate the
+same characters regardless of the keypad character selection. See <A HREF="table5-10.html">Table
+5-10</A> for the characters generated by the keypad. Select the keypad mode
+by using the following sequences.</P>
+<P CLASS="note">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 <A HREF="chapter6.html">Chapter 6</A> for more information about communication line connections.</P>
+<P><STRONG>Application Keypad Mode (DECKPAM)</STRONG></P>
+<PRE CLASS="code">ESC =
+033 075</PRE>
+<P>Selects application keypad mode. Keypad generates control functions.
+Cursor key mode (DECCKM) selects type of characters generated by cursor
+keys.</P>
+<P><STRONG>Numeric Keypad Mode (DECKPNM)</STRONG></P>
+<PRE CLASS="code">ESC &gt;
+033 076</PRE>
+<P>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.</P>
+<H4 ID="S5.5.2.16">Character Sets and Selection</H4>
+<P>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.</P>
+<P>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.</P>
+<UL>
+<LI>United States</LI>
+<LI>United Kingdom</LI>
+<LI>Special characters and line drawing (VT100 compatible)</LI>
+<LI>Alternate ROM</LI>
+<LI>Alternate ROM special characters</LI>
+</UL>
+<P>Tables <A HREF="table5-11.html">5.11</A>, <A HREF="table5-12.html">5.12</A> and <A HREF="table5-13.html">5.13</A> 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.</P>
+<P>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.</P>
+<P>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.</P>
+<P CLASS="note">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 <A HREF="chapter6.html">Chapter 6</A> for more information about communication line
+connections.</P>
+<P><STRONG>Select Character Set (SCS)</STRONG></P>
+<PRE CLASS="code">ESC ( A
+033 050 101</PRE>
+<P>Designates the UK character set as G0.</P>
+<PRE CLASS="code">ESC ( B
+033 050 102</PRE>
+<P>Designates the US character set as G0.</P>
+<PRE CLASS="code">ESC ( 0
+033 050 060</PRE>
+<P>Designates the special characters and line drawing character set as G0.</P>
+<PRE CLASS="code">ESC ( 1
+033 050 061</PRE>
+<P>Designates the alternate ROM character set as G0.</P>
+<PRE CLASS="code">ESC ( 2
+033 050 062</PRE>
+<P>Designates the alternate ROM special characters character set as G0.</P>
+<P>Designate G1 by using the following sequences.</P>
+<P><STRONG>Select Character Set (SCS)</STRONG></P>
+<PRE CLASS="code">ESC ) A
+033 051 101</PRE>
+<P>Designates the UK character set as G1.</P>
+<PRE CLASS="code">ESC ) B
+033 051 102</PRE>
+<P>Designates the US character set as G1.</P>
+<PRE CLASS="code">ESC ) 0
+033 051 060</PRE>
+<P>Designates the special characters and line drawing character set as G1.</P>
+<PRE CLASS="code">ESC ) 1
+033 051 061</PRE>
+<P>Designates the alternate ROM character set as G1.</P>
+<PRE CLASS="code">ESC ) 2
+033 051 062</PRE>
+<P>Designates the alternate ROM special characters character set as G1.</P>
+<P>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.</P>
+<P><STRONG>Single Shift 2 (SS2)</STRONG></P>
+<PRE CLASS="code">ESC N
+033 116</PRE>
+<P>Selects G2 (default) character set for one character. You select G2 in SET-UP.</P>
+<P><STRONG>Single Shift 3 (SS3)</STRONG></P>
+<PRE CLASS="code">ESC O
+033 117</PRE>
+<P>Selects G3 (default) character set for one character. You select G3 in SET-UP.</P>
+<P>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.</P>
+<UL>
+<LI>When starting a print operation, make sure the G0 character sets in
+the terminal and printer are the same.</LI>
+<LI>During printing, the terminal checks that the next character to transmit
+belongs to the presently selected G0 character set. If not, the terminal
+transmits a G0 designator to the printer to select the correct
+character set. The G1 designator is never used.</LI>
+<LI>At the end of printing, the terminal checks that the printer's G0 character
+set is the same as when printing started. If not, the terminal
+transmits a G0 designator to the printer to select the original G0
+character set. The designator is transmitted before the print termination
+character.</LI>
+</UL>
+<P>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.</P>
+<OL>
+<LI>US/UK (selected in SET-UP)</LI>
+<LI>US/UK (not selected in SET-UP)</LI>
+<LI>Special characters and line drawing</LI>
+<LI>Alternate ROM</LI>
+<LI>Alternate ROM special characters</LI>
+</OL>
+<P CLASS="note">NOTE: The substitute character appears on the screen when the terminal
+receives a parity error, the SUB or CAN control characters, and the <IMG SRC="char141.png" ALT="checker" HEIGHT="20" WIDTH="12">
+(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.</P>
+<H4 ID="S5.5.2.17">Character Attributes</H4>
+<P>The terminal can display the following character
+attributes that change the character display without changing the character.</P>
+<UL>
+<LI>Underline</LI>
+<LI>Reverse video (character background opposite of the screen background
+feature)</LI>
+<LI>Blink</LI>
+<LI>Bold (increased intensity)</LI>
+<LI>Any combination of these attributes</LI>
+</UL>
+<P>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.</P>
+<P><STRONG>Select Graphic Rendition (SGR)</STRONG></P>
+<PRE CLASS="code">ESC [ m or ESC [ 0 m
+033 133 155 033 133 060 155</PRE>
+<P>Turns off character attributes.</P>
+<PRE CLASS="code">ESC [ 1 m
+033 133 061 155</PRE>
+<P>Selects bold (increased intensity).</P>
+<PRE CLASS="code">ESC [ 4 m
+033 133 064 155</PRE>
+<P>Selects underline.</P>
+<PRE CLASS="code">ESC [ 5 m
+033 133 065 155</PRE>
+<P>Selects blink.</P>
+<PRE CLASS="code">ESC [ 7 m
+033 133 067 155</PRE>
+<P>Selects reverse video.</P>
+<H4 ID="S5.5.2.18">Tab Stops</H4>
+<P>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.</P>
+<P><STRONG>Horizontal Tabulation Set (HTS)</STRONG></P>
+<PRE CLASS="code">ESC H
+033 110</PRE>
+<P>Sets a horizontal tab stop at cursor position.</P>
+<P><STRONG>Tabulation Clear (TBC)</STRONG></P>
+<PRE CLASS="code">ESC [ g or ESC [ 0 g
+033 133 147 033 133 060 147</PRE>
+<P>Clears a horizontal tab stop at cursor position.</P>
+<PRE CLASS="code">ESC [ 3 g
+033 133 063 147</PRE>
+<P>Clears all horizontal tab stops.</P>
+<H4 ID="S5.5.2.19">Line Attributes</H4>
+<P>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.</P>
+<P CLASS="note">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.</P>
+<P><STRONG>Double-Height Line (DECDHL)</STRONG></P>
+<PRE CLASS="code">Top Half: Bottom Half:
+ESC # 3 ESC # 4
+033 043 063 033 043 064</PRE>
+<P>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.</P>
+<P><STRONG>Single-Width Line (DECSWL)</STRONG></P>
+<PRE CLASS="code">ESC # 5
+033 043 065</PRE>
+<P>Makes the line with the cursor single-width, single-height. This is line attribute
+for all new lines on screen.</P>
+<P><STRONG>Double-Width Line (DECDWL)</STRONG></P>
+<PRE CLASS="code">ESC # 6
+033 043 066</PRE>
+<P>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.</P>
+<H4 ID="S5.5.2.20">Erasing</H4>
+<P>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.</P>
+<P>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.</P>
+<P>Erasing a character also erases any character attribute of the character.
+Erase characters by using the following sequences.</P>
+<P><STRONG>Erase In Line (EL)</STRONG></P>
+<PRE CLASS="code">ESC [ K or ESC [ 0 K
+033 133 113 033 133 060 113</PRE>
+<P>Erases from cursor to end of line, including cursor position.</P>
+<PRE CLASS="code">ESC [ 1 K
+033 133 061 113</PRE>
+<P>Erases from beginning of line to cursor, including cursor position.</P>
+<PRE CLASS="code">ESC [ 2 K
+033 133 062 113</PRE>
+<P>Erases complete line.</P>
+<P><STRONG>Erase In Display (ED)</STRONG></P>
+<PRE CLASS="code">ESC [ J or ESC [ 0 J
+033 133 112 033 133 060 112</PRE>
+<P>Erases from cursor to end of screen, including cursor position.</P>
+<PRE CLASS="code">ESC [ 1 J
+033 133 061 112</PRE>
+<P>Erases from beginning of screen to cursor, including cursor position.</P>
+<PRE CLASS="code">ESC [ 2 J
+033 133 062 112</PRE>
+<P>Erases complete display. All lines are erased and changed to single-width.
+Cursor does not move.</P>
+<H4 ID="S5.5.2.21">Computer Editing</H4>
+<P>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.</P>
+<P CLASS="note">NOTE: Insertion-replacement mode (IRM) selects how characters are
+added to the screen. See <A HREF="#S5.5.2.22">Inserting and Replacing Characters</A> in this
+chapter for more information.</P>
+<P><STRONG>Delete Character (DCH)</STRONG></P>
+<PRE CLASS="code">ESC [ Pn P
+033 133 *** 120</PRE>
+<P>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.</P>
+<P><STRONG>Insert Line (IL)</STRONG></P>
+<PRE CLASS="code">ESC [ Pn L
+033 133 *** 114</PRE>
+<P>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.</P>
+<P><STRONG>Delete Line (DL)</STRONG></P>
+<PRE CLASS="code">ESC [ Pn M
+033 133 *** 115</PRE>
+<P>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.</P>
+<H4 ID="S5.5.2.22">Inserting and Replacing Characters</H4>
+<P>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.</P>
+<P CLASS="note">NOTE: This mode resets after a communication line connection in all
+communication except full-duplex no modem control (FDX&nbsp;A). See <A HREF="chapter6.html">Chapter
+6</A> for more information about communication line connections.</P>
+<P><STRONG>Insertion-Replacement Mode (IRM)</STRONG></P>
+<PRE CLASS="code">ESC [ 4 h
+033 133 064 150</PRE>
+<P>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.</P>
+<PRE CLASS="code">ESC [ 4 l
+033 133 064 154</PRE>
+<P>Reset selects replace mode and turns INSERT off. New display characters
+replace old display characters at cursor position. The old character
+is erased.</P>
+<H4 ID="S5.5.2.23">Printing</H4>
+<P>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.</P>
+<P>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.</P>
+<P>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.</P>
+<P>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.</P>
+<P><STRONG>Media Copy (Auto Print On) (MC)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 5 i
+033 133 077 065 151</PRE>
+<P>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).</P>
+<P>The line also prints during an auto wrap. Auto wrap lines end with a
+CR, LF.</P>
+<P><STRONG>Media Copy (Auto Print Off) (MC)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 4 i
+033 133 077 064 151</PRE>
+<P>Turns off auto print.</P>
+<P CLASS="note">NOTE: Printer controller has a higher priority than auto print. Therefore,
+you can select printer controller and print characters during auto print.</P>
+<P><STRONG>Media Copy (Printer Controller On) (MC)</STRONG></P>
+<PRE CLASS="code">ESC [ 5 i
+033 133 065 151</PRE>
+<P>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.</P>
+<P><STRONG>Media Copy (Printer Controller Off) (MC)</STRONG></P>
+<PRE CLASS="code">ESC [ 4 i
+033 133 064 151</PRE>
+<P>Turns off printer controller. Always move printhead to left margin before
+turning off printer controller.</P>
+<P><STRONG>Media Copy (Print Cursor Line) (MC)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 1 i
+033 133 077 061 151</PRE>
+<P>Prints display line with cursor. Cursor position does not change. Print cursor
+line ends when line prints.</P>
+<P><STRONG>Media Copy (Print Screen) (MC)</STRONG></P>
+<PRE CLASS="code">ESC [ i or ESC [ 0 i
+033 133 151 033 133 060 151</PRE>
+<P>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.</P>
+<H4 ID="S5.5.2.24">Printer Extent</H4>
+<P>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.</P>
+<P><STRONG>Printer Extent Mode (DECPEX)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 1 9 h
+033 133 077 061 071 150</PRE>
+<P>Set selects the full screen to print during a print screen.</P>
+<PRE CLASS="code">ESC [ ? 1 9 l
+033 133 077 061 071 154</PRE>
+<P>Reset selects the scrolling region to print during a print screen.</P>
+<H4 ID="S5.5.2.25">Print Termination Character</H4>
+<P>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.</P>
+<P><STRONG>Printer Form Feed Mode (DECPFF)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 1 8 h
+033 133 077 061 070 150</PRE>
+<P>Set selects form feed as print termination character. The terminal transmits
+this character to printer after each print screen.</P>
+<PRE CLASS="code">ESC [ ? 1 8 l
+033 133 077 061 070 154</PRE>
+<P>Reset selects no termination character.</P>
+<H4 ID="S5.5.2.26">Reports</H4>
+<P>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.</P>
+<P CLASS="note">NOTE: The terminal does not respond to the DSR, DA, or DECID sequences
+during printer controller operation.</P>
+<P><STRONG>Device Status Report (DSR)</STRONG></P>
+<PRE CLASS="code">ESC [ 5 n
+033 133 065 156</PRE>
+<P>Computer requests a status report (using a DSR sequence).</P>
+<PRE CLASS="code">ESC [ 0 n
+033 133 060 156</PRE>
+<P>Terminal response: Ready, no malfunctions detected.</P>
+<PRE CLASS="code">ESC [ 3 n
+033 133 063 156</PRE>
+<P>Terminal response: Malfunction, error in self-test. Reset and retry.</P>
+<PRE CLASS="code">ESC [ ? 1 5 n
+033 133 077 061 065 156</PRE>
+<P>Computer requests a printer status report. Terminal checks status of
+printer. This report should be requested before any printer operation.</P>
+<PRE CLASS="code">ESC [ ? 1 3 n
+033 133 077 061 063 156</PRE>
+<P>Printer not connected to terminal. Data terminal ready (DTR) signal of the
+printer has not been on since terminal turned on.</P>
+<PRE CLASS="code">ESC [ ? 1 1 n
+033 133 077 061 061 156</PRE>
+<P>Printer not ready to print. Printer DTR was on, but is now off.</P>
+<PRE CLASS="code">ESC [ ? 1 0 n
+033 133 077 061 060 156</PRE>
+<P>Printer ready to print. Printer DTR is on.</P>
+<PRE CLASS="code">ESC [ 6 n
+033 133 066 156</PRE>
+<P>Computer requests a cursor position report from terminal.</P>
+<P><STRONG>Cursor Position Report (CPR)</STRONG></P>
+<PRE CLASS="code">ESC [ Pl ; Pc R
+033 133 *** 073 *** 122</PRE>
+<P>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.</P>
+<P><STRONG>Device Attributes (DA)</STRONG></P>
+<PRE CLASS="code">ESC [ c or ESC [ 0 c
+033 133 143 033 133 060 143</PRE>
+<P>Computer requests terminal identify itself.</P>
+<P><STRONG>Identify Terminal (DECID)</STRONG></P>
+<PRE CLASS="code">ESC Z
+033 132</PRE>
+<P>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.</P>
+<P><STRONG>Device Attributes (DA)</STRONG></P>
+<PRE CLASS="code">ESC [ ? 6 c
+033 133 077 066 143</PRE>
+<P>Terminal response: VT102.</P>
+<H4 ID="S5.5.2.27">Reset</H4>
+<P>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.</P>
+<OL>
+<LI>(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.</LI>
+<LI>(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.</LI>
+</OL>
+<P>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.</P>
+<P><STRONG>Reset to Initial State (RIS)</STRONG></P>
+<PRE CLASS="code">ESC c
+033 143</PRE>
+<P>Resets the terminal to its initial state.</P>
+<H4 ID="S5.5.2.28">Tests</H4>
+<P>DECTST selects the self-tests used to verify terminal operation.
+Self-tests provide error indications on the keyboard indicators or screen.
+See <A HREF="chapter9.html">Chapter 9</A> 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.</P>
+<P>The terminal loses received characters while performing the test. To prevent
+this, the computer may act in one of two ways.</P>
+<OL>
+<LI>(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.</LI>
+<LI>(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.</LI>
+</OL>
+<P>Select terminal self-tests by using the following sequences.</P>
+<P><STRONG>Invoke Confidence Test (DECTST)</STRONG></P>
+<PRE CLASS="code">ESC [ 2 ; 1 y
+033 133 062 073 061 171</PRE>
+<P>Power-up test. Terminal resets and performs power-up test.</P>
+<PRE CLASS="code">ESC [ 2 ; 2 y
+033 133 062 073 062 171</PRE>
+<P>Data loopback test. Uses test connector on modem interface connector.</P>
+<PRE CLASS="code">ESC [ 2 ; 4 y
+033 133 062 073 064 171</PRE>
+<P>EIA loopback test. Uses test connector on modem interface connector.</P>
+<PRE CLASS="code">ESC [ 2 ; 1 6 y
+033 133 062 073 061 066 171</PRE>
+<P>Printer loopback test. Uses test connector on printer interface connector.</P>
+<PRE CLASS="code">ESC [ 2 ; 9 y
+033 133 062 073 071 171</PRE>
+<P>Repeats power-up test continuously until failure or power turned off.</P>
+<PRE CLASS="code">ESC [ 2 ; 1 0 y
+033 133 062 073 061 060 171</PRE>
+<P>Repeats data loopback test continuously until failure or power turned off.
+Uses test connector on the modem interface connnector.</P>
+<PRE CLASS="code">ESC [ 2 ; 1 2 y
+033 133 062 073 061 062 171</PRE>
+<P>Repeats EIA loopback test continuously until failure or power turned off.
+Uses test connector on modem interface connector.</P>
+<PRE CLASS="code">ESC [ 2 ; 2 4 y
+033 133 062 073 062 064 171</PRE>
+<P>Repeats printer loopback test continuously until failure or power turned
+off. Uses test connector on printer interface.</P>
+<H4 ID="S5.5.2.29">Adjustments</H4>
+<P>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.</P>
+<P><STRONG>Screen Alignment Display (DECALN)</STRONG></P>
+<PRE CLASS="code">ESC # 8
+033 043 070</PRE>
+<P>Fills screen with uppercase E's for screen focus and alignment. This command
+is used by DIGITAL Manufacturing and Field Service personnel.</P>
+<H4 ID="S5.5.2.30">Keyboard Indicator</H4>
+<P>You can program the L1 indicator (LED) for specific
+applications. Turn L1 on or off by using the following sequences.</P>
+<P><STRONG>Load LED (DECLL)</STRONG></P>
+<PRE CLASS="code">ESC [ 0 q
+033 133 060 161</PRE>
+<P>Turns L1 off.</P>
+<PRE CLASS="code">ESC [ 1 q
+033 133 061 161</PRE>
+<P>Turns L1 on.</P>
+<H3 ID="S5.5.3">VT52-Compatible Sequences</H3>
+<P>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 (<A HREF="chapter3.html">Chapter 3</A>), or the computer can use a sequence. (See <A HREF="#S5.5.2">ANSI-Compatible
+Sequences</A> in this chapter).</P>
+<H4 ID="S5.5.3.1">Modes</H4>
+<P>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).</P>
+<H4 ID="S5.5.3.2">ANSI/VT52 Compatibility</H4>
+<P>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.</P>
+<P><STRONG>ANSI Mode (DECANM)</STRONG></P>
+<PRE CLASS="code">ESC &lt;
+033 074</PRE>
+<P>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.</P>
+<H4 ID="S5.5.3.3">Cursor Positioning</H4>
+<P>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:</P>
+<UL>
+<LI>One column to the right when a character appears</LI>
+<LI>One line down after a linefeed, form feed, or vertical tab. (Linefeed/new
+line may also move the cursor to left margin).</LI>
+<LI>To the left margin after a carriage return</LI>
+<LI>One column to the left after a backspace</LI>
+<LI>To the next tab stop (or right margin if no tabs are set) after a horizontal
+tab character.</LI>
+</UL>
+<P>You can also move the cursor by using the following sequences.</P>
+<P><STRONG>Cursor Up</STRONG></P>
+<PRE CLASS="code">ESC A
+033 101</PRE>
+<P>Moves cursor up one line in same column. Cursor stops at top margin.</P>
+<P><STRONG>Cursor Down</STRONG></P>
+<PRE CLASS="code">ESC B
+033 102</PRE>
+<P>Moves cursor down one line in same column. Cursor stops at bottom
+margin.</P>
+<P><STRONG>Cursor Right</STRONG></P>
+<PRE CLASS="code">ESC C
+033 103</PRE>
+<P>Moves cursor one column to right. Cursor stops at right margin.</P>
+<P><STRONG>Cursor Left</STRONG></P>
+<PRE CLASS="code">ESC D
+033 104</PRE>
+<P>Moves cursor one column to left. Cursor stops at left margin.</P>
+<P><STRONG>Cursor to Home</STRONG></P>
+<PRE CLASS="code">ESC H
+033 110</PRE>
+<P>Moves cursor to home position.</P>
+<P><STRONG>Direct Cursor Address</STRONG></P>
+<PRE CLASS="code">ESC Y line column
+033 131 *** ***</PRE>
+<P>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).</P>
+<P><STRONG>Reverse Linefeed</STRONG></P>
+<PRE CLASS="code">ESC I
+033 111</PRE>
+<P>Moves cursor up one line in same column. If cursor is at top margin,
+screen performs scroll-down.</P>
+<H4 ID="S5.5.3.4">Keypad Character Selection</H4>
+<P>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 <A HREF="table5-14.html">Table 5-14</A> for the
+characters generated by the keypad. Enter and exit application keypad
+mode by using the following sequences.</P>
+<P CLASS="note">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 <A HREF="chapter6.html">Chapter 6</A> for more information about
+communication line disconnects.</P>
+<P><STRONG>Enter Application Keypad Mode</STRONG></P>
+<PRE CLASS="code">ESC =
+033 075</PRE>
+<P>Keypad generates sequences used by the applications program.</P>
+<P><STRONG>Exit Application Keypad Mode (Numeric Keypad Mode)</STRONG></P>
+<PRE CLASS="code">ESC &gt;
+033 076</PRE>
+<P>Keypad generates characters that match the numeric, comma, period,
+and minus sign keys on main keyboard.</P>
+<H4 ID="S5.5.3.5">Character Sets and Selection</H4>
+<P>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 <A HREF="table5-11.html">5-11</A> and <A HREF="table5-12.html">5-12</A> show the United
+Kingdom and United States character sets. <A HREF="table5-13.html">Table 5-13</A> shows the special
+characters and line drawing character set. <A HREF="table5-15.html">Table 5-15</A> compares the special
+characters and line drawing character set to VT52 graphics mode
+(character set). Select the character sets by using the following sequences.</P>
+<P CLASS="note">NOTE: The character set selected in SET-UP is used after all communication
+line connections, except full-duplex no modem control (FDX A).
+See <A HREF="chapter6.html">Chapter 6</A> for more information about communication.</P>
+<P><STRONG>Enter Graphics Mode</STRONG></P>
+<PRE CLASS="code">ESC F
+033 106</PRE>
+<P>Selects the special characters and line drawing character set.</P>
+<P><STRONG>Exit Graphics Mode</STRONG></P>
+<PRE CLASS="code">ESC G
+033 107</PRE>
+<P>Selects the character set selected in SET-UP.</P>
+<H4 ID="S5.5.3.6">Erasing</H4>
+<P>Erasing removes characters from the screen. Erased characters
+are lost. Erase characters by using the following sequences.</P>
+<P><STRONG>Erase to End of Line</STRONG></P>
+<PRE CLASS="code">ESC K
+033 113</PRE>
+<P>Erases all characters from cursor to end of current line, including cursor
+position. Cursor does not move.</P>
+<P><STRONG>Erase to End of Screen</STRONG></P>
+<PRE CLASS="code">ESC J
+033 112</PRE>
+<P>Erases all characters from cursor to end of screen, including cursor
+position. Cursor does not move.</P>
+<H4 ID="S5.5.3.7">Printing</H4>
+<P>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.</P>
+<P>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.</P>
+<P>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.</P>
+<P>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.</P>
+<P><STRONG>Auto Print</STRONG></P>
+<PRE CLASS="code">ESC ^
+033 136</PRE>
+<P>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).</P>
+<P>The line also prints during an auto wrap. Auto wrap lines end with CR, LF.</P>
+<PRE CLASS="code">ESC _
+033 137</PRE>
+<P>Turns off auto print.</P>
+<P CLASS="note">NOTE: Printer controller has a higher priority than auto print. Therefore,
+you can select printer controller and print characters during auto print.</P>
+<P><STRONG>Print Controller</STRONG></P>
+<PRE CLASS="code">ESC W
+033 127</PRE>
+<P>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.</P>
+<PRE CLASS="code">ESC X
+033 130</PRE>
+<P>Turns off printer controller. Always move printhead to left margin before
+turning off printer controller.</P>
+<P><STRONG>Print Cursor Line</STRONG></P>
+<PRE CLASS="code">ESC V
+033 135</PRE>
+<P>Prints display line with cursor. Cursor position does not change. Print cursor
+line ends when the line prints.</P>
+<P><STRONG>Print Screen</STRONG></P>
+<PRE CLASS="code">ESC ]
+033 126</PRE>
+<P>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.</P>
+<H4 ID="S5.5.3.8">Reports</H4>
+<P>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.</P>
+<P><STRONG>Identify</STRONG></P>
+<PRE CLASS="code">ESC Z
+033 132</PRE>
+<P>Terminal sends an identify sequence to computer.</P>
+<PRE CLASS="code">ESC / Z
+033 057 132</PRE>
+<P>VT102 response to identify sequence. (Same as VT52).</P>
+<DIV CLASS="navbar"><HR>
+<TABLE WIDTH="100%">
+<COL SPAN="3" WIDTH="33%">
+<TBODY>
+<TR>
+<TD ALIGN="LEFT"><A HREF="chapter4.html">Chapter 4</A></TD>
+<TD ALIGN="CENTER"><A HREF="contents.html">Contents</A></TD>
+<TD ALIGN="RIGHT"><A HREF="chapter6.html">Chapter 6</A></TD>
+</TR>
+</TBODY>
+</TABLE>
+<DIV CLASS="navbot">http://vt100.net/docs/vt102-ug/chapter5.html</DIV></DIV>
+</BODY>
+</HTML>