<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>VT100.net: Digital VT100 User Guide</TITLE>
<LINK HREF="vt100-ug.css" TYPE="text/css" REL="stylesheet">
</HEAD>
<BODY><DIV CLASS="navbar"><TABLE WIDTH="100%">
<TBODY>
<TR>
<TD COLSPAN="3" WIDTH="100%"><A HREF="
http://vt100.net/"><IMG SRC="vt100.net-logo.gif" ALT="VT100.net" HEIGHT="16" WIDTH="102" BORDER="0"></A> VT100 User Guide</TD>
</TR>
<TR>
<TD ALIGN="LEFT" WIDTH="33%"><A HREF="chapter2.html">Chapter 2</A></TD>
<TD ALIGN="CENTER" WIDTH="34%"><A HREF="contents.html">Contents</A></TD>
<TD ALIGN="RIGHT" WIDTH="33%"><A HREF="chapter4.html">Chapter 4</A></TD>
</TR>
</TBODY>
</TABLE>
<HR></DIV>
<H1 ID="S3">Chapter 3<BR>Programmer Information</H1>
<P>The VT100 terminal normally performs a two-part function. It is an input device to
a computer -- information entered through the keyboard is sent to the computer. It
is simultaneously an output device for the computer -- that is, data coming in from
the computer is displayed on the video screen. <A HREF="figure3-1.html">Figure 3-1</A> shows the data flow.</P>
<P>This section of the user's manual discusses data flow between the VT100 and the
host. Included are codes generated by the keyboard; the transmission protocol
followed by the terminal; and the actions and reactions of the terminal to control
functions in both ANSI and VT52 modes of operation.</P>
<H2 ID="S3.1">The Keyboard</H2>
<P>The VT100 uses a keyboard with a key arrangement similar to an ordinary office
typewriter, as shown in <A HREF="figure3-2.html">Figure 3-2</A>. In addition to the standard typewriter keys the
VT100 keyboard has additional keys and indicators used to generate control sequences,
cursor control commands, and to show the current terminal status.</P>
<P><STRONG>LED Indicators</STRONG><BR>
The keyboard has seven light emitting diodes (LEDs) of which two are committed
to the complementary ON-LINE/LOCAL function. The power on condition is implicitly
shown by one of the two LEDs being on; that is, if the keyboard is connected
and power is on, one of these LEDs will be on.</P>
<P>A third LED indicates a "keyboard locked" condition. In this condition the keyboard
has been "turned off" automatically by the terminal due to a full buffer or by the
host through the transmission of an XOFF to the terminal.</P>
<P>The four remaining LEDs are programmable and can be assigned any meaning for
specific applications. The code sequences to turn these LEDs on or off are discussed
later in this chapter.</P>
<P><IMG SRC="keys/bk/setup.gif" ALT="" HEIGHT="40" WIDTH="60"> <STRONG>SET-UP</STRONG><BR>
The <SPAN CLASS="keyname">SET-UP</SPAN> key is at the upper-left corner of the main key array. Operations
performed in SET-UP mode can be stored in nonvolatile memory (NVR) so that
turning the terminal power off does not, by itself, alter the terminal configuration.</P>
<P>The procedures to change the SET-UP features are provided in the operator's
information section of this manual. Those SET-UP features which may be modified
by the host are listed in <A HREF="table3-1.html">Table 3-1</A> and described in detail under the escape sequences.</P>
<P><STRONG>Keyboard Operation</STRONG><BR>
The operator uses the keyboard to transmit codes to the host. Some keys transmit
one or more codes to the host immediately when typed. Other keys such as <SPAN CLASS="keyname">CTRL</SPAN>
and <SPAN CLASS="keyname">SHIFT</SPAN> do not transmit codes when typed, but modify the codes transmitted
by other keys. The code-transmitting keys cause the terminal to make a clicking
sound to verify to the operator that the keystroke has been processed by the
terminal. If two code-transmitting keys are pressed together, two codes will be
transmitted according to the order in which the keys were typed. The terminal will
not wait for the keys to be lifted, but will transmit both codes as soon as possible
after the keys are first typed. If three such keys are pressed simultaneously, the
codes for the first two keys are transmitted immediately; the code for the third will
be transmitted when one of the first two keys is lifted.</P>
<P><STRONG>Alphabetic Keys</STRONG> -- The VT100 will transmit the lowercase code unless either or
both of the <SPAN CLASS="keyname">SHIFT</SPAN> keys are down, or unless the <SPAN CLASS="keyname">CAPS LOCK</SPAN> key is down. Pressing
the <SPAN CLASS="keyname">CAPS LOCK</SPAN> key will lock only the 26 alphabetic keys in the shifted
(uppercase) mode. <A HREF="table3-2.html">Table 3-2</A> shows the codes generated by the alphabetic keys.</P>
<P><STRONG>Nonalphabetic Keys</STRONG> -- Each of the nonalphabetic keys can be used to generate
two different codes. One code will be generated if neither <SPAN CLASS="keyname">SHIFT</SPAN> key is pressed.
The other code will be generated if either or both of the <SPAN CLASS="keyname">SHIFT</SPAN> keys are down.
Unlike the <SPAN CLASS="keyname">SHIFT LOCK</SPAN> key of a typewriter, the <SPAN CLASS="keyname">CAPS LOCK</SPAN> key does not affect
these keys; it affects only the alphabetic keys. <A HREF="table3-3.html">Table 3-3</A> shows the nonalphabetic
keys and the codes they generate.</P>
<P><STRONG>Function Keys</STRONG> -- There are several keys on the keyboard which transmit control
codes. Control codes do not produce displayable characters but are codes for
functions. If these codes are received by the terminal, the VT100 will perform the
associated function as shown in <A HREF="table3-4.html">Table 3-4</A>.</P>
<P><STRONG>NO SCROLL</STRONG> -- When the <SPAN CLASS="keyname">NO SCROLL</SPAN> key is pressed it generates a single XOFF
code, inhibits further scrolling and freezes the screen. When pressed again the
same key generates XON. In practice, if the software recognizes XOFF, the host
will stop transmitting until the <SPAN CLASS="keyname">NO SCROLL</SPAN> key is pressed again to allow scrolling.
If the XOFF/XON feature is disabled (SET-UP function) the <SPAN CLASS="keyname">NO SCROLL</SPAN> key
causes no action.</P>
<P><STRONG>BREAK</STRONG> -- Typing the <SPAN CLASS="keyname">BREAK</SPAN> key causes the transmission line to be forced to its
zero state for 0.2333 seconds ± 10 percent. If either <SPAN CLASS="keyname">SHIFT</SPAN> key is down, the time
is increased to 3.5 seconds ± 10 percent. Data Terminal Ready is also deasserted
during this interval. At the conclusion of the 3.5 second interval Data Terminal
Ready will again be asserted.</P>
<P>The <SPAN CLASS="keyname">SHIFT</SPAN> and <SPAN CLASS="keyname">BREAK</SPAN> keys typed together provide the long-break-disconnect
function. Used with properly configured modems with RS-232-C levels, it will
cause both the local and remote data sets to disconnect. For modems that are
connected via the 20 mA current loop, issuing the long space may disconnect the
remote data set only.</P>
<P>The <SPAN CLASS="keyname">CTRL</SPAN> and <SPAN CLASS="keyname">BREAK</SPAN> keys typed together cause the transmission of the
answerback message.</P>
<P>The <SPAN CLASS="keyname">BREAK</SPAN> key does not function when the VT100 is in LOCAL mode.</P>
<P><STRONG>Auto Repeating</STRONG> -- All keys will auto repeat except: <SPAN CLASS="keyname">SET-UP</SPAN>, <SPAN CLASS="keyname">ESC</SPAN>, <SPAN CLASS="keyname">NO SCROLL</SPAN>,
<SPAN CLASS="keyname">TAB</SPAN>, <SPAN CLASS="keyname">RETURN</SPAN>, and any key pressed with <SPAN CLASS="keyname">CTRL</SPAN>. Auto repeating works as follows:
when a key is typed, its code(s) is sent once, immediately. If the key is held
down for more than ½ second, the code(s) will be sent repeatedly at a rate of
approximately 30 Hz (less if low transmit baud rates are used) until the key is
released.</P>
<P><STRONG>CTRL (Control)</STRONG> -- The <SPAN CLASS="keyname">CTRL</SPAN> key is used in conjunction with other keys on the
keyboard to generate control codes. If the <SPAN CLASS="keyname">CTRL</SPAN> key is held down when any of the
keys in <A HREF="table3-5.html">Table 3-5</A> are typed, the code actually transmitted is in the range
000<SUB>8</SUB>-037<SUB>8</SUB>.</P>
<P><STRONG>Cursor Control</STRONG> -- The keyboard also contains four keys labeled with arrows in
each of four directions. These keys transmit control sequences. If the host echoes
these control sequences back to the terminal, the cursor will move one character
up, down, right, or left. <A HREF="table3-6.html">Table 3-6</A> shows the control sequences generated by each
key.</P>
<P><STRONG>Auxiliary Keypad</STRONG> -- The keys on the auxiliary keypad normally transmit the codes
for the numerals, decimal point, minus sign, and comma. In addition, the key
labeled <SPAN CLASS="keyname">ENTER</SPAN> transmits the same code as the <SPAN CLASS="keyname">RETURN</SPAN> key. The host cannot tell
if these keys were typed on the auxiliary keypad as opposed to the corresponding
keys on the main keyboard. Therefore, software which requires considerable numeric
data entry need not be rewritten to use the keypad.</P>
<P>However, if software must be able to distinguish between pressing a key on the
auxiliary keypad and pressing the corresponding key on the main keyboard, the
host can give the terminal a command to place it in keypad application mode. In
keypad application mode all keys on the auxiliary keypad are defined to give control
sequences which may be used by the host as user-defined functions.</P>
<P>The codes sent by the auxiliary keypad for the four combinations of the
VT52/ANSI mode and keypad numeric/application mode are shown in Tables <A HREF="table3-7.html">3-7</A>
and <A HREF="table3-8.html">3-8</A>. None of the keys are affected by pressing the <SPAN CLASS="keyname">SHIFT</SPAN>, <SPAN CLASS="keyname">CAPS LOCK</SPAN>, or
<SPAN CLASS="keyname">CTRL</SPAN> keys.</P>
<P><STRONG>Special Graphics Characters</STRONG><BR>
If the Special Graphics set is selected, the graphics for ASCII codes 137<SUB>8</SUB> through
176<SUB>8</SUB> will be replaced according to <A HREF="table3-9.html">Table 3-9</A>. (See the SCS control sequence).</P>
<H2 ID="S3.2">Communications Protocols</H2>
<P><STRONG>Full Duplex</STRONG><BR>
The terminal can operate at transmission speeds up to 19,200 baud. However, the
terminal may not be able to keep up with incoming data. The terminal stores
incoming characters in a 64-character buffer and processes them on a first-in/first-out
basis. When the content of the buffer reaches 32 characters, the terminal will
transmit 023<SUB>8</SUB> (XOFF or DC3). On this signal the host should suspend its transmission
to the terminal. Eventually, if the host stops transmitting, the terminal will
deplete the buffer. When 16 characters remain in the buffer the terminal will
transmit 021<SUB>8</SUB> (XON or DC1) to signal the host that it may resume transmission.</P>
<P>If the host fails to respond to an XOFF from the terminal in a timely manner, the
buffer will continue to fill. When the 64-character capacity of the buffer is exceeded,
a condition occurs called "buffer overflow". To determine if the buffer will
overflow use the following formulas:</P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>No. of characters to overflow</TD>
<TD>=</TD>
<TD>32 - [3 × (receiver speed / transmit speed) ]</TD>
</TR>
<TR VALIGN="TOP">
<TD>Time to respond to XOFF</TD>
<TD>=</TD>
<TD>No. of characters to overflow × (bits per character + parity bit + 2) / receiver speed</TD>
</TR>
</TBODY>
</TABLE>
<P><SPAN CLASS="example">Example 1:</SPAN><BR>
The VT100 is transmitting 8-bit characters with no parity at 1200 baud and receiving
at 1200 baud. The terminal has just sent an XOFF which the host must
respond to with 0.2416 second to avoid a buffer overflow.</P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>No. of characters to overflow</TD>
<TD>=</TD>
<TD>32 - [3 × (1200 / 1200) ] = 29 characters</TD>
</TR>
<TR VALIGN="TOP">
<TD>Time to respond to XOFF</TD>
<TD>=</TD>
<TD>29 × [8 + 0 + 2) / 1200 = 0.2416 second</TD>
</TR>
</TBODY>
</TABLE>
<P><SPAN CLASS="example">Example 2:</SPAN><BR>
The VT100 is transmitting 7-bit characters with parity at 300 baud and receiving
at 1200 baud. The terminal has just sent an XOFF which the host must respond to
within 0.1666 second to avoid a buffer overflow.</P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>No. of characters to overflow</TD>
<TD>=</TD>
<TD>32 - [3 × (1200 / 300) ] = 20 characters</TD>
</TR>
<TR VALIGN="TOP">
<TD>Time to respond to XOFF</TD>
<TD>=</TD>
<TD>20 × [7 + 1 + 2) / 1200 = 0.1666 second</TD>
</TR>
</TBODY>
</TABLE>
<P>If the buffer overflows, the VT100 will begin to discard incoming characters and
the error character will be displayed.</P>
<P>Software which does not support receipt of the XOFF/XON signals from the terminal
can still use the VT100 provided the software never sends the <CODE>ESC</CODE> code to the
terminal, the baud rate is limited to 4800 or less, and the software does not use
smooth scrolling or split screen features.</P>
<P>Alternatively, if XOFF/XON cannot be used, fill characters may be used after characters
or character strings are sent to the VT100. A reference chart of fill characters
required for these functions is included in Appendix C.</P>
<P>Two of the terminal functions, Reset and Self-Test, reinitialize the terminal and
erase the buffer. This means that if characters are received subsequent to the
commands to perform these two functions and the characters are placed in the
buffer, the character would be destroyed without being processed.</P>
<P>To compensate for this, the host may act in one of two ways:</P>
<OL>
<LI>Immediately after sending the terminal the commands to perform either
the Reset or Self-Test functions, the host may act as if it had received
XOFF from the terminal, thus sending no more characters until it receives
XON. The terminal will transmit XON only after it completes the
specified operation and the XOFF/XON feature is enabled.</LI>
<LI>When the first method cannot be implemented, a delay of no less than
10 seconds may be used to allow the terminal time to complete the
invoked function. This method, however, does not guarantee against
the loss of data when an invoked function has detected an error; and
while this delay is currently adequate, future options may require a
change in the time delay.</LI>
</OL>
<P>The XOFF/XON synchronization scheme has an advantage over requiring the host
to insert delays or filler characters in its data stream. Requiring a minimum of
software support, XON/XOFF ensures that every character or command sent to
the VT100 will be processed in correct order. It frees interface programs from all
timing considerations and results in more reliable operation.</P>
<P>In addition to the buffer-filling condition, there are two other means of transmitting
XOFF and XON; the <SPAN CLASS="keyname">NO SCROLL</SPAN> key, and Control S/Control Q. If the XON/XOFF
feature is enabled, the VT100 will coordinate these three sources of XOFF and
XON so that the desired effect occurs. For example, if the buffer-filling condition
has caused an XOFF to be sent, and then the operator types the <SPAN CLASS="keyname">NO SCROLL</SPAN> key,
a second XOFF is not sent. Instead of sending an XON when the buffer empties,
the VT100 waits until the operator types the <SPAN CLASS="keyname">NO SCROLL</SPAN> key again before sending
XON.</P>
<P>Also, entering SET-UP mode causes the VT100 to temporarily stop taking characters
from the buffer. An XOFF will be sent if the buffer becomes nearly full.</P>
<P>Use of Control S and Control Q will also be synchronized with the <SPAN CLASS="keyname">NO SCROLL</SPAN>
key.</P>
<P>If the XON/XOFF feature is disabled, the buffer-filling condition will not send an
XOFF, the <SPAN CLASS="keyname">NO SCROLL</SPAN> key is disabled, and Control S and Control Q will be
transmitted as typed.</P>
<P>The VT100 also recognizes received XOFF and XON. Receipt of XOFF will inhibit
the VT100 from transmitting any codes except XOFF and XON. From three to
seven keystrokes on the keyboard will be stored in a keyboard buffer (some keys
transmit two or three codes, e.g., cursor controls). If the keyboard buffer overflows,
keyclicks will stop and the KBD LOCKED LED will come on. Transmission resumes
upon receipt of XON.</P>
<P>If the user transmits an XOFF to the host (by Control S or <SPAN CLASS="keyname">NO SCROLL</SPAN>), the host
should not echo any further type-in until the user types XON. This places the
burden of not overloading the host's output buffer on the user.</P>
<P>Entering and exiting SET-UP clears the keyboard locked condition.</P>
<H2 ID="S3.3">Terminal Control Commands</H2>
<P>The VT100 has many control commands which cause it to take action other than
displaying a character on the screen. In this way, the host can command the
terminal to move the cursor, change modes, ring the bell, etc. The following paragraphs
discuss the terminal control commands.</P>
<H3 ID="S3.3.1">Control Characters</H3>
<P>Control characters have values of 000<SUB>8</SUB> - 037<SUB>8</SUB>, and 177<SUB>8</SUB>. The control characters
recognized by the VT100 are shown in <A HREF="table3-10.html">Table 3-10</A>. All other control codes cause
no action to be taken.</P>
<P>Control characters (codes 0<SUB>8</SUB> to 37<SUB>8</SUB> inclusive) are specifically excluded from the
control sequence syntax, but may be embedded within a control sequence. Embedded
control characters are executed as soon as they are encountered by the
VT100. The processing of the control sequence then continues with the next character
received. The exceptions are: if the character <STRONG>ESC</STRONG> occurs, the current control
sequence is aborted, and a new one commences beginning with the <STRONG>ESC</STRONG> just
received. If the character CAN (30<SUB>8</SUB>) or the character SUB (32<SUB>8</SUB>) occurs, the current
control sequence is aborted. The ability to embed control characters allows
the synchronization characters XON and XOFF to be interpreted properly without
affecting the control sequence.</P>
<H3 ID="S3.3.2">Control Sequences</H3>
<P>The VT100 is an upward and downward software compatible terminal; that is,
previous DIGITAL video terminals have DIGITAL private standards for control sequences.
The American National Standards Institute (ANSI) has since standardized
escape and control sequences in terminals in documents X3.41-1974 and
X3.64-1977.</P>
<P CLASS="note">NOTE: The ANSI standards allow the manufacturer flexibility in
implementing each function. This manual describes how the VT100 will respond to
the implemented ANSI control function.</P>
<P>The VT100 is compatible with both the previous DIGITAL standard and ANSI
standards. Customers may use existing DIGITAL software designed around the
VT52 or new VT100 software. The VT100 has a "VT52 compatible" mode in
which the VT100 responds to control sequences like a VT52. In this mode, most of
the new VT100 features cannot be used.</P>
<P>Throughout this section of the manual, references will be made to "VT52 mode" or
"ANSI mode". These two terms are used to indicate the VT100's software compatibility.
All new software should be designed around the VT100 "ANSI mode".
Future DIGITAL video terminals will not necessarily be committed to VT52 compatibility.</P>
<P CLASS="note">NOTE: ANSI standards may be obtained by writing:<BR>
Sales Department<BR>
American National Standards Institute<BR>
1430 Broadway<BR>
New York, New York 10018</P>
<H3 ID="S3.3.3">Valid ANSI Mode Control Sequences</H3>
<H4>Definitions</H4>
<P>The following listing defines the basic elements of the ANSI mode control sequences.
A more complete listing appears in Appendix A.</P>
<DL>
<DT>Control Sequence Introducer (CSI)</DT>
<DD>An escape sequence that provides
supplementary controls and is itself a prefix affecting the interpretation of
a limited number of contiguous characters. In the VT100 the CSI is <CODE>ESC [</CODE>.</DD>
<DT>Parameter</DT>
<DD><OL>
<LI>A string of zero or more decimal characters which represent
a single value. Leading zeroes are ignored. The decimal characters
have a range of 0 (60<SUB>8</SUB>) to 9 (71<SUB>8</SUB>).</LI>
<LI>The value so represented.</LI>
</OL></DD>
<DT>Numeric Parameter</DT>
<DD>A parameter that represents a number, designated
by Pn.</DD>
<DT>Selective Parameter</DT>
<DD>A parameter that selects a subfunction from a
specified list of subfunctions, designated by Ps. In general, a control sequence
with more than one selective parameter causes the same effect as
several control sequences, each with one selective parameter, e.g., CSI Psa;
Psb; Psc F is identical to CSI Psa F CSI Psb F CSI Psc F.</DD>
<DT>Parameter String</DT>
<DD>A string of parameters separated by a semicolon (73<SUB>8</SUB>).</DD>
<DT>Default</DT>
<DD>A function-dependent value that is assumed when no explicit
value, or a value of 0, is specified.</DD>
<DT>Final character</DT>
<DD>A character whose bit combination terminates an escape
or control sequence.</DD>
</DL>
<P><SPAN CLASS="example">Examples:</SPAN></P>
<OL>
<LI><P>Control sequence for double-width line (DECDWL) <CODE>ESC # 6</CODE></P>
<TABLE>
<THEAD>
<TR>
<TH>Sequence</TH>
<TH>Octal Representation of Sequence</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD><IMG SRC="ch3examp1a.gif" ALT=""></TD>
<TD><IMG SRC="ch3examp1b.gif" ALT=""></TD>
</TR>
</TBODY>
</TABLE></LI>
<LI><P>Control sequence to turn off all character attributes, and then turn on underscore
and blink attributes (SGR). <CODE>ESC [ 0 ; 4 ; 5 m</CODE></P>
<TABLE>
<THEAD>
<TR>
<TH>Sequence</TH>
<TH>Octal Representation of Sequence</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD><IMG SRC="ch3examp2a.gif" ALT=""></TD>
<TD><IMG SRC="ch3examp2b.gif" ALT=""></TD>
</TR>
</TBODY>
</TABLE></LI>
</OL>
<P>Alternative sequences which will accomplish the same thing:</P>
<TABLE>
<THEAD>
<TR>
<TD> </TD>
<TH>Sequence</TH>
<TH>Octal Representation of Sequence</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>a.</TD>
<TD><CODE>ESC [ ; 4 ; 5 m</CODE></TD>
<TD><CODE>033 133 073 064 073 065 155</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD ROWSPAN="3">b.</TD>
<TD><CODE>ESC [ m</CODE></TD>
<TD><CODE>033 133 155</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD><CODE>ESC [ 4 m</CODE></TD>
<TD><CODE>033 133 064 155</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD><CODE>ESC [ 5 m</CODE></TD>
<TD><CODE>033 133 065 155</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>c.</TD>
<TD><CODE>ESC [ 0 ; 04; 005 m </CODE></TD>
<TD><CODE>033 133 060 073 060 064 073 060 060 065 155</CODE></TD>
</TR>
</TBODY>
</TABLE>
<H4>Control Sequences</H4>
<P>All of the following escape and control sequences are transmitted from the host
computer to the VT100 unless otherwise noted. All of the control sequences are a
subset of those specified in ANSI X3.64-1977 and ANSI X3.41-1974.</P>
<H4 ID="CPR"><SPAN CLASS="mnemonic">CPR</SPAN> -- Cursor Position Report -- VT100 to Host</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Pn ; Pn R</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 1</TD>
</TR>
</TBODY>
</TABLE>
<P>The CPR sequence reports the active position by means of the parameters. This
sequence has two parameter values, the first specifying the line and the second
specifying the column. The default condition with no parameters present, or parameters
of 0, is equivalent to a cursor at home position.</P>
<P>The numbering of lines depends on the state of the Origin Mode (DECOM).</P>
<P>This control sequence is solicited by a device status report (DSR) sent from the
host.</P>
<H4 ID="CUB"><SPAN CLASS="mnemonic">CUB</SPAN> -- Cursor Backward -- Host to VT100 and VT100 to Host</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Pn D</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 1</TD>
</TR>
</TBODY>
</TABLE>
<P>The CUB sequence moves the active position to the left. The distance moved is
determined by the parameter. If the parameter value is zero or one, the active
position is moved one position to the left. If the parameter value is n, the active
position is moved n positions to the left. If an attempt is made to move the cursor
to the left of the left margin, the cursor stops at the left margin. <EM>Editor Function</EM></P>
<H4 ID="CUD"><SPAN CLASS="mnemonic">CUD</SPAN> -- Cursor Down -- Host to VT100 and VT100 to Host</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Pn B</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 1</TD>
</TR>
</TBODY>
</TABLE>
<P>The CUD sequence moves the active position downward without altering the column
position. The number of lines moved is determined by the parameter. If the
parameter value is zero or one, the active position is moved one line downward. If
the parameter value is n, the active position is moved n lines downward. In an
attempt is made to move the cursor below the bottom margin, the cursor stops at
the bottom margin. <EM>Editor Function</EM></P>
<H4 ID="CUF"><SPAN CLASS="mnemonic">CUF</SPAN> -- Cursor Forward -- Host to VT100 and VT100 to Host</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Pn C</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 1</TD>
</TR>
</TBODY>
</TABLE>
<P>The CUF sequence moves the active position to the right. The distance moved is
determined by the parameter. A parameter value of zero or one moves the active
position one position to the right. A parameter value of n moves the active position
n positions to the right. If an attempt is made to move the cursor to the right of the
right margin, the cursor stops at the right margin. <EM>Editor Function</EM></P>
<H4 ID="CUP"><SPAN CLASS="mnemonic">CUP</SPAN> -- Cursor Position</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Pn ; Pn H</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 1</TD>
</TR>
</TBODY>
</TABLE>
<P>The CUP sequence moves the active position to the position specified by the
parameters. This sequence has two parameter values, the first specifying the line
position and the second specifying the column position. A parameter value of zero
or one for the first or second parameter moves the active position to the first line or
column in the display, respectively. The default condition with no parameters present
is equivalent to a cursor to home action. In the VT100, this control behaves
identically with its format effector counterpart, HVP. <EM>Editor Function</EM></P>
<P>The numbering of lines depends on the state of the Origin Mode (DECOM).</P>
<H4 ID="CUU"><SPAN CLASS="mnemonic">CUU</SPAN> -- Cursor Up -- Host to VT100 and VT100 to Host</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Pn A</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 1</TD>
</TR>
</TBODY>
</TABLE>
<P>Moves the active position upward without altering the column position. The number
of lines moved is determined by the parameter. A parameter value of zero or
one moves the active position one line upward. A parameter value of n moves the
active position n lines upward. If an attempt is made to move the cursor above the
top margin, the cursor stops at the top margin. <EM>Editor Function</EM></P>
<H4 ID="DA"><SPAN CLASS="mnemonic">DA</SPAN> -- Device Attributes</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Pn c</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 0</TD>
</TR>
</TBODY>
</TABLE>
<OL>
<LI>The host requests the VT100 to send a device attributes (DA) control
sequence to identify itself by sending the DA control sequence with
either no parameter or a parameter of 0.</LI>
<LI>Response to the request described above (VT100 to host) is generated
by the VT100 as a DA control sequence with the numeric parameters
as follows:
<TABLE WIDTH="100%">
<COL WIDTH="50%">
<COL WIDTH="50%">
<THEAD>
<TR>
<TH>Option Present</TH>
<TH>Sequence Sent</TH>
</TR>
</THEAD>
<TBODY>
<TR>
<TD>No options</TD>
<TD><CODE>ESC [?1;0c</CODE></TD>
</TR>
<TR>
<TD>Processor option (STP)</TD>
<TD><CODE>ESC [?1;1c</CODE></TD>
</TR>
<TR>
<TD>Advanced video option (AVO)</TD>
<TD><CODE>ESC [?1;2c</CODE></TD>
</TR>
<TR>
<TD>AVO and STP</TD>
<TD><CODE>ESC [?1;3c</CODE></TD>
</TR>
<TR>
<TD>Graphics option (GPO)</TD>
<TD><CODE>ESC [?1;4c</CODE></TD>
</TR>
<TR>
<TD>GPO and STP</TD>
<TD><CODE>ESC [?1;5c</CODE></TD>
</TR>
<TR>
<TD>GPO and AVO</TD>
<TD><CODE>ESC [?1;6c</CODE></TD>
</TR>
<TR>
<TD>GPO, STP and AVO</TD>
<TD><CODE>ESC [?1;7c</CODE></TD>
</TR>
</TBODY>
</TABLE></LI>
</OL>
<H4 ID="DECALN"><SPAN CLASS="mnemonic">DECALN</SPAN> -- Screen Alignment Display (DEC Private)</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC # 8</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>This command fills the entire screen area with uppercase Es for screen focus and
alignment. This command is used by DEC manufacturing and Field Service personnel.</P>
<H4 ID="DECANM"><SPAN CLASS="mnemonic">DECANM</SPAN> -- ANSI/VT52 Mode (DEC Private)</H4>
<P>This is a private parameter applicable to set mode (SM) and reset mode (RM)
control sequences. The reset state causes only VT52 compatible escape sequences
to be interpreted and executed. The set state causes only ANSI "compatible"
escape and control sequences to be interpreted and executed.</P>
<H4 ID="DECARM"><SPAN CLASS="mnemonic">DECARM</SPAN> -- Auto Repeat Mode (DEC Private)</H4>
<P>This is a private parameter applicable to set mode (SM) and reset mode (RM)
control sequences. The reset state causes no keyboard keys to auto-repeat. The
set state causes certain keyboard keys to auto-repeat.</P>
<H4 ID="DECAWM"><SPAN CLASS="mnemonic">DECAWM</SPAN> -- Autowrap Mode (DEC Private)</H4>
<P>This is a private parameter applicable to set mode (SM) and reset mode (RM)
control sequences. The reset state causes any displayable characters received
when the cursor is at the right margin to replace any previous characters there. The
set state causes these characters to advance to the start of the next line, doing a
scroll up if required and permitted.</P>
<H4 ID="DECCKM"><SPAN CLASS="mnemonic">DECCKM</SPAN> -- Cursor Keys Mode (DEC Private)</H4>
<P>This is a private parameter applicable to set mode (SM) and reset mode (RM)
control sequences. This mode is only effective when the terminal is in keypad
application mode (see DECKPAM) and the ANSI/VT52 mode (DECANM) is set
(see DECANM). Under these conditions, if the cursor key mode is reset, the four
cursor function keys will send ANSI cursor control commands. If cursor key mode
is set, the four cursor function keys will send application functions.</P>
<H4 ID="DECCOLM"><SPAN CLASS="mnemonic">DECCOLM</SPAN> -- Column Mode (DEC Private)</H4>
<P>This is a private parameter applicable to set mode (SM) and reset mode (RM)
control sequences. The reset state causes a maximum of 80 columns on the
screen. The set state causes a maximum of 132 columns on the screen.</P>
<H4 ID="DECDHL"><SPAN CLASS="mnemonic">DECDHL</SPAN> -- Double Height Line (DEC Private)</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD>Top Half: <STRONG><CODE>ESC # 3</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
<TR>
<TD>Bottom Half: <STRONG><CODE>ESC # 4</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>These sequences cause the line containing the active position to become the top
or bottom half of a double-height double-width line. The sequences must be used
in pairs on adjacent lines and the same character output must be sent to both lines
to form full double-height characters. If the line was single-width single-height, all
characters to the right of the center of the screen are lost. The cursor remains over
the same character position unless it would be to the right of the right margin, in
which case it is moved to the right margin.</P>
<P CLASS="note">NOTE: The use of double-width characters reduces the number of characters per line by half.</P>
<H4 ID="DECDWL"><SPAN CLASS="mnemonic">DECDWL</SPAN> -- Double-Width Line (DEC Private)</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC # 6</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>This causes the line that contains the active position to become double-width
single-height. If the line was single-width single-height, all characters to the right
of the screen are lost. The cursor remains over the same character position unless
it would be to the right of the right margin, in which case, it is moved to the right
margin.</P>
<P CLASS="note">NOTE: The use of double-width characters reduces the number of characters per line by half.</P>
<H4 ID="DECID"><SPAN CLASS="mnemonic">DECID</SPAN> -- Identify Terminal (DEC Private)</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC Z</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>This sequence causes the same response as the ANSI device attributes (DA). This
sequence will not be supported in future DEC terminals, therefore, DA should be
used by any new software.</P>
<H4 ID="DECINLM"><SPAN CLASS="mnemonic">DECINLM</SPAN> -- Interlace Mode (DEC Private)</H4>
<P>This is a private parameter applicable to set mode (SM) and reset mode (RM)
control sequences. The reset state (non-interlace) causes the video processor to
display 240 scan lines per frame. The set state (interlace) causes the video processor
to display 480 scan lines per frame. There is no increase in character resolution.</P>
<H4 ID="DECKPAM"><SPAN CLASS="mnemonic">DECKPAM</SPAN> -- Keypad Application Mode (DEC Private)</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC =</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>The auxiliary keypad keys will transmit control sequences as defined in Tables <A HREF="table3-7.html">3-7</A>
and <A HREF="table3-8.html">3-8</A>.</P>
<H4 ID="DECKPNM"><SPAN CLASS="mnemonic">DECKPNM</SPAN> -- Keypad Numeric Mode (DEC Private)</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC ></CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>The auxiliary keypad keys will send ASCII codes corresponding to the characters
engraved on the keys.</P>
<H4 ID="DECLL"><SPAN CLASS="mnemonic">DECLL</SPAN> -- Load LEDS (DEC Private)</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Ps q</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 0</TD>
</TR>
</TBODY>
</TABLE>
<P>Load the four programmable LEDs on the keyboard according to the parameter(s).</P>
<TABLE WIDTH="100%">
<COL WIDTH="30%">
<COL WIDTH="70%">
<THEAD>
<TR>
<TH>Parameter</TH>
<TH>Parameter Meaning</TH>
</TR>
</THEAD>
<TBODY>
<TR>
<TD>0</TD>
<TD>Clear LEDs L1 through L4</TD>
</TR>
<TR>
<TD>1</TD>
<TD>Light L1</TD>
</TR>
<TR>
<TD>2</TD>
<TD>Light L2</TD>
</TR>
<TR>
<TD>3</TD>
<TD>Light L3</TD>
</TR>
<TR>
<TD>4</TD>
<TD>Light L4</TD>
</TR>
</TBODY>
</TABLE>
<P>LED numbers are indicated on the keyboard.</P>
<H4 ID="DECOM"><SPAN CLASS="mnemonic">DECOM</SPAN> -- Origin Mode (DEC Private)</H4>
<P>This is a private parameter applicable to set mode (SM) and reset mode (RM)
control sequences. The reset state causes the origin to be at the upper-left character
position on the screen. Line and column numbers are, therefore, independent of
current margin settings. The cursor may be positioned outside the margins with a
cursor position (CUP) or horizontal and vertical position (HVP) control.</P>
<P>The set state causes the origin to be at the upper-left character position within the
margins. Line and column numbers are therefore relative to the current margin
settings. The cursor is not allowed to be positioned outside the margins.</P>
<P>The cursor is moved to the new home position when this mode is set or reset.</P>
<P>Lines and columns are numbered consecutively, with the origin being line 1, column
1.</P>
<H4 ID="DECRC"><SPAN CLASS="mnemonic">DECRC</SPAN> -- Restore Cursor (DEC Private)</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC 8</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>This sequence causes the previously saved cursor position, graphic rendition, and
character set to be restored.</P>
<H4 ID="DECREPTPARM"><SPAN CLASS="mnemonic">DECREPTPARM</SPAN> -- Report Terminal Parameters</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ <sol>; <par>; <nbits>; <xspeed>;
<rspeed>; <clkmul>; <flags> x</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>These sequence parameters are explained below in the DECREQTPARM sequence.</P>
<H4 ID="DECREQTPARM"><SPAN CLASS="mnemonic">DECREQTPARM</SPAN> -- Request Terminal Parameters</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ <sol> x</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>The sequence DECREPTPARM is sent by the terminal controller to notify the host
of the status of selected terminal parameters. The status sequence may be sent
when requested by the host or at the terminal's discretion. DECREPTPARM is sent
upon receipt of a DECREQTPARM. On power-up or reset, the VT100 is inhibited
from sending unsolicited reports.</P>
<P>The meanings of the sequence parameters are:</P>
<TABLE WIDTH="100%" FRAME="HSIDES" RULES="GROUPS" CELLSPACING="0" CELLPADDING="3">
<COL WIDTH="20%">
<COL WIDTH="20%">
<COL WIDTH="20%">
<COL WIDTH="40%">
<THEAD>
<TR>
<TH>Parameter</TH>
<TH>Value</TH>
<TH COLSPAN="2">Meaning</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD ROWSPAN="4"><sol></TD>
<TD>0 or none</TD>
<TD COLSPAN="2">This message is a request (DECREQTPARM) and
the terminal will be allowed to send unsolicited reports.
(Unsolicited reports are sent when the terminal
exits the SET-UP mode).</TD>
</TR>
<TR VALIGN="TOP">
<TD>1</TD>
<TD COLSPAN="2">This message is a request; from now on the terminal
may only report in response to a request.</TD>
</TR>
<TR VALIGN="TOP">
<TD>2</TD>
<TD COLSPAN="2">This message is a report (DECREPTPARM).</TD>
</TR>
<TR VALIGN="TOP">
<TD>3</TD>
<TD COLSPAN="2">This message is a report and the terminal is only
reporting on request.</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD ROWSPAN="3"><par></TD>
<TD>1</TD>
<TD COLSPAN="2">No parity set</TD>
</TR>
<TR VALIGN="TOP">
<TD>4</TD>
<TD COLSPAN="2">Parity is set and odd</TD>
</TR>
<TR VALIGN="TOP">
<TD>5</TD>
<TD COLSPAN="2">Parity is set and even</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD ROWSPAN="2"><nbits></TD>
<TD>1</TD>
<TD COLSPAN="2">8 bits per character</TD>
</TR>
<TR VALIGN="TOP">
<TD>2</TD>
<TD COLSPAN="2">7 bits per character</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="MIDDLE">
<TD ROWSPAN="16"><xspeed>, <rspeed></TD>
<TD>0</TD>
<TD>50</TD>
<TD ROWSPAN="16">Bits per second</TD>
</TR>
<TR VALIGN="TOP">
<TD>8</TD>
<TD>75</TD>
</TR>
<TR VALIGN="TOP">
<TD>16</TD>
<TD>110</TD>
</TR>
<TR VALIGN="TOP">
<TD>24</TD>
<TD>134.5</TD>
</TR>
<TR VALIGN="TOP">
<TD>32</TD>
<TD>150</TD>
</TR>
<TR VALIGN="TOP">
<TD>40</TD>
<TD>200</TD>
</TR>
<TR VALIGN="TOP">
<TD>48</TD>
<TD>300</TD>
</TR>
<TR VALIGN="TOP">
<TD>56</TD>
<TD>600</TD>
</TR>
<TR VALIGN="TOP">
<TD>64</TD>
<TD>1200</TD>
</TR>
<TR VALIGN="TOP">
<TD>72</TD>
<TD>1800</TD>
</TR>
<TR VALIGN="TOP">
<TD>80</TD>
<TD>2000</TD>
</TR>
<TR VALIGN="TOP">
<TD>88</TD>
<TD>2400</TD>
</TR>
<TR VALIGN="TOP">
<TD>96</TD>
<TD>3600</TD>
</TR>
<TR VALIGN="TOP">
<TD>104</TD>
<TD>4800</TD>
</TR>
<TR VALIGN="TOP">
<TD>112</TD>
<TD>9600</TD>
</TR>
<TR VALIGN="TOP">
<TD>120</TD>
<TD>19200</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD><clkmul></TD>
<TD>1</TD>
<TD COLSPAN="2">The bit rate multiplier is 16.</TD>
</TR>
</TBODY>
<TBODY>
<TR VALIGN="TOP">
<TD><flags></TD>
<TD>0-15</TD>
<TD COLSPAN="2">This value communicates the four switch values in
block 5 of SET UP B, which are only visible to the
user when an STP option is installed. These bits may
be assigned for an STP device. The four bits are a
decimal-encoded binary number.</TD>
</TR>
</TBODY>
</TABLE>
<H4 ID="DECSC"><SPAN CLASS="mnemonic">DECSC</SPAN> -- Save Cursor (DEC Private)</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC 7</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>This sequence causes the cursor position, graphic rendition, and character set to
be saved. (See DECRC).</P>
<H4 ID="DECSCLM"><SPAN CLASS="mnemonic">DECSCLM</SPAN> -- Scrolling Mode (DEC Private)</H4>
<P>This is a private parameter applicable to set mode (SM) and reset mode (RM)
control sequences. The reset state causes scrolls to "jump" instantaneously. The
set state causes scrolls to be "smooth" at a maximum rate of six lines per second.</P>
<H4 ID="DECSCNM"><SPAN CLASS="mnemonic">DECSCNM</SPAN> -- Screen Mode (DEC Private)</H4>
<P>This is a private parameter applicable to set mode (SM) and reset mode (RM)
control sequences. The reset state causes the screen to be black with white characters.
The set state causes the screen to be white with black characters.</P>
<H4 ID="DECSTBM"><SPAN CLASS="mnemonic">DECSTBM</SPAN> -- Set Top and Bottom Margins (DEC Private)</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Pn; Pn r</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default values: see below</EM></TD>
</TR>
</TBODY>
</TABLE>
<P>This sequence sets the top and bottom margins to define the scrolling region. The
first parameter is the line number of the first line in the scrolling region; the second
parameter is the line number of the bottom line in the scrolling region. Default is
the entire screen (no margins). The minimum size of the scrolling region allowed is
two lines, i.e., the top margin must be less than the bottom margin. The cursor is
placed in the home position (see Origin Mode DECOM).</P>
<H4 ID="DECSWL"><SPAN CLASS="mnemonic">DECSWL</SPAN> -- Single-width Line (DEC Private)</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC # 5</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>This causes the line which contains the active position to become single-width
single-height. The cursor remains on the same character position. This is the
default condition for all new lines on the screen.</P>
<H4 ID="DECTST"><SPAN CLASS="mnemonic">DECTST</SPAN> -- Invoke Confidence Test</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ 2 ; Ps y</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Ps is the parameter indicating the test to be done. Ps is computed by taking the
weight indicated for each desired test and adding them together. If Ps is 0, no test
is performed but the VT100 is reset.</P>
<TABLE WIDTH="100%">
<COL WIDTH="50%">
<COL WIDTH="50%">
<THEAD>
<TR>
<TH>Test</TH>
<TH>Weight</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>Power up self-test (ROM check
sum, RAM, NVR keyboard
and AVO if installed)</TD>
<TD>1</TD>
</TR>
<TR VALIGN="TOP">
<TD>Data Loop Back</TD>
<TD>2 (loop back connector required)</TD>
</TR>
<TR VALIGN="TOP">
<TD>EIA modem control test</TD>
<TD>4 (loop back connector required)</TD>
</TR>
<TR VALIGN="TOP">
<TD>Repeat Selected Test(s)<BR>
indefinitely (until failure or
power off)</TD>
<TD>8</TD>
</TR>
</TBODY>
</TABLE>
<H4 ID="DSR"><SPAN CLASS="mnemonic">DSR</SPAN> -- Device Status Report</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Ps n</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 0</TD>
</TR>
</TBODY>
</TABLE>
<P>Requests and reports the general status of the VT100 according to the following
parameter(s).</P>
<TABLE WIDTH="100%">
<COL WIDTH="20%">
<COL WIDTH="80%">
<THEAD>
<TR>
<TH>Parameter</TH>
<TH>Parameter Meaning</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>0</TD>
<TD>Response from VT100 -- Ready, No malfunctions
detected (default)</TD>
</TR>
<TR VALIGN="TOP">
<TD>3</TD>
<TD>Response from VT100 -- Malfunction -- retry</TD>
</TR>
<TR VALIGN="TOP">
<TD>5</TD>
<TD>Command from host -- Please report status (using a
DSR control sequence)</TD>
</TR>
<TR VALIGN="TOP">
<TD>6</TD>
<TD>Command from host -- Please report active position
(using a CPR control sequence)</TD>
</TR>
</TBODY>
</TABLE>
<P>DSR with a parameter value of 0 or 3 is always sent as a response to a requesting
DSR with a parameter value of 5.</P>
<H4 ID="ED"><SPAN CLASS="mnemonic">ED</SPAN> -- Erase In Display</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Ps J</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 0</TD>
</TR>
</TBODY>
</TABLE>
<P>This sequence erases some or all of the characters in the display according to the
parameter. Any complete line erased by this sequence will return that line to single
width mode. <EM>Editor Function</EM></P>
<TABLE WIDTH="100%">
<COL WIDTH="20%">
<COL WIDTH="80%">
<THEAD>
<TR>
<TH>Parameter</TH>
<TH>Parameter Meaning</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>0</TD>
<TD>Erase from the active position to the end of the
screen, inclusive (default)</TD>
</TR>
<TR VALIGN="TOP">
<TD>1</TD>
<TD>Erase from start of the screen to the active position,
inclusive</TD>
</TR>
<TR VALIGN="TOP">
<TD>2</TD>
<TD>Erase all of the display -- all lines are erased,
changed to single-width, and the cursor does not move.</TD>
</TR>
</TBODY>
</TABLE>
<H4 ID="EL"><SPAN CLASS="mnemonic">EL</SPAN> -- Erase In Line</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Ps K</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 0</TD>
</TR>
</TBODY>
</TABLE>
<P>Erases some or all characters in the active line according to the parameter. <EM>Editor
Function</EM></P>
<TABLE WIDTH="100%">
<COL WIDTH="20%">
<COL WIDTH="80%">
<THEAD>
<TR>
<TH>Parameter</TH>
<TH>Parameter Meaning</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>0</TD>
<TD>Erase from the active position to the end of the line, inclusive (default)</TD>
</TR>
<TR VALIGN="TOP">
<TD>1</TD>
<TD>Erase from the start of the screen to the active position, inclusive</TD>
</TR>
<TR VALIGN="TOP">
<TD>2</TD>
<TD>Erase all of the line, inclusive</TD>
</TR>
</TBODY>
</TABLE>
<H4 ID="HTS"><SPAN CLASS="mnemonic">HTS</SPAN> -- Horizontal Tabulation Set</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC H</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Set one horizontal stop at the active position. <EM>Format Effector</EM></P>
<H4 ID="HVP"><SPAN CLASS="mnemonic">HVP</SPAN> -- Horizontal and Vertical Position</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Pn ; Pn f</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 1</TD>
</TR>
</TBODY>
</TABLE>
<P>Moves the active position to the position specified by the parameters. This sequence
has two parameter values, the first specifying the line position and the
second specifying the column. A parameter value of either zero or one causes the
active position to move to the first line or column in the display, respectively. The
default condition with no parameters present moves the active position to the
home position. In the VT100, this control behaves identically with its editor function
counterpart, CUP. The numbering of lines and columns depends on the reset
or set state of the origin mode (DECOM). <EM>Format Effector</EM></P>
<H4 ID="IND"><SPAN CLASS="mnemonic">IND</SPAN> -- Index</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC D</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>This sequence causes the active position to move downward one line without
changing the column position. If the active position is at the bottom margin, a
scroll up is performed. <EM>Format Effector</EM></P>
<H4 ID="LNM"><SPAN CLASS="mnemonic">LNM</SPAN> -- Line Feed/New Line Mode</H4>
<P>This is a parameter applicable to set mode (SM) and reset mode (RM) control sequences.
The reset state causes the interpretation of the line feed (LF), defined in
ANSI Standard X3.4-1977, to imply only vertical movement of the active position
and causes the <SPAN CLASS="keyname">RETURN</SPAN> key (CR) to send the single code CR. The set state causes
the LF to imply movement to the first position of the following line and causes the
<SPAN CLASS="keyname">RETURN</SPAN> key to send the two codes (CR, LF). This is the New Line (NL) option.</P>
<P>This mode does not affect the index (IND), or next line (NEL) format effectors.</P>
<H4 ID="NEL"><SPAN CLASS="mnemonic">NEL</SPAN> -- Next Line</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC E</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>This sequence causes the active position to move to the first position on the next
line downward. If the active position is at the bottom margin, a scroll up is performed.
<EM>Format Effector</EM></P>
<H4 ID="RI"><SPAN CLASS="mnemonic">RI</SPAN> -- Reverse Index</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC M</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Move the active position to the same horizontal position on the preceding line. If
the active position is at the top margin, a scroll down is performed. <EM>Format Effector</EM></P>
<H4 ID="RIS"><SPAN CLASS="mnemonic">RIS</SPAN> -- Reset To Initial State</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC c</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Reset the VT100 to its initial state, i.e., the state it has after it is powered on. This
also causes the execution of the power-up self-test and signal INIT H to be asserted
briefly.</P>
<H4 ID="RM"><SPAN CLASS="mnemonic">RM</SPAN> -- Reset Mode</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Ps ; Ps ; . . . ; Ps l</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> none</TD>
</TR>
</TBODY>
</TABLE>
<P>Resets one or more VT100 modes as specified by each selective parameter in the
parameter string. Each mode to be reset is specified by a separate parameter. [See
Set Mode (SM) control sequence]. (See Modes following this section).</P>
<H4 ID="SCS"><SPAN CLASS="mnemonic">SCS</SPAN> -- Select Character Set</H4>
<P>The appropriate G0 and G1 character sets are designated from one of the five
possible character sets. The G0 and G1 sets are invoked by the codes SI and SO
(shift in and shift out) respectively.</P>
<TABLE WIDTH="100%">
<COL WIDTH="20%">
<COL WIDTH="20%">
<COL WIDTH="60%">
<THEAD>
<TR VALIGN="BOTTOM">
<TH>G0 Sets Sequence</TH>
<TH>G1 Sets Sequence</TH>
<TH>Meaning</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD><STRONG><CODE>ESC ( A</CODE></STRONG></TD>
<TD><STRONG><CODE>ESC ) A</CODE></STRONG></TD>
<TD>United Kingdom Set</TD>
</TR>
<TR VALIGN="TOP">
<TD><STRONG><CODE>ESC ( B</CODE></STRONG></TD>
<TD><STRONG><CODE>ESC ) B</CODE></STRONG></TD>
<TD>ASCII Set</TD>
</TR>
<TR VALIGN="TOP">
<TD><STRONG><CODE>ESC ( 0</CODE></STRONG></TD>
<TD><STRONG><CODE>ESC ) 0</CODE></STRONG></TD>
<TD>Special Graphics</TD>
</TR>
<TR VALIGN="TOP">
<TD><STRONG><CODE>ESC ( 1</CODE></STRONG></TD>
<TD><STRONG><CODE>ESC ) 1</CODE></STRONG></TD>
<TD>Alternate Character ROM Standard Character Set</TD>
</TR>
<TR VALIGN="TOP">
<TD><STRONG><CODE>ESC ( 2</CODE></STRONG></TD>
<TD><STRONG><CODE>ESC ) 2</CODE></STRONG></TD>
<TD>Alternate Character ROM Special Graphics</TD>
</TR>
</TBODY>
</TABLE>
<P>The United Kingdom and ASCII sets conform to the "ISO international register of
character sets to be used with escape sequences". The other sets are private
character sets. Special graphics means that the graphic characters for the codes
137<SUB>8</SUB> to 176<SUB>8</SUB> are replaced with other characters. The specified character set will
be used until another SCS is received.</P>
<P CLASS="note">NOTE: Additional information concerning the SCS escape sequence may be obtained
in ANSI standard X3.41-1974.</P>
<H4 ID="SGR"><SPAN CLASS="mnemonic">SGR</SPAN> -- Select Graphic Rendition</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Ps ; . . . ; Ps m</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 0</TD>
</TR>
</TBODY>
</TABLE>
<P>Invoke the graphic rendition specified by the parameter(s). All following characters
transmitted to the VT100 are rendered according to the parameter(s) until the next
occurrence of SGR. <EM>Format Effector</EM></P>
<TABLE WIDTH="100%">
<THEAD>
<TR VALIGN="BOTTOM">
<TH>Parameter</TH>
<TH>Parameter Meaning</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>0</TD>
<TD>Attributes off</TD>
</TR>
<TR VALIGN="TOP">
<TD>1</TD>
<TD>Bold or increased intensity</TD>
</TR>
<TR VALIGN="TOP">
<TD>4</TD>
<TD>Underscore</TD>
</TR>
<TR VALIGN="TOP">
<TD>5</TD>
<TD>Blink</TD>
</TR>
<TR VALIGN="TOP">
<TD>7</TD>
<TD>Negative (reverse) image</TD>
</TR>
</TBODY>
</TABLE>
<P>All other parameter values are ignored.</P>
<P>With the Advanced Video Option, only one type of character attribute is possible
as determined by the cursor selection; in that case specifying either the
underscore or the reverse attribute will activate the currently selected attribute.
(See cursor selection in Chapter 1).</P>
<H4 ID="SM"><SPAN CLASS="mnemonic">SM</SPAN> -- Set Mode</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Ps ; . . . ; Ps h</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> none</TD>
</TR>
</TBODY>
</TABLE>
<P>Causes one or more modes to be set within the VT100 as specified by each
selective parameter in the parameter string. Each mode to be set is specified by a
separate parameter. A mode is considered set until it is reset by a reset mode (RM)
control sequence.</P>
<H4 ID="TBC"><SPAN CLASS="mnemonic">TBC</SPAN> -- Tabulation Clear</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC [ Ps g</CODE></STRONG></TD>
<TD ALIGN="RIGHT"><EM>default value:</EM> 0</TD>
</TR>
</TBODY>
</TABLE>
<TABLE WIDTH="100%">
<COL WIDTH="20%">
<COL WIDTH="80%">
<THEAD>
<TR VALIGN="BOTTOM">
<TH>Parameter</TH>
<TH>Parameter Meaning</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>0</TD>
<TD>Clear the horizontal tab stop at the active position
(the default case).</TD>
</TR>
<TR VALIGN="TOP">
<TD>3</TD>
<TD>Clear all horizontal tab stops.</TD>
</TR>
</TBODY>
</TABLE>
<P>Any other parameter values are ignored. <EM>Format Effector</EM></P>
<H3 ID="S3.3.4">Modes</H3>
<P>The following is a list of VT100 modes which may be changed with set mode (SM)
and reset mode (RM) controls.</P>
<H4>ANSI Specified Modes</H4>
<TABLE WIDTH="100%">
<COL WIDTH="20%">
<COL WIDTH="20%">
<COL WIDTH="60%">
<THEAD>
<TR VALIGN="BOTTOM">
<TH>Parameter</TH>
<TH>Mode Mnemonic</TH>
<TH>Mode Function</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>0</TD>
<TD></TD>
<TD>Error (ignored)</TD>
</TR>
<TR VALIGN="TOP">
<TD>20</TD>
<TD>LNM</TD>
<TD>Line feed new line mode</TD>
</TR>
</TBODY>
</TABLE>
<H4>DEC Private Modes</H4>
<P>If the first character in the parameter string is ? (77<SUB>8</SUB>), the parameters are interpreted
as DEC private parameters according to the following:</P>
<TABLE WIDTH="100%">
<COL WIDTH="20%">
<COL WIDTH="20%">
<COL WIDTH="60%">
<THEAD>
<TR VALIGN="BOTTOM">
<TH>Parameter</TH>
<TH>Mode Mnemonic</TH>
<TH>Mode Function</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>0</TD>
<TD></TD>
<TD>Error (ignored)</TD>
</TR>
<TR VALIGN="TOP">
<TD>1</TD>
<TD>DECCKM</TD>
<TD>Cursor key</TD>
</TR>
<TR VALIGN="TOP">
<TD>2</TD>
<TD>DECANM</TD>
<TD>ANSI/VT52</TD>
</TR>
<TR VALIGN="TOP">
<TD>3</TD>
<TD>DECCOLM</TD>
<TD>Column</TD>
</TR>
<TR VALIGN="TOP">
<TD>4</TD>
<TD>DECSCLM</TD>
<TD>Scrolling</TD>
</TR>
<TR VALIGN="TOP">
<TD>5</TD>
<TD>DECSCNM</TD>
<TD>Screen</TD>
</TR>
<TR VALIGN="TOP">
<TD>6</TD>
<TD>DECOM</TD>
<TD>Origin</TD>
</TR>
<TR VALIGN="TOP">
<TD>7</TD>
<TD>DECAWM</TD>
<TD>Auto wrap</TD>
</TR>
<TR VALIGN="TOP">
<TD>8</TD>
<TD>DECARM</TD>
<TD>Auto repeating</TD>
</TR>
<TR VALIGN="TOP">
<TD>9</TD>
<TD>DECINLM</TD>
<TD>Interlace</TD>
</TR>
</TBODY>
</TABLE>
<P>Any other parameter values are ignored.</P>
<P>The following modes, which are specified in the ANSI X3.64-1977 standard, may
be considered to be permanently set, permanently reset, or not applicable, as
noted. Refer to that standard for further information concerning these modes.</P>
<TABLE WIDTH="100%">
<COL WIDTH="20%">
<COL WIDTH="40%">
<COL WIDTH="40%">
<THEAD>
<TR VALIGN="BOTTOM">
<TH>Mode Mnemonic</TH>
<TH>Mode Function</TH>
<TH>State</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>CRM</TD>
<TD>Control representation</TD>
<TD>Reset</TD>
</TR>
<TR VALIGN="TOP">
<TD>EBM</TD>
<TD>Editing boundary</TD>
<TD>Reset</TD>
</TR>
<TR VALIGN="TOP">
<TD>ERM</TD>
<TD>Erasure</TD>
<TD>Set</TD>
</TR>
<TR VALIGN="TOP">
<TD>FEAM</TD>
<TD>Format effector action</TD>
<TD>Reset</TD>
</TR>
<TR VALIGN="TOP">
<TD>FETM</TD>
<TD>Format effector transfer</TD>
<TD>Reset</TD>
</TR>
<TR VALIGN="TOP">
<TD>GATM</TD>
<TD>Guarded area transfer</TD>
<TD>NA</TD>
</TR>
<TR VALIGN="TOP">
<TD>HEM</TD>
<TD>Horizontal editing</TD>
<TD>NA</TD>
</TR>
<TR VALIGN="TOP">
<TD>IRM</TD>
<TD>Insertion-replacement</TD>
<TD>Reset</TD>
</TR>
<TR VALIGN="TOP">
<TD>KAM</TD>
<TD>Keyboard action</TD>
<TD>Reset</TD>
</TR>
<TR VALIGN="TOP">
<TD>MATM</TD>
<TD>Multiple area transfer</TD>
<TD>NA</TD>
</TR>
<TR VALIGN="TOP">
<TD>PUM</TD>
<TD>Positioning unit</TD>
<TD>Reset</TD>
</TR>
<TR VALIGN="TOP">
<TD>SATM</TD>
<TD>Selected area transfer</TD>
<TD>NA</TD>
</TR>
<TR VALIGN="TOP">
<TD>SRTM</TD>
<TD>Status reporting transfer</TD>
<TD>Reset</TD>
</TR>
<TR VALIGN="TOP">
<TD>TSM</TD>
<TD>Tabulation stop</TD>
<TD>Reset</TD>
</TR>
<TR VALIGN="TOP">
<TD>TTM</TD>
<TD>Transfer termination</TD>
<TD>NA</TD>
</TR>
<TR VALIGN="TOP">
<TD>VEM</TD>
<TD>Vertical editing</TD>
<TD>NA</TD>
</TR>
</TBODY>
</TABLE>
<H3 ID="S3.3.5">Valid VT52 Mode Control Sequences</H3>
<H4 ID="VT52CUU">Cursor Up</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC A</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Move the active position upward one position without altering the horizontal position.
If an attempt is made to move the cursor above the top margin, the cursor
stops at the top margin.</P>
<H4 ID="VT52CUD">Cursor Down</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC B</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Move the active position downward one position without altering the horizontal
position. If an attempt is made to move the cursor below the bottom margin, the
cursor stops at the bottom margin.</P>
<H4 ID="VT52CUF">Cursor Right</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC C</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Move the active position to the right. If an attempt is made to move the cursor to
the right of the right margin, the cursor stops at the right margin.</P>
<H4 ID="VT52CUB">Cursor Left</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC D</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Move the active position one position to the left. If an attempt is made to move the
cursor to the left of the left margin, the cursor stops at the left margin.</P>
<H4 ID="VT52EGM">Enter Graphics Mode</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC F</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Causes the special graphics character set to be used.</P>
<P CLASS="note">NOTE: The special graphics characters in the VT100
are different from those in the VT52.</P>
<H4 ID="VT52XGM">Exit Graphics Mode</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC G</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>This sequence causes the standard ASCII character set to be used.</P>
<H4 ID="VT52CUH">Cursor to Home</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC H</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Move the cursor to the home position.</P>
<H4 ID="VT52RI">Reverse Line Feed</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC I</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Move the active position upward one position without altering the column position.
If the active position is at the top margin, a scroll down is performed.</P>
<H4 ID="VT52ED">Erase to End of Screen</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC J</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Erase all characters from the active position to the end of the screen. The active
position is not changed.</P>
<H4 ID="VT52EL">Erase to End of Line</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC K</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Erase all characters from the active position to the end of the current line. The
active position is not changed.</P>
<H4 ID="VT52CUP">Direct Cursor Address</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC Y line column</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>Move the cursor to the specified line and column. The line and column numbers
are sent as ASCII codes whose values are the number plus 037<SUB>8</SUB>; e.g., 040<SUB>8</SUB> refers
to the first line or column, 050<SUB>8</SUB> refers to the eighth line or column, etc.</P>
<H4 ID="VT52ID">Identify</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC Z</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>This sequence causes the terminal to send its identifier escape sequence to the
host. This sequence is:</P>
<BLOCKQUOTE><STRONG><CODE>ESC / Z</CODE></STRONG></BLOCKQUOTE>
<H4 ID="VT52KPAM">Enter Alternate Keypad Mode</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC =</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>The optional auxiliary keypad keys will send unique identifiable escape sequences
for use by applications programs.</P>
<P CLASS="note">NOTE: Information regarding options must be obtained in ANSI
mode, using the device attributes (DA) control sequences.</P>
<H4 ID="VT52KPNM">Exit Alternate Keypad Mode</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC ></CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>The optional auxiliary keypad keys send the ASCII codes for the functions or characters
engraved on the key.</P>
<H4 ID="VT52ANSI">Enter ANSI Mode</H4>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD><STRONG><CODE>ESC <</CODE></STRONG></TD>
<TD ALIGN="RIGHT"> </TD>
</TR>
</TBODY>
</TABLE>
<P>All subsequent escape sequences will be interpreted according to ANSI Standards
X3.64-1977 and X3.41-1974. The VT52 escape sequence designed in this section
will not be recognized.</P>
<H3 ID="S3.3.6">Control Sequence Summary</H3>
<P>The following is a summary of the VT100 control sequences.</P>
<H4 ID="S3.3.6.1">ANSI Compatible Mode</H4>
<P><STRONG>Cursor Movement Commands</STRONG></P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>Cursor up</TD>
<TD><CODE>ESC [ Pn A</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Cursor down</TD>
<TD><CODE>ESC [ Pn B</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Cursor forward (right)</TD>
<TD><CODE>ESC [ Pn C</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Cursor backward (left)</TD>
<TD><CODE>ESC [ Pn D</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Direct cursor addressing</TD>
<TD><CODE>ESC [ Pl ; Pc H</CODE>† or<BR>
<CODE>ESC [ Pl ; Pc f</CODE>†</TD>
</TR>
<TR VALIGN="TOP">
<TD>Index</TD>
<TD><CODE>ESC D</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>New line</TD>
<TD><CODE>ESC E</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Reverse index</TD>
<TD><CODE>ESC M</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Save cursor and attributes</TD>
<TD><CODE>ESC 7</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Restore cursor and attributes</TD>
<TD><CODE>ESC 8</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD COLSPAN="2"><SMALL>† Pl = line number; Pc = column number</SMALL></TD>
</TR>
</TBODY>
</TABLE>
<P CLASS="note">NOTE: Pn refers to a decimal parameter expressed as a string of
ASCII digits. Multiple parameters are separated by the semicolon character (073<SUB>8</SUB>). If
a parameter is omitted or specified to be 0 the default parameter value is used. For
the cursor movement commands, the default parameter value is 1.</P>
<P><STRONG>Line Size (Double-Height and Double-Width) Commands</STRONG></P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>Change this line to double-height top half</TD>
<TD><CODE>ESC # 3</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Change this line to double-height bottom half</TD>
<TD><CODE>ESC # 4</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Change this line to single-width single-height</TD>
<TD><CODE>ESC # 5</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Change this line to double-width single-height</TD>
<TD><CODE>ESC # 6</CODE></TD>
</TR>
</TBODY>
</TABLE>
<P><STRONG>Character Attributes</STRONG></P>
<P><CODE>ESC [ Ps;Ps;Ps;...;Ps m</CODE></P>
<P>Ps refers to a selective parameter. Multiple parameters are separated by the semicolon
character (073<SUB>8</SUB>). The parameters are executed in order and have the following
meanings:</P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>0 or None</TD>
<TD>All Attributes Off</TD>
</TR>
<TR VALIGN="TOP">
<TD>1</TD>
<TD>Bold on</TD>
</TR>
<TR VALIGN="TOP">
<TD>4</TD>
<TD>Underscore on</TD>
</TR>
<TR VALIGN="TOP">
<TD>5</TD>
<TD>Blink on</TD>
</TR>
<TR VALIGN="TOP">
<TD>7</TD>
<TD>Reverse video on</TD>
</TR>
</TBODY>
</TABLE>
<P>Any other parameter values are ignored.</P>
<P><STRONG>Erasing</STRONG></P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>From cursor to end of line</TD>
<TD><CODE>ESC [ K</CODE> or <CODE>ESC [ 0 K</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>From beginning of line to cursor</TD>
<TD><CODE>ESC [ 1 K</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Entire line containing cursor</TD>
<TD><CODE>ESC [ 2 K</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>From cursor to end of screen</TD>
<TD><CODE>ESC [ J</CODE> or <CODE>ESC [ 0 J</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>From beginning of screen to cursor</TD>
<TD><CODE>ESC [ 1 J</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Entire screen</TD>
<TD><CODE>ESC [ 2 J</CODE></TD>
</TR>
</TBODY>
</TABLE>
<P><STRONG>Programmable LEDs</STRONG></P>
<P><CODE>ESC [ Ps;Ps;...Ps q</CODE></P>
<P>Ps are selective parameters separated by semicolons (073<SUB>8</SUB>) and executed in order,
as follows:</P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>0 or None</TD>
<TD>All LEDs Off</TD>
</TR>
<TR VALIGN="TOP">
<TD>1</TD>
<TD>L1 On</TD>
</TR>
<TR VALIGN="TOP">
<TD>2</TD>
<TD>L2 On</TD>
</TR>
<TR VALIGN="TOP">
<TD>3</TD>
<TD>L3 On</TD>
</TR>
<TR VALIGN="TOP">
<TD>4</TD>
<TD>L4 On</TD>
</TR>
</TBODY>
</TABLE>
<P>Any other parameter values are ignored.</P>
<P><STRONG>Character Sets (G0 and G1 Designators)</STRONG></P>
<P>The G0 and G1 character sets are designated as follows:</P>
<TABLE>
<THEAD>
<TR>
<TH>Character set</TH>
<TH>G0 designator</TH>
<TH>G1 designator</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>United Kingdom (UK)</TD>
<TD><CODE>ESC ( A</CODE></TD>
<TD><CODE>ESC ) A</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>United States (USASCII)</TD>
<TD><CODE>ESC ( B</CODE></TD>
<TD><CODE>ESC ) B</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Special graphics characters and line drawing set</TD>
<TD><CODE>ESC ( 0</CODE></TD>
<TD><CODE>ESC ) 0</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Alternate character ROM</TD>
<TD><CODE>ESC ( 1</CODE></TD>
<TD><CODE>ESC ) 1</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Alternate character ROM special graphics characters</TD>
<TD><CODE>ESC ( 2</CODE></TD>
<TD><CODE>ESC ) 2</CODE></TD>
</TR>
</TBODY>
</TABLE>
<P><STRONG>Scrolling Region</STRONG></P>
<P><CODE>ESC [ Pt ; Pb r</CODE></P>
<P>Pt is the number of the top line of the scrolling region; Pb is the number of the
bottom line of the scrolling region and must be greater than Pt.</P>
<P><STRONG>Tab Stops</STRONG></P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>Set tab at current column</TD>
<TD><CODE>ESC H</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Clear tab at current column</TD>
<TD><CODE>ESC [ g</CODE> or <CODE>ESC [ 0 g</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Clear all tabs</TD>
<TD><CODE>ESC [ 3 g</CODE></TD>
</TR>
</TBODY>
</TABLE>
<P><STRONG>Modes</STRONG></P>
<TABLE>
<THEAD>
<TR VALIGN="BOTTOM">
<TH ROWSPAN="2">Mode Name</TH>
<TH COLSPAN="2">To Set</TH>
<TH COLSPAN="2">To Reset</TH>
</TR>
<TR VALIGN="BOTTOM">
<TH>Mode</TH>
<TH>Sequence</TH>
<TH>Mode</TH>
<TH>Sequence</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>Line feed/new line</TD>
<TD>New line</TD>
<TD><CODE>ESC [20h</CODE></TD>
<TD>Line feed</TD>
<TD><CODE>ESC [20l</CODE>*</TD>
</TR>
<TR VALIGN="TOP">
<TD>Cursor key mode</TD>
<TD>Application</TD>
<TD><CODE>ESC [?1h</CODE></TD>
<TD>Cursor</TD>
<TD><CODE>ESC [?1l</CODE>*</TD>
</TR>
<TR VALIGN="TOP">
<TD>ANSI/VT52 mode</TD>
<TD>ANSI</TD>
<TD><EM>N/A</EM></TD>
<TD>VT52</TD>
<TD><CODE>ESC [?2l</CODE>*</TD>
</TR>
<TR VALIGN="TOP">
<TD>Column mode</TD>
<TD>132 Col</TD>
<TD><CODE>ESC [?3h</CODE></TD>
<TD>80 Col</TD>
<TD><CODE>ESC [?3l</CODE>*</TD>
</TR>
<TR VALIGN="TOP">
<TD>Scrolling mode</TD>
<TD>Smooth</TD>
<TD><CODE>ESC [?4h</CODE></TD>
<TD>Jump</TD>
<TD><CODE>ESC [?4l</CODE>*</TD>
</TR>
<TR VALIGN="TOP">
<TD>Screen mode</TD>
<TD>Reverse</TD>
<TD><CODE>ESC [?5h</CODE></TD>
<TD>Normal</TD>
<TD><CODE>ESC [?5l</CODE>*</TD>
</TR>
<TR VALIGN="TOP">
<TD>Origin mode</TD>
<TD>Relative</TD>
<TD><CODE>ESC [?6h</CODE></TD>
<TD>Absolute</TD>
<TD><CODE>ESC [?6l</CODE>*</TD>
</TR>
<TR VALIGN="TOP">
<TD>Wraparound</TD>
<TD>On</TD>
<TD><CODE>ESC [?7h</CODE></TD>
<TD>Off</TD>
<TD><CODE>ESC [?7l</CODE>*</TD>
</TR>
<TR VALIGN="TOP">
<TD>Auto repeat</TD>
<TD>On</TD>
<TD><CODE>ESC [?8h</CODE></TD>
<TD>Off</TD>
<TD><CODE>ESC [?8l</CODE>*</TD>
</TR>
<TR VALIGN="TOP">
<TD>Interlace</TD>
<TD>On</TD>
<TD><CODE>ESC [?9h</CODE></TD>
<TD>Off</TD>
<TD><CODE>ESC [?9l</CODE>*</TD>
</TR>
<TR VALIGN="TOP">
<TD>Keypad mode</TD>
<TD>Application</TD>
<TD><CODE>ESC =</CODE></TD>
<TD>Numeric</TD>
<TD><CODE>ESC ></CODE></TD>
</TR>
</TBODY>
</TABLE>
<P><SMALL>* The last character of the sequence is a lowercase L (154<SUB>8</SUB>).</SMALL></P>
<P><STRONG>Reports</STRONG></P>
<P><STRONG>Cursor Position Report</STRONG></P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>Invoked by</TD>
<TD><CODE>ESC [ 6 n</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Response is</TD>
<TD><CODE>ESC [ Pl ; Pc R</CODE> †</TD>
</TR>
</TBODY>
</TABLE>
<P><SMALL>† Pl = line number; Pc = column number</SMALL></P>
<P><STRONG>Status Report</STRONG></P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>Invoked by</TD>
<TD><CODE>ESC [ 5 n</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Response is</TD>
<TD><CODE>ESC [ 0 n</CODE> (terminal ok)<BR>
<CODE>ESC [ 3 n</CODE> (terminal not ok)</TD>
</TR>
</TBODY>
</TABLE>
<P><STRONG>What Are You</STRONG></P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>Invoked by</TD>
<TD><CODE>ESC [ c</CODE> or <CODE>ESC [ 0 c</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Response is</TD>
<TD><CODE>ESC [ ? 1 ; Ps c</CODE></TD>
</TR>
</TBODY>
</TABLE>
<P>Ps is the "option present" parameter with the following meaning:</P>
<TABLE>
<THEAD>
<TR VALIGN="BOTTOM">
<TH>Ps</TH>
<TH>Meaning</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>0</TD>
<TD>Base VT100, no options</TD>
</TR>
<TR VALIGN="TOP">
<TD>1</TD>
<TD>Processor options (STP)</TD>
</TR>
<TR VALIGN="TOP">
<TD>2</TD>
<TD>Advanced video option (AVO)</TD>
</TR>
<TR VALIGN="TOP">
<TD>3</TD>
<TD>AVO and STP</TD>
</TR>
<TR VALIGN="TOP">
<TD>4</TD>
<TD>Graphics processor option (GPO)</TD>
</TR>
<TR VALIGN="TOP">
<TD>5</TD>
<TD>GPO and STP</TD>
</TR>
<TR VALIGN="TOP">
<TD>6</TD>
<TD>GPO and AVO</TD>
</TR>
<TR VALIGN="TOP">
<TD>7</TD>
<TD>GPO, STP, and AVO</TD>
</TR>
</TBODY>
</TABLE>
<P>Alternatively invoked by <CODE>ESC Z</CODE> (not recommended). Response is the same.</P>
<P><STRONG>Reset</STRONG></P>
<P>Reset causes the power-up reset routine to be executed.</P>
<P><CODE>ESC c</CODE></P>
<P><STRONG>Confidence Tests</STRONG></P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>Fill Screen with "Es"</TD>
<TD><CODE>ESC # 8</CODE></TD>
</TR>
<TR VALIGN="TOP">
<TD>Invoke Test(s)</TD>
<TD><CODE>ESC [ 2 ; Ps y</CODE></TD>
</TR>
</TBODY>
</TABLE>
<P>Ps is the parameter indicating the test to be done and is a decimal number computed
by taking the "weight" indicated for each desired test and adding them
together.</P>
<TABLE>
<COL SPAN="2" WIDTH="50%">
<THEAD>
<TR VALIGN="BOTTOM">
<TH>Test</TH>
<TH>Weight</TH>
</TR>
</THEAD>
<TBODY>
<TR VALIGN="TOP">
<TD>Power-up self test (ROM checksum, RAM, NVR, keyboard and AVO if installed)</TD>
<TD>1</TD>
</TR>
<TR VALIGN="TOP">
<TD>Data Loop Back</TD>
<TD>2 (loop back connector required)</TD>
</TR>
<TR VALIGN="TOP">
<TD>EIA modem control test</TD>
<TD>4 (loop back connector required)</TD>
</TR>
<TR VALIGN="TOP">
<TD>Repeat selected test(s) indefinitely (until failure or power off)</TD>
<TD>8</TD>
</TR>
</TBODY>
</TABLE>
<H4 ID="S3.3.6.2">VT52 Compatible Mode</H4>
<P>The following is a summary of the VT100 control sequences.</P>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>Cursor Up</TD>
<TD><CODE>ESC A</CODE></TD>
<TD> </TD>
</TR>
<TR VALIGN="TOP">
<TD>Cursor Down</TD>
<TD><CODE>ESC B</CODE></TD>
<TD> </TD>
</TR>
<TR VALIGN="TOP">
<TD>Cursor Right</TD>
<TD><CODE>ESC C</CODE></TD>
<TD> </TD>
</TR>
<TR VALIGN="TOP">
<TD>Cursor Left</TD>
<TD><CODE>ESC D</CODE></TD>
<TD> </TD>
</TR>
<TR VALIGN="TOP">
<TD>Select Special Graphics character set</TD>
<TD><CODE>ESC F</CODE></TD>
<TD> </TD>
</TR>
<TR VALIGN="TOP">
<TD>Select ASCII character set</TD>
<TD><CODE>ESC G</CODE></TD>
<TD> </TD>
</TR>
<TR VALIGN="TOP">
<TD>Cursor to home</TD>
<TD><CODE>ESC H</CODE></TD>
<TD> </TD>
</TR>
<TR VALIGN="TOP">
<TD>Reverse line feed</TD>
<TD><CODE>ESC I</CODE></TD>
<TD> </TD>
</TR>
<TR VALIGN="TOP">
<TD>Erase to end of screen</TD>
<TD><CODE>ESC J</CODE></TD>
<TD> </TD>
</TR>
<TR VALIGN="TOP">
<TD>Erase to end of line</TD>
<TD><CODE>ESC K</CODE></TD>
<TD> </TD>
</TR>
<TR VALIGN="TOP">
<TD>Direct cursor address</TD>
<TD><CODE>ESC Y l c</CODE></TD>
<TD>(see note 1)</TD>
</TR>
<TR VALIGN="TOP">
<TD>Identify</TD>
<TD><CODE>ESC Z</CODE></TD>
<TD>(see note 2)</TD>
</TR>
<TR VALIGN="TOP">
<TD>Enter alternate keypad mode</TD>
<TD><CODE>ESC =</CODE></TD>
<TD> </TD>
</TR>
<TR VALIGN="TOP">
<TD>Exit alternate keypad mode</TD>
<TD><CODE>ESC ></CODE></TD>
<TD> </TD>
</TR>
<TR VALIGN="TOP">
<TD>Enter ANSI mode</TD>
<TD><CODE>ESC <</CODE></TD>
<TD> </TD>
</TR>
</TBODY>
</TABLE>
<TABLE>
<TBODY>
<TR VALIGN="TOP">
<TD>NOTE 1: </TD>
<TD>Line and column numbers for direct cursor address are single character
codes whose values are the desired number plus 37<SUB>8</SUB>. Line and column
numbers start at 1.</TD>
</TR>
<TR VALIGN="TOP">
<TD>NOTE 2: </TD>
<TD>Response to <CODE>ESC Z</CODE> is <CODE>ESC / Z</CODE>.</TD>
</TR>
</TBODY>
</TABLE>
<DIV CLASS="navbar"><HR>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD ALIGN="LEFT" WIDTH="33%"><A HREF="chapter2.html">Chapter 2</A></TD>
<TD ALIGN="CENTER" WIDTH="34%"><A HREF="contents.html">Contents</A></TD>
<TD ALIGN="RIGHT" WIDTH="33%"><A HREF="chapter4.html">Chapter 4</A></TD>
</TR>
</TBODY>
</TABLE>
<TABLE WIDTH="100%">
<TBODY>
<TR>
<TD WIDTH="48"><A TITLE="Terminal Info" HREF="
http://vt100.net/"><IMG SRC="button-terminals.gif" ALT="Terminal Info" HEIGHT="48" WIDTH="48" BORDER="0"></A></TD>
<TD WIDTH="48"><A TITLE="Guestbook" HREF="
http://vt100.net/cgi/guestbook"><IMG SRC="button-guestbook.gif" ALT="Guestbook" HEIGHT="48" WIDTH="48" BORDER="0"></A></TD>
<TD ALIGN="RIGHT" WIDTH="100%"><SMALL>
http://vt100.net/docs/vt100-ug/chapter3.html</SMALL></TD>
</TR>
</TBODY>
</TABLE></DIV></BODY>
</HTML>