From: dtaylor@magnus.acs.ohio-state.edu (Douglas A Taylor)
Subject: Re: GeoComm and screen commands (control codes)
Reply-To: doug-taylor+@osu.edu
Organization: The Ohio State University
Date: Fri, 16 Oct 1992 19:18:15 GMT

In article <phurley.55@tamu.edu> phurley@tamu.edu (Philip W. Hurley) writes:
>I would like to know if it is possible to know what control codes GeoComm 
>*actually* uses to modify the screen.

GeoComm uses the files located in the directory
\GEOWORKS\SYSTEM\TERMCAP to determine how to emulate a terminal.  The
file VT100.TC contains the VT100 control codes, VT52.TC contains the
VT52 control codes, and so on.  GeoComm recognizes only the .TC files
that come with GW, so if you want to create a new termcap for GW
you'll have to call it VT100.TC or VT52.TC or ... well, you get the
idea.

The format of the entries in a .TC file is

<control code>	<number indicating GeoComm function>

For instance, GeoComm function number for "bell" is 0.  If your
terminal uses control-G for the bell function you would make sure that
the line 

^G	0

is in the .TC file for your terminal type.  The notation used for the
control codes is similar to that used by the Unix termcap and terminfo
databases.  I've included below a sample .TC file which indicates what
functions are assigned to what numbers.

One problem with the way that GeoComm handles the .TC files is that a
semi-colon comments out the rest of the line.  This could cause
problems if your terminal uses control codes which include
semi-colons; in fact, this may be the cause of the infamous
change-scroll-region bug in GeoComm's VT100 emulation.  (The control
sequence for change-scroll-region for a VT100 is \E[%i%d;%i%dr or
something very similar.)

I hope that in GeoComm in v2 will fix the semi-colon bug and will give
better support to user-defined term types.

--- cut here ---
;$Id: vt100.tc,v 1.4 90/09/07 23:50:43 brianc Exp $
;bell
^G		0
;left
^H		1
;tab
^I		2
;down
^J		3
;return
^M		4
;scroll down
;\EM		5
;up arrow
^Z		6
;down arrow
^J		7
;right arrow
;\EOC		8
;left arrow
^U		9
;F1
;\EOP		10
;F2
;\EOQ		11
;F3
;\EOR		12
;F4
;\EOS		13
;clear&home
^L		14
;num lock on
^O\E0P		15
;num lock off
^O\E0`		16
;cursor up
^Z		17
;cursor right
\E[C		18
;cursor home
;		19
;clear 2 end o screen
\Ek		20
;clear 2 end o line
\EK		21
;normal mode (no inverse)
^O		22
;save cursor
;\E7		23
;restore cursor
;\E8		24
;change scroll reg
;\E[%i%d;%i%dr	25
;gotoxy
\EY%+ %c%+ %c	26
;bold on	27
;underscore on	28
;blink on	29
;reverse on
^N		30
;insert line
;\E[L		31
;back tab	32
;delete line
;\E[M		33
;delete char
;\E[P		34
;insert char	35
;go status	36
;insert mode
;\E[4h		37
;leave insert mode
;\E[4l		38
;scroll up
;\ED		39
;term init	40
;sane reset	41
;graphics on
;\E[%dm		42
;set row
;\E[%i%dH	43
;set column
;\E[;%i%dH	44
;underscore off 45
;reverse off	46
^O
;set tab	47
;clear tab	48
;visible bell
;\Evb		49
;cursor down many
;\E[%dB		50
;cursor left many
;\E[%dD		51
;cursor right many
;\E[%dC		52
;cursor up many
;\E[%dA		53
--- cut here ---
-- 
   Doug Taylor                         |   Nothing real can be threatened.
   The Ohio State University           |   Nothing unreal exists.
   doug-taylor+@osu.edu                |            - A Course in Miracles
Newsgroups: comp.os.msdos.pcgeos