Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: bruce@ais.com
Subject: Re: Looking for VT-100 escape sequences listing.
Date: 8 Jun 92 12:15:26 GMT	[thread overview]
Message-ID: <3250@ais.com> (raw)
In-Reply-To: chan.707816618@hertz

In article <chan.707816618@hertz>, chan@ece.scarolina.edu (Simon Chan) writes:
>>In article <l2vqdqINNs2k@phakt.usc.edu>, wiegley@phakt.usc.edu (Jeffrey Wiegley) writes:
>>> regarding:
>>> 
>>> NoNoNoNoNo.  I want a LISTING of what escape sequences do what on a vt100,
>>> not a list of escape sequences for a vt100.
>>> 
>>> I.E. something like...
>>> 
>>>     (ESC)[;H(ESC)[2J    will clear the screen and home the cursor
>>>     etc, etc...
>>> 
> Taken from VT100 Programming Reference Card (DIGITAL)

Typing in all these ANSI escape sequences is a bit of a chore (which is
why I didn't do it even though I have all the DEC documentation from
their latest terminals).  It's a great public service & I'm sure there
are a lot of people on the net who will appreciate it.  But there are
a couple of typos in your list:

> 		Save cursor and attributes	ESC 7
> 		Restore cursor and attributes	ESC B

Restore cursor and attributes is ESC 8, not ESC B.  The attributes
saved and restored are the position, video attribute modes (reverse
video, etc), origin mode, character sets (G0, G1, etc), & wrap flag.
On VT220's and above, it also saves the selective erase attribute &
the single shift 2 or single shift 3 (SS2 or SS3) state.

> 		From cursor to end of line		ESC [ K  or ESC [ O K
> 		From beginning of line to cursor	ESC [ 1 K
> 		Entire line containing cursor		ESC [ 2 K
> 		From cursor to end of screen		ESC [ J  or ESC [ O J
> 		From beginning of screen to cursor	ESC [ 1 J
> 		Entire screen				ESC [ 2 J

The ones given here as ESC [ O K and ESC [ O J should be ESC [ 0 K
and ESC [ 0 J (number zero, not letter "O").

> 	Programmable LEDs
> 		ESC [ Ps;Ps;...Ps q
> 		Ps =	0 or None	All LEDs Off
> 			1		L1 on
> 			2		L2 on
> 			3		L3 on
> 			4		L4 on
> 		Any other parameter values are ignored.

Note that the programmable LED's are not supported on DEC terminals
above the VT100 family.

> 	Character Set (G0 and G1 Designators)

Use these with the ASCII characters Shift In/Shift out (SI/SO, hex
0f and 0e respectively).

> 	Scrolling Region
> 		ESC [ Pt ; Pb r
> 		Pt is the number of the top line of the scrolling region;
> 		Pb is the number of the bottom line of the scrolling region 
> 		and must be greater than  Pt.

The default for pt is line 1, the default for pb is the end of the
screen.

NOTE:	Most of the escape sequences have defaults for the parameters,
	if the values are outside the range or omitted.  The action is
	not necessarily the same for out-of-range parameters and for
	omitted parameters, but it is usually not `the sequence is
	ignored'.  For example, in the cursor position sequence, the
	default for the row and the column is 1, if either or both of
	these is 0 or omitted.  But if either one of them is greater
	than the number of rows or columns, then the cursor moves to
	the last row or column (as appropriate).  Likewise for the Set
	Scrolling Region sequence;  if the row and column are omitted
	then the effect is to set the entire screen to be one scrolling
	region, NOT!!! as some emulators implement it, to ignore the
	sequence or, worse, to set it to a 1-line scrolling region (!!!).

One minor pet peeve.  An awful lot of the VTxxx emulators out there don't
really emulate a VT100 very well - this includes a lot (probably _most_)
of the commercial products.  I know that it can be tricky to get all the
little details right - I've written them myself, but I _do_ wish that
anyone who is writing one of these things would get hold of some copies
of the VTxxx torture test/demo files and try running them through their
emulators.  You may be surprised at how poorly a lot of the emulators out
there handle the little details ... some of them are so bad that they are
not really useable as VT100 emulators;  they are more of a satire on a
VT100 than a real emulator.

Bruce C. Wright


  reply	other threads:[~1992-06-08 12:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-06-04 23:46 Looking for VT-100 escape sequences listing Jeffrey Wiegley
1992-06-05 14:01 ` Devine, William Charles
1992-06-05 17:57   ` Apprentice Wizard Wannabe
1992-06-05 22:24     ` Jeffrey Wiegley
1992-06-06  6:07       ` jrd
1992-06-06  7:43         ` Simon Chan
1992-06-08 12:15           ` bruce [this message]
1992-06-09 21:03           ` Kurt Wampler
1992-06-08  2:11       ` Richard Shuford
1992-06-08 16:38         ` Karl Kleine
1992-06-08 18:32           ` Mark Bartelt
1992-06-05 21:10 ` Devine, William Charles
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox