Category : Recently Uploaded Files
Archive   : RBCOM345.ZIP
Filename : TERM-EMU.DOC

 
Output of file : TERM-EMU.DOC contained in archive : RBCOM345.ZIP
RBcomm v3.45 Copyright (c) 1989-1995 Ralf Brown All Rights Reserved

-----------------------------------------------------------------------------
Terminal Emulation
------------------

RBcomm supports three terminal emulations. ANSI provides standard ANSI
escape sequences plus most VT102 and many VT200 escape sequences. BBS is
identical to ANSI except that clearing the screen with Esc-[-J or Esc-[-2-J
also homes the cursor, character set switching is disabled, and two of
RBcomm's private commands are replaced by the AVATAR level 0 command set.
Finally, VT52 replaces many of the Esc-letter sequences in ANSI with the
actions a VT52 or H19 would perform. In addition, in all of these modes,
RBcomm has its own, much more compact command set (which may optionally
be disabled to permit display of the corresponding control characters).

------------------
Control Characters
------------------

Note: Control characters marked with (RBcomm) may be displayed if the
terminal emulation is set to "BBS" and RBcomm private commands are
disabled.

^A UnixWindows command character (see below for sequences)
^B move cursor right one position (RBcomm)
^C move cursor down a line (RBcomm)
^D move cursor left one position, does not wrap to previous line (RBcomm)
^E send the answerback string to the remote system (ANSI and VT52 only)
^F special sequences (see below) (RBcomm)
^G sound bell, or flash screen if visible bell enabled
^H move cursor left one position, wraps to previous line
^I move to next tab stop
^J move cursor down a line, scrolling screen when at bottom
^K insert a blank line
^L clear screen and home cursor
^M move cursor to start of line
^N "shift out"--switch to G1 character set (VT100)
^O "shift in"--switch to G0 character set (VT100)
^P clear rest of line (Note: if AVATAR is in cooked mode, ^P is the
"cook" character, causing the next character to have its high three
bits cleared; two consecutive ^Ps will be needed to give the
clear-line command) (RBcomm)
^R change to reverse video (RBcomm)
^T change character attribute to underlined (RBcomm)
^U clear underlined attribute and reverse video (RBcomm)
^V start of an AVATAR command (see below)
^W delete character at cursor position, rest of line shifts left (RBcomm)
^X insert a blank at the cursor's position, push rest of line
right (RBcomm)
^Y repeat the following character the number of times specified by
the second character after the ^Y
^Z delete line cursor is on (RBcomm)
^[ escape sequence (see below)
^\ turn on insert mode (RBcomm)
^] turn off insert mode (RBcomm)
^^ move cursor up a line (RBcomm)
^_ the following two characters (less 32) specify the new cursor
column and row. i.e. ^_-blank-blank homes the cursor. (RBcomm)


----------------
Escape Sequences
----------------

Esc-blank-F turn off eight-bit control characters
Esc-blank-G turn on eight-bit control characters. When eight-bit control
characters are enabled, many of the characters from 80h through
9Fh are equivalent to Esc-.
Esc-( (VT100) next character ('0', '1', '2', 'A', or 'B') sets G0 character
set
Esc-) (VT100) next character ('0', '1', '2', 'A', or 'B') sets G1 character
set
Esc-# (VT100) next character sets character size
only '8' implemented -- fill screen with 'E's for alignment display
Esc-7 save cursor
Esc-8 restore cursor
Esc-< set terminal emulation to ANSI
Esc-= set keypad application mode (if allowed to change NumLock by RBCONFIG)
Esc-> set keypad numeric mode (if allowed to change NumLock by RBCONFIG)
Esc-@ turn on insert mode
Esc-A move cursor up
Esc-B move cursor down
Esc-C move cursor right
Esc-D (ANSI) "index"--move cursor down, scroll if at bottom
(VT52) move cursor left
Esc-E (ANSI) move to start of next line, scroll if at bottom
(VT52) clear screen
Esc-F (ANSI) not implemented
(VT52) select graphics character set
Esc-G (ANSI) not implemented
(VT52) select text character set
Esc-H (ANSI) set horizontal tab at current position
(VT52) home cursor
Esc-I (ANSI) horizontal tab
(VT52) reverse linefeed, scrolls down if already on top line
Esc-J (ANSI) not implemented
(VT52) clear to end of screen
Esc-K (ANSI) not implemented
(VT52) clear to end of line
Esc-L (ANSI) not implemented
(VT52) insert a new line at cursor
Esc-M (ANSI) "reverse index"--cursor up, reverse scroll if at top
(VT52) delete cursor line
Esc-N (ANSI) not implemented
(VT52) delete char at cursor, rest of line shifts left
Esc-O (ANSI) not implemented
(VT52) turn off insert mode
Esc-Y move cursor, next two characters are row + 32, column + 32
Esc-Z request identification
(ANSI) RBcomm returns the string "rbcommN.NNx" where N.NN is the
version number and "x" is a single byte identifying implemented
capabilities
bit 0: multiple screens available if set
bit 1: file transfer implemented (always set)
bit 6: always set (makes character printable)
bit 7: always clear
remaining bits reserved (zero)
(VT52) RBcomm returns the string Esc-/-Z, indicating a VT100 emulating
a VT52.
Esc-[ ANSI sequence, see below
Esc-] Operating System Command. The following characters through an Esc-\
sequence (maximum 80 characters) are skipped, as this command has
no effect.
Esc-^ ANSI Privacy Message. The following characters through an Esc-\
sequence (maximum 80 characters) are accumulated. If running under
DESQview, the first 40 are displayed in the notification window;
otherwise, the accumulated characters are discarded.
Esc-_ Application Program Command. The following characters through an
Esc-\ sequence (maximum 80 characters) are skipped, as this command
has no effect.
Esc-c reset to initial state
Esc-j save cursor position (Heath H19)
Esc-k restore cursor position (Heath H19)
Esc-l erase line (Heath H19)
Esc-p turn on bold characters
Esc-q turn off bold characters
Esc-v turn on line wrap (Heath H19)
Esc-w turn off line wrap (Heath H19)
Esc-z reset terminal emulation (Heath H19)


--------------
ANSI Sequences
--------------

All of the sequences listed here consist of Esc-[ followed by zero or more
numbers separated by semicolons followed by the command letter. Therefore,
only the command letter will be listed. X1, X2, etc refer to the specified
numeric argument, and usually are followed by a default value in
parentheses. All cursor positioning commands number rows and columns
starting at 1.

blank extended ANSI sequence (see below)
$ extended ANSI sequence (see below)
@ insert X1 (1) blanks, shifting rest of line to the right
A move cursor up X1 (1) lines
B move cursor down X1 (1) lines
C move cursor right X1 (1) positions
D move cursor left X1 (1) positions
E move cursor down X1 (1) lines, scroll if at bottom
F move cursor up X1 (1) lines, scroll if at top
G move cursor to position X1 (1) in current line
H move cursor to row X1 (1), column X2 (1)
I move to X1st (1) following horizontal tab position
J case X1 (*): 0 clear from cursor to end of screen
1 clear from start of screen to cursor
2 clear screen
* default is 0 for ANSI and VT52, 2 for ANSI-BBS
K case X1 (0): 0 clear from cursor to end of line
1 clear from start of line to cursor
2 clear line
L insert X1 (1) lines at cursor
M delete X1 (1) lines at cursor
or play following music string, if emulation is ANSI-BBS and Music
is enabled. The music string has the same format as for the
PLAY command, and is terminated with a ^N character.
P delete X1 (1) characters at cursor, rest of line shifts left
S scroll up X1 (1) lines
T scroll down X1 (1) lines
U switch to screen X1 (1) screens later, wrapping back to screen 0
if X1 preceded by an equal sign, switch to specified screen
V switch to screen X1 (1) screens prior, wrapping to last screen
X erase X1 (1) characters starting at cursor position, cursor stays put
Z move cursor to X1st (1) preceding horizontal tab position
` move cursor to position X1 (1) in current line
a move cursor X1 (0) positions from current position in line
c device attribute report
responds by sending Esc-[-?-6-c (VT102)
d move cursor to line X1
e move cursor X1 (0) lines from current line
f move cursor to row X1 (1), column X2 (1)
g case X1 (0): 0 clear horizontal tab at current position
3 clear all horizontal tab stops
'>' clear all horizontal tab stops, then set tabs every
N positions (i.e. Esc-[->-5-g sets tabs every five
columns)
h select mode
case X1 (0): ?2 set emulation to ANSI
?3 select 132-column mode (if enabled by RBCONFIG)
4 turn on insert mode
?5 turn on inverted video
?6 turn on scrolling-region-relative cursor positioning
(origin mode)
?7 turn on wrap mode
12 turn on local echo
20 turn on newline mode (send CRLF when CR pressed)
?25 turn cursor on (make visible)
i media copy
case X1 (1): 1 dump entire screen to printer
?1 dump screen line containing cursor to printer
4 exit printer controller mode [not yet implemented]
?4 stop echoing to printer [not yet implemented]
5 enter printer controller mode [not yet implemented]
?5 start echoing to printer [not yet implemented]
l reset mode
case X1 (0): ?2 set emulation to VT52
?3 select 80-column mode
4 turn off insert mode
?5 turn off inverted video
?6 set top of scrolling region to topmost line, bottom
to bottom of screen, and turn off relative cursor
positioning (absolute cursor positioning)
?7 turn off wrap mode
12 turn off local echo
20 turn off newline mode (send only CR when CR pressed)
?25 turn off cursor (make invisible)
Note: may not work on all systems or in all video
modes
m select graphic rendition
for each Xn in order,
0 reset attributes to white on black, turn off reverse
video
1 set bold
4 set underlined
5 set blinking
7 set reverse video
8 set invisible (black on black)
21 turn off bold
22 turn off bold
24 turn off underlined
25 turn off blinking
27 turn off reverse video
30 set foreground color
-
37
40 set background color
-
47
Note: Esc-[-m is equivalent to Esc-[-0-m
n device status report
case X1 (0): 5 report terminal status
always sends Esc-[-0-n (terminal OK) to remote
6 report cursor position
sends string Esc-[-row-;-col-R to remote system
15 printer status
sends Esc-[-?-1-3-n (no printer) if no printer defined
Esc-[-?-1-0-n if printer is ready
Esc-[-?-1-1-n if printer is not ready
[currently always sends ?13n]
25 report User Definable Key status
always sends Esc-[-?-21-n (UDK's locked)
26 report keyboard dialect
always sends Esc-[-?-27-;-1-n (US ASCII)
r set scrolling region to rows X1 (1) through X2 (lines-on-screen)
s save cursor (may not be nested)
u restore cursor
x request terminal parameters (VT100)
case X1 (0): 0 sends back string indicating bits, parity, speed
1 sends back string indicating bits, parity, speed
the string sent is
Esc-[--;--;--;--;--;1;0x
where is 2 if X1 was 0 and 3 if X1 was 1
is 1 for none, 2 for space, 3 for mark, 4 for odd,
and 5 for even
is 1 for 8, 2 for 7, 3 for 6, and 4 for 5 data bits
and are the transmit and receive speeds:
16 -> 110 bps
32 -> 150 bps
48 -> 300 bps
56 -> 600 bps
64 -> 1200 bps
88 -> 2400 bps
104 -> 4800 bps
112 -> 9600 bps
120 -> 19200 bps
128 -> 38400 bps
136 -> 57600 bps
144 -> 115200 bps
z reset terminal emulation (Heath H19)


-----------------------
Extended ANSI sequences
-----------------------

If the command character for an ANSI sequence is a blank, the NEXT character
specifies the actual operation.

@ scroll left X1 (1) columns
A scroll right X1 (1) columns

If the command character for an ANSI sequence is a dollar sign, the NEXT
character specifies the actual operation. These are DEC VT2xx extensions.

p ANSI mode control state request
always returns CSI X1 ; 0 $ y (unknown mode)
u terminal state request
always returns DCS 1 $ ST (no state information returned)


---------------------
UnixWindows sequences
---------------------

When RBcomm receives a ^A, the following character specifies the actual
command. If UnixWindows is enabled, a ^A introduces a UnixWindows command
at ANY time, even in the middle of another command; when disabled, ^A is a
normal command sequence introducer. This distinction is necessary because
both AVATAR and RBcomm private commands may include ^A within the sequence.
The UnixWindows commands are encoded as follows:

+---+---+---+---+---+---+---+---+
| 0 |dir| function | parameter |
+---+---+---+---+---+---+---+---+

where "dir" is 0 for commands being sent to RBcomm from the remote system
and 1 for commands sent by RBcomm. RBcomm currently supports the following
functions: [Note: this is not yet enough to successfully run UnixWin]

0 NEWW [not yet implemented]

1 KILLW [not yet implemented]

2 SELIN The parameter of this function specifies which "window" will
display characters received from the serial port. UW windows
are numbered from 1 to 7 and mapped to RBcomm screens 0 through
6. UW window 0 does not exist; if function 2 is invoked with
parameter 0, the command is ignored.

3 SELOUT This command is never sent by the remote host, and is thus
ignored

4 WINOPT [not yet implemented]

5 META If the parameter is 0, set the high bit of the next received
character before processing it. If the next character is a ^A
UnixWindows command character, this command will apply to the
next non-UW character (or the control character produced by
function 6 below)
If the parameter is one of the following, act as if the specified
character had been received; otherwise, ignore the command.
parameter 1 = char 129
parameter 2 = char 145
parameter 3 = char 147

6 CTRL if the parameter is one of the following, act as if the specified
control character had been received; otherwise, ignore the command.
If function 5 was received immediately prior to this command, the
high bit will be set.
1 ^A
2 ^Q
3 ^S

7 MAINT the parameter specifies one of a number of maintenance functions:
0 ENTRY sent by UW server on startup. RBcomm enables the
UnixWindows protocol on receiving this command.
2 ASKPCL remote system requests the start of protocol negotiation.
RBcomm responds with CANPCL 1 (the most basic protocol).
3 CANPCL remote system specifies a protocol it is capable of
supporting in the following byte (1Fh is added to the
protocol number to make it printable). If protocol 1
specified, RBcomm responds with SETPCL 1, otherwise it
responds with CANPCL 1.
4 SETPCL remote system specifies a protocol which both ends are
to use. The protocol is sent in the next byte, with 1Fh
added to make it printable. As RBcomm only supports
protocol 1, this function is currently ignored.
7 EXIT sent by UW server on shutdown. RBcomm disables the
UnixWindows protocol on receiving this command.


------------------------
Special RBcomm sequences
------------------------

When RBcomm receives a ^F, the following character specifies the actual
command.

^x display the IBM PC screen character corresponding to the control
character
0 turn off visual bell, ^G will beep
1 turn on visual bell, ^G will flash the screen, but internally
generated beeps still sound
2 flash the screen
3 beep even if visual bell turned on
4 fill area. Identical to AVATAR ^V^M (see below) but does not cancel
insert mode.
5 clear from cursor to end of screen
6 repeat pattern. Identical to AVATAR ^V^Y (see below)
: disable the UnixWindows protocol
; enable the UnixWindows protocol
< set terminal emulation to VT102/ANSI. Does not affect any other
settings
= set terminal emulation to ANSI-BBS. Does not affect any other
settings.
> set terminal emulation to VT52. Does not affect any other settings.
? query terminal emulation type. Sends back <127> where type is
'A' for VT102/ANSI, 'B' for ANSI-BBS, or 'V' for VT52. The type
is converted to lower case if the UnixWindows protocol is enabled.
@ send identification (see Esc-Z)
A [obsolete--this command no longer does anything]
B if next character is '0' through '8' switch to the specified
screen, provided that memory was allocated for it at startup.
Sends a response of 127-- to the remote system,
where the digit is the screen number from the ^FB command, and
status is 'Y' if the screen exists or 'N' if it doesn't. It is
the remote system's responsibility to redraw the screen if the
response is 'N'.
C if next character is '0' through '8' and the specified screen was
allocated at startup, clear that screen to blanks.

------------------------
AVATAR command sequences
------------------------

^V^A set screen attribute to low seven bits of following character
^V^B set blink
^V^C move cursor up a line
^V^D move cursor down a line
^V^E move cursor left one space
^V^F move cursor right one space
^V^G clear from cursor to end of line
^V^H move cursor to row and column , where the upper left corner
is 1,1
^V^I turn on insert mode until next AVATAR command (except ^Y and ^V^Y)
^V^J scroll area up. Next five characters specify number of lines to
scroll, top margin, left margin, bottom margin, and right margin (all
margins are based on 1,1 being the upper left corner of the screen)
^V^K scroll area down. Next five characters are as for ^V^J
^V^L clear area. Next three characters specify screen attribute for cleared
area, number of lines less one, and number of columns less one. The
blink bit of the attribute is ignored, and the current display attribute
is set to the attribute of the cleared area. If the requested area
extends beyond the current window limits, it will be truncated to fit.
^V^M fill area. Next four characters specify screen attribute for filled
area, character to fill with, number of lines less one, and number of
columns less one. The current display attribute is set to the filled
attribute with blinking turned off. If the requested area extends
beyond the current window limits, it will be truncated to fit.
^V^N delete character at cursor position, shifting the remainder of the
line.

The following commands (except for ^V^Y) are Level 1 extensions. They
are not fully implemented, and are not expected to be completely
correct, as the official specifications have just (1/20/91) been
published, and I have not had time to implement and test everything. In
cases where the official specs differ from the sketchy information I had
to work with, the behavior will be incorrect. Those commands marked
[not implemented] will merely be skipped without any further processing.

^V^O turn clockwise mode on [not implemented]
^V^P not used
^V^Q query. Next character specifies the type of query
^Q get driver version info. Returns the string
"AVT0,rbcommN.NNc\r"
where N.NN is the RBcomm version and c is the capability byte
(see Esc-Z). This identifies RBcomm as complying with the AVATAR
level 0 specification, since level 1 support is still incomplete.
^V^R reset AVATAR [not implemented]
^V^S make a sound. The next three characters specify the note number,
octave, and duration in tenths of a second. The note is computed as
(note-'A')*2 + sharp
The current implementation does not queue any tones unless RBcomm is
running under DESQview (which can queue notes).
^V^T highlight character at cursor position. Next character specifies new
attribute.
^V^U highlight window. Next two characters specify the window handle and
new attribute.
^V^V define window. Next six characters specify the window handle, default
attribute, top margin, left margin, bottom margin, and right margin.
The default attribute is also the initial current attribute for the
new window. Note: window 0 can not be redefined.
^V^W switch to window. The next character specifies the handle of the
window to switch to.
^V^X flush input [not implemented]
^V^Y repeat pattern. The following character specifies the length of the
pattern to be repeated, followed by the pattern, and finally followed
by a single character indicating the number of times to repeat the
pattern. The pattern may contain command sequences, but is limited
to 80 characters (longer patterns are truncated to 80 characters).
^V^\ go to bed [not implemented]
^V^] wake up [not implemented]
^V^^ start vertical output [not implemented]
^V^_ start horizontal output [not implemented]
^V! poke char/attr to physical screen. The next four characters specify
the character and attribute to poke, and the row and column at which
to display that character and attribute.
^V" turn off line wrap
^V# wrap in zigzag mode [not implemented]
^V$ turn on line wrap
^V% reverse direction of linefeeds [not implemented]
^V& linefeeds move in normal direction [not implemented]
^V' set cursor type. The next character specifies the cursor's shape:
^A return to default (startup) cursor shape
^B make cursor invisible (does not work on all systems in all modes)
^C block cursor, covering entire character cell
otherwise, this command is ignored
^V( output in forward direction [not implemented]
^V) output in reverse direction [not implemented]
^V* system pause. The next character specifies the duration in tenths of
a second. Contrary to the official AVATAR specs, RBcomm treats zero
as 256 tenths seconds, rather than a full hour. This is both more
consistent and more secure, as neither keyboard nor serial port
activity is possible during a system pause.
^V+ insert a line
^V, insert a blank column at the current cursor position
^V- delete current line
^V. delete current column
^V/ set/reset static mode [not implemented] The next character specifies
whether or not the cursor should be advanced after outputting a
character to the screen.
^V0 highlight from cursor to end of line. The next character specifies
the new attribute to be applied to the rest of the line.
^V1 highlight from start of line to cursor. The next character specifies
the new attribute to be applied to the beginning of the line.
^V: keyboard mode. The next character specifies the mode. RBcomm
always returns ^V:0 (default mode), as it does not support this
command.
^V< scroll left. The next five characters specify the number of columns
to scroll, the top margin, left margin, bottom margin, and right
margin of the area to scroll.
^V= set parser mode. If the next character ANDed with 1Fh is ^R or ^C,
set the mode to raw or cooked, respectively. In cooked mode, the
character immediately following a ^P is ANDed with 1Fh, and the result
is treated as if it had arrived from the remote system instead of the
^P sequence.
^V> scroll right. The next five characters are as for ^V<
^V? peek at physical screen. The next two characters specify the row and
column at which to peek. RBcomm returns the poke command (see ^V!)
needed to restore the given character position to its current state.

-----------------------------------------------------------------------------


  3 Responses to “Category : Recently Uploaded Files
Archive   : RBCOM345.ZIP
Filename : TERM-EMU.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/