Good references for ANSI terminal emulation?

Chuck Guzis cclist at sydex.com
Sun Oct 25 23:52:53 CDT 2009


On 25 Oct 2009 at 19:12, Michael B. Brutman wrote:

> Just a little more help because I'm being super thick - what exactly
> does "keypad application mode mean"?  I understand the difference
> between numeric mode and non-numeric, or I'm assuming that it works
> the same way it does on PC.  But the "application mode" thing is
> throwing me off because I don't know what it means and can't draw my
> own analogies.

The VT100 User Guide is pretty awful with its language.  I like the 
VT220 or even the TVI 922 manuals better for clear language.

Okay, let's start with the cursor keys (up down right left).  In VT52 
mode, these generate ESC A, ESC B, etc.  In VT100 mode, the default 
is to generate ESC [ A, ESC [ B and so on.  These correspond to the 
ANSI control seuqnences that move the cursor one position.

There is another mode, called "application" mode.   The cursor keys 
generate ESC O A, ESC O B, etc.  

One puts the cursor keys into "application mode" with ESC [ ? 1 h.
One put s the cursor keys into "normal" mode with ESC [ ? 1 l.  
(lowercase "L").  Why are these called "set" and "reset"?  Easy--the 
ANSI seuqence "ESC [ ? (some number or string of numbers) h" is the 
ANSI "set mode" (mnemonic SM) command.  The other one is the ANSI 
"reset mode" (mnemonic RM) command.

Okay, now for the numeric keypad.

These also can generate either what's printed on the keycaps (hex 39 
for 9) or a unique code that distinguishes them from the keys with 
the same labels on main section of the keyboard.  This is called 
"application mode" also--but it's separate from the cursor keys.

To enter application mode for the numeric keypad use "ESC ="; to 
return to numeric mode, use "ESC >".  These are not ANSI commands, 
but are DEC's own contribution to the VT100--but most implementations 
follow them anyway.

Note that there are many DEC-specific VT100 commands, such as 
enabling double-wide and double-wide, double-high characters.

Hope this helps,
Chuck
 



More information about the cctech mailing list