This page describes the DEC VT320 command set supported
by the HDSterm emulator on the ViewStation.
HDSterm
Command Sequences
The HDSterm client is a VT320 terminal emulator. It responds to
all the standard VT320 command sequences. These are listed below.
HDSterm uses 7-bit control characters. Therefore, 8-bit
control codes (values 0x80 through 0x9f) should be expressed as two
byte sequences. For example, the CSI character (decimal 155, or hex 9B)
:
CSI (ASCII 0x09B) should be expressed as "ESC [" and
DCS
(ASCII 0x090) should be expressed as "ESC P", and so on.
HDSterm Supported Command Set:
Designating "Hard" Character Sets ESC (
B - ASCII -> G0
ESC ) B - ASCII -> G1
ESC * B - ASCII ->
G2
ESC + B - ASCII -> G3
ESC ( < - DEC Suppl. -> G0
ESC
) < - DEC Suppl. -> G1
ESC * < - DEC Suppl. -> G2
ESC
+ < - DEC Suppl. -> G3
ESC ( A - U.K. Ntl. -> G0
ESC )
A - U.K. Ntl. -> G1
ESC ( 0 - DEC spec. graphics -> G0
ESC
) 0 - DEC spec. graphics -> G1
ESC * 0 - DEC spec. graphics ->
G2
ESC + 0 - DEC spec. graphics -> G3
Invoking
Character Sets Using Locking Shifts SI (Ctrl O) -
Invoke G0 into GL (default)
SO (Ctrl N) - Invoke G1 into GL
ESC
~ - Invoke G1 into GR
ESC n - Invoke G2 into GL
ESC } -
Invoke G2 into GR (default)
ESC o - Invoke G3 into GL
ESC
| - Invoke G3 into GR
Invoking G2 or G3 into GL For a Single Character
Using Single Shifts
SS2 (ESC N) - Single Shift G2
SS3 (ESC O) - Single Shift
G3
Terminal Modes
ANSI modes: CSI
Ps ; Ps ; ... l - Reset mode
CSI Ps ; Ps ; ... h - Set mode
Ps = 4 - replace mode / insert mode
Ps = 20 - linefeed
mode / newline mode
DEC private modes: CSI ? Ps ; Ps ; ... h - Set mode
CSI ? Ps ; Ps ; ... l - Reset
mode
Ps = 1 - cursor keys generate "application control" /
ANSI cursor control sequences
Ps = 3 - 132 / 80 columns per
line
Ps = 5 - black chars on white / white chars on black
Ps = 6 - cursor positioning relative to scroll area / global
Ps = 7 - wrap / don't wrap at the end of the line
Ps =
8 - keyboard autorepeat on / off
Ps = 25 - cursor visible /
invisible
ESC = - select application keypad mode
ESC > -
select numeric keypad mode
Cursor Positioning CSI Pn A -
move cursor up Pn lines
CSI Pn B - move cursor down Pn lines
CSI Pn C - move cursor right Pn columns
CSI Pn D - move
cursor left Pn columns
CSI Pl ; Pc H - move cursor to line Pl,
columns Pc
CSI Pl ; Pc f - move cursor to line Pl, columns Pc
IND (ESC D) - move cursor down one line, scrolled
RI (ESC
M) - move cursor up one line, scrolled
NEL (ESC E) - move
cursor down one line and to the first column, scrolled
^H
(0x08) - move cursor left one column
^J (0x0a) - perform
"newline" function, which is either the same as IND or NEL, depending on
the current linefeed/newline mode.
^K (0x0b) - vertical
tab, behaves as ^J above
^L (0x0c) - form feed, behaves as ^J
above
^M (0x0d) - move cursor to first column of current line
ESC 7 - save states: cursor postion, graphic rendition,
character set shift state, wrap flag, origin mode (not supported),
selective erase (not supported)
ESC 8 - restore saved
states
TAB Stops HTS (ESC H) - Set tab
stop at the current column
CSI g - Clear tab at current column
CSI 0 g - Clear tab at current column
CSI 3 g - Clear all
tab stops
^I (0x09) - Move cursor right to next tab stop
Character Rendition and Attributes
CSI Ps ; Ps ; ... m - Select character rendition with
Ps = 0 - everything off
Ps = 1 - display bold
Ps = 4 - display underlined
Ps = 5 - display
blinking
Ps = 7 - display reverse image
Ps =
22 - display normal intensity
Ps = 24 - display not
underlined
Ps = 25 - display not blinking
Ps =
27 - display positive image
Double width/height text. ESC #
3 - double height line top half
ESC # 4 - double height line
bottom half
ESC # 5 - single width single height line
ESC #
6 - double width single height line
Editing
CSI Pn L - insert Pn lines
CSI Pn M - delete Pn
lines
CSI Pn @ - insert Pn blank characters with attributes set
to normal
CSI Pn P - delete Pn characters
CSI Pn X - erase
Pn characters
CSI K - erase to the end of the line including
cursor
CSI 0 K - erase to the end of the line including cursor
CSI 1 K - erase form the beginning of the line including cursor
CSI 2 K - erase the complete line
CSI J - erase from cursor
to end of screen
CSI 0 J - erase from cursor to end of screen
CSI 1 J - erase from beginning of screen to cursor
CSI 2
J - erase the complete display
Scrolling Margins
CSI Pt ; Pb r - Sets top and bottom margins of the
scrolling region to Pt and Pb
CSI r - Sets top and bottom margins
of the scrolling region to the first and last displayed lines
Screen Aligment pattern ESC # 8 -
displays a full screen of E's
Bell ^G (0x07) - ring keyboard bell
Reset
ESC c - reset terminal emulation
Reports CSI Ps n - Device Status
Report
Ps = 5 - Operating status
Ps = 6 -
Request cursor position
Ps = 7 - Request screen size
CSI
0 c (or CSI c) - Terminal ID
CSI Ps x - Request Terminal
Parameters
^E (0x05) - Send answerback message
Set Window, Icon LabelESC ] 0 ;<label>^G -
Set window and icon labels to <label>
Local
Printing ESC [ i - Print screen
ESC [ 0 i -
Print screen
ESC [ 4 i - Printer controller mode off
ESC [
5 i - Printer controller mode on
ESC [ ? 1 i - Print line which
has cursor
ESC [ ?4 i - Autoprint mode off
ESC [ ?5 i -
Autoprint mode on
ANSI Color Support
HDSterm supports escape sequences to change foreground and
background colors, as follows: ESC [ 30 m Foreground black
ESC [ 31 m Foreground red
ESC [ 32 m Foreground green
ESC
[ 33 m Foreground yellow
ESC [ 34 m Foreground blue
ESC [ 35
m Foreground magenta
ESC [ 36 m Foreground cyan
ESC [ 37
m Foreground white
ESC [ 40 m Background black
ESC [ 41
m Background red
ESC [ 42 m Background green
ESC [ 43
m Background yellow
ESC [ 44 m Background blue
ESC [ 45
m Background magenta
ESC [ 46 m Background cyan
ESC [ 47
m Background white
Note that ESC [ 0 m resets all
attributes to Off. It also resets the text background and foreground
colors to the initial colors selected for the screen widget (default is
foreground = black and background = lightsteelblue). These escape
sequences are ignored on a monochrome server.
These colors are the ANSI standard selections, but the actual
colors can be modified by using HDSterm resources that correspond to the
escape sequences above.
The HDSterm resources to define the colors are in the
following form:
HDSTerm*screen.ansiFg_0 = defines the color
for ESC [ 30 m
HDSTerm*screen.ansiFg_6 = defines the color for ESC [ 36 m
HDSTerm*screen.ansiBg_1
= defines the color for ESC [ 41 m
HDSTerm*screen.ansiBg_3 =
defines the color for ESC [ 43 m
and so on.
Return to Section Heading Page
Return to the Home Page
If you need more information than is available here, you can reach
HDS via email at info@hds.com, or
call us at 1.800.HDS.1551 in the USA, or at +610.277.8300 from outside
the US. For questions or problems regarding the HDS WWW page, contact
webmaster@hds.com.
© 1996 by HDS Network Systems
Inc.