Programmer information

From: ae962
Date: 07/30/89-09:07:53 AM Z


From: ae962
Subject: Programmer information
Date: Sun Jul 30 09:07:53 1989


Several people have been asking for this information to utilize
in the writing of a terminal emulator.  In case anyone wants it:
Partial list of VT100 control sequences:
----------------------------------------
Cursor up                       ESC [ Pn A
Cursor down                     ESC [ Pn B
Cursor right                    ESC [ Pn C
Cursor left                     ESC [ Pn D
Direct cursor addressing        ESC [ Pl ; Pc H
Alternate of above              ESC [ Pl ; Pc f
Index                           ESC D
Reverse Index                   ESC M
New Line                        ESC E
Save cursor and attributes      ESC 7
Restore cursor and attributes   ESC 8
Set character attributes        ESC [ Pa ; Pa ; Pa ;...; Pa m
Clear to end of line            ESC [ K
Alternate of above              ESC [ 0 K
Clear from beginning of line    ESC [ 1 K
Clear entire line               ESC [ 2 K
Clear to end of screen          ESC [ J
Alternate of above              ESC [ 0 J
Clear from beginning of screen  ESC [ 1 J
Clear entire screen             ESC [ 2 J

Notes:
------
   ESC is Escape, ASCII 27.  Omit the spaces I have added.
   Pn is an optional decimal parameter given for the number of
positions to move the cursor, but not beyond the screen edge.  If
Pn is omitted or zero, the default of one will be performed.
   Pl is the line number.
   Pc is the column number.
   Pa is a selective parameter indicating the following
attributes.  Several may be present seperated by semicolons,
which are performed in order:
0 or None        All attributes off
1                Bold on
4                Underscore on
5                Blink on
6                Reverse video on
   Index moves the cursor down without changing columns,
scrolling up the screen if necessary.  The cursor down command is
different than this because cursor down will not move the cursor
if it is at the bottom of the screen.
   Reverse index moves the cursor up without changing columns,
and will scroll down the screen if necessary.

Examples:
---------
ESC [ 3 A           Move 3 lines up.
ESC [ D             Move 1 column left.
ESC [ 3 ; 28 H      Move to line 3, column 28.
ESC [ 0 ; 4 m       Turn all attributes off, then bold on.
ESC [ m             All attributes off.
ESC [ 1 K           Clear from the beginning of the line to the
                    cursor.

** Answered by DOUG WOKOUN (aa384) on Tue Feb 21 16:30:54 1989 **

Thank you for the information.

   Doug Wokoun
   Atari SysOp
      aa384


-----------------------------------------
Return to message index