master
Ondřej Hruška 7 years ago
parent 7270d417a3
commit 2652544653
  1. 463
      docs/Locator Input Model for ANSI Terminals (sixth revision).html
  2. 238
      docs/VT100 escape codes.html
  3. 9690
      docs/bjh21_all-escapes.txt
  4. 256
      docs/codepage437.txt
  5. BIN
      docs/espterm-hw-full.jpg
  6. BIN
      docs/espterm-hw-small.jpg
  7. 2257
      docs/espterm-xterm.html
  8. 73
      docs/index.html
  9. 779
      docs/joesmith1984-ansicode.txt
  10. 1216
      docs/shuford_terminal_vt100_codes_news.txt
  11. 324
      docs/vt100.codes.txt

@ -0,0 +1,463 @@
<!doctype html>
<html>
<meta charset="UTF-8">
<title>Locator Input Model for ANSI Terminals (sixth revision)</title>
</head>
<style>
body {
background: white;
color: black;
width: 800px;
margin:0 auto;
font-family:monospace;
white-space: pre;
line-height: 1.35em;
font-size: 12pt;
}
</style>
<body>
<p><b>Locator Input Model for ANSI Terminals (sixth revision)</b>
<hr><p><i>File originally captured 3 Jan, 2011
at http://web.eecs.utk.edu/~shuford/terminal/dec_vt_mouse.html</i>
<p><i>Retrieved from archive and restored by Ondřej Hruška &lt;ondra@ondrovo.com&gt;, 2017</i>
<hr>
<p>This information has been circulated to other terminal vendors
and people outside of Digital, but I'm not sure whether it has
been formally published (the DECterm manual includes some of it).
<p>I hope you find this helpful.
<p>- - Peter Sichel
<p> C&amp;P VT Architecture
<p> Digital Equipment Corp
<p><tt> _ _ _ _ _ _ _ </tt>
<tt> | | | | | | | | </tt>
<tt> |d|i|g|i|t|a|l| INTEROFFICE MEMORANDUM</tt>
<tt> |_|_|_|_|_|_|_|</tt>
<p> TO: Locator Support on DATE: 23 Jun 1989
<p> Terminals Interest List FROM: Peter Sichel
<p> DEPT: Video Architecture
<p> DTN: 223-5162
<p> LOC: PKO3-1/10C
<p> NET: VIDEO::SICHEL<hr>
<p><a href="#Overview">Overview</a>
<p><a href="#LOCATOR_INPUT_MODEL">Locator Input Model</a>
<p><a href="#Enabling_Locator_Reporting">Enabling Locator Reporting</a>
<p><a href="#Locator_Position_Reporting">Locator Position Reporting</a>
<p><a href="#Selecting_Locator_Events">Selecting Locator Events</a>
<p><a href="#LOCATOR_SUPPORT_FOR_GRAPHICS">LOCATOR SUPPORT FOR GRAPHICS</a>
<p><a href="#Locator_Key_Definition">Locator Key Definition (DECLKD)</a>
<p><a href="#Locator_Key_Definition">DECLKD - DEC Locator Key Definition</a>
<p><a href="#LOCATOR_DEVICE_SUPPORT">LOCATOR DEVICE SUPPORT</a>
<p><a href="#Locator_Device_Status_Report_DSR_">Locator Device Status Report (DSR)</a>
<p><a href="#Locator_Controller_Mode">Locator Controller Mode</a>
<p><isindex>
<hr>
<p>SUBJECT: Locator Input Model for ANSI Terminals (sixth revision)
<p>This memo defines support for locator input devices on ANSI text
and graphics terminals. The goal is to make terminals able to
support the same class of applications popular on PCs and Workstations.
This is not meant to imply terminals must be compatible with
workstations, some limitations are unavoidable. The intent is
to provide a minimal set of locator functions which make sense
for terminals. Comments are welcome.
<p><b><a name="Overview">Overview</a></b>
<p>The terminal is supplied with a locator port which can be used
to connect an optional <i>mouse</i> or tablet. When locator reporting
is enabled, a seperate input cursor appears, and the terminal
tracks the locator locally with no host intervention. Individual
locator events such as locator button transitions or movement
may be programmed to send locator reports to the host.
<p>Each locator report includes the specific event which initiated
the report, the current state of the locator keys, and the coordinates
of the input cursor at the time of the event.
<p>The locator is treated as a manual input device similar to a keyboard.
Locater events are queued in the keyboard input silo along with
keystrokes.
<p><b><a name="LOCATOR_INPUT_MODEL">LOCATOR INPUT MODEL</a></b>
<p><i><a name="Enabling_Locator_Reporting"></a>Enabling Locator Reporting</i>
<p>Locator reporting can be selectively enabled from the host using
a DEC private control sequence. When disabled (the power up default),
the locator cursor does not appear, and the locator buttons are
inactive. When enabled, the locator cursor is visible, and the
terminal tracks the locator locally with no host intervention.
Individual locator events such as locator button transitions
or movement may be programmed to send locator reports to the host.
<p>DECELR - DEC Enable Locator Reports
<p>CSI Ps ; Pu ' z
<p> 2/7 7/10
<p>Ps may assume the following values
<p> 0 locator disabled (default)
<p> 1 locator reports enabled
<p> 2 one shot (allow one report, then disable)
<p>Pu specifies the coordinate units for locator reports
<p> 0 (or omitted) default to character cells
<p> 1 device physical pixels
<p> 2 character cells
<p>One shot mode is provided for applications that desire simple
graphics input similar to Tektronix GIN mode (no unsolicited reports).
If parameter value 2 is selected, the next trigger event that
occurs will generate a single locator report. No further locator
reports will occur (the locator will be disabled), until another
DECELR sequence is received.
<p>The coordinate units for locator position reports may be selected
to either of two coordinate systems used by terminal software
at the lowest level. Physical pixels is the &quot;least common
denominator&quot;, and is useful for computing sixel positions.
<p><i><a name="Locator_Position_Reporting">Locator Position Reporting</a></i>
<p>When a selected trigger event occurs such as a button press or
release, the terminal transmits a locator position report as follows.
<p> DECLRP - DEC Locator Report
<p> CSI Pe ; Pb ; Pr ; Pc ; Pp &amp; w
<p> 2/6 7/7
<p> Pe is the event code
<p> Pb is the button code
<p> Pr is the row coordinate
<p> Pc is the column coordinate
<p> Pp is the third coordinate (page number)
<p>Pe, the event code indicates what event caused this
report to be generated. The following event codes are defined:
<p> 0 - request, the terminal received an explicit request
<p> for a locator report, but the locator is unavailable
<p> 1 - request, the terminal received an explicit
<p> request for a locator report
<p> 2 - left button down
<p> 3 - left button up
<p> 4 - middle button down
<p> 5 - middle button up
<p> 6 - right button down
<p> 7 - right button up
<p> 8 - fourth button down
<p> 9 - fourth button up
<p> 10 - locator outside filter rectangle
<p>Pb is the button code, ASCII decimal 0-15 indicating which buttons
are down if any. The state of the four buttons on the locator
correspond to the low four bits of the decimal value, &quot;1&quot;
means button depressed
<p> 0 - no buttons down
<p> 1 - right
<p> 2 - middle
<p> 4 - left
<p> 8 - fourth
<p>Pr is the row coordinate of the locator position in the page,
encoded as an ASCII decimal value. If Pr is omitted, the locator
position is undefined (outside the terminal window for example).
<p>Pc is the column coordinate of the locator position in the page,
encoded as an ASCII decimal value. If Pc is omitted, the locator
position is undefined (outside the terminal window for example).
<p>Pp is the page coordinate of the locator position encoded as an
ASCII decimal value. The page coordinate may be omitted if the
locator is on page one (the default).
<p>Each locator report includes both the specific transition which
caused this event, and the current button state. This allows
software to determine what event just occured and which buttons
are down without keeping track of previous events or button state.
In a multiprocess shared locator environment, an application
may not know the previous button state. This dual reporting also
allows applications to recover from lost locator reports.
<p>Each locator event generates a single report. In the rare situation
where two events occur simultaneously (within a single sampling
period), the terminal will report this as two separate events.
The order of reporting shall be by increasing event code number
(left button first).
<p>Locator events are queued in the keyboard input silo just like
keystrokes. Each locator event occupies one position in the silo
(the keyboard silo currently must have at least 9 positions).
If the input silo becomes full, the locator and keyboard are
locked until there is again room in the silo. The sequential
order of keystroke and locator events is strictly maintained.
<p>It is the responsibility of the host to accept data fast enough
to avoid locking the locator unintentionally. The limited buffering
inside the terminal gives the host a little more time to process
locator events smoothly.
<p>When the keyboard is locked, the &quot;wait&quot; indicator on
the keyboard turns on. The keyboard is automatically locked any
time the keyboard input silo is full. The keyboard can be locked
explicitly using the keyboard action mode (KAM) control function.
<p>When the locator is locked, the terminal continues to track the
locator, but the input cursor changes shape to appear as a wristwatch
(or other shape indicating to wait). The wristwatch cursor indicates
that locator button transitions will be ignored, but allows the
user to continue positioning in anticipation of the locator being
unlocked. The locator is automatically locked any time the input
silo is full.
<p>Locator-ahead, analogous to keyboard type-ahead is supported by
having each report include the locator position at the time of
the event, and maintaining the sequential order of keystroke and
locator events.
<p>A final implication of using the keyboard silo to buffer text
locator events is that locator and keyboard input should be associated
with the same session at all times. The session to receive these
events is sometimes called the &quot;active session&quot; or &quot;input
focus&quot;. In a multi-session windowing environment, the input
cursor is allowed to roam freely over the entire screen in response
to locator movement. The input cursor is never occluded when
locator reporting is enabled in one or more sessions. Each session
enables locator reporting independently. The following cases
describe the locator interaction with session viewports and scroll
regions.
<p>1. The input cursor is within the active session's viewport.
Pressing a button on the locator sends a locator report when enabled.
<p>2. The input cursor is inside the active session's viewport,
but outside the range of defined coordinates for that session.
Pressing a button on the locator will generate a report with omitted
coordinates (position undefined). An example would be when the
input cursor is outside the active scrolling region, and the origin
mode has been set to relative. To use the locator to adjust scroll
margins, the origin mode must be absolute.
<p>3. The input cursor is not contained in any viewport. Pressing
a button on the locator will have no effect. To support &quot;pop
up&quot; menus anywhere on the screen, the entire screen must
be a viewport for at least one session.
<p>4. The input cursor is within a viewport of a session which is
not the active session. Pressing a button on the locator will
normally make the session containing the input cursor the active
session (possibly changing the occlusion order of viewports, and
the shape of the locator). This case is the responsibility of
the &quot;window manager&quot; which is free to define its own
user interface. Two recommendations are: (1) No locator report
should be sent to the previous active session, since the locator
is not in its viewport; and (2) If locator reporting is enabled
in the new session, a locator report should not be transmitted
to avoid application side affects when selecting another window.
<p>Requesting A Locator Position Report
<p>The host may explicitly request a locator position report any
time locator reporting is enabled (DECELR). Upon receiving such
a request, the terminal will immediately send a single locator
report (DECLRP) with event code 1 indicating the current locator
position.
<p>If the session receiving the request is the active session, but
the locator is not within the defined coordinate range for that
session, the terminal will respond with omitted coordinates (locator
position undefined).
<p>If the session receiving the request is not currently active (the
locator is being used in another session), the report will specify
event code 0 (locator unavailable). Locator state from the active
session should not be made available to inactive sessions.
<p>If the locator is disabled (DECELR), the terminal should still
respond with event code 0 (to avoid timing out the application).
<p> DECRQLP - DEC Request Locator Position
<p>CSI Ps ' |
<p> 2/7 7/12
<p>Ps:
<p> 0 (or omitted) default to 1
<p> 1 transmit a single DECLRP locator report all
others ignored
<p>Filter Rectangles
<p>Filter Rectangles add filtered movement events to the list of
locator transitions that can generate reports.
<p>DECEFR - DEC Enable Filter Rectangle
<p> CSI Pt ; Pl ; Pb ; Pr ' w
<p> 2/7 7/7
<p> Pt - Top boundary of filter rectangle
<p> Pl - Left boundary of filter rectangle
<p> Pb - Bottom boundary of filter rectangle
<p> Pr - Right boundary of filter rectangle
<p>The DECEFR control sequence defines the coordinates of a filter
rectangle, and activates it. Anytime the locator is detected
to be outside a filter rectangle, an outside rectangle event is
generated and the rectangle is disabled. Filter rectangles are
always treated as &quot;one-shot&quot; events. Defining a new
rectangle re-activates it.
<p>Applications can re-define the rectangle at any time even if its
already active. If a rectangle which does not contain the locator
is specified, the terminal will generate an outside rectangle
report immediately and deactivate it.
<p>Pt, Pl, Pb, and Pr are in coordinates units specified by the last
DECELR sequence. The filter rectangle includes the boundaries
(similar to other rectangular area operations). The origin is
coordinate pair 1:1 in the upper left corner. If any parameters
are omitted, they are defaulted to the current locator position.
Sending DECEFR with no parameters will cause the application to
be notified for any locator movement (&quot;unfiltered movement
event&quot;).
<p>DECELR always cancels any previous filter rectangle definition.
This gaurantees that when an application enables locator reports,
there will never be an outstanding filter rectangle.
<p>If a filter rectangle lies on the edge of the defined coordinate
space for the active session, and the locator crosses that edge,
the rectangle may be triggered to send a report with omitted coordinates
(locator position undefined).
<p>If the active session receives a filter rectangle with explicit
coordinates while the locator is outside the defined coordinate
space, the rectangle will be triggered to send a report with omitted
coordinates.
<p>If the active session receives a filter rectangle with omitted
coordinates (that is, use the current position) while the locator
is outside the defined coordinate space (position undefined),
the rectangle will be triggered the next time the locator is within
the defined coordinate space.
<p>If a session which is not the active session receives a filter
rectangle with explicit coordinates, it should trigger immediately
with position undefined. If a session which is not the active
session receives a rectangle with omitted coordinates, it should
trigger the next time the locator is within the defined coordinate
space for that session, which cannot happen until the session
becomes active.
<p><i><a name="Selecting_Locator_Events">Selecting Locator Events</a></i>
<p>The locator events which are allowed to generate unsolicited reports
may be individually selected using the Select Locator Events control.
The locator is capable of reporting both up and down transitions
for those situations where the exact sequence of button activiations
is significant. This control allows application software to select
which events it wants reported.
<p>DECSLE - Select Locator Events
<p> CSI P...P ' {
<p> 2/7 7/11
<p> P...P is one or more selective parameters which may
assume the following values:
<p> 0 respond only to explicit host requests
<p> (default, also cancels any pending filter rectangle)
<p> 1 report button down transitions
<p> 2 do not report button down transitions
<p> 3 report button up transitions
<p> 4 do not report button up transitions
<p><b><a name="LOCATOR_SUPPORT_FOR_GRAPHICS">LOCATOR SUPPORT FOR
GRAPHICS</a></b>
<p>The locator can be used in REGIS, and in Tektronix GIN mode during
Tektronix 401x emulation.
<p>REGIS One-shot Graphics Input Mode is provided for backward compatibility
with the VT240. When an application requests graphics input,
a cross hair cursor appears which may be positioned using either
the arrow keys (as on the VT240), or a locator device. Pressing
any non-arrow key on the keyboard which is not dead or a button
on the locator will cause the following actions:
<p>1. The ASCII code or codes for the non-arrow key that was pressed
is sent to the host. Each locator button can be programmed to
send a sequence of 0 to 6 characters. This allows the locator
to be programmed to work with existing applications (see DECLKD
below).
<p>2. The coordinates of the input cursor at the time that the non-arrow
key was depressed are sent to the host, expressed as an absolute
bracketed extent in user coordinates.
<p>3. The graphics input cursor disappears from the screen and the
terminal exits graphics input mode.
<p>While the terminal is in graphics input mode, no further data
from the application is processed until the locator input is complete
and a report is generated.
<p>The mouse and arrow keys may be intermixed freely in REGIS One-Shot
Graphics Input Mode. Since the tablet is an absolute positioning
device, use of the arrow keys in combination with the tablet would
cause inconsistent and confusing behavior. The arrow keys are
disabled for input cursor positioning when the tablet is in proximity
because the tablet establishes a unique screen position.
<p><i><a name="Locator_Key_Definition">Locator Key Definition</a>
(DECLKD)</i>
<p>The DECLKD device control string down line loads one or more definitions
for use by the Locator device during REGIS One-shot Graphics Input.
These definitions are called Locator Key Definitions (LKDs).
<p>DECLKD is intended for older applications that use ReGIS one-shot
input mode with keystroke commands like &quot;A&quot;, &quot;B&quot;,
&quot;C&quot;, etc. These commands can be re-bound to buttons
on the mouse by sending DECLKD (possibly before running the application).
<p>There are six bytes available to each of the locator keys (upto
four). A power-up restart or RIS will cause the LKDs to be set
to their default value. LKDs are not affected by DECSTR.
<p>Default Locator Key Definitions
<p> No button transition ESC [ 240 ~
<p> Ky1 down transition ESC [ 241 ~
<p> Ky2 down transition ESC [ 243 ~
<p> Ky3 down transition ESC [ 245 ~
<p> Ky4 down transition ESC [ 247 ~
<p>Where:
<p> Ky1 = B1 = Left = barrel button
<p> Ky2 = B2 = Middle = tip button
<p> Ky3 = B3 = Right
<p> Ky4 = B4 (tablet cursor only)
<p>Up Transitions are ignored by default.
<p><i>DECLKD - DEC Locator Key Definition</i>
<p> DCS Pc $ w Ky1 / Std1 / Stu1 ; ... ; Kyn / Stnd
/ Stnu ST
<p> 2/4 7/7
<p> Where:
<p>Pc - Clear parameter
<p>0 (or omitted) Clear all LKDs before loading new values. All button
definition strings are empty (not the default).
<p>1 Clear old definition only for keys that are redefined. Kyn /
Stnd / Stnu - Key selection code n, slash delimeter, and string
parameter n for down and up key transitions.
<p>Kyn is a single ASCII digit, and Std/Stu is a series of ASCII
hex pairs. If Std or Stu is omitted, the corresponding button
string will be empty. Key definition strings are delimited with
a semicolon (&quot;;&quot;).
<p>Graphics and ANSI Locator Input
<p>Support for graphics input in REGIS is extended by allowing ANSI
locator input to operate normally regardless of whether the host
output stream is being interpreted as ANSI or REGIS. If ANSI
locator reporting is enabled, keystrokes and locator position
reports may be generated without being solicited from the host.
Characters received from the host are executed instead of buffered,
so graphics output and graphics input may occur simultaneously.
<p>If one-shot graphics input mode is entered (REGIS report position
interactive) while ANSI locator reporting is enabled, the locator
cursor will change to a cross-hair. Pressing a non-arrow key
on the keyboard will send the character for that key followed
by the REGIS user coordinates as a bracketed extent. If a locator
button had been pressed instead, the characters for the locator
button (if any) would be sent followed by the REGIS position report,
and finally the ANSI locator report (DECLRP) if enabled. Upon
sending the REGIS position report, the terminal exits one-shot
input mode, and the input cursor returns to its previous state.
<p>The ANSI locator report should still be sent in the above situation
(if enabled) to keep the two modes independent. This allows filter
rectangles to continue operating, and also keeps the ANSI state
(last DECLRP seen) consistent with the last button transition.
<p>The order of reports is chosen to allow a subroutine to send
R(P(I)) and read the REGIS response that follows without regard
to whether ANSI locator reports are enabled.
<p>Since the ANSI locator report is in the form of a control sequence,
it should not inferfere with REGIS reports. No special procedure
is used to indicate REGIS data from the terminal. This is backward
compatible with the VT240 since ANSI locator reports can only
occur if ANSI locator reporting is enabled.
<p>The suspension of graphics output during REGIS one-shot graphics
input remains the same. This is necessary to support rubber-band
cursors. Rubber-band cursors use the REGIS output position as
one reference point, and the locator input position as the other.
Rubber-band cursors are specified as an option on the REGIS report
position interactive command.
<p><b><a name="LOCATOR_DEVICE_SUPPORT">LOCATOR DEVICE SUPPORT</a></b>
<p>Locator support is currently planned as an extension to the level
3 character cell architecture. The primary device attributes
response will report the locator extension as parameter value
15 (locator port), and 29 (text locator).
<p>Host software may request a Device Status Report (DSR) to determine
whether a locator is available. Upon receiving the appropriate
DSR request, the terminal will respond to indicate the locator
is ready if a locator device is plugged in, and has transmitted
a successful self test message.
<p><i><a name="Locator_Device_Status_Report_DSR_">Locator Device
Status Report (DSR)</a></i>
<p>Host request locator device status CSI ? 55 n
<p>No locator CSI ? 53 n
<p>Locator ready CSI ? 50 n
<p>Locator busy CSI ? 58 n
<p>The locator busy response can occur when an alternate session
has selected locator controller mode (see below).
<p><i><a name="Locator_Controller_Mode"></a>Locator Controller Mode</i>
<p>Locator Controller Mode allows the host to communicate directly
with the locator device without terminal intervention (similar
to printer controller mode). When locator controller mode is
set, all data received at the host port is transferred directly
to the locator port without interpretation by the display terminal.
<p>The only exceptions are the communications control characters
XON/XOFF (if enabled), and the control sequence to disabled locator
controller mode. All characters received at locator port are
transferred to the host port without interpretation. The host
assumes full responsibility for the locator device.
<p>Locator controller mode is desirable for two reasons:
<p>1. It allows the host to explicitly initialize or configure locator
devices. A foriegn locator device might not wake up in DEC format
for example.
<p>2. It allows the locator port to be used for other auxilliary
input devices. A bar code reader could be interfaced to the locator
port for example, allowing the terminal to support a bar code
reader without pre-empting the printer port.
<p>Turn off locator controller mode (MC) CSI 6 i
<p>Turn on locator controller mode (MC) CSI 7 i
<p><i>[End of memo]</i>
</body>
</html>

@ -0,0 +1,238 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 1st March 2002), see www.w3.org"><title>VT100 escape codes</title></head><body>
<h1 align="center">VT100 escape codes</h1>
<p>This document describes how to control a VT100 terminal. The
entries are of the form "name, description, escape code".</p>
<p>The name isn't important, and the description is just to
help you find what you're looking for. What you have to do is
send the "escape code" to the screen. These codes are often
several characters long, but they all begin with <tt>^[</tt>.
This isn't the two characters <tt>^</tt> and <tt>[</tt>, but
rather a representation of the ASCII code ESC (which is why
these are called escape codes).</p>
<p>ESC has the decimal value 27 and should be sent before the rest of the code, which is simply an ASCII string.</p>
<p>As an example of how to use this information, here's how
to clear the screen in C, using the VT100 escape codes:</p>
<pre> #define ASCII_ESC 27
printf( "%c[2J", ASCII_ESC );
<i>or</i>
puts( "\033[2J" );
</pre>
<hr>
<pre>Name Description Esc Code
</pre>
<hr>
<pre>setnl LMN Set new line mode ^[[20h
setappl DECCKM Set cursor key to application ^[[?1h
setansi DECANM Set ANSI (versus VT52) none
setcol DECCOLM Set number of columns to 132 ^[[?3h
setsmooth DECSCLM Set smooth scrolling ^[[?4h
setrevscrn DECSCNM Set reverse video on screen ^[[?5h
setorgrel DECOM Set origin to relative ^[[?6h
setwrap DECAWM Set auto-wrap mode ^[[?7h
setrep DECARM Set auto-repeat mode ^[[?8h
setinter DECINLM Set interlacing mode ^[[?9h
setlf LMN Set line feed mode ^[[20l
setcursor DECCKM Set cursor key to cursor ^[[?1l
setvt52 DECANM Set VT52 (versus ANSI) ^[[?2l
resetcol DECCOLM Set number of columns to 80 ^[[?3l
setjump DECSCLM Set jump scrolling ^[[?4l
setnormscrn DECSCNM Set normal video on screen ^[[?5l
setorgabs DECOM Set origin to absolute ^[[?6l
resetwrap DECAWM Reset auto-wrap mode ^[[?7l
resetrep DECARM Reset auto-repeat mode ^[[?8l
resetinter DECINLM Reset interlacing mode ^[[?9l
altkeypad DECKPAM Set alternate keypad mode ^[=
numkeypad DECKPNM Set numeric keypad mode ^[&gt;
setukg0 Set United Kingdom G0 character set ^[(A
setukg1 Set United Kingdom G1 character set ^[)A
setusg0 Set United States G0 character set ^[(B
setusg1 Set United States G1 character set ^[)B
setspecg0 Set G0 special chars. &amp; line set ^[(0
setspecg1 Set G1 special chars. &amp; line set ^[)0
setaltg0 Set G0 alternate character ROM ^[(1
setaltg1 Set G1 alternate character ROM ^[)1
setaltspecg0 Set G0 alt char ROM and spec. graphics ^[(2
setaltspecg1 Set G1 alt char ROM and spec. graphics ^[)2
setss2 SS2 Set single shift 2 ^[N
setss3 SS3 Set single shift 3 ^[O
modesoff SGR0 Turn off character attributes ^[[m
modesoff SGR0 Turn off character attributes ^[[0m
bold SGR1 Turn bold mode on ^[[1m
lowint SGR2 Turn low intensity mode on ^[[2m
underline SGR4 Turn underline mode on ^[[4m
blink SGR5 Turn blinking mode on ^[[5m
reverse SGR7 Turn reverse video on ^[[7m
invisible SGR8 Turn invisible text mode on ^[[8m
setwin DECSTBM Set top and bottom line#s of a window ^[[&lt;v&gt;;&lt;v&gt;r
cursorup(n) CUU Move cursor up n lines ^[[&lt;n&gt;A
cursordn(n) CUD Move cursor down n lines ^[[&lt;n&gt;B
cursorrt(n) CUF Move cursor right n lines ^[[&lt;n&gt;C
cursorlf(n) CUB Move cursor left n lines ^[[&lt;n&gt;D
cursorhome Move cursor to upper left corner ^[[H
cursorhome Move cursor to upper left corner ^[[;H
cursorpos(v,h) CUP Move cursor to screen location v,h ^[[&lt;v&gt;;&lt;h&gt;H
hvhome Move cursor to upper left corner ^[[f
hvhome Move cursor to upper left corner ^[[;f
hvpos(v,h) CUP Move cursor to screen location v,h ^[[&lt;v&gt;;&lt;h&gt;f
index IND Move/scroll window up one line ^[D
revindex RI Move/scroll window down one line ^[M
nextline NEL Move to next line ^[E
savecursor DECSC Save cursor position and attributes ^[7
restorecursor DECSC Restore cursor position and attributes ^[8
tabset HTS Set a tab at the current column ^[H
tabclr TBC Clear a tab at the current column ^[[g
tabclr TBC Clear a tab at the current column ^[[0g
tabclrall TBC Clear all tabs ^[[3g
dhtop DECDHL Double-height letters, top half ^[#3
dhbot DECDHL Double-height letters, bottom half ^[#4
swsh DECSWL Single width, single height letters ^[#5
dwsh DECDWL Double width, single height letters ^[#6
cleareol EL0 Clear line from cursor right ^[[K
cleareol EL0 Clear line from cursor right ^[[0K
clearbol EL1 Clear line from cursor left ^[[1K
clearline EL2 Clear entire line ^[[2K
cleareos ED0 Clear screen from cursor down ^[[J
cleareos ED0 Clear screen from cursor down ^[[0J
clearbos ED1 Clear screen from cursor up ^[[1J
clearscreen ED2 Clear entire screen ^[[2J
devstat DSR Device status report ^[5n
termok DSR Response: terminal is OK ^[0n
termnok DSR Response: terminal is not OK ^[3n
getcursor DSR Get cursor position ^[6n
cursorpos CPR Response: cursor is at v,h ^[&lt;v&gt;;&lt;h&gt;R
ident DA Identify what terminal type ^[[c
ident DA Identify what terminal type (another) ^[[0c
gettype DA Response: terminal type code n ^[[?1;&lt;n&gt;0c
reset RIS Reset terminal to initial state ^[c
align DECALN Screen alignment display ^[#8
testpu DECTST Confidence power up test ^[[2;1y
testlb DECTST Confidence loopback test ^[[2;2y
testpurep DECTST Repeat power up test ^[[2;9y
testlbrep DECTST Repeat loopback test ^[[2;10y
ledsoff DECLL0 Turn off all four leds ^[[0q
led1 DECLL1 Turn on LED #1 ^[[1q
led2 DECLL2 Turn on LED #2 ^[[2q
led3 DECLL3 Turn on LED #3 ^[[3q
led4 DECLL4 Turn on LED #4 ^[[4q
#
# All codes below are for use in VT52 compatibility mode.
#
setansi Enter/exit ANSI mode (VT52) ^[&lt;
altkeypad Enter alternate keypad mode ^[=
numkeypad Exit alternate keypad mode ^[&gt;
setgr Use special graphics character set ^[F
resetgr Use normal US/UK character set ^[G
cursorup Move cursor up one line ^[A
cursordn Move cursor down one line ^[B
cursorrt Move cursor right one char ^[C
cursorlf Move cursor left one char ^[D
cursorhome Move cursor to upper left corner ^[H
cursorpos(v,h) Move cursor to v,h location ^[&lt;v&gt;&lt;h&gt;
revindex Generate a reverse line-feed ^[I
cleareol Erase to end of current line ^[K
cleareos Erase to end of screen ^[J
ident Identify what the terminal is ^[Z
identresp Correct response to ident ^[/Z
&lt;hr&gt;
#
# VT100 Special Key Codes
#
# These are sent from the terminal back to the computer when the
# particular key is pressed. Note that the numeric keypad keys
# send different codes in numeric mode than in alternate mode.
# See escape codes above to change keypad mode.
#
# Function Keys:
PF1 ^[OP
PF2 ^[OQ
PF3 ^[OR
PF4 ^[OS
# Arrow Keys:
Reset Set
----- ---
up ^[A ^[OA
down ^[B ^[OB
right ^[C ^[OC
left ^[D ^[OD
# Numeric Keypad Keys:
Keypad Mode
-----------------
Keypad Key Numeric Alternate
---------- ------- ---------
0 0 ^[Op
1 1 ^[Oq
2 2 ^[Or
3 3 ^[Os
4 4 ^[Ot
5 5 ^[Ou
6 6 ^[Ov
7 7 ^[Ow
8 8 ^[Ox
9 9 ^[Oy
- (minus) - ^[Om
, (comma) , ^[Ol
. (period) . ^[On
ENTER ^M ^[OM
</pre>
<hr noshade="noshade">
<table summary="Page footer" cellpadding="5">
<tbody><tr>
<td>C</td>
<td>27, 033, 0x1b</td>
</tr>
<tr>
<td>English</td>
<td>27 decimal, 33 octal, 1b hexadecimal</td>
</tr>
</tbody></table>
</body></html>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,256 @@
0000 0
263A ☺ 1
263B ☻ 2
2665 ♥ 3
2666 ♦ 4
2663 ♣ 5
2660 ♠ 6
2022 • 7
25D8 ◘ 8
25CB ○ 9
25D9 ◙ 10
2642 ♂ 11
2640 ♀ 12
266A ♪ 13
266B ♫ 14
263C ☼ 15
25BA ► 16
25C4 ◄ 17
2195 ↕ 18
203C ‼ 19
00B6 ¶ 20
00A7 § 21
25AC ▬ 22
21A8 ↨ 23
2191 ↑ 24
2193 ↓ 25
2192 → 26
2190 ← 27
221F ∟ 28
2194 ↔ 29
25B2 ▲ 30
25BC ▼ 31
0020 32
0021 ! 33
0022 " 34
0023 # 35
0024 $ 36
0025 % 37
0026 & 38
0027 ' 39
0028 ( 40
0029 ) 41
002A * 42
002B + 43
002C , 44
002D - 45
002E . 46
002F / 47
0030 0 48
0031 1 49
0032 2 50
0033 3 51
0034 4 52
0035 5 53
0036 6 54
0037 7 55
0038 8 56
0039 9 57
003A : 58
003B ; 59
003C < 60
003D = 61
003E > 62
003F ? 63
0040 @ 64
0041 A 65
0042 B 66
0043 C 67
0044 D 68
0045 E 69
0046 F 70
0047 G 71
0048 H 72
0049 I 73
004A J 74
004B K 75
004C L 76
004D M 77
004E N 78
004F O 79
0050 P 80
0051 Q 81
0052 R 82
0053 S 83
0054 T 84
0055 U 85
0056 V 86
0057 W 87
0058 X 88
0059 Y 89
005A Z 90
005B [ 91
005C \ 92
005D ] 93
005E ^ 94
005F _ 95
0060 ` 96
0061 a 97
0062 b 98
0063 c 99
0064 d 100
0065 e 101
0066 f 102
0067 g 103
0068 h 104
0069 i 105
006A j 106
006B k 107
006C l 108
006D m 109
006E n 110
006F o 111
0070 p 112
0071 q 113
0072 r 114
0073 s 115
0074 t 116
0075 u 117
0076 v 118
0077 w 119
0078 x 120
0079 y 121
007A z 122
007B { 123
007C | 124
007D } 125
007E ~ 126
2302 ⌂ 127
00C7 Ç 128
00FC ü 129
00E9 é 130
00E2 â 131
00E4 ä 132
00E0 à 133
00E5 å 134
00E7 ç 135
00EA ê 136
00EB ë 137
00E8 è 138
00EF ï 139
00EE î 140
00EC ì 141
00C4 Ä 142
00C5 Å 143
00C9 É 144
00E6 æ 145
00C6 Æ 146
00F4 ô 147
00F6 ö 148
00F2 ò 149
00FB û 150
00F9 ù 151
00FF ÿ 152
00D6 Ö 153
00DC Ü 154
00A2 ¢ 155
00A3 £ 156
00A5 ¥ 157
20A7 ₧ 158
0192 ƒ 159
00E1 á 160
00ED í 161
00F3 ó 162
00FA ú 163
00F1 ñ 164
00D1 Ñ 165
00AA ª 166
00BA º 167
00BF ¿ 168
2310 ⌐ 169
00AC ¬ 170
00BD ½ 171
00BC ¼ 172
00A1 ¡ 173
00AB « 174
00BB » 175
2591 ░ 176
2592 ▒ 177
2593 ▓ 178
2502 │ 179
2524 ┤ 180
2561 ╡ 181
2562 ╢ 182
2556 ╖ 183
2555 ╕ 184
2563 ╣ 185
2551 ║ 186
2557 ╗ 187
255D ╝ 188
255C ╜ 189
255B ╛ 190
2510 ┐ 191
2514 └ 192
2534 ┴ 193
252C ┬ 194
251C ├ 195
2500 ─ 196
253C ┼ 197
255E ╞ 198
255F ╟ 199
255A ╚ 200
2554 ╔ 201
2569 ╩ 202
2566 ╦ 203
2560 ╠ 204
2550 ═ 205
256C ╬ 206
2567 ╧ 207
2568 ╨ 208
2564 ╤ 209
2565 ╥ 210
2559 ╙ 211
2558 ╘ 212
2552 ╒ 213
2553 ╓ 214
256B ╫ 215
256A ╪ 216
2518 ┘ 217
250C ┌ 218
2588 █ 219
2584 ▄ 220
258C ▌ 221
2590 ▐ 222
2580 ▀ 223
03B1 α 224
00DF ß 225
0393 Γ 226
03C0 π 227
03A3 Σ 228
03C3 σ 229
00B5 µ 230
03C4 τ 231
03A6 Φ 232
0398 Θ 233
03A9 Ω 234
03B4 δ 235
221E ∞ 236
03C6 φ 237
03B5 ε 238
2229 ∩ 239
2261 ≡ 240
00B1 ± 241
2265 ≥ 242
2264 ≤ 243
2320 ⌠ 244
2321 ⌡ 245
00F7 ÷ 246
2248 ≈ 247
00B0 ° 248
2219 ∙ 249
00B7 · 250
221A √ 251
207F ⁿ 252
00B2 ² 253
25A0 ■ 254
00A0 255

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

File diff suppressed because it is too large Load Diff

@ -0,0 +1,73 @@
<!doctype html>
<html>
<meta charset="UTF-8">
<title>VT100 emulation - useful references</title>
</head>
<style>
body {
background: white;
color: black;
width: 825px;
margin:0 auto;
font-family:monospace;
line-height: 1.35em;
font-size: 12pt;
}
li,p {
white-space: pre;
}
ul, ol {
margin-top: 0;
margin-bottom: 0;
}
li {
margin-bottom: 0.3em;
}
</style>
<body>
<p>VT100 emulation resources collection Ondřej Hruška &lt;ondra@ondrovo.com&gt;, Sep 2017</p>
<hr>
<h1>VT100 emulation resources collection</h1>
<p>This page lists some files and sites I found helpful when developing <a href="https://github.com/MightyPork/ESPTerm">ESPTerm</a>.</p>
<h2>Web references</h2>
<ul>
<li>An invaluable resource in my research was the website <a href="http://vt100.net/">vt100.net</a> which provides
original manuals for manu VT models.</li>
<li>The <a href="http://invisible-island.net/xterm/ctlseqs/ctlseqs.html">Xterm manual page</a> also proved immensely useful.
I have even made a <a href="espterm-xterm.html">copy of it</a> with highlighted differences and missing features
in ESPTerm.</li>
<li>Some sequences can also be found in the <a href="https://www.gnu.org/software/screen/manual/html_node/Control-Sequences.html">GNU Screen manual page</a></li>
<li>Application keys mode became clear after reading this page:
<a href="http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-21.html">www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-21.html</a>.</li>
<li>When trying to understand what codes should be sent by function and control
keys, this page provided some great insight:
<a href="http://invisible-island.net/xterm/xterm-function-keys.html">invisible-island.net/xterm/xterm-function-keys.html</a></li>
</ul>
<h2>Collected files and memos</h2>
<p>Those are some documents I've found on the internet while researching for ESPTerm
and preserve them here for reference should the original sources disappear.</p>
<ul>
<li><a href="./vt100.codes.txt">vt100.codes.txt</a></li>
<li><a href="./bjh21_all-escapes.txt">bjh21_all-escapes.txt</a></li>
<li><a href="./joesmith1984-ansicode.txt">joesmith1984-ansicode.txt</a></li>
<li><a href="./shuford_terminal_vt100_codes_news.txt">shuford_terminal_vt100_codes_news.txt</a></li>
<li><a href="./VT100 escape codes.html">VT100 escape codes.html</a></li>
<li><a href="./Locator Input Model for ANSI Terminals (sixth revision).html">Locator Input Model for ANSI Terminals (sixth revision).html</a></li>
<li><a href="./codepage437.txt">codepage437.txt</a> - a file I compiled from Wikipedia</li>
</ul>
<p>[End of document]</p>

@ -0,0 +1,779 @@
Summary of ANSI standards for ASCII terminals Joe Smith, 18-May-84
Contents:
1. Overview and Definitions
2. General rules for interpreting an ESCape Sequence
3. General rules for interpreting a Control Sequence
4. C0 and C1 control codes in numeric order
5. Two and three-character ESCape Sequences in numeric order
6. Control Sequences in numeric order
7. VT100 emulation requirements
The VT100 USER GUIDE and ANSI standard X3.64-1979 both list the ANSI ESCape
sequences in alphabetic order by mnemonic, but do not have a have a cross
reference in order by ASCII code. This paper lists the combination of all
definitions from the three ANSI standards in numeric order. For a description
of the advantages of using these standards, see the article "Toward
Standardized Video Terminals" in the April-1984 issue of BYTE magazine.
ANSI X3.4-1977 defines the 7-bit ASCII character set (C0 and G0). It was
written in 1968, revised in 1977, and explains the decisions made in laying out
the ASCII code. In particular, it explains why ANSI chose to make ASCII
incompatible with EBCDIC in order to make it self-consistant.
ANSI X3.41-1974 introduces the idea of an 8-bit ASCII character set (C1 and G1
in addition to the existing C0 and G0). It describes how to use the 8-bit
features in a 7-bit environment. X3.41 defines the format of all ESCape
sequences, but defines only the 3-character ones with a parameter character
in the middle. These instruct the terminal how to interpret the C0, G0, C1,
and G1 characters (such as by selecting different character-set ROMs).
Note: NAPLPS does videotex graphics by redefining the C1 set and
selecting alternate G0, G1, G2, and G3 sets.
See the February 1983 issue of BYTE magazine for details.
ANSI X3.64-1979 defines the remaining ESCape sequences. It defines all the C1
control characters, and specifies that certain two-character ESCape sequences
in the 7-bit environment are to act exactly like the 8-bit C1 control set.
X3.64 introduces the idea of a Control-Sequence, which starts with CSI
character, has an indefinite length, and is terminated by an alphabetic
character. The VT100 was one of the first terminals to implement this
standard.
Definitions:
Control Character - A single character with an ASCII code with the range
of 000 to 037 and 200 to 237 octal, 00 to 1F and 80 to 9F hex.
Escape Sequence - A two or three character string staring with ESCape.
(Four or more character strings are allowed but not defined.)
Control Sequence - A string starting with CSI (233 octal, 9B hex) or
with ESCape Left-Bracket, and terminated by an alphabetic character.
Any number of parameter characters (digits 0 to 9, semicolon, and
question mark) may appear within the Control Sequence. The terminating
character may be preceded by an intermediate character (such as space).
Character classifications:
C0 Control 000-037 octal, 00-1F hex (G0 is 041-176 octal, 21-7E hex)
SPACE 040+240 octal, 20+A0 hex Always and everywhere a blank space
Intermediate 040-057 octal, 20-2F hex !"#$%&'()*+,-./
Parameters 060-077 octal, 30-3F hex 0123456789:;<=>?
Uppercase 100-137 octal, 40-5F hex @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
Lowercase 140-176 octal, 60-7E hex `abcdefghijlkmnopqrstuvwxyz{|}~
Alphabetic 100-176 octal, 40-7E hex (all of upper and lower case)
Delete 177 octal, 7F hex Always and everywhere ignored
C1 Control 200-237 octal, 80-9F hex 32 additional control characters
G1 Displayable 241-376 octal, A1-FE hex 94 additional displayable characters
Special 240+377 octal, A0+FF hex Same as SPACE and DELETE
Note that in this paper, the terms uppercase, lowercase, and alphabetics
include more characters than just A to Z.
------------------------------------------------------------------------------
General rules for interpreting an ESCape Sequence:
An ESCape Sequence starts with the ESC character (033 octal, 1B hex).
The length of the ESCape Sequence depends on the character that immediately
follows the ESCape.
If the next character is
C0 control: Interpret it first, then resume processing ESCape sequence.
Example: CR, LF, XON, and XOFF work as normal within an ESCape sequence.
Intermediate: Expect zero or more intermediates, a parameter terminates
a private function, an alphabetic terminates a standard sequence.
Example: ESC ( A defines standard character set, ESC ( 0 a DEC set.
Parameter: End of a private 2-character escape sequence.
Example: ESC = sets special keypad mode, ESC > clears it.
Uppercase: Translate it into a C1 control character and act on it.
Example: ESC D does indexes down, ESC M indexes up. (CSI is special)
Lowercase: End of a standard 2-character escape sequence.
Example: ESC c resets the terminal.
Delete: Ignore it, and continue interpreting the ESCape sequence
C1 and G1: Treat the same as their 7-bit counterparts
Note that CSI is the two-character sequence ESCape left-bracket or the 8-bit
C1 code of 233 octal, 9B hex. CSI introduces a Control Sequence, which
continues until an alphabetic character is received.
General rules for interpreting a Control Sequence:
1) It starts with CSI, the Control Sequence Introducer.
2) It contains any number of parameter characters (0123456789:;<=>?).
3) It terminates with an alphabetic character.
4) Intermediate characters (if any) immediately precede the terminator.
If the first character after CSI is one of "<=>?" (074-077 octal, 3C-3F hex),
then Control Sequence is to be interpreted according to private standards (such
as setting and resetting modes not defined by ANSI). The terminal should
expect any number of numeric parameters, separated by semicolons (073 octal,
3B hex). Only after the terminating alphabetic character is received should
the terminal act on the Control Sequence.
=============================================================================
C0 set of 7-bit control characters (from ANSI X3.4-1977).
Oct Hex Name * (* marks function used in DEC VT series or LA series terminals)
--- -- - --- - --------------------------------------------------------------
000 00 @ NUL * Null filler, terminal should ignore this character
001 01 A SOH Start of Header
002 02 B STX Start of Text, implied end of header
003 03 C ETX End of Text, causes some terminal to respond with ACK or NAK
004 04 D EOT End of Transmission
005 05 E ENQ * Enquiry, causes terminal to send ANSWER-BACK ID
006 06 F ACK Acknowledge, usually sent by terminal in response to ETX
007 07 G BEL * Bell, triggers the bell, buzzer, or beeper on the terminal
010 08 H BS * Backspace, can be used to define overstruck characters
011 09 I HT * Horizontal Tabulation, move to next predetermined position
012 0A J LF * Linefeed, move to same position on next line (see also NL)
013 0B K VT * Vertical Tabulation, move to next predetermined line
014 0C L FF * Form Feed, move to next form or page
015 0D M CR * Carriage Return, move to first character of current line
016 0E N SO * Shift Out, switch to G1 (other half of character set)
017 0F O SI * Shift In, switch to G0 (normal half of character set)
020 10 P DLE Data Link Escape, interpret next control character specially
021 11 Q XON * (DC1) Terminal is allowed to resume transmitting
022 12 R DC2 Device Control 2, causes ASR-33 to activate paper-tape reader
023 13 S XOFF* (DC2) Terminal must pause and refrain from transmitting
024 14 T DC4 Device Control 4, causes ASR-33 to deactivate paper-tape reader
025 15 U NAK Negative Acknowledge, used sometimes with ETX and ACK
026 16 V SYN Synchronous Idle, used to maintain timing in Sync communication
027 17 W ETB End of Transmission block
030 18 X CAN * Cancel (makes VT100 abort current escape sequence if any)
031 19 Y EM End of Medium
032 1A Z SUB * Substitute (VT100 uses this to display parity errors)
033 1B [ ESC * Prefix to an ESCape sequence
034 1C \ FS File Separator
035 1D ] GS Group Separator
036 1E ^ RS * Record Separator (sent by VT132 in block-transfer mode)
037 1F _ US Unit Separator
040 20 SP * Space (should never be defined to be otherwise)
177 7F DEL * Delete, should be ignored by terminal
==============================================================================
C1 set of 8-bit control characters (from ANSI X3.64-1979)
Oct Hex Name * (* marks function used in DEC VT series or LA series terminals)
--- -- - --- - --------------------------------------------------------------
200 80 @ Reserved for future standardization
201 81 A Reserved
202 82 B Reserved
203 83 C Reserved
204 84 D IND * Index, moves down one line same column regardless of NL
205 85 E NEL * NEw Line, moves done one line and to first column (CR+LF)
206 86 F SSA Start of Selected Area to be sent to auxiliary output device
207 87 G ESA End of Selected Area to be sent to auxiliary output device
210 88 H HTS * Horizontal Tabulation Set at current position
211 89 I HTJ Hor Tab Justify, moves string to next tab position
212 8A J VTS Vertical Tabulation Set at current line
213 8B K PLD Partial Line Down (subscript)
214 8C L PLU Partial Line Up (superscript)
215 8D M RI * Reverse Index, go up one line, reverse scroll if necessary
216 8E N SS2 * Single Shift to G2
217 8F O SS3 * Single Shift to G3 (VT100 uses this for sending PF keys)
220 90 P DCS * Device Control String, terminated by ST (VT125 enters graphics)
221 91 Q PU1 Private Use 1
222 92 R PU2 Private Use 2
223 93 S STS Set Transmit State
224 94 T CCH Cancel CHaracter, ignore previous character
225 95 U MW Message Waiting, turns on an indicator on the terminal
226 96 V SPA Start of Protected Area
227 97 W EPA End of Protected Area
230 98 X Reserved for for future standard
231 99 Y Reserved
232 9A Z * Reserved, but causes DEC terminals to respond with DA codes
233 9B [ CSI * Control Sequence Introducer (described in a seperate table)
234 9C \ ST * String Terminator (VT125 exits graphics)
235 9D ] OSC Operating System Command (reprograms intelligent terminal)
236 9E ^ PM Privacy Message (password verification), terminated by ST
237 9F _ APC Application Program Command (to word processor), term by ST
==============================================================================
Character set selection sequences (from ANSI X3.41-1974)
All are 3 characters long (including the ESCape). Alphabetic characters
as 3rd character are defined by ANSI, parameter characters as 3rd character
may be interpreted differently by each terminal manufacturer.
Oct Hex * (* marks function used in DEC VT series or LA series terminals)
--- -- -- - ------------------------------------------------------------------
040 20 ANNOUNCER - Determines whether to use 7-bit or 8-bit ASCII
A G0 only will be used. Ignore SI, SO, and G1.
B G0 and G1 used internally. SI and SO affect G0, G1 is ignored.
C G0 and G1 in an 8-bit only environment. SI and SO are ignored.
D G0 and G1 are used, SI and SO affect G0.
E
F * 7-bit transmission, VT240/PRO350 sends CSI as two characters ESC [
G * 8-bit transmission, VT240/PRO350 sends CSI as single 8-bit character
041 21 ! Select C0 control set (choice of 63 standard, 16 private)
042 22 " Select C1 control set (choice of 63 standard, 16 private)
043 23 # Translate next character to a special single character
#3 * DECDHL1 - Double height line, top half
#4 * DECDHL2 - Double height line, bottom half
#5 * DECSWL - Single width line
#6 * DECDWL - Double width line
#7 * DECHCP - Make a hardcopy of the graphics screen (GIGI,VT125,VT241)
#8 * DECALN - Alignment display, fill screen with "E" to adjust focus
044 24 $ MULTIBYTE CHARACTERS - Displayable characters require 2-bytes each
045 25 % SPECIAL INTERPRETATION - Such as 9-bit data
046 26 & Reserved for future standardization
047 27 ' Reserved for future standardization
050 28 ( * SCS - Select G0 character set (choice of 63 standard, 16 private)
(0 * DEC VT100 line drawing set (affects lowercase characters)
(1 * DEC Alternate character ROM set (RAM set on GIGI and VT220)
(2 * DEC Alternate character ROM set with line drawing
(5 * DEC Finnish on LA100
(6 * DEC Norwegian/Danish on LA100
(7 * DEC Swedish on LA100
(9 * DEC French Canadian
(< * DEC supplemental graphics (everything not in USASCII)
(A * UKASCII (British pound sign)
(B * USASCII (American pound sign)
(C * ISO Finnish on LA120
(E * ISO Norwegian/Danish on LA120
(H * ISO Swedish on LA120
(K * ISO German on LA100,LA120
(R * ISO French on LA100,LA120
(Y * ISO Italian on LA100
(Z * ISO Spanish on LA100
051 29 ) * SCS - Select G1 character set (choice of 63 standard, 16 private)
* (same character sets as listed under G0)
052 2A * * SCS - Select G2 character set
* (same character sets as listed under G0)
053 2B + * SCS - Select G3 character set
* (same character sets as listed under G0)
054 2C , SCS - Select G0 character set (additional 63+16 sets)
055 2D - SCS - Select G1 character set (additional 63+16 sets)
056 2E . SCS - Select G2 character set
057 2F / SCS - Select G3 character set
==============================================================================
Private two-character escape sequences (allowed by ANSI X3.41-1974)
These can be defined differently by each terminal manufacturer.
Oct Hex * (* marks function used in DEC VT series or LA series terminals)
--- -- - - ------------------------------------------------------------------
060 30 0
061 31 1 DECGON graphics on for VT105, DECHTS horiz tab set for LA34/LA120
062 32 2 DECGOFF graphics off VT105, DECCAHT clear all horz tabs LA34/LA120
063 33 3 DECVTS - set vertical tab for LA34/LA120
064 34 4 DECCAVT - clear all vertical tabs for LA34/LA120
065 35 5 * DECXMT - Host requests that VT132 transmit as if ENTER were pressed
066 36 6
067 37 7 * DECSC - Save cursor position and character attributes
070 38 8 * DECRC - Restore cursor and attributes to previously saved position
071 39 9
072 3A :
073 3B ;
074 3C < * DECANSI - Switch from VT52 mode to VT100 mode
075 3D = * DECKPAM - Set keypad to applications mode (ESCape instead of digits)
076 3E > * DECKPNM - Set keypad to numeric mode (digits intead of ESCape seq)
077 3F ?
DCS Device Control Strings used by DEC terminals (ends with ST)
Pp = Start ReGIS graphics (VT125, GIGI, VT240, PRO350)
Pq = Start SIXEL graphics (screen dump to LA34, LA100, screen load to VT125)
Pr = SET-UP data for GIGI, $PrVC0$\ disables both visible cursors.
Ps = Reprogram keys on the GIGI, $P0sDIR<CR>$\ makes keypad 0 send "DIR<CR>"
0-9=digits on keypad, 10=ENTER, 11=minus, 12=comma, 13=period,
14-17=PF1-PF4, 18-21=cursor keys. Enabled by $[?23h (PK1).
Pt = Start VT105 graphics on a VT125
==============================================================================
Standard two-character escape sequences (defined by ANSI X3.64-1979)
100 40 @ See description of C1 control characters
An ESCape followed by one of these uppercase characters is translated
to an 8-bit C1 control character before being interpreted.
220 90 P DCS - Device Control String, terminated by ST - see table above.
133 5B [ CSI - Control Sequence Introducer - see table below.
137 5F _ See description of C1 control characters
==============================================================================
Indepenent control functions (from Appendix E of X3.64-1977).
These four controls have the same meaning regardless of the current
definition of the C0 and C1 control sets. Each control is a two-character
ESCape sequence, the 2nd character is lowercase.
Oct Hex * (* marks function used in DEC VT series or LA series terminals)
--- -- - - --------------------------------------------------------------------
140 60 ` DMI - Disable Manual Input
141 61 a INT - INTerrupt the terminal and do special action
142 62 b EMI - Enable Manual Input
143 63 c * RIS - Reset to Initial State (VT100 does a power-on reset)
... The remaining lowercase characters are reserved by ANSI.
153 6B k NAPLPS lock-shift G1 to GR
154 6C l NAPLPS lock-shift G2 to GR
155 6D m NAPLPS lock-shift G3 to GR
156 6E n * LS2 - Shift G2 to GL (extension of SI) VT240,NAPLPS
157 6F o * LS3 - Shift G3 to GL (extension of SO) VT240,NAPLPS
... The remaining lowercase characters are reserved by ANSI.
174 7C | * LS3R - VT240 lock-shift G3 to GR
175 7D } * LS2R - VT240 lock-shift G2 to GR
176 7E ~ * LS1R - VT240 lock-shift G1 to GR
==============================================================================
Control Sequences (defined by ANSI X3.64-1979)
Control Sequences are started by either ESC [ or CSI and are terminated by an
"alphabetic" character (100 to 176 octal, 40 to 7E hex). Intermediate
characters are space through slash (40 to 57 octal, 20 to 2F hex) and parameter
characters are zero through question mark (60 to 77 octal, 30 to 3F hex,
including digits and semicolon). Parameters consist of zero or more decimal
numbers separated by semicolons. Leading zeros are optional, leading blanks
are not allowed. If no digits precede the final character, the default
parameter is used. Many functions treat a parameter of 0 as if it were 1.
Oct Hex * (* marks function used in DEC VT series or LA series terminals)
--- -- - - --------------------------------------------------------------------
100 40 @ ICH - Insert CHaracter
[10@ = Make room for 10 characters at current position
101 41 A * CUU - CUrsor Up
* [A = Move up one line, stop at top of screen, [9A = move up 9
102 42 B * CUD - CUrsor Down
* [B = Move down one line, stop at bottom of screen
103 43 C * CUF - CUrsor Forward
* [C = Move forward one position, stop at right edge of screen
104 44 D * CUB - CUrsor Backward
* [D = Same as BackSpace, stop at left edge of screen
105 45 E CNL - Cursor to Next Line
[5E = Move to first position of 5th line down
106 46 F CPL - Cursor to Previous Line
[5F = Move to first position of 5th line previous
107 47 G CHA - Cursor Horizontal position Absolute
[40G = Move to column 40 of current line
110 48 H * CUP - CUrsor Position
* [H = Home, [24;80H = Row 24, Column 80
111 49 I CHT - Cursor Horizontal Tabulation
[I = Same as HT (Control-I), [3I = Go forward 3 tabs
112 4A J * ED - Erase in Display (cursor does not move)
* [J = [0J = Erase from current position to end (inclusive)
* [1J = Erase from beginning to current position (inclusive)
* [2J = Erase entire display
* [?0J = Selective erase in display ([?1J, [?2J similar)
113 4B K * EL - Erase in Line (cursor does not move)
* [K = [0K = Erase from current position to end (inclusive)
* [1K = Erase from beginning to current position
* [2K = Erase entire current line
* [?0K = Selective erase to end of line ([?1K, [?2K similar)
114 4C L * IL - Insert Line, current line moves down (VT102 series)
[3L = Insert 3 lines if currently in scrolling region
115 4D M * DL - Delete Line, lines below current move up (VT102 series)
[2M = Delete 2 lines if currently in scrolling region
116 4E N EF - Erase in Field (as bounded by protected fields)
[0N, [1N, [2N act like [L but within currend field
117 4F O EA - Erase in qualified Area (defined by DAQ)
[0O, [1O, [2O act like [J but within current area
120 50 P * DCH - Delete Character, from current position to end of field
[4P = Delete 4 characters, VT102 series
121 51 Q SEM - Set Editing extent Mode (limits ICH and DCH)
[0Q = [Q = Insert/delete character affects rest of display
[1Q = ICH/DCH affect the current line only
[2Q = ICH/DCH affect current field (between tab stops) only
[3Q = ICH/DCH affect qualified area (between protected fields)
122 52 R * CPR - Cursor Position Report (from terminal to host)
* [24;80R = Cursor is positioned at line 24 column 80
123 53 S SU - Scroll up, entire display is moved up, new lines at bottom
[3S = Move everything up 3 lines, bring in 3 new lines
124 54 T SD - Scroll down, new lines inserted at top of screen
[4T = Scroll down 4, bring previous lines back into view
125 55 U NP - Next Page (if terminal has more than 1 page of memory)
[2U = Scroll forward 2 pages
126 56 V PP - Previous Page (if terminal remembers lines scrolled off top)
[1V = Scroll backward 1 page
127 57 W CTC - Cursor Tabulation Control
[0W = Set horizontal tab for current line at current position
[1W = Set vertical tab stop for current line of current page
[2W = Clear horiz tab stop at current position of current line
[3W = Clear vert tab stop at current line of current page
[4W = Clear all horiz tab stops on current line only
[5W = Clear all horiz tab stops for the entire terminal
[6W = Clear all vert tabs stops for the entire terminal
130 58 X ECH - Erase CHaracter
[4X = Change next 4 characters to "erased" state
131 59 Y CVT - Cursor Vertical Tab
[2Y = Move forward to 2nd following vertical tab stop
132 5A Z CBT - Cursor Back Tab
[3Z = Move backwards to 3rd previous horizontal tab stop
133 5B [ Reserved for future standardization left bracket
134 5C \ Reserved reverse slant
135 5D ] Reserved right bracket
136 5E ^ Reserved circumflex
137 5F _ Reserved underscore
140 60 ` * HPA - Horizontal Position Absolute (depends on PUM)
[720` = Move to 720 decipoints (1 inch) from left margin
* [80` = Move to column 80 on LA120
141 61 a * HPR - Horizontal Position Relative (depends on PUM)
[360a = Move 360 decipoints (1/2 inch) from current position
* [40a = Move 40 columns to right of current position on LA120
142 62 b REP - REPeat previous displayable character
[80b = Repeat character 80 times
143 63 c * DA - Device Attributes
* [c = Terminal will identify itself
* [?1;2c = Terminal is saying it is a VT100 with AVO
* [>0c = Secondary DA request (distinguishes VT240 from VT220)
144 64 d * VPA - Vertical Position Absolute (depends on PUM)
[90d = Move to 90 decipoints (1/8 inch) from top margin
* [10d = Move to line 10 if before that else line 10 next page
145 65 e * VPR - Vertical Position Relative (depends on PUM)
[720e = Move 720 decipoints (1 inch) down from current position
* [6e = Advance 6 lines forward on LA120
146 66 f * HVP - Horizontal and Vertical Position (depends on PUM)
[720,1440f = Move to 1 inch down and 2 inches over (decipoints)
* [24;80f = Move to row 24 column 80 if PUM is set to character
147 67 g * TBC - Tabulation Clear
* [0g = Clear horizontal tab stop at current position
* [1g = Clear vertical tab stop at current line (LA120)
* [2g = Clear all horizontal tab stops on current line only LA120
* [3g = Clear all horizontal tab stops in the terminal
150 68 h * SM - Set Mode (. means permanently set on VT100)
[0h = Error, this command is ignored
* [1h = GATM - Guarded Area Transmit Mode, send all (VT132)
[2h = KAM - Keyboard Action Mode, disable keyboard input
[3h = CRM - Control Representation Mode, show all control chars
* [4h = IRM - Insertion/Replacement Mode, set insert mode (VT102)
[5h = SRTM - Status Report Transfer Mode, report after DCS
* [6h = ERM - ERasure Mode, erase protected and unprotected
[7h = VEM - Vertical Editing Mode, IL/DL affect previous lines
[8h, [9h are reserved
[10h = HEM - Horizontal Editing mode, ICH/DCH/IRM go backwards
[11h = PUM - Positioning Unit Mode, use decipoints for HVP/etc
. [12h = SRM - Send Receive Mode, transmit without local echo
[13h = FEAM - Format Effector Action Mode, FE's are stored
[14h = FETM - Format Effector Transfer Mode, send only if stored
[15h = MATM - Multiple Area Transfer Mode, send all areas
* [16h = TTM - Transmit Termination Mode, send scrolling region
[17h = SATM - Send Area Transmit Mode, send entire buffer
[18h = TSM - Tabulation Stop Mode, lines are independent
[19h = EBM - Editing Boundry Mode, all of memory affected
* [20h = LNM - Linefeed Newline Mode, LF interpreted as CR LF
* [?1h = DECCKM - Cursor Keys Mode, send ESC O A for cursor up
* [?2h = DECANM - ANSI Mode, use ESC < to switch VT52 to ANSI
* [?3h = DECCOLM - COLumn mode, 132 characters per line
* [?4h = DECSCLM - SCrolL Mode, smooth scrolling
* [?5h = DECSCNM - SCreeN Mode, black on white background
* [?6h = DECOM - Origin Mode, line 1 is relative to scroll region
* [?7h = DECAWM - AutoWrap Mode, start newline after column 80
* [?8h = DECARM - Auto Repeat Mode, key will autorepeat
* [?9h = DECINLM - INterLace Mode, interlaced for taking photos
* [?10h = DECEDM - EDit Mode, VT132 is in EDIT mode
* [?11h = DECLTM - Line Transmit Mode, ignore TTM, send line
[?12h = ?
* [?13h = DECSCFDM - Space Compression/Field Delimiting on,
* [?14h = DECTEM - Transmit Execution Mode, transmit on ENTER
[?15h = ?
* [?16h = DECEKEM - Edit Key Execution Mode, EDIT key is local
[?17h = ?
* [?18h = DECPFF - Print FormFeed mode, send FF after printscreen
* [?19h = DECPEXT - Print Extent mode, print entire screen
* [?20h = OV1 - Overstrike, overlay characters on GIGI
* [?21h = BA1 - Local BASIC, GIGI to keyboard and screen
* [?22h = BA2 - Host BASIC, GIGI to host computer
* [?23h = PK1 - GIGI numeric keypad sends reprogrammable sequences
* [?24h = AH1 - Autohardcopy before erasing or rolling GIGI screen
* [?29h = - Use only the proper pitch for the LA100 font
* [?38h = DECTEK - TEKtronix mode graphics
151 69 i * MC - Media Copy (printer port on VT102)
* [0i = Send contents of text screen to printer
[1i = Fill screen from auxiliary input (printer's keyboard)
[2i = Send screen to secondary output device
[3i = Fill screen from secondary input device
* [4i = Turn on copying received data to primary output (VT125)
* [4i = Received data goes to VT102 screen, not to its printer
* [5i = Turn off copying received data to primary output (VT125)
* [5i = Received data goes to VT102's printer, not its screen
* [6i = Turn off copying received data to secondary output (VT125)
* [7i = Turn on copying received data to secondary output (VT125)
* [?0i = Graphics screen dump goes to graphics printer VT125,VT240
* [?1i = Print cursor line, terminated by CR LF
* [?2i = Graphics screen dump goes to host computer VT125,VT240
* [?4i = Disable auto print
* [?5i = Auto print, send a line at a time when linefeed received
152 6A j Reserved for future standardization
153 6B k Reserved for future standardization
154 6C l * RM - Reset Mode (. means permanently reset on VT100)
* [1l = GATM - Transmit only unprotected characters (VT132)
. [2l = KAM - Enable input from keyboard
. [3l = CRM - Control characters are not displayable characters
* [4l = IRM - Reset to replacement mode (VT102)
. [5l = SRTM - Report only on command (DSR)
* [6l = ERM - Erase only unprotected fields
. [7l = VEM - IL/DL affect lines after current line
[8l, [9l are reserved
. [10l = HEM - ICH and IRM shove characters forward, DCH pulls
. [11l = PUM - Use character positions for HPA/HPR/VPA/VPR/HVP
[12l = SRM - Local echo - input from keyboard sent to screen
. [13l = FEAM - HPA/VPA/SGR/etc are acted upon when received
. [14l = FETM - Format Effectors are sent to the printer
[15l = MATM - Send only current area if SATM is reset
* [16l = TTM - Transmit partial page, up to cursor position
[17l = SATM - Transmit areas bounded by SSA/ESA/DAQ
. [18l = TSM - Setting a tab stop on one line affects all lines
. [19l = EBM - Insert does not overflow to next page
* [20l = LNM - Linefeed does not change horizontal position
* [?1l = DECCKM - Cursor keys send ANSI cursor position commands
* [?2l = DECANM - Use VT52 emulation instead of ANSI mode
* [?3l = DECCOLM - 80 characters per line (erases screen)
* [?4l = DECSCLM - Jump scrolling
* [?5l = DECSCNM - Normal screen (white on black background)
* [?6l = DECOM - Line numbers are independent of scrolling region
* [?7l = DECAWM - Cursor remains at end of line after column 80
* [?8l = DECARM - Keys do not repeat when held down
* [?9l = DECINLM - Display is not interlaced to avoid flicker
* [?10l = DECEDM - VT132 transmits all key presses
* [?11l = DECLTM - Send page or partial page depending on TTM
[?12l = ?
* [?13l = DECSCFDM - Don't suppress trailing spaces on transmit
* [?14l = DECTEM - ENTER sends ESC S (STS) a request to send
[?15l = ?
* [?16l = DECEKEM - EDIT key transmits either $[10h or $[10l
[?17l = ?
* [?18l = DECPFF - Don't send a formfeed after printing screen
* [?19l = DECPEXT - Print only the lines within the scroll region
* [?20l = OV0 - Space is destructive, replace not overstrike, GIGI
* [?21l = BA0 - No BASIC, GIGI is On-Line or Local
* [?22l = BA0 - No BASIC, GIGI is On-Line or Local
* [?23l = PK0 - Ignore reprogramming on GIGI keypad and cursors
* [?24l = AH0 - No auto-hardcopy when GIGI screen erased
* [?29l = Allow all character pitches on the LA100
* [?38l = DECTEK - Ignore TEKtronix graphics commands
155 6D m * SGR - Set Graphics Rendition (affects character attributes)
* [0m = Clear all special attributes
* [1m = Bold or increased intensity
* [2m = Dim or secondary color on GIGI (superscript on XXXXXX)
[3m = Italic (subscript on XXXXXX)
* [4m = Underscore, [0;4m = Clear, then set underline only
* [5m = Slow blink
[6m = Fast blink (overscore on XXXXXX)
* [7m = Negative image, [0;1;7m = Bold + Inverse
[8m = Concealed (do not display character echoed locally)
[9m = Reserved for future standardization
* [10m = Select primary font (LA100)
* [11m - [19m = Selete alternate font (LA100 has 11 thru 14)
[20m = FRAKTUR (whatever that means)
* [22m = Cancel bold or dim attribute only (VT220)
* [24m = Cancel underline attribute only (VT220)
* [25m = Cancel fast or slow blink attribute only (VT220)
* [27m = Cancel negative image attribute only (VT220)
* [30m = Write with black, [40m = Set background to black (GIGI)
* [31m = Write with red, [41m = Set background to red
* [32m = Write with green, [42m = Set background to green
* [33m = Write with yellow, [43m = Set background to yellow
* [34m = Write with blue, [44m = Set background to blue
* [35m = Write with magenta, [45m = Set background to magenta
* [36m = Write with cyan, [46m = Set background to cyan
* [37m = Write with white, [47m = Set background to white
[38m, [39m, [48m, [49m are reserved
156 6E n * DSR - Device Status Report
* [0n = Terminal is ready, no malfunctions detected
[1n = Terminal is busy, retry later
[2n = Terminal is busy, it will send DSR when ready
* [3n = Malfunction, please try again
[4n = Malfunction, terminal will send DSR when ready
* [5n = Command to terminal to report its status
* [6n = Command to terminal requesting cursor position (CPR)
* [?15n = Command to terminal requesting printer status, returns
[?10n = OK, [?11n = not OK, [?13n = no printer.
* [?25n = "Are User Defined Keys Locked?" (VT220)
157 6F o DAQ - Define Area Qualification starting at current position
[0o = Accept all input, transmit on request
[1o = Protected and guarded, accept no input, do not transmit
[2o = Accept any printing character in this field
[3o = Numeric only field
[4o = Alphabetic (A-Z and a-z) only
[5o = Right justify in area
[3;6o = Zero fill in area
[7o = Set horizontal tab stop, this is the start of the field
[8o = Protected and unguarded, accept no input, do transmit
[9o = Space fill in area
==============================================================================
Private Control Sequences (allowed by ANSI X3.41-1974).
These take parameter strings and terminate with the last half of lowercase.
Oct Hex * (* marks function used in DEC VT series or LA series terminals)
--- -- - - --------------------------------------------------------------------
160 70 p * DECSTR - Soft Terminal Reset
[!p = Soft Terminal Reset
161 71 q * DECLL - Load LEDs
[0q = Turn off all, [?1;4q turns on L1 and L4, etc
[154;155;157q = VT100 goes bonkers
[2;23!q = Partial screen dump from GIGI to graphics printer
[0"q = DECSCA Select Character Attributes off
[1"q = DECSCA - designate set as non-erasable
[2"q = DECSCA - designate set as erasable
162 72 r * DECSTBM - Set top and bottom margins (scroll region on VT100)
[4;20r = Set top margin at line 4 and bottom at line 20
163 73 s * DECSTRM - Set left and right margins on LA100,LA120
[5;130s = Set left margin at column 5 and right at column 130
164 74 t * DECSLPP - Set physical lines per page
[66t = Paper has 66 lines (11 inches at 6 per inch)
165 75 u * DECSHTS - Set many horizontal tab stops at once on LA100
[9;17;25;33;41;49;57;65;73;81u = Set standard tab stops
166 76 v * DECSVTS - Set many vertical tab stops at once on LA100
[1;16;31;45v = Set vert tabs every 15 lines
167 77 w * DECSHORP - Set horizontal pitch on LAxxx printers
[1w = 10 characters per inch, [2w = 12 characters per inch
[0w=10, [3w=13.2, [4w=16.5, [5w=5, [6w=6, [7w=6.6, [8w=8.25
170 78 x * DECREQTPARM - Request terminal parameters
[3;5;2;64;64;1;0x = Report, 7 bit Even, 1200 baud, 1200 baud
171 79 y * DECTST - Invoke confidence test
[2;1y = Power-up test on VT100 series (and VT100 part of VT125)
[3;1y = Power-up test on GIGI (VK100)
[4;1y = Power-up test on graphics portion of VT125
172 7A z * DECVERP - Set vertical pitch on LA100
[1z = 6 lines per inch, [2z = 8 lines per inch
[0z=6, [3z=12, [4z=3, [5z=3, [6z=4
173 7B { Private
174 7C | * DECTTC - Transmit Termination Character
[0| = No extra characters, [1| = terminate with FF
175 7D } * DECPRO - Define protected field on VT132
[0} = No protection, [1;4;5;7} = Any attribute is protected
[254} = Characters with no attributes are protected
176 7E ~ * DECKEYS - Sent by special function keys
[1~=FIND, [2~=INSERT, [3~=REMOVE, [4~=SELECT, [5~=PREV, [6~=NEXT
[17~=F6...[34~=F20 ([23~=ESC,[24~=BS,[25~=LF,[28~=HELP,[29~=DO)
177 7F DELETE is always ignored
==============================================================================
Control Sequences with intermediate characters (from ANSI X3.64-1979).
Note that there is a SPACE character before the terminating alphabetic.
Oct Hex * (* marks function used in DEC VT series or LA series terminals)
--- -- - - --------------------------------------------------------------------
100 40 @ SL - Scroll Left
[4 @ = Move everything over 4 columns, 4 new columns at right
101 41 A SR - Scroll Right
[2 A = Move everything over 2 columns, 2 new columns at left
102 42 B GSM - Graphic Size Modification
[110;50 B = Make 110% high, 50% wide
103 43 C GSS - Graphic Size Selection
[120 C = Make characters 120 decipoints (1/6 inch) high
104 44 D FNT - FoNT selection (used by SGR, [10m thru [19m)
[0;23 D = Make primary font be registered font #23
105 45 E TSS - Thin Space Specification
[36 E = Define a thin space to be 36 decipoints (1/20 inch)
106 46 F JFY - JustiFY, done by the terminal/printer
[0 E = No justification
[1 E = Fill, bringing words up from next line if necessary
[2 E = Interword spacing, adjust spaces between words
[3 E = Letter spacing, adjust width of each letter
[4 E = Use hyphenation
[5 E = Flush left margin
[6 E = Center following text between margins (until [0 E)
[7 E = Flush right margin
[8 E = Italian form (underscore instead of hyphen)
107 47 G SPI - SPacing Increment (in decipoints)
[120;72 G = 6 per inch vertical, 10 per inch horizontal
110 48 H QUAD- Do quadding on current line of text (typography)
[0 H = Flush left, [1 H = Flush left and fill with leader
[2 H = Center, [3 H = Center and fill with leader
[4 H = Flush right, [5 H = Flush right and fill with leader
111 49 I Reserved for future standardization
157 67 o Reserved for future standardization
160 70 p Private use
... May be defined by the printer manufacturer
176 7E ~ Private use
177 7F DELETE is always ignored
==============================================================================
Minimum requirements for VT100 emulation:
1) To act as a passive display, implement the 4 cursor commands, the 2 erase
commands, direct cursor addressing, and at least inverse characters.
The software should be capable of handling strings with 16 numeric parameters
with values in the range of 0 to 255.
[A Move cursor up one row, stop if a top of screen
[B Move cursor down one row, stop if at bottom of screen
[C Move cursor forward one column, stop if at right edge of screen
[D Move cursor backward one column, stop if at left edge of screen
[H Home to row 1 column 1 (also [1;1H)
[J Clear from current position to bottom of screen
[K Clear from current position to end of line
[24;80H Position to line 24 column 80 (any line 1 to 24, any column 1 to 132)
[0m Clear attributes to normal characters
[7m Add the inverse video attribute to succeeding characters
[0;7m Set character attributes to inverse video only
2) To enter data in VT100 mode, implement the 4 cursor keys and the 4 PF keys.
It must be possible to enter ESC, TAB, BS, DEL, and LF from the keyboard.
[A Sent by the up-cursor key (alternately ESC O A)
[B Sent by the down-cursor key (alternately ESC O B)
[C Sent by the right-cursor key (alternately ESC O C)
[D Sent by the left-cursor key (alternately ESC O D)
OP PF1 key sends ESC O P
OQ PF2 key sends ESC O Q
OR PF3 key sends ESC O R
OS PF3 key sends ESC O S
[c Request for the terminal to identify itself
[?1;0c VT100 with memory for 24 by 80, inverse video character attribute
[?1;2c VT100 capable of 132 column mode, with bold+blink+underline+inverse
3) When doing full-screen editing on a VT100, implement directed erase, the
numeric keypad in applications mode, and the limited scrolling region.
The latter is needed to do insert/delete line functions without rewriting
the screen.
[0J Erase from current position to bottom of screen inclusive
[1J Erase from top of screen to current position inclusive
[2J Erase entire screen (without moving the cursor)
[0K Erase from current position to end of line inclusive
[1K Erase from beginning of line to current position inclusive
[2K Erase entire line (without moving cursor)
[12;24r Set scrolling region to lines 12 thru 24. If a linefeed or an
INDex is received while on line 24, the former line 12 is deleted
and rows 13-24 move up. If a RI (reverse Index) is received while
on line 12, a blank line is inserted there as rows 12-13 move down.
All VT100 compatible terminals (except GIGI) have this feature.
ESC = Set numeric keypad to applications mode
ESC > Set numeric keypad to numbers mode
OA Up-cursor key sends ESC O A after ESC = ESC [ ? 1 h
OB Down-cursor key sends ESC O B " " "
OC Right-cursor key sends ESC O B " " "
OB Left-cursor key sends ESC O B " " "
OM ENTER key sends ESC O M after ESC =
Ol COMMA on keypad sends ESC O l " " (that's lowercase L)
Om MINUS on keypad sends ESC O m " "
Op ZERO on keypad sends ESC O p " "
Oq ONE on keypad sends ESC O q " "
Or TWO on keypad sends ESC O r " "
Os THREE on keypad sends ESC O s " "
Ot FOUR on keypad sends ESC O t " "
Ou FIVE on keypad sends ESC O u " "
Ov SIX on keypad sends ESC O v " "
Ow SEVEN on keypad sends ESC O w " "
Ox EIGHT on keypad sends ESC O x " "
Oy NINE on keypad sends ESC O y " "
4) If the hardware is capable of double width/double height:
#3 Top half of a double-width double-height line
#4 Bottom half of a double-width double-height line
#5 Make line single-width (lines are set this way when cleared by ESC [ J)
#6 Make line double-width normal height (40 or 66 characters)
5) If the terminal emulator is capable of insert/delete characters,
insert/delete lines, insert/replace mode, and can do a full-screen dump to
the printer (in text mode), then it should identify itself as a VT102
[c Request for the terminal to identify itself
[?6c VT102 (printer port, 132 column mode, and ins/del standard)
[1@ Insert a blank character position (shift line to the right)
[1P Delete a character position (shift line to the left)
[1L Insert blank line at current row (shift screen down)
[1M Delete the current line (shift screen up)
[4h Set insert mode, new characters shove existing ones to the right
[4l Reset insert mode, new characters replace existing ones
[0i Print screen (all 24 lines) to the printer
[4i All received data goes to the printer (nothing to the screen)
[5i All received data goes to the screen (nothing to the printer)
[End of ANSICODE.TXT]

File diff suppressed because it is too large Load Diff

@ -0,0 +1,324 @@
/======================================================\
| VT100 and VT52 Compatable Modes ESCape Codes Chart |
\======================================================/
VT52 Compatable Mode
--------------------
ESC A Cursor up
ESC B Cursor down
ESC C Cursor right
ESC D Cursor left
ESC F Special graphics character set
ESC G Select ASCII character set
ESC H Cursor to home
ESC I Reverse line feed
ESC J Erase to end of screen
ESC K Erase to end of line
ESC Ylc Direct cursor address (See note 1)
ESC Z Identify (See note 2)
ESC = Enter alternate keypad mode
ESC > Exit alternate keypad mode
ESC 1 Graphics processor on (See note 3)
ESC 2 Graphics processor off (See note 3)
ESC < Enter ANSI mode
Note 1: Line and column numbers for direct cursor addresses are single
character codes whose values are the desired number plus 37 octal.
Line and column numbers start at 1.
Note 2: Response to ESC Z is ESC/Z.
Note 3: Ignored if no graphics processor stored in the VT100
ANSI Compatable Mode
--------------------
ESC [ Pn A Cursor up Pn lines
ESC [ Pn B Cursor down Pn lines
ESC [ Pn C Cursor forward Pn characters (right)
ESC [ Pn D Cursor backward Pn characters (left)
ESC [ Pl;PcH Direct cursor addressing, where Pl is line#, Pc is column#
ESC [ Pl;Pcf Same as above
ESC D Index
ESC M Reverse index
ESC 7 Save cursor and attributes
ESC 8 Restore cursor and attributes
ESC #3 Change this line to double-height top half
ESC #4 Change this line to double-height bottom half
ESC #5 Change this line to single-width single-height
ESC #6 Change this line to double-width single-height
ESC [ Ps..Ps m Ps refers to selective parameter. Multiple parameters are
separated by the semicolon character (073 octal). The param-
eters are executed in order and have the following meaning:
0 or none All attributes off
1 Bold on
4 Underscore on
5 Blink on
7 Reverse video on
Any other parameters are ignored.
ESC [ K Erase from cursor to end of line
ESC [ 0K Same
ESC [ 1K Erase from beginning of line to cursor
ESC [ 2K Erase line containing cursor
ESC [ J Erase from cursor to end of screen
ESC [ 0J Same
ESC [ 2J Erase entire screen
ESC [ Ps..Ps q Programmable LEDs: Ps are selective parameters separated by
semicolons (073 octal) and executed in order, as follows:
0 or None All LEDs off
1 L1 On
2 L2 On
3 L3 On
4 L4 On
Any other parameter values are ignored.
The following select alternative character sets. The G1 set is invoked for
use by the control code SO (Shift Out), the G0 set is invoked by the control
code SI (Shift In).
G0 designator G1 designator Character set
ESC ( A ESC ) A United Kingdom (UK)
ESC ( B ESC ) B United States (USASCII)
ESC ( 0 ESC ) 0 Special graphics/line drawing set
ESC ( 1 ESC ) 1 Alternative character ROM
ESC ( 2 ESC ) 2 Alternative graphic ROM
ESC K Pt;Pb r Set top scrolling window (Pt) and bottom scrolling window
(Pb). Pb must be greater than Pb.
ESC H Set tab at current column
ESC [ g Clear tab at current column
ESC [ 0g Same
ESC [ 3g Clear all tabs
Modes
-----
Mode Name Mode To set seq Mode To reset seq
Line feed/new New line ESC [20h Line feed ESC [20l
Cursor key Application ESC [?1h Cursor ESC [?1l
ANSI/VT52 ANSI n/a VT52 ESC [?2l
Column mode 132 col ESC [?3h 80 col ESC [?3l
Scrolling Smooth ESC [?4h Jump ESC [?4l
Screen mode Reverse ESC [?5h Normal ESC [?5l
Origin mode Relative ESC [?6h Absolute ESC [?6l
Wraparound On ESC [?7h Off ESC [?7l
Autorepeat On ESC [?8h Off ESC [?8l
Interface On ESC [?9h Off ESC [?9l
Reports
-------
ESC [ 6n Cursor position report
ESC [ Pl;PcR (response; Pl=line#; Pc=column#)
ESC [ 5n Status report
ESC [ c (response; terminal Ok)
ESC [ 0c (response; teminal not Ok)
ESC [ c What are you?
ESC [ 0c Same
ESC [?1;Ps c response; where Ps is option present:
0 Base VT100, no options
1 Preprocessor option (STP)
2 Advanced video option (AVO)
3 AVO and STP
4 Graphics processor option (GO)
5 GO and STP
6 GO and AVO
7 GO, STP, and AVO
ESC c Causes power-up reset routine to be executed
ESC #8 Fill screen with "E"
ESC [ 2;Ps y Invoke Test(s), where Ps is a decimal computed by adding the
numbers of the desired tests to be executed:
1 Power up test
2 Data loop back
4 EIA modem control signal test
8 Repeat test(s) indefinitely
Article 4810 of alt.hackers:
Newsgroups: alt.hackers
From: Dom@sound.demon.co.uk (The Dark Stranger)
Path: caen!math.ohio-state.edu!howland.reston.ans.net!pipex!uknet!demon!sound.demon.co.uk!sound.and.vision.bbs!vf10!VeXNeT!Dom
Subject: Re: vt100 escapes
Reply-To: Dom@sound.demon.co.uk
References: <2kp5c0$61c@samba.oit.unc.edu>
Distribution: world
X-Mailer: Sound & Vision BBS +44 (0)932-252-323
Organization: Vex-Factor:10 Productions, London, England.
Approved: I like to think so
Lines: 145
Date: Tue, 1 Mar 1994 19:13:36 +0000
Message-ID: <#2377_vf10@sound.demon.co.uk>
Sender: usenet@demon.co.uk
In article <2kp5c0$61c@samba.oit.unc.edu> Michael.Lea@launchpad.unc.edu (Michael David Lea) writes:
> Does anyone know where I can get a list of vt100 escape codes? I found
> one list but it doesn't seem to work.
TERMINAL COMMANDS
~~~~~~~~~~~~~~~~
c Reset
[ ! p Soft Reset
# 8 Fill Screen with E's
} 1 * Fill screen with * test
} 2 Video attribute test display
} 3 Character sets display test
KEYBOARD COMMANDS
~~~~~~~~~~~~~~~~
[ 2 h Keyboard locked
[ 2 l Keyboard unlocked
[ ? 8 h Autorepeat ON
[ ? 8 l Autorepeat OFF
[ 0 q Lights all off on keyboard
[ * q Light * on
PROGRAMMABLE KEY COMMANDS
~~~~~~~~~~~~~~~~~~~~~~~~
! pk Program a programmable key (local)
@ pk Program a programmable key (on-line)
% pk Transmit programmable key contents
SCREEN FORMAT
~~~~~~~~~~~~
[ ? 3 h 132 Characters on
[ ? 3 l 80 Characters on
[ ? 4 h Smooth Scroll on
[ ? 4 l Jump Scroll on
[ *t ; *b r Scrolling region selected, line *t to *b
[ ? 5 h Inverse video on
[ ? 5 l Normal video off
[ ? 7 h Wraparound ON
[ ? 7 l Wraparound OFF
[ ? 75 h Screen display ON
[ ? 75 l Screen display OFF
CHARACTER SETS AND LABELS
~~~~~~~~~~~~~~~~~~~~~~~~
( A British
( B North American ASCII set
( C Finnish
( E Danish or Norwegian
( H Swedish
( K German
( Q French Canadian
( R Flemish or French/Belgian
( Y Italian
( Z Spanish
( 0 Line Drawing
( 1 Alternative Character
( 2 Alternative Line drawing
( 4 Dutch
( 5 Finnish
( 6 Danish or Norwegian
( 7 Swedish
( = Swiss (French or German)
[Note all ( may be replaced with )]
CHARACTER SIZE
~~~~~~~~~~~~~
# 1 Double ht, single width top half chars
# 2 Double ht, single width lower half chars
# 3 Double ht, double width top half chars
# 4 Double ht, double width lower half chars
# 5 Single ht, single width chars
# 6 Single ht, double width chars
ATTRIBUTES AND FIELDS
~~~~~~~~~~~~~~~~~~~~
[ 0 m Clear all character attributes
[ 1 m Alternate Intensity ON
[ 4 m Underline ON
[ 5 m Blink ON
[ 7 m Inverse video ON
[ 22 m Alternate Intensity OFF
[ 24 m Underline OFF
[ 25 m Blink OFF
[ 27 m Inverse Video OFF
[ 0 } Protected fields OFF
[ 1 } Protected = Alternate Intensity
[ 4 } Protected = Underline
[ 5 } Protected = Blinking
[ 7 } Protected = Inverse
[ 254 } Protected = All attributes OFF
CURSOR COMMANDS
~~~~~~~~~~~~~~
[ ? 25 l Cursor OFF
[ ? 25 h Cursor ON
[ ? 50 l Cursor OFF
[ ? 50 h Cursor ON
7 Save cursor position and character attributes
8 Restore cursor position and character attributes
D Line feed
E Carriage return and line feed
M Reverse Line feed
[ A Cursor up one line
[ B Cursor down one line
[ C Cursor right one column
[ D Cursor left one column
[ * A Cursor up * lines
[ * B Cursor down * lines
[ * C Cursor right * columns
[ * D Cursor left * columns
[ H Cursor home
[ *l ; *c H Move cursor to line *l, column *c
[ *l ; *c f Move curosr to line *l, column *c
Y nl nc Direct cursor addressing (line/column number)
H Tab set at present cursor position
[ 0 g Clear tab at present cursor position
[ 3 g Clear all tabs
EDIT COMMANDS
~~~~~~~~~~~~
[ 4 h Insert mode selected
[ 4 l Replacement mode selected
[ ? 14 h Immediate operation of ENTER key
[ ? 14 l Deferred operation of ENTER key
[ ? 16 h Edit selection immediate
[ ? 16 l Edit selection deffered
[ P Delete character from cursor position
[ * P Delete * chars from curosr right
[ M Delete 1 char from cursor position
[ * M Delete * lines from cursor line down
[ J Erase screen from cursor to end
[ 1 J Erase beginning of screen to cursor
[ 2 J Erase entire screen but do not move cursor
[ K Erase line from cursor to end
[ 1 K Erase from beginning of line to cursor
[ 2 K Erase entire line but do not move cursor
[ L Insert 1 line from cursor position
[ * L Insert * lines from cursor position
ObBusinessHack: Customer wants a CD-ROM multimedia encyclopaedia, so I buy a
Soundblaster Pro for #75 which comes bundled with a multimedia encyclopaedia
CD-ROM. After carefully removing the "not to be sold separately" notice from
the CD, I sell it on for #75. Result: One free Soundblaster Pro and a happy
(but gullible) customer. (Allegedly ;)
Virtually... :)om
.............................................................................
: INTERNET: Dom@sound.demon.co.uk :: Tel: 0831-88-42-69 Int:+44-831-884-269 :
: FIDONET: VF10 at node 2:254/14 :: PGP 2.3 public key available via Email :
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Loading…
Cancel
Save