home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Vectronix 2
/
VECTRONIX2.iso
/
FILES_09
/
NAESUTIL.LZH
/
UTIL
/
TW100
/
TW100.DOC
< prev
next >
Wrap
Text File
|
1996-02-08
|
8KB
|
182 lines
Toswin TW100 - TOS programs in a window with VT100 emulation
Version 0.9 - 13 October 1995
Description
This is an extension to Toswin (see toswin.doc) that recognises vt100 escape
sequences. The original Toswin recognised vt52 escapes with some extensions.
However, vt52 emulation is not really suitable for accessing other systems,
e.g. various flavours of unix, hence tw100.
An extra menu item (Reset window) has been added to the window menu. This
resets the terminal attributes to the initial settings. This has the same
effect as the reset escape sequence.
Known Bugs & Features
There is no alternative vt100 character set.
The font tw100v.fnt uses the vt100 character set. Thus characters with the
eighth bit set will not be the 'normal' Atari ones.
ANSI character sizes, graphic modes and key redefinition escapes are not
implemented.
The clear all tabs escape resets the tabs to be every 8 columns - I'm not
sure if this standard vt100 behaviour or not.
ANSI and vt100 escapes are recognised and acted upon in vt52 mode.
Changing the number of lines doesn't reset the scrolling region.
Changing to vt52 mode doesn't reset the scrolling region.
Cut and paste doesn't handle end of line.
No way to cycle windows.
Termcap & terminfo
The termcap is basically a vt100 with a few additions. The default terminal
type is tw100. If TERM is set to vt100, a vt100 termcap or terminfo entry
will work. The files tw100.tc and tw100.ti contain termcap and uncompiled
terminfo entries respectively.
Escape sequences
These are the sequences recognised and acted upon by tw100. They are not
necessarily a concise list of vt52/vt100/ansi codes. In some cases, a
sequence will have a different result, depending on the mode the window is
in.
Code Mode Description
ESC > tw52 switch to tw100 mode
ESC 7 save cursor position
ESC 8 restore cursor position
ESC A cursor up
ESC B cursor down
ESC C cursor right
ESC D tw52 cursor left
ESC D tw100 carriage return
ESC E tw52 clear home
ESC E tw100 carriage return & line feed
ESC H tw52 cursor home
ESC H tw100 set tab at cursor position
ESC I cursor up & insert line
ESC J clear below cursor
ESC K clear remainder of line
ESC L insert line
ESC M tw52 delete line
ESC M tw100 reverse carriage return
ESC Q quote next character
ESC R set window size
ESC S set title bar
ESC T send termcap string
ESC Yrc move cursor to row r, column c
ESC Z return terminal id
ESC a delete character
ESC b set foreground colour
ESC c tw52 set background colour
ESC c tw100 reset
ESC d clear to cursor
ESC e enable cursor
ESC f cursor off
ESC h enter insert mode
ESC i leave insert mode
ESC j save cursor position
ESC k restore cursor position
ESC l clear line
ESC o clear from start of line to cursor
ESC p reverse video on
ESC q reverse video off
ESC t set cursor timer
ESC u cursor flashing off
ESC v wrap on
ESC w wrap off
ESC y set special effects
ESC z clear special effects
ESC [n@ insert n characters
ESC [nA cursor up n
ESC [nB cursor down n
ESC [nC cursor right n
ESC [nD cursor left n
ESC [y;xH cursor to x,y
ESC [nJ clear screen parts (n = 0 - clear to end,
1 - clear from beginning,
2 - clear all)
ESC [nK clear line parts (n = 0 - clear to end,
1 - clear from beginning,
2 - clear all)
ESC [nL insert n lines
ESC [nM delete n lines
ESC [nP delete n characters
ESC [c terminal description
ESC [y;xf cursor to x,y
ESC [ng clear tabs (n = 0 - tab at cursor,
3 - all tabs)
ESC [nh keyboard/screen attributes (n = 2 - keyboard locked,
4 - insert mode)
ESC [nl keyboard/screen attributes (n = 2 - keyboard unlocked,
4 - overwrite mode)
ESC [nm character attributes (n = 0 - all attributes off,
1 - bold on,
2 - faint on,
4 - underline on,
5 - blink on (uses italics),
7 - reverse video on,
21 - bold off,
22 - faint off,
24 - underline off,
25 - blink off,
27 - reverse video off,
30 - white foreground,
31 - black foreground,
32 - red foreground,
33 - green foreground,
34 - yellow foreground,
35 - blue foreground,
36 - magenta foreground,
37 - cyan background,
40 - white background,
41 - black background,
42 - red background,
43 - green background,
44 - yellow background,
45 - blue background,
46 - magenta background,
47 - cyan background)
ESC [nn reports (n = 5 - status report
6 - cursor position
ESC [!p soft reset
ESC [m;nr set scrollin region to lines m through n
ESC [?nh mode set (n = 3 - 132 column mode,
4 - smooth scroll,
5 - inverse video on,
7 - wrap on,
25 - cursor on,
50 - cursor on)
ESC [?nl mode reset (n = 2 - switch to tw52 mode,
3 - 80 column mode,
4 - jump scroll,
5 - inverse video off,
7 - wrap off,
25 - cursor off,
50 - cursor off)
Programs behaving oddly
Elvis (vi clone), at least in the version 1.7 ST port, expects the terminal
to be in auto-wrap mode. The vt100 termcap entry sets the terminal to no
line wrap in the termcap initialisation sequence. This means that lines
with length equal to or greater than the window width cause the display to
be incorrect. This does not happen with 'real' vi on unix systems.
Lynx (version 2.3.1 ST port) doesn't handle the cursor keys correctly. The
emacs cursor movement keys (^B, ^F, ^P, ^N) need to be used instead.