[comp.sys.cbm] Kermit 2.2 termcap

kentsu@microsoft.UUCP (Kent SULLIVAN) (02/20/90)

In article <6683@ucdavis.ucdavis.edu> ez001287@deneb.ucdavis.edu writes:
>I've been using Kermit 2.2 on my 128 for some time now, but I still haven't
>found out how to use some of its features, most notably the included
>termcap and the 25th line status line.

I used to use all of these features on several BSD 4.3 Unix systems, but now
am using them (except for sysline, which is not supported), on SCO Xenix/386.

>The termcap, according to the UNIX experts here at UCD, is missing a colon
>at the end.  Even with this fixed, however, they still can't quite tell
>me how to use it correctly.  Their suggestion went:
>
>setenv TERMCAP {filename}
>setenv TERM {terminal type}

Under every Unix system I have ever used, a final colon is *not* required.
You can look at other termcap examples in the file "/etc/termcap" on your
Unix host.  I have no problems whatsoever when using the termcap in the
manual, a copy of which is reproduced below.  Ray literally spent months
getting the termcap right for Kermit v2.2...

Here is exactly what I used to do on BSD Unix:

1) Put the termcap into a file caled ".termcap" in my home directory.  The
   file can be any name, but the "." makes it invisible:

Kc|vt100|Commodore 64/128 Kermit v2.2 in VT-100 mode:ae=\E(1:AL=\E[%dL:\
	:al=\E[L:as=\E(0:bc=^H:bl=^G:bs:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
	:cm=\E[%i%d;%dH:co#80:cr=^M:cs=\E[%i%d;%dr:DC=\E%dP:dc=\E[P:\
	:DL=\E[%dM:dl=\E[M:DO=\E[%dB:do=^J:ds=\E7\E[25H\E[2K\E8:ei=\E[4l:es:\
	:fs=\E8:ho=\E[H:hs:im=\E[4h:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:kb=\177:\
	:kd=\E[B:ke=\E>:kl=\E[D:kn=4:kr=\E[C:ks=\E=:ku=\E[A:l1=PF1:l2=PF2:\
	:l3=PF3:l4=PF4:LE=\E[%dD:le=^H:li#24:ll=\E[24H:mb=\E[5m:md=\E[1m:\
	:me=\E[m:mi:mr=\E[7m:ms:nd=\E[C:pt:rc=\E8:RI=\E[%dC:rs=\E<\Ec:sc=\E7:\
	:se=\E[m:so=\E[7m:sr=\EM:ta=^I:te=\E[?7h:ti=\E[?7l:\
	:ts=\E7\E[%i25;%dH\E[m\E(1\E[1K:ue=\E[m:UP=\E[%dA:up=\E[A:us=\E[4m:\
	:vb=\E[?5h\E,\E[?5l:vt#3:xo

2) Put the following lines in my .login:

setenv TERM vt100
setenv TERMCAP ~/.termcap

>I figure that once I get the termcap working, I should just be able to give
>the "sysline" command to activate the 25th line status line.  When I do
>that now, I also get the error above.  Does anyone know how these things work?

Yes, that's right.  You can just say "sysline" and it will fire up.  To make
it easy to get rid of the sysline without having to look up its process
number, Ray did the following for me:

In .cshrc:

alias sysline 'set sysline=`/usr/ucb/sysline -i`'
alias nosysline 'source $HOME/.nosysline'

In a file called ".nosysline" in my home directory:

if ($?sysline) then
	kill -HUP $sysline
	unset sysline
endif

In .logout:

nosysline

As you can probably guess, 'sysline' turns it on and 'nosysline' turns it off,
which is done automatically when I log out if no other time.

Since we're on the subject, all of Ray's escape sequences in the termcap are
standard VT-100/102 codes, except for the visual bell (vb).  The typical way
to do a visual bell is give the sequence to turn on the light background,
delay for a few microseconds (with the \E200 sequence) then give the sequence
to restore the dark background.  This doesn't work too well though when you
have to allow for a wide variety of baud rates--300 bps is 8 times slower than
2400.  What looks right at 300 bps was much too fast at 2400.

So, as studious termcap hackers might have already noticed, Ray created a
new escape sequence that only Kermit recognizes for the visual bell.  The
C-64/128 now calculates the delay internally, so the bell looks the same no
matter the baud rate.

Hope this helps...

Kent Sullivan
Microsoft Corporation
Author of the C-64/128 Kermit v2.2 User's Guide

The opinions expressed in this article are my own and do not necessarily
reflect those of my employer.

rickc@pogo.WV.TEK.COM (Rick Clements) (03/02/90)

Is there a way to get Kermit to treat the 25th line like a standard line?

If I forget and use my default termcap entry (ansi), the VAX thinks I have a
terminal with 25 lines.  The nice thing is EMACS will use all 25 lines.  The
only problem is if it leaves me on line 25, I have a 1 line terminal until
I do a clear.  Since I haven't found anything useful to do with the status
line, I would rather have all 25 lines to use.
-- 
Rick Clements (RickC@pogo.WV.TEK.COM)

kentsu@microsoft.UUCP (Kent SULLIVAN) (03/13/90)

In article <8629@pogo.WV.TEK.COM> rickc@pogo.WV.TEK.COM (Rick Clements) writes:

>Is there a way to get Kermit to treat the 25th line like a standard line?

Yes, there is.

>If I forget and use my default termcap entry (ansi), the VAX thinks I have a
>terminal with 25 lines.  The nice thing is EMACS will use all 25 lines.  The
>only problem is if it leaves me on line 25, I have a 1 line terminal until
>I do a clear.  Since I haven't found anything useful to do with the status
>line, I would rather have all 25 lines to use.

Ray Moody, Kermit's author, made the status of the 25th line "toggle-able". 
He says that a SET LINE-25 {ON, OFF} type of command will be added in the
future.  For now, do this:

LOAD "KERMIT",8
POKE 24706, 1
RUN (or SAVE it if you want 25 lines as the default)

The above POKE changes the status of the 25th line during the initial startup
sequence.  Once it is changed, you are "stuck" in 25-line mode unless you
exit Kermit, POKE 24706, 0 (don't use 25th line), and do a SYS 2064 to
restart Kermit.

However, if you have a cartridge like Super Snapshot that can interrupt Kermit
while it is running, you can change the storage location of the 25th line's
status on the fly without exiting Kermit: $7E2D (32301).

Hope this helps.

Kent Sullivan
Microsoft Corporation
Author of the C-64/128 Kermit User's Guide

Any opinions expressed in this article are my own and do not necessarily
reflect those of my employer.
Newsgroups: comp.sys.cbm
Subject: Re: Kermit 2.2 termcap
Summary: "Just one poke..."
Expires: 
References: <6683@ucdavis.ucdavis.edu> <51015@microsoft.UUCP> <8629@pogo.WV.TEK.COM>
Sender: 
Reply-To: kentsu@microsoft.UUCP (Kent SULLIVAN)
Followup-To: 
Distribution: na
Organization: Microsoft Corp., Redmond WA
Keywords: 

In article <8629@pogo.WV.TEK.COM> rickc@pogo.WV.TEK.COM (Rick Clements) writes:

>Is there a way to get Kermit to treat the 25th line like a standard line?

Yes, there is.

>If I forget and use my default termcap entry (ansi), the VAX thinks I have a
>terminal with 25 lines.  The nice thing is EMACS will use all 25 lines.  The
>only problem is if it leaves me on line 25, I have a 1 line terminal until
>I do a clear.  Since I haven't found anything useful to do with the status
>line, I would rather have all 25 lines to use.

Ray Moody, Kermit's author, made the status of the 25th line "toggle-able". 
He says that a SET LINE-25 {ON, OFF} type of command will be added in the
future.  For now, do this:

LOAD "KERMIT",8
POKE 24706, 1
RUN (or SAVE it if you want 25 lines as the default)

The above POKE changes the status of the 25th line during the initial startup
sequence.  Once it is changed, you are "stuck" in 25-line mode unless you
exit Kermit, POKE 24706, 0 (don't use 25th line), and do a SYS 2064 to
restart Kermit.

However, if you have a cartridge like Super Snapshot that can interrupt Kermit
while it is running, you can change the storage location of the 25th line's
status on the fly without exiting Kermit: $7E2D (32301).

Hope this helps.

Kent Sullivan
Microsoft Corporation
Author of the C-64/128 Kermit User's Guide

Any opinions expressed in this article are my own and do not necessarily
reflect those of my employer.