[net.micro.pc] Termcap entry to support ANSI.SYS

hopp@nbs-amrf.UUCP (Ted Hopp) (01/31/85)

I use the following termcap entry for my pc running Lotus Symphony (tm).
It seems to be entirely compatible with our application software.

Ip|ibmpc|IBM PC using ANSI driver:\
	:am:bs:cd=\E[J:ce=\E[K:cl=\E[1;1H\E[2J:cm=\E[%i%d;%dH:co#80:li#24:\
	:do=\E[B:up=\E[A:nd=\E[C:kd=\E[B:kl=\E[D:kr=\E[C:ku=\E[A:\
	:se=\E[0m:so=\E[7m:ue=\E[0m:us=\E[4m:

This is not exactly identical to the ansi termcap entry posted to
the net a while ago, but it is very close.  The differences are in
the se and ue capabilities.  See below.

Regarding a recent conversation:
> > ?
> johnl@ima.UUCP

> > Does the ANSI.SYS device driver that comes with IBM DOS resemble
> > anything else?  In other words, is this a standard set of escape
> > sequences that could be used to emulate a terminal?

>				...  every ANSI terminal you see actually
> implements a subset of the ANSI standard, and usually includes some vendor-
> specific additions. ...

Amen.

> As far as PC-TALK goes, this means you're more or less in luck.  I hacked
> PC-TALK in about 20 minutes to use the ANSI driver, and it worked adequately
> with several termcap programs when I set TERM to vt100.

I have found that ANSI.SYS is not entirely compatible with our termcap
vt100 entry ("termcap.src 1.4 83/12/22 SMI; from UCB 1.19 05/20/83"),
or the ansi entry that was posted to the net a while ago, for that
matter.  The problem is with underline and standout mode.  The ANSI
standard allows a missing parameter value to default to 0 and both the
vt100 and ansi underline end (ue) and standout end (se) capabilities
make use of this default.  Unfortunately, ANSI.SYS ignores the escape
sequence unless the parameter value is explicitly provided, even if it
is 0.  Thus, TERM=vt100 results in the terminal staying in either
underline or standout mode forever after one or the other is entered.
The above termcap entry fixes this problem.

By the way, this entry complies with the IBM documentation for the
ANSI.SYS driver, not with the Lotus documentation, which is wrong.
(The cursor motion origin is (1,1), not (0,0).  Also, the right/left
arrow key sequences are switched in the Lotus documentation.)

Also, as has been pointed out on the net before, communication software
doesn't necessarily support these sequences, even with the driver
installed.  For instance, the Lotus software works without the driver,
and another package we have doesn't work with it.  Software has to make
use of the right system calls to manipulate the screen; if it bypasses
them, and doesn't support this stuff in the code, it won't work.

-- 

Ted Hopp	{seismo,umcp-cs}!nbs-amrf!hopp