Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!rutgers!bellcore!faline!thumper!tr
From: tr@thumper.bellcore.com (tom reingold)
Newsgroups: comp.sys.ibm.pc
Subject: Enclosed is MS-Kermit document (part 6 of 7)
Message-ID: <898@thumper.bellcore.com>
Date: 31 Dec 87 13:15:53 GMT
Organization: Bellcore, Morristown, Noo Joizy
Lines: 706
@@@@@@@@@@@@@@@@@@@@ Cut and concatenate here. @@@@@@@@@@@@@@@@@@@@
- No LOCAL or REMOTE commands.
- No 8th-bit prefixing, repeat counts, CRCs or 2-character checksums.
- No TAKE or initialization files.
- No command macros or command line arguments.
- No terminal session logging.
and others, depending on the specific version.
Incompatibilities between 2.29 and 2.30 include:
- LOCAL command has been removed from 2.30.
- CLEAR command now means clear serial port buffer rather than key and
macro definitions. Key and macro definition string space is now gar-
bage collected, so a CLEAR command for them is no longer necessary.
- CLRINP command is gone (replaced by CLEAR).
- Numbers of the form \nnn default to decimal rather than octal.
- Status of Default Disk is now shown as default disk and path.
- LOG filespec replaced by LOG SESSION filespec and LOG PACKET
filespec.
- SET KEY and SHOW KEY commands use different key identifications and
syntax:
MS-Kermit no longer understands keycap names such as F1 and BACKSPACE because
the codes are now highly dependent on individual keyboards, software, and com-
puters. Also, not every key press combination is supported by the system
software and key codes do depend on the keyboard in use. Thus, the SHOW KEY
command is normally used to obtain codes for keys on your system. In most
cases, defining one key also redefines all other keys sending the same charac-
ter. This is a side effect of not knowing the physical details of every
keyboard. However, efforts have been made to recognize many such "aliased"
keys and to generate unique identifications for each. Special keys, such as F1,
F2 and others which do not send an ASCII code are usually unique and are iden-
tified by scan codes.
Previous versions of MS Kermit used a different key coding algorithm and not
all old codes map to the expected keys. However, Kermit does attempt to use
the older SET KEY syntax properly as much as possible. The older syntax re-
quired the keyword SCAN followed by a number WITHOUT the BACKSLASH. The cur-
rent MS Kermit uses decimal as the default number base and previous versions
used octal in certain commands. So, when Kermit senses an old style SET KEY
command it converts the number, displays the new format and gives a warning
message. It is best to make a new style SET KEY file.
1.11. What's Missing
Kermit-MS has plenty of room for improvement. Missing features (which may be
added in future releases) include:
- Sliding windows.
- Attribute packets.
- Login script elaboration within the Kermit command structure
(variables, conditional branching, etc).
- Substitutible parameters for TAKE and DO commands.
- Default filetype for TAKE command files.
- Alternate names for initialization files.
- Consistent parsing of interactive and TAKE-file commands and com-
ments.
- Consistent use of backslash codes in any command.
- DIAL command, telephone directory, explicit support for various
modems.
- Trapping of carrier loss.
- Tektronix or other graphics terminal emulation for IBM PC family.
- Pause at end of screen during local TYPE.
- Piped operation a la UNIX (e.g. "compress foo.bar | kermit send").
- Transaction file logging.
- Normal form for outbound filenames.
- A way to accept default values for omitted trailing fields in com-
mands.
- A better built-in help facility.
- Separation of SET DEBUG functions for screen and file transfer.
- Simple Control and Meta key reassignment.
- Specification of character sequences having special meaning to com-
munications "black boxes" which use ASCII characters for control pur-
poses. Byte stuffing or character doubling may be required.
Future releases of MS-Kermit will probably have major portions of the program
(now written entirely in assembler) replaced by C-language code. This would
include the file transfer portions, the command parser, etc.
1.12. Installation of Kermit-MS
If you already have Kermit on your PC, you can use it to obtain new versions of
Kermit-MS when they appear on the central system at your site. If you do not
have Kermit or any other reliable file capture facility on your PC, you can or-
der a Kermit diskette from Columbia (write to Kermit Distribution, Columbia
University Center for Computing Activities, 612 West 115th Street, New York, NY
10025, USA, for information), or from any of a number of user groups or dis-
kette services. If you absolutely can't get a Kermit diskette, but have access
to another computer that has a copy of the MS-DOS Kermit program (usually in
".BOO" format, explained below), there are two recommended methods for getting
it onto your PC:
1. Use another file capture facility to get it.
2. Type in and run the "baby Kermit" program (72 lines) from chapter 7
of the Kermit book.
The first method involves either "raw capture" (no error checking), or else use
of (gasp!) another protocol, such as Xmodem, which, like Kermit, requires a
program to execute the same protocol on both ends of the connection.
Raw capture generally involves "typing" the file on the other computer, with
your PC taking the place of the terminal, and rather than displaying the file
on the screen as it's being typed, your PC is storing it on the disk. This is
a tricky process, however, because data can easily be lost or corrupted. For
instance, you could write a very short BASIC program to capture a file in this
way, but it could probably not keep up -- even at low baud rates -- unless you
included the tricky serial port BASIC commands. The DOS command COPY COM1
filename command has the same speed problem, and it stops only when it receives
a Control-Z character from the other computer.
If the other computer has Kermit on it -- which is likely, since this is prob-
ably the reason you want to get Kermit onto your PC -- you should type in the
receive-only BASIC Kermit program listed on pp.186-188 of the Kermit book, and
then use it in conjunction with the other computer's Kermit to transfer the
file. Make sure to set a long enough delay on the other computer to give your-
self time to escape back to the PC and start up the "baby Kermit" before pack-
ets start to arrive, otherwise you'll probably get fatal DOS i/o errors.
Note that Kermit programs are often distributed under names other than
"Kermit". The Columbia Kermit program library contains hundreds of Kermit
programs, which must be given unique names. MS-DOS Kermit for the IBM PC, for
instance, is called MSVIBM.BOO. Once you have this program in .EXE format on
your disk, you probably should rename it to KERMIT.EXE, because it's harder to
remember (and type) the distribution name.
".BOO Files"
MS-Kermit (and many other Kermit programs) are often distributed using a spe-
cial encoding called "boo" (short for "bootstrap") format, developed especially
for distribution of MS-Kermit over networks and communication lines. MS-Kermit
has grown to have so many features that the binary program image (the .EXE
file) has become quite large. But binary files are generally not compatible
with the common labeled tape formats (e.g. ANSI D), electronic mail, or raw
downloading -- the methods most commonly used for Kermit distribution.
A common practice is to encode .EXE and other binary files into printable
characters, such as hexadecimal digits, for transportability. A simple "hex"
encoding results in two characters per 8-bit binary byte, plus CRLFs added
every 80 (or less) hex characters to allow the file to pass through
card-oriented links. A hex file is therefore more than twice as large as the
original binary file.
A .BOO file is a more compact, but somewhat more complicated, encoding. Every
three binary bytes (24 bits) are split up into four 6-bit bytes with 48 (ASCII
character "0") is added to each, resulting in four ASCII characters ranging
from "0" (ASCII 48) to "o" (ASCII 111), with CRLFs added at or near "column
76". The resulting file size would therefore be about 4/3 the .EXE file size.
This is still quite large, so .BOO files also compress consecutive null (zero)
bytes. Up to 78 consecutive nulls are compressed into two characters. Tilde
("~") is the null-compression lead-in, and the following character indicates
how many nulls are represented (subtract 48 from this character's ASCII value).
For instance "~A" means 17 consecutive nulls; "~~" means 78 of them. Repeated
nulls are very common in .EXE files.
4-for-3 encoding combined with null compression reduces the size of the encoded
file to approximately the same size as the original .EXE file, and sometimes
even smaller. The first line of a .BOO file is the name (in plain text) of the
original file. Here's what the first few lines of a typical .BOO file look
like:
MSTIBM.EXE
CEYP0Id05@0P~3oomo2Y01FWeP8@007P000040HB4001`W~28bL005\W~2JBP00722V0ZHPYP:
\8:H2]R2V0[`PYP:68>H2S23V0YHPiP:Xg800;Qd~2UWD006Yg~2Ogl009]o~2L8000;20~~~~
~~~~~~~:R2H008TV?P761T410
0i7n0o1]e7[@2\PO=8LH60@00Raj>04^97Xh0
Programs for Handling .BOO Files
Kermit Distribution includes several useful .BOO-file programs:
MSBPCT.BAS This Microsoft BASIC program can be used on any PC to decode a
.BOO file into an .EXE file. It's about 50 lines line, so it
can be typed in.
MSBPCT.BOO BASIC programs run rather slowly, so .BOO-file decoders have
also been written in high-level languages like C. The
MSBPCT.EXE file that was produced by compiling MSBPCT.C is en-
coded into MSBPCT.BOO, which can be decoded back into
MSBPCT.EXE using MSBPCT.BAS. Once you've done that, you don't
need to run the slow BASIC version any more, which is a bless-
ing, because the MS-Kermit .BOO file takes more than half an
hour to decode using the BASIC version, but only seconds using
MSBPCT.EXE.
MSBPCT.* There are .BOO-file decoders written in other languages too,
like assembler, Turbo Pascal, etc. Take your pick. They all
do the same thing.
MSBMKB.* This is the program for encoding an .EXE file into a .BOO file.
It is written in C, compiled, and translated (by itself) into
.BOO format, suitable for decoding back into .EXE form by any
of the MSBPCT programs.
MSBHEX.* are programs for producing and decoding straight hex files.
1.13. Program Organization
Kermit-MS version 2 is composed of separate assembler source files, assembled
separately, and linked together. The modules are:
System/Device Independent:
MSSKER.ASM Main program
MSSSEN.ASM File sender
MSSRCV.ASM File receiver
MSSSER.ASM Server operation
MSSFIL.ASM File i/o
MSSCMD.ASM Command parser
MSSTER.ASM CONNECT command
MSSCOM.ASM Packet reader and sender
MSSSET.ASM SET, SHOW, and STATUS commands
MSSSCP.ASM Script CLEAR, ECHO, INPUT, OUTPUT, PAUSE, TRANSMIT commands
MSSFIN.ASM Dummy module to find the end of the data segment; must be
linked LAST.
MSSDEF.H Data structure definitions and equates
System/Device Dependent:
MSUxxx.ASM System-dependent keyboard translator for system xxx
MSXxxx.ASM System-dependent code for system xxx
MSYxxx.ASM Terminal emulation for system xxx
MSZxxx.ASM More terminal emulation for system xxx
The xxx is replaced by a 3-letter code for the particular system, e.g. IBM for
the IBM PC family, RB1 for the Rainbow-100, etc.
The modular organization allows easier modification of the program, quicker
transfer of modified portions from system-to-system. The modules are designed
to be well-defined and self-contained, such that they can be easily replaced.
For instance, someone who prefers windows and mice to typing commands should be
able to replace the command parsing module without having to worry about the
effect on the other modules.
To assemble any of the Kermit modules, file MSSDEF.H must be on the default
disk.
All the Kermit implementations require the modules MSSCMD, MSSCOM, MSSFIL,
MSSKER, MSSRCV, MSSSCP, MSSSEN, MSSSER, MSSSET, MSSTER, MSSFIN. MSSFIN must be
linked last.
Each particular implementation requires at least an MSXxxx module, usually an
MSUxxx module, and, if it is doing terminal emulation in software, also an
MSYxxx and possible also an MSZxxx module. See the batch or make files from
the source distribution for details of exactly which modules are required for a
particular implementation.
Once all the required object modules exist, they may be linked together to
produce a Kermit program. For example, on the Rainbow:
A>link
Microsoft Object Linker V2.00
(C) Copyright 1982 by Microsoft Inc.
Object Modules [.OBJ]: mssker msurb1 msxrb1 msscmd msscom +
mssfil mssrcv mssset msssen mssser mssscp msster mssfin
Run File [MSSKER.EXE]: kermit
List File [NUL.MAP]:;
A>
1.14. Bringing Kermit to New Systems
You can bring Kermit-MS to systems that are not explicitly supported in one of
two ways -- attempt to run the "generic" MS-DOS Kermit on it, or add explicit
code to support your system.
To get started with Kermit on a new system, try running "generic" MS-DOS Ker-
mit; in many cases, it will run as is. The generic version accomplishes all
its port and console i/o through DOS calls, and during terminal connection does
not attempt to emulate any particular kind of terminal. In some cases, the
generic version may still require some fiddling to run on a new system; for in-
stance, different systems refer to their communication ports in different ways
-- COM1, J1, AUX, etc. The SET PORT command allows you to specify the port
using any of these device names, or using DOS file handles -- keep trying until
you find the one that works. Generic MS-DOS Kermit will probably run no faster
than 1200 baud, and it only works with DOS 2.0 or later.
If you want to write code to explicitly support a new system, first call or
write Kermit Distribution at Columbia to make sure no one else is already doing
the same work. If you're the first, then begin by reading the file MSXAAA.DOC,
provided with the MS-DOS Kermit sources in the Kermit distribution, which is a
guide to the system dependent modules of Kermit-MS. Then create new MSUxxx.ASM
and MSXxxx.ASM modules, and, if your version is also doing terminal emulation
in software, also an MSY and possibly an MSZ module.
1.15. Kermit-MS VT102 Terminal Emulator Technical Summary
This section summarizes the Kermit-MS keyboard and screen operation during
emulation of H19, VT52, and VT102 terminals, prinicipally for the IBM PC but
also used by the NEC APC3, Victor 9000, and Sanyo 55x systems. Note that
spaces shown between characters of escape sequences are there for ease of read-
ing. The actual sequences contain no spaces.
1.15.1. Keyboard Layout and Characters Sent
Here is how the keypad functions are assigned to the IBM keyboard function
keys. You may change them by using the SET KEY command to define a desired key
as the appropriate Kermit action verb; use SET KEY without a definition to un-
define a key. Names of appropriate verbs are also shown for use in the Set Key
command, such as
Set Key \2352 \Kbreak (IBM Alt-B assigned to verb BREAK)
Verb names are system dependent, use ? in the Set Key definition part for a
list of local verbs. IBM PC verbs are listed in Table 1-3; IBM key values are
either straight ASCII or the IBM Bios scan code, plus 256, plus 512 for Shift
key held down, plus 1024 for Control key held down, plus 2048 for Alt key held
down; non-ASCII keys are always 256 decimal or greater. Keys particular to the
Enhanced Keyboard have 4096 added to the result.
---------------------------------------------------------------------------
Heath-19 and VT52 Keypads VT102 keypad
IBM Keys IBM keys
+------+------+-------+----------+ +------+------+------+------+
| Blue | Red | Grey | up arrow | | PF1 | PF2 | PF3 | PF4 |
| F1 | F2 | F3 | up arrow | | F1 | F2 | F3 | F4 |
+------+------+-------+----------+ +------+------+------+------+
| 7 | 8 | 9 |down arrow| | 7 | 8 | 9 | - |
| F5 | F6 | F7 |down arrow| | F5 | F6 | F7 | F8 |
+------+------+-------+----------+ +------+------+------+------+
| 4 | 5 | 6 | rgt arrow| | 4 | 5 | 6 | , |
| F9 | F10 | SF1 | rgt arrow| | F9 | F10 | SF1 | SF2 |
+------+------+-------+----------+ +------+------+------+------+
| 1 | 2 | 3 |left arrow| | 1 | 2 | 3 | E |
| SF3 | SF4 | SF5 |left arrow| | SF3 | SF4 | SF5 | n S|
+------+------+-------+----------+ +------+------+------+ t F|
| 0------0 | . | Enter | | 0------0 | . | e 6|
| SF7 | SF8 | SF6 | | SF7 | SF8 | r |
+-------------+-------+----------+ +-------------+------+------+
SF1 means push Shift and F1 keys simultaneously
---------------------------------------------------------------------------
CURSOR KEYS:
H-19 & VT52 VT102
VT52/H19 key IBM Verb IBM key All Modes Numeric Application
up arrow UPARR up arrow ESC A ESC [ A ESC O A
down arrow DNARR down arrow ESC B ESC [ B ESC O B
right arrow RTARR right arrow ESC C ESC [ C ESC O C
left arrow LFARR left arrow ESC D ESC [ D ESC O D
AUXILIARY KEYPAD:
Heath-19 & VT52 VT102
VT52/H19 key IBM Verb IBM key Numeric Applic. Numeric Applic.
PF1/HF7/Blue GOLD,PF1 F1 ESC P ESC P ESC O P ESC O P
PF2/HF8/Red PF2 F2 ESC Q ESC Q ESC O Q ESC O Q
PF3/HF9/Grey PF3 F3 ESC R ESC R ESC O R ESC O R
PF4/HF1 PF4 F4 ESC S ESC S ESC O S ESC O S
0 KP0 SF7 0 ESC ? p 0 ESC O p
1 KP1 SF3 1 ESC ? q 1 ESC O q
2 KP2 SF4 2 ESC ? r 2 ESC O r
3 KP3 SF5 3 ESC ? s 3 ESC O s
4 KP4 F9 4 ESC ? t 4 ESC O t
5 KP5 F10 5 ESC ? u 5 ESC O u
6 KP6 SF1 6 ESC ? v 6 ESC O v
7 KP7 F5 7 ESC ? w 7 ESC O w
8 KP8 F6 8 ESC ? x 8 ESC O x
9 KP9 F7 9 ESC ? y 9 ESC O y
, (comma) KPCOMA SF2 , ESC ? l , ESC O l (ell)
- (minus) KPMINUS F8 - ESC ? m - ESC O m
. (period) KPDOT SF8 . ESC ? n . ESC O n
Enter KPENTER SF6 ^M(cr) ESC ? M ^M ESC O M
(SFn means hold down Shift key while pressing Function key n.)
An often confusing item is knowing the mode of the auxillary keypad: numeric or
application. Digital Equipment Corporation designed the terminal to change
modes only under command from the remote computer and not at all from the
keyboard. So the startup state is numeric/cursor mode, and reception of escape
sequences "ESC [ ? 1 h" or "l" changes the mode. Kermit verbs for the keypad
and cursor keys generate the correct escape sequences appropriate to the cur-
rent mode and terminal type.
A best attempt is made to safely test for the 101/102 key Enhanced keyboard and
use it if present. If it is present then the keyboard translator separates the
individual arrow keys from those on the numeric keypad and also separates the
asterisk and forward slash keys on the keypad from those on the regular
typewriter keyboard. These special Enhanced keyboard keys are reported as scan
codes with 4096 added to the base scan code.
OTHER IBM KEYS OPERATIONAL IN CONNECT MODE:
IBM key IBM Verb Action
Keypad Del Send ASCII Del code (rubout) \127
Backspace (<-) Send ASCII Del code (rubout) \127 (BS is \8)
Keypad - MODELINE Toggle mode line on/off (only if Mode Line is
enabled and not used by the host).
Alt - TERMTYPE Toggle among H-19, VT52, and VT100 emulations.
Alt = RESET Clear screen and reset terminal emulator to
starting (setup) state.
Alt B BREAK Send a BREAK signal
Alt H HELP Show drop down help menu (detailed below)
Alt S KSTATUS Show settings
Alt X EXIT Exit Connect mode, back to Kermit prompt
Home HOMSCN Roll screen up (text down) to beginning of
storage.
End ENDSCN Roll screen down (text up) to end of storage.
PgUp UPSCN Roll screen up (back, earlier) one screen.
PgDn DNSCN Roll screen down (forward, later) one screen.
Ctrl-PgUp UPONE Roll screen up one line.
Ctrl-PdDn DNONE Roll screen down one line.
Control PrtSc PRTSCN Toggle on/off copying of received text to
printer, "PRN" shows on far right of mode
line when activated.
Control-End DUMP Dump image of screen to a disk file or device.
Default filename is KERMIT.SCN in the current
directory. Use command SET DUMP to change the
filename. Screen images are appended to the
file, separated by formfeeds.
Shift-PrtSc Standard DOS Print-screen, dump screen image to printer.
"Alt -" means hold down Alt and type minus on the upper key rank. This
switches among the various kinds of emulation but does not change most operat-
ing parameters of the emulator.
CONNECT ESCAPE COMMANDS:
Type the Kermit escape character (normally "^]"), then one of the keys below:
(equivalent IBM Verb)
? display this short list. HELP
0 send a null character. NULL
B send a BREAK signal. BREAK
C close connect session & return to Kermit prompt. EXIT
F dump screen to filespec, default is KERMIT.SCN. DUMP
H hangup the phone or network connection HANGUP
L send a Long BREAK signal LBREAK
M toggle mode line on/off. MODELINE
P push to DOS. DOS
Q quit (suspend) logging. LOGOFF
R resume logging. LOGON
S show status. STATUS
Kermit escape character itself: send it to the host.
1.15.2. Responses To Characters Received By the Terminal Emulator
Unknown escape sequences of the form "ESC char" are absorbed by the emulator
without further effect; longer unknown escape sequences echo the extra charac-
ters.
DEC VT102 functions while in ANSI (VT102) mode, unsupported features marked by
an asterisk (*):
Escape Seq Mnemonic Description of Action
ESC D IND Index, moves cursor down one line, can scroll
ESC E NEL Move cursor to start of line below, can scroll
ESC H HTS Set one horizontal tab at current position
ESC M RI Reverse Index, cursor up one line, can scroll
ESC Z DECID Identify terminal (response is ESC [ ? 6 c)
ESC c RIS Reset terminal to initial state
ESC = DECKPAM Enter keypad application mode
ESC > DECKNPNM Enter keypad numeric mode
ESC 7 DECSC Save cursor position and attributes
ESC 8 DECRC Restore cursor from previously saved position
ESC # 3 DECDHL Double height and width line, top half
ESC # 4 DECDHL Double height and width line, bottom half
ESC # 5 DECSWL Single height and width line
ESC # 6 DECDWL Double width single height line
ESC # 8 DECALN Test screen alignment, fill screen with E's
ESC [ Pn @ ICH ANSI insert Pn spaces at and after cursor
ESC [ Pn A CUU Cursor up Pn lines, does not scroll
ESC [ Pn B CUD Cursor down Pn lines, does not scroll
ESC [ Pn C CUF Cursor forward, stays on same line
ESC [ Pn D CUB Cursor backward, stays on same line
ESC [ Pn; Pn H CUP Set cursor to row, column (same as HVP)
ESC [ Ps J ED Erase in display:
0 = cursor to end of screen, inclusive
1 = start of screen to cursor, inclusive
2 = entire screen, reset lines to single
width, cursor does not move.
ESC [ Ps K EL Erase in line:
0 = cursor to end of line, inclusive
1 = start of line to cursor, inclusive
2 = entire line, cursor does not move
ESC [ Pn L IL Insert Pn lines preceding current line.
ESC [ Pn M DL Delete Pn lines from current downward, incl.
ESC [ Pn P DCH Delete Pn chars from cursor to left, incl.
ESC [ Pn; Pn R CPR Cursor report (row, column), sent by terminal
Example: home position yields ESC [ 1; 1 R
ESC [ Pn c DA Device attributes (reports ESC [ ? 6 ; 2 c)
ESC [ Pn; Pn f HVP Set cursor to row, column (same as CUP)
ESC [ Ps g TBC Tabs clear, 0 = at this position, 3 = all
ESC [ 4 h IRM Insert mode on
ESC [ 20 h LNM Set newline mode (cr => cr/lf)
ESC [ 4 l IRM Replacement mode on
ESC [ 20 l LNM Reset newline mode (cr => cr)
ESC [ ? Ps;...;Ps h SM Set mode, see table below
ESC [ ? Ps;...;Ps l RM Reset mode, see table below
Ps Mnemonic Mode Set Reset
0 error (ignored)
1 DECCKM cursor keys application cursor/numeric
2 DECANM ANSI/VT52 ANSI/VT102 VT52
3 DECCOLM Columns +132 col 80 col
4 DECSCLM *Scrolling smooth jump
5 DECSCNM Screen reverse video normal
6 DECOM Origin relative absolute
7 DECAWM Autowrap on off
8 DECARM *Autorepeat on off
9 DECINLM *Interlace on off
18 DECPFF Printer termination character, use FF if set
19 DECPEX Printer extent, set=screen, off=scrolling region
+ See comments on EGA boards.
ESC [ Pn i MC Printer controls (Media Copy)
0 Print whole Screen
4 Exit printer controller (transparent printing)
5 Enter printer controller (transparent printing)
ESC [ ? Pn i MC Printer controls (Media Copy)
1 Print line containing cursor
4 Exit auto print (stop echoing to printer)
5 Enter auto print (echo screen chars to printer)
ESC [ Ps;...;Ps m SGR Select graphic rendition
0 = all attributes off (#'s 1, 4, 5, 7)
1 = bold, intensify foreground
4 = underscore (reverse video on IBM CGA)
5 = blink
7 = reverse video
non-DEC extensions: 30-37 = foreground color = 30 + colors
40-47 = background color = 40 + colors
colors: 1 = red, 2 = green, 4 = blue
ESC [ Ps n DSR Device Status Report.
Response from VT100: 0 = ready, 3 = malfunction.
Command to VT100: 5 = report status with DSR,
6 = report cursor position using CPR sequence.
ESC [ Ps;...;Ps q DECLL Load LEDs, Ps = 0 means clear LED #1-4
Ps = 1,2,3,4 sets LED # 1,2,3,4 on status line.
ESC [ Pn; Pn r DECSTBM Set top and bottom scrolling margins, resp.
ESC [ r resets margin to full screen.
ESC [ sol x DECREQTPARM Request terminal parameters, see table below
ESC [ sol; par; nbits; xspeed; rspeed; clkmul; flags x
DECREPTPARM Reports terminal parameters
sol = 0 request; terminal can send unsolicited
reports - supported as sol = 1 below.
sol = 1, request; term reports only on request
sol = 2, this is a report (DECREPTPARM)
sol = 3, terminal reporting only on request
par = 1 none, 2 space, 3 mark, 4 odd, 5 even
nbits = 1 (8 bits/char), 2 (7 bits/char)
xspeed,rspeed = transmit & receive speed index
0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,128 correspond to speeds of
50,75,110,134.5,150,200,300,600,1200,1800,2000,2400,3600,4800,9600,19200,
and 38400 baud. clkmul = 1 (clock rate multiplier is 16)
flags = 0-15 (Setup Block #5), always 0 here
ESC [ 2; Ps y DECST *Confidence tests - not supported
SCS Select character sets.
ESC ( A SCS G0 points to UK symbols
ESC ) A SCS G1 points to UK symbols
ESC ( B SCS G0 points to ASCII symbols
ESC ) B SCS G1 points to ASCII symbols
ESC ( 0 SCS G0 points to special (line drawing) graphics
ESC ) 0 SCS G1 points to special (line drawing) graphics
ESC ( 1 SCS G0 points to alt char ROM - UK symbols
ESC ) 1 SCS G1 points to alt char ROM - UK symbols
ESC ( 2 SCS G0 points to alt graphics ROM - as ESC ( 0
ESC ) 2 SCS G1 points to alt graphics ROM - as ESC ) 0
(Separate graphics are used for DEC and Heath)
^E ENQ *Answerback message, not supported
^G BELL Sound VT102 style beep
^H BS Backspace, move cursor left one character
^I HT Horizontal tab, move cursor to next tabstop
^J LF Linefeed, move cursor down one line
^K VT Vertical Tab, treated as a line feed
^L FF Formfeed, treated as a line feed
^M CR Carriage return, move cursor to col 1
^N SO Select usage of G1 character set
^O SI Select usage of G0 character set
^X CAN Cancel escape sequence in progress
^Z SUB Treated as a CAN
Other extensions:
ESC [ ? 6 h ESC [ 25; Pc f VT52/VT100 move cursor to 25th line.
ESC [ ? 6 h ESC [ 25; Pc H VT52/VT100 move cursor to 25th line.
(These will disable Kermit's own status line.)
ESC * char VT200 series graphics command, ignored.
1.15.3. DEC VT102 functions while in VT52 mode
Escape sequence Description of action
ESC A Cursor up
ESC B Cursor down
ESC C Cursor right
ESC D Cursor left
ESC F Enter graphics mode
ESC G Exit graphics mode
ESC H Cursor home
ESC I Reverse line feed
ESC J Erase to end of screen
ESC K Erase to end of line
ESC V Print cursor line
ESC X Exit Printer Controller mode, transparent print
ESC Y row column Direct cursor address, offset from space
ESC W Enter Printer Controller mode, transparent print
ESC Z Identify (response is ESC / Z)
ESC ^ (caret) Enter autoprint mode (printer echoes screen)
ESC _ (underscore) Exit autoprint mode
ESC ] Print Screen
ESC = Enter alternate keypad mode
ESC > Exit alternate keypad mode
ESC < Enter ANSI mode (changes to VT102)
1.15.4. Heath-19 functions while in non-ANSI mode
Escape seq Mnemonic Description of action
ESC A HCUU Cursor Up
ESC B HCUD Cursor Down
ESC C HCUF Cursor Forward, stays on same line
ESC D HCUB Cursor Backward, stays on same line
ESC E HCD Clear display
ESC F HEGM Enter Graphics mode
ESC G HXGM Exit Graphic mode
ESC H HCUH Cursor Home
ESC I HRI Reverse Index
ESC J HEOP Erase to end of page
ESC K HEOL Erase to end of line
ESC L HIL Insert line
ESC M HDL Delete line
ESC N HDCH Delete character
ESC O HERM Exit Insert Char mode
ESC Y row col HDCA Direct cursor addressing, offset from space
ESC Z HID Identify (response is ESC / K which is a VT52)
ESC b HBD Erase Beginning of display
ESC j HSCP Save cursor position
ESC k HRCP Set cursor to saved position
ESC l HEL Erase entire line
ESC n HCPR Cursor Position Report request
ESC o HEBL Erase beginning of line
ESC p HERV Enter Reverse Video mode
ESC q HXRV Exit Reverse Video mode
ESC r Bn HMBR *Modify baud rate - not supported
ESC t HEKS *Enter Keypad shifted mode, not supported
ESC u HXKS *Exit Keypad shifted mode, not supported
ESC v HEWA Wrap around at end of line
ESC w HXWA Discard at end of line
ESC x Ps HSM Set Mode. See table below
ESC y Ps HRM Reset Mode. See table below
Ps Mnemonic Mode Set (x) Reset (y)
1 HSM/HRM 25th line enabled +disabled
2 *keyclick off on
3 *holdscreen enabled disabled
4 cursor type block underline
5 cursor on/off on off
6 *keypad-shifted shifted unshifted
7 alt app keypad enabled disabled
8 *linefeed lf=>cr/lf lf=>lf
9 newline mode cr=>cr/lf cr=>cr
+ disabling the 25th line also clears it
ESC z HRAM Reset to power-up configuration
ESC = HAKM Enter Alternate Keypad mode
ESC > HXAM Exit Alternate Keypad mode
ESC < HEAM Enter ANSI mode (ESC [ stuff)
ESC @ HEIM Enter Insert Char mode
ESC [ HEHS *Enter Hold Screen mode, not supported
ESC \ HXHS *Exit Hold Screen mode, not supported
ESC { and } HEK, HDK *Keyboard enable/disable, not supported
ESC ] HX25 *Transmit 25th line, not supported
ESC # HXMP *Transmit page, not supported
1.15.5. Heath-19 functions while in ANSI mode
Escape Seq Mnenonic Description of Action
ESC [ s PSCP Save cursor position & attributes
ESC [ u PRCP Restore cursor position & attributes
ESC [ z PRAM Reset to power-up configuration
ESC [ 2 J ED Erase entire screen but do not move cursor;
regular Heath-19 moves cursor to Home.
ESC [ ? 2 h PEHM Revert to normal Heath-19 non-ANSI mode
@@@@@@@@@@@@@@@@@@@@ Cut and concatenate here. @@@@@@@@@@@@@@@@@@@@
--
Tom Reingold INTERNET: tr@bellcore.bellcore.com
Bell Communications Research UUCP: rutgers!bellcore!tr
435 South St room 2L350 SOUNDNET: (201) 829-4622 [work]
Morristown, NJ 07960 (201) 287-2345 [home]