[comp.terminals] VT100/220 = ANSI Std ?

greg@ncelvax.UUCP (Gregory K. Ramsey) (07/08/89)

Can anyone tell me, is there an ANSI (or other) standard that
corresponds to the VT100 or VT220 terminals?  or would it be
more appropriate to ask if the VT100/220 properly emaulates
some standard.

My VT220 quick referance book says something about an ANSI
mode for the VT100 & 220 but that implies we might be losing
some of the terminals functionality when doing that. 

I need this information asap so an Email reply would be
greatly appreciated.

Greg

greg@ncelvax.uucp   or
ncelvax!greg@nosc.mil  or last choice
gkr@nosc.mil


-- 
                    ___                  Greg Ramsey                    
          _n_n_n____i_i ________         Naval Civil Engineering Lab
         (____________I I______I         Code L54                805/
         /ooOOOO OOOOoo  oo oooo         Port Hueneme, CA 93043  982-4619

leichter@CS.YALE.EDU (Jerry Leichter) (07/08/89)

In article <430@ncelvax.UUCP>, greg@ncelvax.UUCP (Gregory K. Ramsey) writes...
>Can anyone tell me, is there an ANSI (or other) standard that
>corresponds to the VT100 or VT220 terminals?  or would it be
>more appropriate to ask if the VT100/220 properly emaulates
>some standard.
> 
>My VT220 quick referance book says something about an ANSI
>mode for the VT100 & 220 but that implies we might be losing
>some of the terminals functionality when doing that. 
> 

The relevant ANSI standard here, if I remember right, is ANSI X.34.  All DEC
terminals since the VT100 have complied with this standard.  However, it's
important to realize what "compliance" means.

ANSI X.34 specifies a couple of things:

	- The syntax for various kinds of command sequences - that's
		where all the ESCAPE [ stuff comes from, there is a defined
		class of command sequences, called  control sequences, which
		have the syntax ESC [ <par> <int> <fin>, where <par>, <int>
		and <fin> are mutually exclusive sets of characters.  There
		are something like five classes of command sequences; they
		are almost identical in syntax, with the exception of their
		initial two characters.

	- A set of functions, and command sequences to invoke them.  A termi-
		nal need not implement all the functions - I'm not sure if
		ANY are considered mandatory - but if it DOES implement a
		function, it must implement it exactly as specified, and
		invoke it using the specified command sequence.

		No DEC terminal implements all of the specified functions,
		though recent ones implement most of them.  (Most of the ones
		that have been left out have to do with block mode; X.34
		specifies a large and complex block mode.)  I know of no
		terminal which implements everything in X.34.

	- A set of internal states, which influence the behavior of some of
		the defined functions, and a set of command sequences to let
		you change the states.  In some sense, any X.34 terminal must
		implement all the states, though it may declare some of them
		as permanently set or reset.  (Of course, if the terminal
		implements no function which depends on some state, there is
		no way you could ever tell if it was set or reset....)

		Again, no DEC terminal - and no terminal I know of - actually
		implements as "live" all the specified states, though most of
		the omitted ones have to do with details of the X.34 block
		mode model.

	- A set of reserved command sequences.  This set includes all the
		command sequences to which X.34 assigns a meaning, and a
		whole bunch more besides.  (You can view those as defined to
		be no-ops in the current version of the spec.)  The basic rule
		is that a terminal must implement a reserved command sequence
		either exactly as specified by X.34, or as a no-op.

	- A set of extension command sequences.  These can be defined by a
		given vendor any way he likes.  Note that the syntax must
		remain compliant with the ANSI syntax spec; it's the semantics
		which a vendor is free to specify.

The simplest way to determine which of the VTxxx commands are ANSI and which
are DEC extensions is to look at the names:  X.34 specifies standard names
for its commands, such as CUP (Cursor Up) for ESC [ <x> A.  DEC's names always
start with DEC - I think DECSTBM (Set Top and Bottom Margin, which specifies
the scrolling region), ESC [ <t> ; <b> r is an example.  In the case of mode
settings, the commands are fixed but the DEC mode names start with DEC.

"ANSI mode" on a VT100 or later DEC terminal is identical to VT100 or VT200 or
VT300 mode.  It is being distinguished, not from some DEC extended mode, but
from the VT52 emulation mode these terminals support.

							-- Jerry