[net.micro.cpm] IMP for the C-128

jay@garfield.UUCP (10/20/86)

<Be-ware the Line Mangler>
I just started using the IMP terminal program on the commodore 128. I set
the term to be adm31 and everything works fine except......
 i)  whenever there is a reverse video line (like when you more filename),
     all I get is graphic characters.
 ii) within vi when I insert into a line, it seems to overwrite the line.
     escape after insert does seem to change matters.  does not seem to
     work either.

That is all I found so far. Am I using the most suited termcap entry? Has
anyone else had the same problems and/or fixed them? Please post. Also if 
anyone has the description (with escape sequence codes) for the adm31, I
would appreciate it if you would post it or mail it to me.

Thank you.
J.(Jay) Kumarasingam
UUCP:	{akgua,allegra,cbosgd,ihnp4,seismo,utcsri}!garfield!jay
CDNNET:	jay@garfield.mun.cdn
--
The opinions expressed here shall be voided in the morning.

cagordon@watnot.UUCP (Chris Gordon ) (10/26/86)

I think this is useful enough to enough people to make it worth posting.

In article <2835@garfield.UUCP> jay@garfield.UUCP (Jay Kumarasingam) writes:
>I just started using the IMP terminal program on the commodore 128. I set
>the term to be adm31 and everything works fine except......
> i)  whenever there is a reverse video line (like when you more filename),
>     all I get is graphic characters.

Don't use adm31, the code for reverse video (or standout) is different for the
C128 - use oadm31 (old adm31) if you have it on your system. If you don't, you
could always make your own termcap entry and change the :so=\EG1: to :so=\EG4:

> ii) within vi when I insert into a line, it seems to overwrite the line.
>     escape after insert does seem to change matters.  does not seem to
>     work either.

This is because the insert start/end codes given in the termcap entry do NOT
work on the 128. I think you're best bet would be to make up your own
termcap entry. If you would like some help, here's a termcap entry I use
(although until I get my NEWSYS installed, I can't really test it out but I
*know* the codes work on CP/M 3.0 on the 128 - I have tried them.) :

setterm adm31
setenv TERMCAP "l1|adm31|31:is=\Eu\E0:cr=^M:do=^J:nl=^J:bl=^G:al=\EE:am:le=^H:bs:ce=\ET:cm=\E=%+\040%+\040:cl=\E*:cd=\EY:co#80:dc=\EW:dl=\ER:ho=^^:kd=^J:kl=^H:kr=^L:ku=^K:li#24:mi:nd=^L:se=\EG0:so=\EG4:up=^K:"

(I just set up a file and 'source' it (from csh))


>That is all I found so far. Am I using the most suited termcap entry? Has
>anyone else had the same problems and/or fixed them? Please post. Also if 
>anyone has the description (with escape sequence codes) for the adm31, I
>would appreciate it if you would post it or mail it to me.

Here are some I know (taken and modified from the termcap entry) :

Escape codes for C128's CP/M emulating ADM31. '#' represents a number. 'ESC' is
the ESCAPE code (ASCII 27). SPC is ASCII 32.

ESC E		insert line
ESC R		delete line
ESC W		delete character
ESC *		clear entire display (same as ^Z)
ESC Y		clear to end of display (same as ESC y)
ESC T		clear to end of line (same as ESC t)
ESC G 4		start standout
ESC G 0		end standout
ESC = # #	move cursor to (#-32, #-32)
^^		home cursor (how to type this from the keyboard I don't know -
		could always use "ESC = SPC SPC")
^K		up one line
^L		right one charactrer
^H		left
^J		down


I hope this helps.

			...Chris

-- 
-------------------------------------------------------------------------------
Chris Gordon                     UUCP: {abunchasystems}!watmath!watnot!cagordon
U of Waterloo, Ont         CompuServe: Don't know yet
-------------------------------------------------------------------------------
"...Life...in the fast lane... (AND bits of egg!)"

ggw@ethos.UUCP (Gregory Woodbury) (11/01/86)

In article <2835@garfield.UUCP> jay@garfield.UUCP (Jay Kumarasingam) writes:
>... I set
>the term to be adm31 and everything works fine except......
> i)  whenever there is a reverse video line, all I get is graphic characters.
> ii) within vi when I insert into a line, it seems to overwrite the line.
>
>termcap entry? Has anyone else had the same problems and fixed them?
>Please post.

I have indeed been biten by the same bug several time, and have written a
termcap and a terminfo for the 128.  The main problem is that the C-128 isn't
really an adm-341 emulator as much as a Kaypro emulator.  The <ESC>G#
codes are different, which causes the alt char set to be used instead of
inverse video.  Here is the termcap that I am using on SysV.2 UNIX's:
---------------cut here--------------
c128|c128.mex|cpm128|commodore-128 cp/m+:\
	:co#80:li#24:am:cl=\E*:bs:\
	:cm=\E=%+ %+ :nd=\014:up=\013:ce=\ET:cd=\EY:\
	:al=\EE:dl=\ER:im=:ei=:ic=\EQ:mi:dm=:ed=:dc=\EW:\
	:so=\EG4:se=\EG0:us=\EG3:ue=\EG0:
----------------------------
Its not absolutely complete, but its better than trying to use the ADM-31
and going blind.  The terminfo (available on request) is more complete and
based on a look at the terminal emulation sources in the CBM release.
-- 
------------------------------------------
Gregory G. Woodbury				The usual disclaimers apply
Red Wolfe Software and Services, Durham, NC
{duke|mcnc|rti-sel}!ethos!ggw