tr@thumper.bellcore.com (tom reingold) (12/31/87)
@@@@@@@@@@@@@@@@@@@@ Cut and concatenate here. @@@@@@@@@@@@@@@@@@@@
MS-DOS KERMIT USER GUIDE
FOR THE IBM PC FAMILY, COMPATIBLES, AND OTHER MS-DOS SYSTEMS
C. Gianone, F. da Cruz
Columbia University Center for Computing Activities
New York, New York 10027
J.R. Doupnik
CASS and EE, Utah State University, Logan, UT 84322
Copyright (C) 1981,1987
Trustees of Columbia University in the City of New York
Permission is granted to any individual or institution to use, copy,
or redistribute this document so long as it is not sold for profit, and
provided this copyright notice is retained.
1. MS-DOS KERMIT
--------
This document is formatted as an ordinary, plain text ASCII disk file, from
SCRIBE text formatter source. Typeset copies are available from Columbia
University.
--------
*DRAFT OF 15 DEC 1987, ALSO APPLIES TO VERSION 2.29C WITH MINOR DIFFERENCES*
Program: Joe R. Doupnik (Utah State University), with contributions by
James Harvey (Indiana/Purdue University), James Sturdevant
(A.C. Nielson Company), and many others. Originally by Daphne
Tzoar and Jeff Damens (Columbia University). See History.
Language: Microsoft Macro Assembler (MASM)
Version: 2.30
Released: December xx, 1987
Documentation: Christine Gianone, Frank da Cruz (Columbia University),
Joe R. Doupnik (Utah State University)
Dedicated To: Peppi
Kermit-MS Capabilities At A Glance:
Local operation: Yes
Remote operation: Yes
Transfers text files: Yes
Transfers binary files: Yes
Wildcard send: Yes
File transfer interruption: Yes
Filename collision avoidance: Yes
Can time out: Yes
8th-bit prefixing: Yes
Repeat count compression: Yes
Alternate block check types: Yes
Terminal emulation: VT102, H19, VT52, Tektronix 4010
Communication settings: Yes
Transmit BREAK: Yes
IBM mainframe communication: Yes
Transaction logging: No
Session logging (raw download): Yes
Raw upload: Yes
Act as server: Yes
Talk to server: Yes
Advanced server functions: Yes
Advanced commands for servers: Yes
Local file management: Yes
Command/init files: Yes
Command macros: Yes
Extended-length packets: Yes
Local area networks: Yes
Attribute packets: No
Sliding windows: No
MS-DOS Kermit, or Kermit-MS (or MS-Kermit), is a program that implements the
Kermit file transfer protocol for the entire IBM PC family, including the PS/2
series, IBM compatibles, and several other machines based on the Intel 8086
processor series (8088, 80286, etc) and the DOS operating system family (PC-DOS
or MS-DOS, henceforth referred to collectively as MS-DOS or simply DOS).
It is assumed you are already familiar with the general ideas of data com-
munication and Kermit file transfer. A very brief overview is given here, but
for details consult the early chapters of the Kermit User Guide (of which this
document is a chapter), or the book Kermit, A File Transfer Protocol, by Frank
da Cruz, Digital Press (1987), order number EY-6705E-DP (phone 1-800-343-8321),
which also includes background tutorials on computers, file systems, and data
communication (including modems, cabling, etc.) For further information about
Kermit documentation, updates, lists of current available versions, etc, write
to:
Kermit Distribution
Columbia University Center for Computing Activities
612 West 115th Street
New York, NY 10025 (USA)
1.1. History
Over the years, MS-Kermit has grown from a Kermit file transfer program that
embodied a simple terminal emulator into a complex and powerful communication
program that includes the Kermit file transfer protocol. As a result, the bulk
of this manual is devoted to the communication features, rather than Kermit
protocol operation. Skip ahead to the next section if you're not interested in
the history of MS-Kermit.
MS-DOS Kermit (like the Kermit file transfer protocol itself) is a product of
the Systems Integration Group of the Columbia University Center for Computing
Activities, managed by Frank da Cruz, and it was one of the four original Ker-
mit programs (with the CP/M, DEC-20, and IBM mainframe versions). It was in-
itially written for the IBM PC with DOS 1.1 by Daphne Tzoar in 1981-1982, based
largely on Bill Catchings's original CP/M 8080 assembler version. PC-Kermit
(as it was called then) provided basic Kermit file transfer and VT52 emulation.
Joellen Windsor of the University of Arizona added conditional assembly support
for the Heath/Zenith-100 shortly thereafter, and soon after that Dave King of
Carnegie-Mellon University added Heath-19 terminal emulation, and some patches
to let the program run under the new DOS version, 2.0. During this era, the
program version numbers went from 1.0 to 1.20.
With the appearance in the marketplace of many new MS-DOS machines that were
not compatible with the IBM PC, it became apparent that conditionally assembled
code supporting each of these machines within a single monolithic source file
was not the best way to organize the program. Therefore Daphne, along with
Jeff Damens of Columbia, undertook to reorganize the program in a modular way,
isolating system dependencies into separate files. The result was version
2.26, released in July 1984. It included support for the DEC Rainbow, the
HP-150, the Wang PC, and generic MS-DOS, as well as for the IBM PC family and
the H/Z-100. It also included many new features, like 8th-bit prefixing (code
contributed by The Source Telecomputing), alternate block check selection,
byte-count compression, server/client operation, access to local file and DOS
operations, command macros, initialization and command files, screen rollback,
key redefinition, and more. For the 2.26 release, the executable Kermit
programs were encoded printably as ".BOO" files, designed by Bill Catchings as
part of this effort.
Release 2.27 was produced by Daphne and Jeff in December 1984. Unlike 2.26, it
ran correctly on the new PC/AT under DOS 3.0, and included support for the NEC
APC from Ron Blanford of Seattle, WA, and Ian Gibbons of the University of
Hawaii, and for the TI Professional from Joe Smith of the Colorado School of
Mines, plus some bug fixes and reorganization. 2.27 was the last version able
to run under pre-2.0 versions of DOS.
Version 2.28 (Daphne, Jeff, June 1985) added dynamic memory allocation to
reduce disk storage for the .EXE file, and to allow the program to adjust it-
self to the PC's memory size, plus the inevitable bug fixes (many of them con-
tributed by Edgar Butt of the University of Maryland and Gregg Small of the
University of California at Berkeley). During this period, support for ad-
ditional MS-DOS systems was added by various people.
In December 1985, a tape showed up at Columbia sent by Prof. Joe R. Doupnik of
the Center for Atmospheric and Space Studies and EE Department at Utah State
University. This tape contained version 2.28 modified to fully support the DOS
2.0 file system, and to which many new features had been added, notably the
ability of the MS-DOS Kermit server to process various REMOTE commands (DIR,
CWD, SPACE, etc). And at about the same time, a tape arrived from James Harvey
of Indiana/Purdue University, who had changed Kermit's CONNECT command to emu-
late the popular DEC VT100 terminal. This material was sent to Joe, who then
laboriously fitted James's work into his own code, keeping the VT52 and H19
emulation alive as options, and upgrading the VT100 emulation to VT102 by ad-
ding features such as line and character insertion and deletion. The result
was version 2.29, released in May 1986.
Soon after the release of 2.29, some disks were sent in by James Sturdevant of
the A.C. Nielson Company, containing a full implementation of the Kermit script
facility, as described in the Kermit book. This material was sent to Joe, who
had by now become keeper of MS-DOS Kermit and had already begun work on version
2.30 by adding support for extended-length packets. Joe had been carrying on
voluminous network correspondence (Thanks, BITNET!) with Columbia and with
MS-DOS Kermit users and testers all over the world, giving birth to many new
features, including support for 8-bit ASCII terminal connections and inter-
national character sets, ANSI printer control, support for operation over local
area networks, and a redesigned, more powerful, more portable key redefinition
mechanism. Version 2.30 was released in December 1987.
Among the many contributors to this version are: Robert Goeke for the NEC AP3,
Brian Peterson and Andreas Stumpf for the Victor 9000, Bob Babcock and Joe
White for the Sanyos, Christopher Lent for the Wang PC, Jack Bryans for an In-
tel iRMX version, Jim Noble for the Grid Compass, Geoff Mulligan and others for
the Zenith 100, and David Knoell for the special Rainbow edition. And thanks
to Gisbert Selke, Jack Bryans, and others for proofreading drafts of this
manual. And apologies to anyone we neglected to mention.
1.2. System Requirements
Kermit-MS version 2.30 runs in as little as 70K of memory (about 55K
contiguous), but will occupy up to 120K, if it can be found, for extra screen
rollback memory. Versions not using screen rollback memory will not require
the additional space. It will also try to leave 24 Kbytes free for a second
copy of COMMAND.COM which is needed for execution of certain commands.
On the IBM PC family, Kermit-MS 2.30 performs almost complete emulation of the
DEC VT-102 and Heath/Zenith-19 terminals at speeds up to 19,200 baud or
greater, lacking only the VT102's smooth scrolling and, on some display boards,
132 column features. Much of the speed is accomplished via direct writes to
screen memory, but this is done in a "TopView-aware" manner to allow successful
operation in windowing environments like MS-Windows, DesqView, and TopView it-
self. Speed is also due to direct access of the serial port 8250 UART
(Universal Asynchronous Receiver/Transmitter) chip, with buffered, interrupt-
driven receipt of characters and selectable XON/XOFF flow control. Full speed
9600 baud operation is possible on 4.77Mhz systems without flow control, but
flow control is required on these systems for 19,200 baud or higher rates. The
IBM PC version will also run on near-clones like the DG/1 that differ from
true PCs only in their choice of UART; non-8250 UARTs are detected automati-
cally, and slower non-interrupt driven Bios serial port i/o is used, in which
case the top speed is in the 1200 baud range.
As of version 2.30, Kermit-MS performs Tektronix 4010 graphics terminal emula-
tion on IBM PC family systems equipped with CGA, EGA, and Hercules graphics
adapters, with either color or monochrome monitors.
Kermit-MS 2.30 runs on the entire IBM PC family (the PC, XT, AT, PCjr, Portable
PC, PC Convertible, PS/2) and compatibles (Compaq, Z150, etc), and there are
also specially tailored versions for non-IBM-compatibles like the DEC Rainbow,
NEC APC, Sanyo MBC, Victor 9000, HP-110, HP-150, HP Portable Plus, and others,
plus a "generic DOS" version that should run (slowly) on any 8086-based MS-DOS
machine. This document concentrates on the IBM version; some of the system-de-
pendent capabilities described here may be lacking in the non-IBM versions.
See section 1.9 for features of different systems.
1.3. Using MS-Kermit
MS-DOS Kermit performs two major functions, terminal emulation and file trans-
fer. Before you can transfer files with another system you must first connect
to it as a terminal, login if necessary, and start up a Kermit program there.
The following example shows this process; the other computer is a Unix system,
but the method is the same with most others. The parts you type are underlined
(if this document was printed on a printer that can underline), and when you
type a command, you terminate it with a carriage return, which you can't see in
the example. The cryptic "^]c" is MS-Kermit's "escape sequence", which you
enter by holding down the Control (Ctrl) key and pressing "]" (right square
bracket), and then typing the letter C. The MS-Kermit program is stored on disk
as KERMIT.EXE.
Program Dialog Explanation
A>kermit
IBM PC Kermit-MS V2.30 Program's greeting.
Type ? for help
Kermit-MS>set speed 1200 Set the right baud rate.
Kermit-MS>connect Connect as a terminal.
(Connecting to host, type ^]C to return to PC.)
ATDT7654321 Dial the modem if necessary.
CONNECT 1200 The modem tells you you're connected.
Now you're talking to the Unix system.
Type a carriage return to get its attention.
Login: christin Login to the host.
password:
% kermit Run Kermit on the host.
C-Kermit>receive Tell it to receive a file.
^]c Escape back to the PC.
Kermit-MS>send autoexec.bat Send a file.
(The file is transferred...)
Kermit-MS> Transfer complete, prompt reappears.
In this example, the user types "kermit", and sees the program's herald and its
prompt, "Kermit-MS>". Then she sets the appropriate communication speed ("baud
rate"), connects as a terminal, issues a dialing command to a Hayes-like modem
(you would skip this step if you had a direct connection), logs in to her ID on
the Unix system which she has dialed, starts "C-Kermit" on the Unix system,
tells it to receive a file, escapes back to the PC, and tells MS-Kermit to send
a file. After the file is transferred, the user would normally connect back to
the Unix system, exit from the Kermit program there, and log out:
Kermit-MS>connect Connect again.
(Connecting to host, type ^]C to return.)
C-Kermit>exit
% ^D Logout from Unix by typing Ctrl-D.
^]c Escape back to PC.
Kermit-MS>exit Return to DOS.
To transfer a file in the other direction, simply exchange the "send" and
"receive" commands above. That's the easiest and quickest way to use Kermit.
If this simple scenario does not work for you, issue the MS-Kermit STATUS com-
mand and look for any obvious incorrect settings (speed, parity), fix them with
SET commands, and try again. (IBM mainframes have so many "different" set-
tings, there's a special command for them, "do ibm", which you would type as
the first Kermit-MS command above.) If that doesn't help, read on. Many
problems can crop up when you attempt to connect two unlike systems over a pos-
sibly hostile communication medium. And if you intend to be a frequent user of
Kermit, there are many options you can take advantage of to adapt MS-Kermit to
different systems, improve its performance, and automate common tasks.
1.4. The MS-DOS File System
The features of the MS-DOS file system of greatest interest to Kermit users are
the form of the file specifications, and the formats of the files themselves.
1.4.1. File Specifications
MS-DOS file specifications (in version 2.0 or later of DOS) are of the form
DEVICE:\PATHNAME\NAME.TYPE
where the DEVICE is a single character identifier (for instance, A for the
first floppy disk, C for the first fixed disk, D for a RAM disk emulator) fol-
lowed by a colon (":"), PATHNAME is up to 63 characters of identifier(s) (up to
8 characters each) surrounded by backslashes ("\"), NAME is an identifier of up
to 8 characters, and TYPE is an identifier of up to 3 characters in length.
Device and pathname may be omitted. The first backslash in the pathname may be
omitted if the specified path is relative to the current directory. In the
path field, "." means the current directory, ".." means the parent directory.
Some DOS implementations (like Wang) may use slash ("/") rather than backslash
as a directory separator.
Pathname is normally omitted, but can be specified in all Kermit-MS commands
(as of version 2.29). Device and directory pathnames, when omitted, default to
either the user's current disk and directory, or to the current directory
search path as specified in the DOS PATH environment variable, depending on the
context in which the file name appears.
When this document says that a file is searched for "in the current
path," it means that Kermit-MS looks on the current disk and directory
first, and if the file is not found, then the directories listed in the
PATH environment variable are searched. If the PATH environment vari-
able is empty, Kermit looks only at the current disk and directory.
NAME.TYPE is sufficient to specify a file on the current disk and directory,
and only this information is sent along by Kermit-MS with an outgoing file.
The device, path, name, and type fields may contain uppercase letters, digits,
and the special characters "-" (dash), "_" (underscore), "$" (dollar sign), "&"
(ampersand), "#" (number sign), "@" (at sign), "!" (exclamation mark), "'"
(single quote), "()" (parentheses), "{}" (curly braces), "^" (caret or
circumflex), "~" (tilde), and "`" (accent grave). Normally, you should confine
your filenames to letters and digits for maximum transportability to non-DOS
systems. When you type lowercase letters in filenames, they are converted
automatically to uppercase. There are no imbedded or trailing spaces. Other
characters may not be included; there is no mechanism for "quoting" otherwise
illegal characters in filenames. The fields of the file specification are set
off from one another by the punctuation indicated above.
The name field is the primary identifier for the file. The type, also called
the extension or suffix, is an indicator which, by convention, tells what kind
of file we have. For instance FOO.BAS is the source of a BASIC program named
FOO; FOO.OBJ might be the relocatable object module produced by compiling
FOO.BAS; FOO.EXE could be an executable program produced by loading FOO.OBJ,
and so forth. .EXE and .COM are the normal suffixes for executable programs.
MS-DOS allows a group of files to be specified in a single file specification
by including the special "wildcard" characters, "*" and "?". A "*" matches any
string of characters from the current position to the end of the field, includ-
ing no characters at all; a "?" matches any single character. Here are some
examples:
*.BAS All files of type BAS (BASIC source files) in the current directory.
FOO.* Files of all types with name FOO.
F*.* All files whose names start with F.
*.? All files whose types are exactly one character long, or have no type
at all.
Wildcard notation is used on many computer systems in similar ways, and it is
the mechanism most commonly used to instruct Kermit to send a group of files.
Users of Kermit-MS should bear in mind that other (non-MS-DOS) systems may use
different wildcard characters. For instance VMS and the DEC-20 use "%" instead
of "?" as the single character wildcard; when using Kermit-MS to request a
wildcard file group from a Kermit-20 server, the DOS "?" must be replaced by
the DEC-20 "%".
1.4.2. File Formats
MS-DOS systems store files as bulk collections of 8-bit bytes, with no par-
ticular distinction among text, program code, and binary files. ASCII text
files consist of lines separated by carriage-return-linefeed sequences (CRLFs),
and this conforms exactly to the way Kermit represents text files during trans-
mission. Since a non-MS-DOS receiving system might need to make distinctions
as to file type, you may need to use various SET functions on the remote system
to inform it that the incoming file is of some particular (non-default) type,
such as binary. In transmitting files between Kermit-MS programs, regardless
of file contents, the receiving MS-DOS system is equally capable of processing
text, code, and data, and in fact requires no knowledge of how the bytes in the
file are to be used. Unlike most other Kermit programs, MS-DOS Kermit does not
require a command like SET FILE TYPE BINARY to switch from text to binary file
transfer. But the Kermit on the other end of the connection probably does!
MS-DOS (unlike CP/M) is capable of pinpointing the end of file with precision
by keeping a byte count in the directory, so one would expect no particular
confusion in this regard. However, certain MS-DOS programs continue to use the
CP/M convention of terminating a text file with a Control-Z character, and
won't operate correctly unless this terminating byte is present. Therefore,
you should be aware of a special SET EOF option for both incoming and outbound
files, described later.
Non-MS-DOS systems may be confused by nonstandard ASCII files sent by
Kermit-MS:
- Files containing any of the 8-bit "extended ASCII" characters will
probably need conversion (or translation) to 7-bit ASCII.
- Files produced by word processing programs like Word Perfect or Word
Star may contain special binary formatting codes, and could need con-
version to conventional 7-bit ASCII format prior to transmission,
using commonly available "exporter" programs.
- Files created by word processors that store formatting data at the
end of the file, after the Control-Z and before physical end, may re-
quire special processing via SET EOF to strip the formatting data,
lest it confuse non-MS-DOS recipients.
- Spreadsheet or database files usually need special formatting to be
meaningful to non-MS-DOS recipients (though they can be transmitted
between MS-DOS systems with Kermit-MS).
- BASIC programs are normally saved in a binary "tokenized" form. Use
BASIC's ",a" SAVE option to save them as regular ASCII text, as in
save"foofa",a
1.5. Program Invocation
Kermit-MS can be run interactively, from a batch file, or as an "external" DOS
command. Commands consist of one or more fields, separated by "whitespace" --
one or more spaces or tabs. Kermit-MS also returns the errorlevel parameter
for batch file tests.
Upon initial startup, the program executes any commands found in the file
MSKERMIT.INI in the current path. This initialization file may contain command
macro definitions, communications settings for one or more ports, or any other
Kermit-MS commands. Here is a sample MSKERMIT.INI file:
comment -- MSKERMIT.INI, MS-DOS Kermit initialization file
comment -- Don't overwrite my files!
set warning on
comment -- Define macros for the systems I use...
define unix set local-echo off,set par non,set flow xon,set timer off
def ibm set par odd,set loc on,set hands xon,set flo none,set tim on
def modem set port 2, set baud 1200
comment -- Define a macro for quickly adapting to noisy connections...
def noisy set block-check 3, set send packet-length 40, set retry 20
comment -- I always start out by connecting to my UNIX system...
set port 1
set baud 4800
do unix
connect
The meanings of these commands will emerge below. For now, just note how you
can use command files (and "macro definitions") to easily adapt MS-Kermit to
widely differing communication environments. A more advanced initialization
file is shown below in section 1.8.
Interactive Operation:
To run Kermit-MS interactively, invoke the program from DOS command level by
typing its name, normally "kermit" (this means the program should be stored in
your path with the name KERMIT.EXE). When you see the program's prompt,
Kermit-MS>
you may type Kermit commands repeatedly until you are ready to exit the
program, as in the following example (which assumes there's already a Kermit
"server" set up on the other end):
A>
A>kermit
IBM PC Kermit-MS V2.30
Type ? for help
Kermit-MS>set speed 19200
Kermit-MS>send foo.*
The files are sent.
Kermit-MS>get bar.*
The requested files are received.
Kermit-MS>exit
A>
A command keyword, such as SEND, RECEIVE, HELP, etc, may be abbreviated, so
long as you have typed enough letters to distinguish it from other keywords
that are valid in that position. For instance, you can type CLE for CLEAR and
CLO for CLOSE. Several common commands even have special non-unique abbrevia-
tions, like C for CONNECT, S for SEND, and R for RECEIVE.
During interactive operation, you may edit the command you're currently typing
using BACKSPACE to erase the character most recently typed, Ctrl-W to delete
the most recent field, or Ctrl-U to delete the entire command. The editing
characters may be used in any combination until the command is finally entered
by typing RETURN (Carriage Return, Enter) or Ctrl-L.
You may use the help ("?") and keyword completion (ESC) features freely while
typing Kermit-MS commands. A question mark typed at almost any point in a com-
mand produces a brief description, or "menu", of what is expected or possible
at that point. ESC typed at any point, except in a local filename, will cause
the current field to be filled out if what you have typed so far is sufficient
to identify it, and will leave you in position to type the next field (or to
type a "?" to find out what the next field is); otherwise, the program will
beep at you and wait for you to type more characters.
Kermit-MS recognizes only 7-bit ASCII characters when examining a Kermit com-
mand line. Therefore, you can't normally enter special characters like car-
riage return, backspace, ESC, question mark, or Ctrl-U as part of the command's
text, nor can you enter 8-bit codes. To get around this restriction, a special
notation is provided for including these characters in commands, called
"backslash numeric form". The character is entered as a backslash ("\") fol-
lowed by a number corresponding to the ASCII code for the character:
\123 a decimal number (decimal is the default number base)
\d249 a decimal number (also \D)
\o177 an octal number (also \O)
\x0d a hexadecimal number (also \X)
Table 1-1 shows all of the 7-bit ASCII codes. Most Kermit commands understand
these codes, both imbedded within character strings, and alone, as when a
single character or number is to be specified.
-------------------------------------------------------------------------------
Dec Name Ctrl Dec Char Dec Char Dec Char
0 NUL ^@ | 32 SP | 64 @ | 96 `
1 SOH ^A | 33 ! | 65 A | 97 a
2 STX ^B | 34 " | 66 B | 98 b
3 ETX ^C | 35 # | 67 C | 99 c
4 EOT ^D | 36 $ | 68 D | 100 d
5 ENQ ^E | 37 % | 69 E | 101 e
6 ACK ^F | 38 & | 70 F | 102 f
7 BEL ^G beep | 39 ' | 71 G | 103 g
8 BS ^H backspace | 40 ( | 72 H | 104 h
9 HT ^I tab | 41 ) | 73 I | 105 i
10 LF ^J linefeed | 42 * | 74 J | 106 j
11 VT ^K | 43 + | 75 K | 107 k
12 FF ^L formfeed | 44 , | 76 L | 108 l
13 CR ^M return | 45 - | 77 M | 109 m
14 SO ^N shift out | 46 . | 78 N | 110 n
15 SI ^O shift in | 47 / | 79 O | 111 o
16 DLE ^P | 48 0 | 80 P | 112 p
17 DC1 ^Q XON | 49 1 | 81 Q | 113 q
18 DC2 ^R | 50 2 | 82 R | 114 r
19 DC3 ^S XOFF | 51 3 | 83 S | 115 s
20 DC4 ^T | 52 4 | 84 T | 116 t
21 NAK ^U | 53 5 | 85 U | 117 u
23 ETB ^W | 54 6 | 86 V | 118 v
22 SYN ^V | 55 7 | 87 W | 119 w
24 CAN ^X | 56 8 | 88 X | 120 x
25 EM ^Y | 57 9 | 89 Y | 121 y
26 SUB ^Z | 58 : | 90 Z | 122 z
27 ESC ^[ escape | 59 ; | 91 [ | 123 {
28 FS ^\ | 60 < | 92 \ | 124 |
29 GS ^] | 61 = | 93 ] | 125 }
30 RS ^^ | 62 > | 94 ^ | 126 ~
31 US ^_ | 63 ? | 95 _ | 127 RUBOUT,DELETE
Table 1-1: The US ASCII Character Set (ANSI X3.4-1977)
-------------------------------------------------------------------------------
Some Kermit-MS commands like GET, SHOW KEY, and SET KEY, may prompt for ad-
ditional information on subsequent lines. If you have reached one of these
prompts and then wish to cancel the command, you may type Control-C.
Summary of Kermit-MS command editing characters:
SPACE Separates fields within the command.
TAB Same as Space, and echoes as Space. You may also use Ctrl-I for
Tab.
BACKSPACE
Deletes the character most recently typed. May be typed repeatedly
to delete all the way back to the prompt. You may also use DELETE,
RUBOUT, Ctrl-H, or equivalent keys.
Ctrl-W Deletes the most recent "word", or field, on the command line. May
be typed repeatedly.
Ctrl-U Deletes the entire command line, back to the prompt.
Ctrl-C Cancels the current command and returns to the "Kermit-MS>" prompt.
Also, terminates execution of a TAKE command file.
ESC If enough characters have been supplied in the current keyword to
identify it uniquely the remainder of the field is supplied and the
cursor is positioned to the next field of the command. Otherwise,
a beep is sounded. ESC does not provide filename completion in
version 2.30.
? Displays a brief message describing what may be typed in the cur-
rent command field. Also, wildcard character for matching any
single character in all but the first position of a filename.
# Wildcard character for matching single characters in filenames.
Equivalent to MS-DOS "?", but used in the first position of a
filename only, so that "?" may be used to get help at the beginning
of a filename field.
RETURN Enters the command. On most keyboards, you may also use ENTER or
Ctrl-M.
Ctrl-L Clears the screen and enters the command.
Liberal use of "?" allows you to feel your way through the commands and their
fields. This feature is sometimes called "menu on demand" or "context sen-
sitive help" -- unlike systems that force you to negotiate menus at every turn,
menu-on-demand provides help only when it is needed.
Command parsing is done through DOS calls. Kermit key redefinition does not
apply at MS-Kermit command level. But ANSI.SYS or other external console
drivers can be used for this purpose, for instance to assign ESC to the PC's
backquote key (ANSI.SYS is the IBM-supplied extended screen and keyboard device
driver, described in the IBM DOS Technical Reference Manual). Other console
drivers available include ProKey, SuperKey, NANSI.SYS (a public-domain replace-
ment for ANSI.SYS), and FANSICONSOLE.
Command Line Invocation:
Kermit-MS may also be invoked with command line arguments from DOS command
level, for instance:
A>kermit send foo.bar
or
A>kermit set port 1, set baud 9600, connect
In this case, help and completion are not available (because the program that
provides them won't start running until after you type the entire command
line), and Kermit-MS will exit back to DOS after completing the specified com-
mand or commands. Therefore, when invoked with command line arguments,
Kermit-MS will behave as if it were an external DOS command, like MODE. Note
that several commands may be given on the command line, separated by commas.
This can't be done interactively or from TAKE command files.
Batch Operation:
Like other MS-DOS programs, Kermit-MS may be operated under batch with command
line arguments. If you invoke it without command line arguments, it will run
interactively, reading commands from the keyboard and not the batch file. When
it exits, batch processing will continue to the end of the batch file.
Kermit-MS returns the "errorlevel" parameter used as program exit status.
Present values are in the range 0 to 7 with three areas yielding success or
failure reports for the entire Kermit session. The errorlevel values are:
errorlevel Kermit session status
0 entirely successful operation
1 a Send command completed unsuccessfully
2 a Receive or GET command completed unsuccessfully
4 a REMOTE command completed unsuccessfully
3,5,6,7 combinations (addition) of the above conditions
Note that failures are remembered for the whole session and are not canceled by
a following successful operation of the same type. Thus, sending several files
individually yields an errorlevel of 0 only if all the files were sent success-
fully.
Remote Operation:
The MS-DOS CTTY command allows an MS-DOS system to be used from a terminal con-
nected to its communication port. Such sessions must be conducted with great
care, since many programs assume that they are running on the real console, and
explicitly reference screen memory or keyboard scan codes. Kermit can be used
in this manner too, but before you give it any file transfer commands, you must
inform it that it is running in "remote mode" rather than its normal "local
mode." Use the SET REMOTE ON command for this purpose, to prevent the file
transfer display from being sent out the port.
@@@@@@@@@@@@@@@@@@@@ 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]tr@thumper.bellcore.com (tom reingold) (12/31/87)
@@@@@@@@@@@@@@@@@@@@ Cut and concatenate here. @@@@@@@@@@@@@@@@@@@@
Local Area Network Operation:
MS-Kermit 2.30 is capable of using a serial port on another local area network
(LAN) node, so long as that node is running an asynchronous communication serv-
er and you have installed a device driver on your own PC that makes COM1 or
COM2 i/o use the network server. This type of connection works because
MS-Kermit 2.30 (but not earlier releases) on IBM PCs checks the selected port,
COM1 or COM2, to see if it's a real 8250 UART chip, and if it isn't, Kermit
uses only Bios calls for port i/o, and the network routes these through your
network device driver. It may be necessary to switch off a real COM1 or COM2
device to convince Kermit to use the Bios. This style of operation should be
transparent to Kermit, except that not all asynchronous communications servers
utilize this technique.
As of version 2.30, the IBM PC version of Kermit can also communicate directly
with another PC on a local area network through the IBM NetBios emulator dis-
tributed with the LAN. In essence, the LAN substitutes for the serial port,
modem, and other wiring. Kermit running on one user machine can transfer files
with another Kermit also on the network much as if they were connected by
modems, and Kermit can talk with some larger machines the same way. The impor-
tant, and only, network command is
SET PORT NET nodename
which is described in the section on SET commands. Also see the SERVER command
description, and (if you're interested) section 1.16.9 for a technical descrip-
tion.
Kermit can even communicate with some other computers, such as Unix systems,
which accept logins via this remote pathway. The initial startup is the same
as calling a mainframe and logging in except the command SET PORT NET nodename
is used instead of SET PORT COM1. A connection is established with the first
use of the communications circuit, such as CONNECT, REMOTE DIR, SEND, or other
file transfer command.
1.6. Kermit-MS Commands
MS-DOS Kermit supplies most of the commands and features of "ideal" Kermit.
Here's a brief list:
BYE to remote server, exit from MS-Kermit.
CLEAR serial port buffer.
CLOSE log files and stop logging remote session.
COMMENT For including comments in command files.
CONNECT as terminal to remote system.
CWD change local working directory.
DEFINE a macro of Kermit-MS commands.
DELETE local files.
DIRECTORY listing of local files.
DISABLE server recognition of selected commands.
DO a command macro.
ECHO a line of text on the screen.
ENABLE server recognition of selected commands.
EXIT from Kermit-MS.
FINISH Shut down remote server.
GET remote files from server.
HANGUP the phone or network connection.
HELP about Kermit-MS.
INPUT specified string from serial port, for scripts.
LOG remote terminal session and/or packets.
LOGOUT remote server, don't exit from Kermit-MS.
OUTPUT string out serial port, for scripts.
PAUSE between commands.
PUSH to MS-DOS command level.
QUIT from Kermit-MS (same as EXIT).
RECEIVE files from remote Kermit.
REMOTE Prefix for remote file management commands.
RUN an MS-DOS program or command.
SEND files to remote Kermit.
SERVER mode of remote operation.
SET various parameters.
SHOW various parameters.
SPACE inquiry (about disk space).
STATUS inquiry (about settings).
TAKE commands from a file.
TRANSMIT a file "raw" (no error checking).
TYPE a local file on the screen.
VERSION display Kermit-MS program version number.
The remainder of this section concentrates on the commands that have special
form or meaning for MS-DOS Kermit. Not all of the following commands are
necessarily available on all MS-DOS systems, and some of the commands may work
somewhat differently between DOS versions.
The notation used is as follows: Optional fields are in [square brackets],
lists of alternatives are in {curly braces}, separated by vertical bars (|).
Parameters, such as numbers or filenames, are shown in italics (providing the
printer is capable of printing italics), and in dialog examples user typein is
underlined (on printers that can show it) to distinguish it from computer
typeout.
The following sections describe MS-Kermit's commands. Command descriptions may
contain references to other commands that haven't been explained yet. You
might find that this manual makes more sense on a second reading.
1.6.1. Program Management Commands
"Program management" is a rubric for Kermit-MS commands like TAKE, EXIT, HELP,
COMMENT, ECHO, and VERSION, that don't fall into any other category.
HELP simply displays a short help message (the same one, in fact, that you
would see if you typed a question mark in the same place).
VERSION displays the MS-Kermit program version number, which you should know in
case you are reporting bugs or seeking technical assistance.
Other program management commands require a bit more explanation.
The EXIT Command
Syntax: EXIT or QUIT
EXIT and QUIT are synonyms for each other. They cause MS-Kermit to return con-
trol to DOS or whatever program invoked MS-Kermit. The specific actions taken
are:
- Close any open log or other files.
- Close any open network connection.
- Release all memory claimed by the program.
- Disable interrupts for the currently selected communication device.
- Terminate execution.
The serial port RS-232 signals are left alone upon EXIT, so that modem connec-
tions are not broken. Kermit-MS may be restarted with the connection intact.
Use HANGUP to explicitly break a modem connection.
The PUSH Command
Syntax: PUSH
PUSH is similar to EXIT, except it leaves MS-Kermit intact by invoking an
MS-DOS command processor "under" Kermit-MS, either COMMAND.COM or whatever
shell you have specified with COMSPEC (or SHELL, depending on the system) in
your CONFIG.SYS file. You can return to Kermit-MS by typing the MS-DOS EXIT
command, and you will find Kermit-MS as you left it, with all settings intact.
The same function is invoked by the CONNECT escape-level command P. Example:
Kermit-MS>push Push to DOS.
Command v2.11 COMMAND.COM program herald.
C>diskcopy a: b: Run a DOS program.
DISKCOPY dialog here...
C>dir b: More DOS commands...
DOS session continues...
C>exit When done, type DOS EXIT command.
Kermit-MS> Back at Kermit.
The TAKE Command
Syntax: TAKE filespec
The TAKE command gives you way a to collect MS-Kermit commands into a single
file, so that you can execute many commands by typing a single (TAKE) command.
TAKE instructs MS-Kermit to execute commands from the file that you specify.
The current directory is searched for the file first, and then any directories
listed in the PATH environment variable. The command file may include any
valid Kermit-MS commands, including TAKE, but it cannot include characters to
be sent to a remote host after a CONNECT command (use scripts for that,
described below). Execution of a TAKE file may be cancelled by typing
Control-C at the keyboard.
An implicit TAKE command is executed upon the file MSKERMIT.INI whenever you
start MS-Kermit. The MSKERMIT.INI file contains any commands you want to be
executed each time you run Kermit. A sample is shown above, and a more am-
bitious example is shown in section 1.8.
Commands within TAKE files, unlike interactive commands, may include trailing
comments, preceded by semicolons (if a real semicolon is needed in a command,
express it as "\;" and it will not be mistaken for the start of a comment).
set port 2 ; Select the modem port.
set speed 1200 ; Set the baud rate for the modem.
connect ; Conduct a terminal session.
hangup ; Hang up the phone after escaping back.
Note the HANGUP command after CONNECT. The HANGUP command is not executed un-
til after you escape back from your CONNECT session. If this file were called
MODEM.CMD, the following TAKE command would execute it:
Kermit-MS>take modem.cmd
This directs MS-Kermit to find the MODEM.CMD file, open it, execute the com-
mands in it, close it, and return to the MS-Kermit> prompt when done. This
process can take a while on floppy-disk based systems.
Commands from the TAKE file will normally not be displayed on your screen
during execution. If you want to see them as they are executing, you can SET
TAKE-ECHO ON (for instance, at the beginning or end of your MSKERMIT.INI file).
With the echoing ON, comments are also displayed for reference, but the semi-
colon is not shown.
TAKE files may be nested to any reasonable level. A command file that was in-
voked by another command file returns to its invoking command file, rather than
to the MS-Kermit> prompt.
There is currently no parameter substitution mechanism for TAKE files.
Warnings:
- An explicit query mark ("?") in a TAKE file will cause a help message
to be displayed and the rest of the line will be read as another com-
mand.
- Since TAKE file processing discards all characters from a line begin-
ning with the first semicolon, it is normally not possible to include
semicolons as part of the commands themselves, e.g.
get dska:foo.bar;6
To get around this restriction, you may precede such semicolons with
a backslash:
get dska:foo.bar\;6
The ECHO Command
Syntax: ECHO [string]
The ECHO command writes the string to the screen, without adding a carriage
return or line feed. ECHO may be used to report progress during execution of a
TAKE command file, or to issue prompts during the execution of a script.
ECHO Part one completed...\13\10
The numbers at the end are "backslash codes" for ASCII control characters, in
this case carriage return (\13) and linefeed (\10). Since the ECHO command in-
terprets backslash codes, ANSI.SYS and similar console drivers can be
programmed through this command by embedding ANSI escape sequences (see section
1.15.2) in the echo string.
The COMMENT Command
Syntax: COMMENT text
The COMMENT command lets you add comments to a TAKE command file. The word
COMMENT (or any unique prefix thereof) must appear as the first word on the
line. The COMMENT command may also be entered interactively. It has no effect
at all. Comments may also be entered in TAKE files, but not on interactive
command lines, by using the semicolon (";") character. Unlike the COMMENT com-
mand, semicolon comments may appear on the same line as a Kermit command. Ex-
ample:
COMMENT - MS-Kermit command file to connect port 2 to an IBM mainframe
set port 2
set speed 4800 ; Baud rate is 4800
do ibm ; Set parameters for IBM linemode
connect ; Be a terminal
Question marks should not be included in comments, as they will invoke the help
function.
The DEFINE Command
Syntax: DEFINE macro-name [command [, command [, ...]]]
Command macros provide another way of collecting many commands into a single
command. The difference between a macro and a TAKE file is that Kermit keeps
all its macro definitions in memory, and can execute them as many times as you
like, without having to look them up on disk, whereas every time you issue a
TAKE command, Kermit has to access a disk. But... you can have as many TAKE
command files as you like, and they can be as long as you want, whereas
MS-Kermit's memory for storing macro definitions is limited. You can put macro
definitions and DO commands for them in TAKE files (or for that matter, you can
put TAKE commands in macro definitions).
Kermit-MS command macros are constructed with the DEFINE command. Any
Kermit-MS commands may be included. Example:
define telenet set parity mark, set baud 1200, connect
A macro can be undefined by typing an empty DEFINE command for it, like
define telenet
A macro definition may be no longer than 128 characters. Longer definitions
can be accomplished by "chaining." Example:
define setup set port 1, set speed 19200, set par even, do setup2
define setup2 set flo no, set handsh xon, set local on, do setup3
define setup3 set timer on, set terminal color 1 31 45, do setup4
define setup4 set warning on, set incomplete keep, connect
DO SETUP will invoke all of these commands. The commas above stand for the
carriage returns needed by individual commands. Commas must be used to
separate commands in macro definitions; carriage returns (\13) cannot be used.
When control or other special characters are needed in a macro they may be ex-
pressed in backslash number form, \nnn.
The SHOW MACROS command displays the value of all currently defined macros, and
tells how much space is left for further definitions.
The DO Command
Syntax: DO macro-name
A Kermit-MS command macro is invoked using the DO command. For instance,
Kermit-MS comes with a predefined macro to allow convenient setup for IBM
mainframe line-mode communications; to invoke it, you would type DO IBM. The
IBM macro is defined as "set timer on, set local-echo on, set parity mark,
handshake xon, set flow none". You can use the DEFINE command to redefine this
macro or remove the definition altogether.
There is no automatic way to undo the effect of a macro. If you need to ac-
complish this effect, you should define another macro for that purpose. For
instance, to undo the effect of "do ibm" so that you could connect to, say, a
VAX, you could:
def vax set par no, set hand no, set flo x, set tim off, set loc off
Then you can "do ibm" whenever you want to use the IBM system, and "do vax"
whenever you want to use the VAX.
If you wish to view the macro expansion whenever you issue a DO command, you
can SET TAKE-ECHO ON.
Local File Management Commands
These commands are executed on your local PC, and generally invoke DOS ser-
vices. This allows you to perform common DOS functions without leaving Kermit.
All file specifications may include device and/or directory fields. The local
file management commands are:
CWD path
Changes the current working directory to the given path. All
references to local file names without explicit paths will refer to
that path. A drive letter may be included to also change disk drives.
DELETE filespec
Deletes the specified file or files. As in DOS, the names of the
deleted files are not listed, only the message "file(s) deleted" or
"file(s) not found", and if you give the command "delete *.*",
Kermit-MS will prompt "Are you sure?" since DOS is doing the work.
DIRECTORY [filespec]
Lists the names, sizes, and creation dates of files that match the
given file specification. If no filespec is given, the command is
equivalent to DIR *.*. Normal DOS switches are effective.
SPACE Performs the MS-DOS CHKDSK function by running the CHKDSK program from
the current path. CHKDSK summarizes your disk and memory usage.
RUN command
Passes the command line to COMMAND.COM for execution. Any legal DOS
operation is permitted: running a program (perhaps with command line
arguments or i/o redirection), executing a DOS command, or executing a
batch file. The COMMAND.COM file should be in the current path. Ker-
mit is suspended while the command is executed and automatically
resumes afterward. You may even nest RUN KERMIT commands several times
if memory is available. The command will be executed directly by
COMMAND.COM so follow the rules of DOS. Example:
Kermit-MS>run more < kim.txt
TYPE filespec
Displays the specified local file on the screen. Automatic pause is
not available at the end of a page (but see above example for how to
accomplish this). On most systems, Ctrl-S can be used to stop scroll-
ing and Ctrl-Q to continue scrolling.
1.6.2. COMMANDS FOR TERMINAL CONNECTION
The CONNECT command connects your PC as a terminal to the remote system so that
you may conduct a session there, and the HANGUP command may be used to discon-
nect your modem (if you have one) from the remote system. There is presently
no DIAL command; modems may be dialed during CONNECT or by using scripts.
Scripts are described in detail in subsequent sections.
For completeness, the descriptions below contain copious reference to the SET
commands, which let you modify all sorts of terminal and communication
parameters (the SET commands are described in a later section). MS-Kermit is
initially set up with the following parameters, so that you only need to issue
SET commands for those that need to be changed:
PORT 1 (COM1 on the IBM PC family)
TERMINAL VT102 emulation (compatible with VT100)
SPEED Whatever the serial card is currently set to.
PARITY None
FLOW-CONTROL XON/XOFF
HANDSHAKE None
LOCAL-ECHO Off
DISPLAY 7-bit characters
INPUT TRANSLATION Off
ESCAPE Control-Rightbracket
The CONNECT Command
Syntax: CONNECT or C
The CONNECT command establishes an interactive terminal connection to the
remote system using the currently selected communications port (SET PORT COM1
or COM2) with all settings currently in effect for that port, emulating the
currently selected type of terminal.
During CONNECT, the characters you type are sent out the communication port,
and the characters that arrive at the port are displayed on the screen or in-
terpreted by the selected terminal emulator. If you SET LOCAL-ECHO ON,
MS-Kermit will also display the characters you type on the screen.
Before you issue the CONNECT command, be sure to set the correct communication
speed (SET SPEED) and any other necessary communication parameters (e.g. SET
PARITY, SET LOCAL-ECHO). If you have SET DEBUG ON, then (on certain systems,
particularly the IBM PC), terminal emulation will be disabled and received con-
trol characters will be displayed in special notation.
By default, 7-bit ASCII characters are displayed on the screen. If you SET
DISPLAY 8, then 8-bit characters will be used (useful for "national" character
sets). Character translation will be done according to any SET TRANSLATION IN-
PUT and SET KEY commands you have issued. In addition, characters that are
sent to the screen will also be recorded in a disk file or on a printer if you
have issued a LOG SESSION command.
To get back to the PC, type the escape character followed by the letter C (for
"Close connection"). On most MS-DOS systems the escape character is Ctrl-]
(Control-Rightbracket). That means, hold down the Ctrl key, press "]", and
then type the letter C.
Kermit-MS>connect Connect to remote system.
Conduct terminal session here...
^]c Escape back to PC.
Kermit-MS> Prompt reappears.
This is called "escaping back". You can use the SET ESCAPE command to change
the escape character character to something besides "^]", or you can assign the
escaping-back operation to a single key with SET KEY.
You can include the CONNECT command in a TAKE command file, but not "bare" text
to be sent to the remote system during CONNECT (use scripts for that). When a
TAKE file includes a CONNECT command, no further commands will be executed from
the file until after you escape back.
When you CONNECT, the program attempts to raise the DTR and RTS RS-232 signals,
and it takes no specific action to lower them unless you explicitly issue the
HANGUP command; thus you can EXIT from Kermit-MS and restart it without drop-
ping a dialup connection. While CONNECTed, you can communicate directly with
an autodialer or "smart modem" to control the communications line, hang it up,
and the like, for instance, by typing AT commands to a Hayes-like modem.
Kermit-MS>set speed 2400
Kermit-MS>connect
AT Now you're talking to the modem.
OK
ATDT8765432
RINGING
CONNECT 2400
Welcome to ... Now you're talking to the host computer.
Please login:
MS-Kermit makes no attempt to monitor the modem's Carrier Detect (CD) or Data
Set Ready (DSR) signals, and will take no notice if they drop. Thus it is not
possible to automatically terminate a session if the connection is broken
during CONNECT.
When using Kermit to connect two PCs "back to back," SET LOCAL-ECHO ON so that
when you CONNECT to the other PC to send messages to its operator, you can see
what you are typing. Depending on the system, you may have to type a carriage
return and a linefeed (Control-J) at the end of each line in order to make the
display look right.
The HANGUP Command
The HANGUP command attempts to momentarily lower the modem signals DTR and RTS.
It may be used to hang up the phone when dialed up through a modem, or to get
the attention of port contention units or terminal concentrators that operate
in this manner. On direct connections, it will probably have no effect.
On IBM PC systems using a local area network connection, the network session is
fully terminated.
TERMINAL EMULATION
The IBM PC version of Kermit-MS emulates the DEC VT102 terminal by default, and
may also be instructed to emulate the DEC VT52, the Heath/Zenith-19, the
Tektronix 4010 graphics terminal, or no terminal at all, selectable with the
SET TERMINAL command. Emulation of each of these terminals is nearly complete.
VT102 emulation lacks only smooth scroll and 132 column mode (some EGA boards
allow it). Double-height, double-width characters are supported, but simulated
using ordinary characters.
The IBM PC's 40-column (large character) screen mode may be used during CONNECT
if you SET TERMINAL NONE (but you may also have to inform the remote host that
your screen width is 40). This can provide improved readability to visually
impaired persons, but at the expense of terminal emulation. To use 40-column
mode, enter the DOS command "MODE 40" (or CO40 or BW40).
On color monitors, the foreground and background colors may be set using SET
TERMINAL COLOR, and inverse/normal video display may also be selected, along
with many other terminal parameters. A complete list of the commands, default
key configurations, and escape sequences accepted by the IBM PC Kermit terminal
emulator is given in section 1.15. Non-IBM-compatible PCs may have different
terminal emulation options. See section 1.9.
Escape-Level Commands
The escape character, normally Control-], is used to regain the attention of
Kermit-MS during CONNECT (you can change the escape character using SET
ESCAPE). When you type the escape character, Kermit-MS waits for you to follow
it with a single character command. For instance, the single character command
"?" produces a list of available single character commands. This command is
executed immediately; it may not be edited, and the program does not wait for a
carriage return to confirm it. Table 1-2 shows CONNECT escape-level commands
available in Kermit-MS:
-------------------------------------------------------------------------------
? Help -- Lists the available single-character commands.
0 (the digit zero) Transmit a NUL (ASCII 0).
B Transmit a BREAK signal.
L Transmit a Long BREAK signal (on some systems).
C Close the connection and return to Kermit-MS prompt level.
H Hangup the phone by lowering DTR and CTS momentarily.
F File the current screen in the screen dump file.
M Toggle the mode line, i.e. turn it off if it is on or vice versa.
P Push to DOS; get back to CONNECT by typing EXIT.
Q Temporarily quit logging the remote session.
R Resume logging the remote session.
S Show the status of the connection.
^] (or whatever you have set the escape character to be)
Typing the escape character twice sends one copy of it to the connected
host.
Table 1-2: Kermit Single-Character CONNECT Escape Commands
-------------------------------------------------------------------------------
Typing any other character (except the space bar, which is the "null command")
after the escape character will cause Kermit-MS to beep, but will do no harm.
These actions are also Kermit action verbs and can be assigned to single keys.
See SET KEY for details.
The Mode Line
When you first issue the CONNECT command, a message (on some systems, an in-
verse video "mode line") will display the most important facts about the con-
nection you've just established, so that you can quickly diagnose any problems.
Here's what the IBM PC mode line looks like:
Esc-chr:^] help:^]? port:1 speed:9600 parity:odd echo:rem VT102 .... PRN
This shows that the escape character is Ctrl-Rightbracket, that you would type
Ctrl-rightbracket followed by question mark ("^]?") to get help during CONNECT,
that you are connected on port 1 at 9600 baud with odd parity and remote echo,
and that a VT102 terminal is being emulated. The four dots represent the
VT102s LEDs (they turn into the digits 1,2,3,4 when "lit") and PRN will show up
if the printer is activated (e.g. by Ctrl-PrintScreen).
The mode line may be turned on and off using SET MODE, or the CONNECT escape
character followed by the letter M.
Screen Rollback
On the IBM PC and some other systems (see Table 1-4), Kermit-MS provides
several pages of screen memory, which may be scrolled up and down using keys as
shown in Table 1-5. For instance, the IBM PC uses PgUp (previous screen), PgDn
(next screen), Ctrl-PgUp and Ctrl-PgDn (one line at a time). Only lines that
scroll off the top of the screen are saved. When an application clears the
screen, that screen is not saved. These functions and others may be assigned
to different keys with the SET KEY command.
If you have rolled the screen back and a new character must be displayed, it
will normally appear at the current cursor position on the old screen. This is
useful when you are trying to copy something from a previous screen. If you
wish new characters to appear in their proper place on the "newest" screen, you
can SET TERMINAL ROLL ON.
Screen Dump
The screen dump feature writes the contents of the current screen to a file
(KERMIT.SCN unless another file was selected by the SET DUMP command) when the
CONNECT escape-level command F is typed. The screen dump file is appended to
on each successive screen dump, with each screen separated by a formfeed
(Ctrl-L). This feature may be used in conjunction with screen rollback -- a
handy way to recapture screenfuls of laboriously typed-in text after a remote
host has crashed without saving your work. The corresponding action verb is
"dump".
A screen dump differs from a session log in two ways. First, each desired
screen must be manually filed, and second, the screen dump file has been
stripped of any escape sequences, whereas the session log records them (see LOG
SESSION).
Printer Control
During terminal emulation, a locally attached printer may be controlled in the
normal manner, on most systems. Pushing the "Print Screen" key (shifted on
some systems) will cause the current contents of the screen to be printed or
spooled; holding down Ctrl while depressing Print Screen will start or stop the
spooling of incoming characters to the printer. On the IBM PC, the mode line
will show PRN when the printer is activated in this manner. ^P or ^N are sent
to the host during terminal emulation and do not toggle printing as they do
when you're talking directly to DOS. CTRL-Print-Screen can be simulated with
the Kermit-MS LOG PRN and CLOSE commands.
The IBM PC MS-Kermit VT102 terminal emulator also supports full transparent
printing of 8-bit binary bytes. The escape sequence "ESC [ 5 i" turns on
transparent printing, in which all further 8-bit characters are sent directly
to the printer, bypassing the SET TRANSLATION INPUT filter, and are not shown
on the screen. Escape sequence "ESC [ 4 i" turns off transparent printing and
the escape sequence is not sent to the printer. Non-transparent printing is
controlled by the "ESC [ ? 5 i" and "ESC [ ? 4 i" sequences. Such printing
simply duplicates text intended for the screen, excluding escape sequences.
The text also appears on the screen. See section 1.16.6 for technical infor-
mation about MS-Kermit's printer control.
1.6.3. COMMANDS FOR FILE TRANSFER
MS-Kermit's SEND, GET, and RECEIVE invoke the Kermit file transfer protocol for
error-checked transmission of files between MS-Kermit and another Kermit
program on the other end of the connection. There are also commands for "raw"
(no error checking) transfer of files with systems that don't have Kermit
programs: LOG SESSION (for capturing text files on your PC) and TRANSMIT (for
uploading text files to the remote system).
Although MS-Kermit makes no distinction between text and binary files, most
other Kermit programs do. Therefore, before you attempt to transfer binary
files with another type of system (say, a VAX, or an IBM mainframe), be sure to
give the appropriate command -- usually something like SET FILE TYPE BINARY --
to the Kermit on the remote end.
File transfers involving floppy disks will be slow and noisy. Hard disks are
much faster (and quieter), and RAM disks faster still (and totally silent).
But if you store files on a RAM disk, be sure to move them to a real disk be-
fore turning off your PC. And before attempting to transfer files to the PC,
make sure you have enough room on the selected device. Kermit does not provide
a way for you to change disks during a file transfer.
The SEND Command
Syntax: SEND filespec1 [filespec2]
The SEND command causes a file or file group to be sent from the local MS-DOS
system to the Kermit on the remote system. The remote Kermit may be running in
either server or interactive mode; in the latter case, you should already have
given it a RECEIVE command and escaped back to your PC. S is a special
non-unique abbreviation for SEND.
filespec1 may contain the wildcard characters "*" to match zero or more
characters within a field, and/or "#" (first position) or "?" (elsewhere) to
match any single character. If filespec1 contains wildcard characters then all
matching files will be sent, in the same order that MS-DOS would show them in a
directory listing. If filespec1 specifies a single file, you may direct
Kermit-MS to send that file with a different name, given in filespec2. For in-
stance, in the command
Kermit-MS>send foo.bar framus.widget
filespec2 begins with the first nonblank character after filespec1 and ends
with the carriage return; thus it may contain blanks or other unusual charac-
ters that may be appropriate on the target machine. The alphabetic case of
text in filespec2 is preserved in transmission, so if case matters on the tar-
get system, be sure to type filespec2 appropriately.
If the SEND command is specified by itself on the command line, then you will
be prompted separately for the name of the file to send, and the name to send
it under:
Kermit-MS>send
Local Source File: c:\chris\xcom1.txt
Remote Destination File: com1.txt
If a file can't be opened for read access, standard MS-DOS recovery procedures
will take place. For example:
Not ready error reading drive A
Abort, Retry, Ignore?
Kermit remains active even if you select "Abort" (DOS's word, not ours).
Files will be sent with their MS-DOS filename and filetype (for instance
FOO.TXT, no device or pathname). Special characters in the file name are not
converted. If there is no filetype, then only the name will be sent, without
the terminating dot. Each file is sent as is, with no conversions done on the
data, except for possibly stopping at a terminating Control-Z character (see
the SET EOF command).
Once you give Kermit-MS the SEND command, the name of each file will be dis-
played on your screen as the transfer begins. Packet, retry, and other counts
@@@@@@@@@@@@@@@@@@@@ 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]tr@thumper.bellcore.com (tom reingold) (12/31/87)
@@@@@@@@@@@@@@@@@@@@ Cut and concatenate here. @@@@@@@@@@@@@@@@@@@@
will be displayed along with informational messages during the transfer, in the
style specified by SET DISPLAY. If the file is successfully transferred, you
will see "Complete", otherwise there will be an error message. When the
specified operation is done, the program will sound a beep.
Several single-character commands may be given while a file transfer is in
progress:
^X (Control-X) Stop sending the current file and go on to the next one, if
any.
^Z Stop sending this file, and don't send any further files.
^C Return to Kermit-MS command level immediately without sending any kind of
notification to the remote system. (^Z or even ^E is preferable.)
^E Like ^C, but send an Error packet to the remote Kermit in an attempt to
bring it back to server or interactive command level.
CR Simulate a timeout: resend the current packet, or NAK the expected one.
Control-X, Control-Z, and Control-E send the proper protocol messages to the
remote Kermit to bring it gracefully to the desired state. Control-C leaves
the remote Kermit in whatever state it happens to be in, possibly retransmit-
ting its last packet over and over, up to its retry limit. You should only
have to use Control-C in dire emergencies (the remote Kermit is stuck, the
remote system crashed, etc), or at those times when you realize that you have
given a file transfer command to Kermit-MS without first having told the remote
Kermit about it.
The RECEIVE Command
Syntax: RECEIVE [filespec]
The RECEIVE command tells Kermit-MS to receive a file or file group from the
other system. The file is stored under the name it was transmitted with, ex-
cept that any illegal characters are translated to X's. Kermit-MS passively
waits for the file to arrive; this command is not to be used when talking to a
Kermit server (use GET for that). You should already have issued a SEND com-
mand to the remote Kermit and escaped back to Kermit-MS before issuing the
RECEIVE command. R is a special non-unique abbreviation for RECEIVE.
If the optional filespec is provided, the first incoming file will be stored
under that name. If the filespec is really just a path then files are stored
where the path indicates. If it is an actual filename the first incoming file
is renamed and any additional files either overwrite the first (if FILE WARNING
is OFF) or are renamed slightly from the filespec (digits are added to the end
of the main filename part before the dot and extension) if FILE WARNING is ON
(the default). The filespec may include any combination of the following
fields:
Device designator
Store the file on the designated device. If no device designator is
given, store it on the current default device.
Directory path
Store the file in the designated directory. If no path given, store the
file in the current directory.
File name
Store the file under the name given. If no name is given, store it under
the name it was sent under, converted, if necessary, to suit DOS conven-
tions, and modified, if desired, to avoid overwriting any file of the
same name in the same directory.
If an incoming file does not arrive in its entirety, Kermit-MS will normally
discard it and it will not appear in your directory. You may change this be-
havior by using the command SET INCOMPLETE KEEP, which will cause as much of
the file as arrived to be saved on the disk.
The same single-character commands are available as during SEND:
^X Request that the remote Kermit stop sending the current file, and proceed
to the next one immediately. Since this is an optional feature of the
Kermit protocol, the remote Kermit might not honor the request.
^Z Request that the remote Kermit terminate the entire transfer; this is
also an optional feature that may or may not be supported by the remote
Kermit.
^C, ^E, and CR operate in the same way as they do during SEND. In this case,
^E should always do what ^Z is supposed to do.
If WARNING is OFF and you type ^X or ^Z to interrupt the transfer, you'll ei-
ther get a partial new file, or else both the old and the new file of that name
will be lost, depending on SET INCOMPLETE. In any case, when WARNING is off,
files with the same name as incoming files will not survive.
Caution: If an incoming file's name (the part before the dot) corresponds to an
MS-DOS device name, such as NUL, COM1, CON, AUX, or PRN, output will go to that
device, rather than to a file with that name. This is a feature of MS-DOS.
1.6.4. Commands for Raw Uploading and Downloading
MS-Kermit can be used to send files to, or capture files from, remote systems
that do not have Kermit programs available. No error checking or correction is
done, so the results can very likely contain corrupted characters, spurts of
noise, gaps, or extraneous system messages or prompts. The command for upload-
ing is TRANSMIT, and for downloading LOG SESSION.
The TRANSMIT Command
Syntax: TRANSMIT filespec [prompt-character]
The TRANSMIT command provides a basic raw upload (export) facility to send
straight ASCII text files to the host without packets, error checking, or
retransmissions, but using all the currently selected communication parameters
for flow control, parity, etc. Information is read from the disk file a line
at a time, sent out the serial port, and the command waits for a single charac-
ter prompt (normally linefeed) from the host before sending the next file line.
A disk file line ends with carriage-return-linefeed (CRLF), but only the car-
riage return is sent, just as you only type carriage return at the end of a
line, not CR and LF. Most remote systems will echo the CR and then also supply
a LF, which indicates that they have processed the line and are ready for
another one. Setting the prompt to binary zero, \0, makes the TRANSMIT command
proceed without waiting for a prompt.
Typically, before using this command to upload a file, you would start a text
editor on the remote host and put it into text insertion mode. When the file
has been completely transmitted, you would manually enter the required sequence
for getting the editor out of text insertion mode, and then make any necessary
corrections by hand.
If transmission appears to be stuck, you can wake it up by typing a carriage
return on the keyboard. You can cancel the TRANSMIT command by typing a
Control-C. Control-Z's or other control characters in the file may have ad-
verse effects on the host. For this reason, you should use TRANSMIT only for
files that contain 7-bit printing ASCII characters, spaces, tabs, carriage
returns, linefeeds, and formfeeds.
The LOG SESSION Command
Syntax: LOG SESSION [filespec]
The LOG SESSION command lets you copy the characters that appear on your screen
during CONNECT into the specified file on the PC. You can use this command to
download files by displaying (usually with a command like TYPE) the file on the
remote system while logging is in effect. Example:
Kermit-MS>connect
$ type foo.bar Give this command, but don't type CR yet.
^]c Escape back.
Kermit-MS>log sess foo.bar Start logging.
Kermit-MS>connect Connect back.
Now type the carriage return.
This is the file FOO.BAR. The file is displayed on your screen
Blah blah ... and captured into PC file FOO.BAR.
$ The prompt is captured too.
^]c When done, escape back
Kermit-MS>close and close the log file.
The PC file FOO.BAR now contains a (possibly mutilated) copy of the remote
computer's FOO.BAR file. It probably has the remote system's prompt at the
end, which you can edit out. The LOG and CLOSE commands are described further
below, in section 1.6.7.
1.6.5. Kermit Server Commands
Kermit-MS can act as a Kermit server, and can also interact with other Kermit
servers. Normally, the remote Kermit is put into server mode. Then the local
Kermit becomes a "client", and may issue repeated commands to the server with-
out having to connect and escape back repeatedly. Servers can not only trans-
fer files, but can also provide a variety of file management functions. The
SERVER command puts MS-Kermit into server mode, and the DISABLE and ENABLE com-
mands modify the behavior of the server.
Kermit servers respond only to information sent as Kermit protocol packets and
not to ordinary CONNECT-mode commands. When MS-Kermit is the client, it uses
the SEND command (described above) to send files to a server, the GET command
(not RECEIVE) to get files from a server, the REMOTE commands to invoke the
file management functions of the server, and the BYE, FINISH, or LOGOUT com-
mands to shut down the server.
The SERVER Command
Kermit-MS is capable of acting as a full-fledged Kermit server for users coming
in through one of the communication ports or a local area network. To put
Kermit-MS into server mode, first issue any desired SET commands to select and
configure the desired port, then DISABLE any undesired functions, and then type
the SERVER command. Kermit-MS will await all further instructions from the
client Kermit on the other end of the connection, which may be hardwired, or
connected through a network or autoanswer modem. In the following example, a
Kermit server is set up for dialing in:
Kermit-MS>set port 1
Kermit-MS>set baud 1200
Kermit-MS>connect
ATA
OK
^]c
Kermit-MS>set timer on
Kermit-MS>set warning on
Kermit-MS>disable all
Kermit-MS>server
Before putting Kermit in server mode in this case, it was necessary to connect
to the modem (in this example, a Hayes) and put it into autoanswer mode by
typing the ATA command.
MS-Kermit 2.30 server mode supports the following requests:
SEND REMOTE CWD REMOTE SEND
GET REMOTE DELETE REMOTE SPACE
FINISH REMOTE DIRECTORY REMOTE TYPE
BYE REMOTE HELP REMOTE WHO
LOGO REMOTE HOST
REMOTE CWD can be used to change both directories and devices. The REMOTE SEND
command accepts a one line message on the command line which will be displayed
on the operator's console. An MS-Kermit Server can DISABLE recognition of
selected REMOTE commands to help reduce accidents.
CAUTION: The method used for most of the REMOTE commands is to invoke a
task with the user's command line, redirect standard output to a tem-
porary file, $KERMIT$.TMP, send that file back to the remote end, and
then delete the file. Sufficient space must be available to store this
file. To service DOS commands or user tasks the boot drive must hold a
copy of COMMAND.COM. PATH will not be searched (this can be dis-
asterous on a floppy disk based system).
FURTHER CAUTION: Any of these DOS tasks or programs may encounter an
error, and in that case, DOS will generally put the familiar "Abort,
Retry, Ignore?" message on the screen, and will wait for an answer from
the keyboard. This will hang the server until a human comes to the
keyboard and gives a response. The same thing will happen when any
program is invoked that interacts with the real console. For instance,
REMOTE SPACE works by running CHKDSK and if CHKDSK finds something
wrong with the disk while tallying up the space, it will ask (at the
console) if you want to it to be fixed. This, too, will hang the serv-
er.
MORAL: The MS-DOS Kermit server should probably not be used for REMOTE
commands unless someone is around to take care of it when it gets
stuck.
For local network operation, the SET PORT NET command must be issued before the
SERVER command. MS-Kermit then becomes a network-wide server, and other client
Kermits can start a network session with it by using the name of the Kermit
Server, which is shown on the server's screen when SET PORT NET is given. The
Kermit Server accepts connections from other Kermits, but only one at a time.
There may be many Kermit Servers active on the network simultaneously because
each has a unique node name. Operations are exactly the same as with serial
port usage and the session (equivalent to a dialed phone connection) is main-
tained between the pair until too many timeouts occur, or the client Kermit
issues a HANGUP command, exits to DOS, or SETs PORT NET to another node. In
the latter cases, the server remains available for use by other client Kermits.
If a client Kermit issues the BYE or FINISH command, the network server is shut
down (unless it was started with FIN disabled).
The DISABLE and ENABLE Commands
When you leave your PC in server mode for dialup or network access by remote
clients, MS-Kermit gives you the ability to control the client's access for
security reasons. The DISABLE and ENABLE commands provide this control. DIS-
ABLE and ENABLE affect the following functions, with the effect of DISABLEs
noted:
CWD Changing of directories, disabled entirely.
DEL Deletion of files confined to current directory.
DIR Production of directory listings confined to current directory.
FIN Shutting down the server (applies also to BYE) disabled entirely.
GET Getting files from the server confined to current directory.
HOST Execution of all REMOTE HOST (DOS) commands disabled entirely.
SEND Forces files sent to server into current directory.
SPACE Asking the server for a disk space report, disabled.
TYPE REMOTE TYPE files confined to current directory.
ALL All of the above.
For reasons which should be obvious, the Kermit server does not support a
REMOTE ENABLE command!
The GET Command
Syntax: GET remote-filespec
The GET command requests a remote Kermit server to send the file or file group
specified by remote-filespec. This command can be used only when Kermit-MS has
a Kermit server active on the other end of the connection. This means that you
must have CONNECTed to the other system, logged in, run Kermit there, issued
the SERVER command, and escaped back (e.g. "^]C") to the local Kermit-MS (or,
in the case of LAN operation, a Kermit server must be running somewhere on the
network). If the remote Kermit does not have a SERVER command, then you should
use SEND and RECEIVE as described above.
You may use the GET command in a special way to specify a different name for
storing the incoming file. Just type GET alone on a line, and you will be
prompted separately for the remote filespec and the local filespec:
Kermit-MS>get
Remote Source File: com1 txt
Local Destination File: a:xcom1.txt
The local file name may contain a device field, and/or a directory specifica-
tion. Device and directory specifications in the local destination file name
work the same way as in the RECEIVE command.
The remote filespec is any string that can be a legal file specification for
the remote system; it is not parsed or validated locally. It can contain
whatever wildcard or file-group notation is valid on the remote system.
Once the file transfer begins, the GET command behaves exactly like the RECEIVE
command.
Warning: If the remote filespec is to contain a semicolon, and the GET command
is being issued from a TAKE command file, you must prefix the semicolon with a
backslash. Otherwise, all characters beginning with the semicolon will be ig-
nored.
get me.home\;0
1.6.6. Commands for Controlling Remote Kermit Servers
The BYE, FINISH, and LOGOUT commands allow you to shut down a remote Kermit
server:
BYE When communicating with a remote Kermit server, use the BYE command to
shut down the server, log out its job, and exit locally from Kermit-MS
to DOS. On local area networks, BYE also terminates the network ses-
sion.
FINISH Like BYE, FINISH shuts down the remote server. However, FINISH does
not log out the server's job. You are left at Kermit-MS prompt level
so that you can connect back to the job on the remote system. On local
area nets, FINISH shuts down the MS-Kermit server, but in a way that
allows it to be restarted as if no interruption had occurred.
LOGOUT The LOGOUT command is identical to the BYE command, except you will
remain at Kermit-MS prompt level, rather than exit to DOS, so that you
can establish or use another connection.
The REMOTE Commands
The REMOTE keyword is a prefix for a number of commands. It indicates that the
command is to be performed by a remote Kermit server. Not all Kermit servers
are capable of executing all of these commands, and some Kermit servers may be
able to perform functions for which Kermit-MS does not yet have the correspond-
ing commands. In case you send a command the server cannot execute, it will
send back a message stating that the command is unknown to it. If the remote
server can execute the command, it will send the results, if any, to your
screen.
Here are the REMOTE commands that Kermit-MS may issue:
REMOTE CWD [directory]
Ask the server to Change your Working Directory on the remote host,
that is, the default source and destination area for file transfer and
management. You will be prompted for a password, which will not echo
as you type it. If you do not supply a password (i.e. you type only a
carriage return), the server will attempt to access the specified
directory without a password. If you do not supply a directory name,
your default or login directory on the remote system will be assumed
and you will not be prompted for a password.
REMOTE DELETE filespec
Ask the server to delete the specified file or files on the remote sys-
tem. In response, the server may display a list of the files that were
or were not successfully deleted.
REMOTE DIRECTORY [filespec]
Ask the server to display a directory listing of the specified files.
If no files are specified, then the list should include all files in
the current working directory.
REMOTE HELP
Ask the server to list the services it provides.
REMOTE HOST [command]
Ask the server to send the command to the remote system's command
processor for execution.
REMOTE KERMIT command
Send the command to the remote Kermit for interpretation as a Kermit
command in the remote Kermit server's own command syntax. Most Kermit
servers, including Kermit-MS, do not yet recognize REMOTE KERMIT com-
mands.
REMOTE SEND message
Send the one line message to be displayed on the Server's screen.
REMOTE SPACE [directory]
Ask the server to provide a brief summary of disk usage in the
specified area on the remote host or, if none specified, the default or
current area.
REMOTE TYPE filespec
Ask the server to display the contents of the specified remote file or
files on your screen.
REMOTE WHO [who-spec]
Ask the server to list actively logged on users; optional who-spec
qualifies the list and uses the syntax of the server system.
1.6.7. The LOG and CLOSE Commands
Syntax: LOG {PACKET, SESSION} [filespec]
CLOSE
LOG SESSION specifies that your terminal session during CONNECT will be
recorded in the indicated file (whose name defaults to KERMIT.LOG in the cur-
rent directory), with any input character translations applied according to SET
TRANSLATION INPUT. The filespec may include a device specification and/or
directory path. The LOG SESSION command allows you to "capture" files from a
remote system that doesn't have Kermit, as well as to record remote
typescripts. LOG PACKET causes the log file to record all packets in file ex-
changes (DEBUG need not be set ON). Both kinds of logging can be active simul-
taneously but only one filename can be specified -- everything goes to the same
log file. The log is closed when you EXIT from Kermit-MS or when you issue an
explicit CLOSE command.
If the log file already exists then new material is appended to it. Try not to
delete an open log file (CLOSE it first) because DOS will become confused.
During terminal emulation, the LOG command records all the characters that ar-
rive from the remote host in the specified file, including escape sequences.
If you have SET LOCAL-ECHO ON, it will also record the characters you type.
Logging may be suspended and resumed within a terminal session with the CONNECT
escape-level commands Q and R. The log file will be composed of 7-bit ASCII
bytes if (a) PARITY is other than NONE, or (b) DISPLAY is SET to 7. If DISPLAY
is 8 and PARITY is NONE, or if DEBUG is ON, then the log will contain 8-bit
bytes.
You may LOG PRN to cause the logging information to be printed directly on your
printer. Any escape sequences that are sent to the screen are also sent to the
printer.
If you want to record information without imbedded escape sequences, use the
screen dump feature, invoked by the CONNECT escape-level command F, which is
described under the CONNECT command.
1.6.8. The SET Command
Syntax: SET parameter value
or: SET parameter parameter value
The SET command establishes or modifies parameters for file transfer or ter-
minal connection. You can examine their values with the STATUS command. The
following SET commands are available in Kermit-MS:
BAUD Communications port line speed (synonym for SPEED)
BELL Whether to beep at the end of a transaction
BLOCK-CHECK-TYPE Level of error checking for file transfer
DEBUG Display packet contents during file transfer
DEFAULT-DISK Default disk drive for file i/o
DELAY Wait number seconds before Sending a file
DESTINATION Default destination device for incoming files
DISPLAY For selecting the type of file transfer display
DUMP Screen dump file (or device) name
END-OF-LINE Packet termination character
EOF Method for determining or marking end of file
ESCAPE Escape character for CONNECT
FLOW-CONTROL Enable or disable XON/XOFF
HANDSHAKE Half-duplex line turnaround option
INCOMPLETE What to do with an incompletely received file
INPUT Behavior of INPUT command for scripts
KEY Specify key redefinitions
LOCAL-ECHO Specify which computer does the echoing during CONNECT
MODE-LINE Whether to display a mode line during terminal emulation
PARITY Character parity to use
PORT Select a communications port
PROMPT Change the "Kermit-MS>" prompt to something else
RECEIVE Request remote Kermit to use specified parameters
REMOTE For running Kermit-MS interactively from back port
RETRY Packet retransmission threshold
SEND Use the specified parameters during file transfer
SPEED Communications port line speed (synonym for BAUD)
TAKE-ECHO Control echoing of commands from TAKE files
TERMINAL Emulation and parameters
TIMER Enable/disable timeouts during file transfer
TRANSLATION Enable/disable/specify conversion of arriving characters
WARNING Specify how to handle filename collisions
The SET commands are now described in greater detail, in alphabetical order.
SET BAUD
Syntax: SET BAUD number
Set the speed (in bits per second, commonly called baud) of the currently
selected terminal communications port (COM1 by default) to 300, 1200, 1800,
2400, 4800, 9600, 19200, 38400, or other common speed. Both connected systems,
as well as any intervening communication equipment, must be able to support the
specified baud rate, and both systems should be set to the same baud rate.
Some implementations do not support the SET BAUD command. But Kermit-MS leaves
the current communication port settings alone unless you issue explicit SET
commands to change them, so you may use MODE or other DOS programs to establish
the desired settings before running Kermit.
On certain systems, when you first run Kermit after powering the system up, you
may get a message "Unrecognized baud rate". This means that Kermit tried to
read the baud rate from the port and none was set. Simply use SET BAUD (if
available) or the DOS MODE command to set the desired baud rate.
SET SPEED is a synomym for SET BAUD.
SET BELL
Syntax: SET BELL {ON, OFF}
Specifies whether the bell (beeper) should sound upon completion of a file
transfer operation. Normally ON.
SET BLOCK-CHECK-TYPE
Syntax: SET BLOCK-CHECK-TYPE {1, 2, 3}
Selects the error detection method: a 1-character 6-bit checksum (the normal
case), a 2-character 12-bit checksum, or a 3-character 16-bit cyclic redundancy
check (CRC). If the other Kermit program is not capable of type 2 or 3 check-
ing methods, automatic fallback to type 1 will occur. The more secure type 2
and 3 block checks take essentially no more execution time than the simple 1
character checksum. SET BLOCK 3 is a stronger check than SET BLOCK 2. SET
BLOCK 2 or 3 is recommended for use with long packets (see below), noisy com-
munication lines, binary (8-bit data) files, and text files containing critical
data (budgets, grades, etc).
SET DEBUG
Syntax: SET DEBUG {PACKET, SESSION, ON, OFF}
With DEBUG PACKET, Kermit will display packet traffic on your screen during
file transfer. With the normal file transfer display, regular-length packets
sent and received are displayed in fixed-size slots. The display of
extended-length packets, however (see SET RECEIVE PACKET-LENGTH), tends to
overlap. If this bothers you, then also SET DISPLAY SERIAL.
With DEBUG SESSION, during terminal emulation (on the IBM PC, Rainbow, and a
few others), control characters are displayed in uparrow ("^") notation and
characters with the 8th bit set are preceded by the tilde ("~") sign, and your
session log (if any) will record 8-bit bytes, rather than 7-bit ASCII, regard-
less of SET DISPLAY or SET PARITY. Character translation (SET TRANSLATION
INPUT) is not done during session debugging. The effect of SET DEBUG SESSION
during terminal connection can be disconcerting, but it gives you a convenient
line monitor equivalent to a specialized device that costs several thousand
dollars, and it can prove very handy for tracking down data communication
problems.
SET DEBUG ON turns on both SESSION and PACKET debugging, and SET DEBUG OFF
turns them both off.
SET DEFAULT-DISK
Syntax: SET DEFAULT-DISK x:
Specify the default disk drive to use for file transfer, directory listings,
and so forth. Equivalent to typing the DOS command for changing disks (A:, B:,
etc). Affects Kermit and all inferior processes, but when you exit from Ker-
mit, you will still have the same default disk as when you entered.
SET DELAY
Syntax: SET DELAY number
Wait the specified number of seconds before starting a file transfer. Intended
for use when the other side needs appreciable time to become ready, such as
rearranging cables, changing programs, etc., or when MS-DOS Kermit is the
remote Kermit (e.g. after CTTY COM1, SET REMOTE ON). The number is 0 to 63
seconds, normally 0.
SET DESTINATION
Syntax: SET DESTINATION {DISK, PRINTER, SCREEN}
SET DESTINATION PRINTER will cause incoming files to be sent directly to the
printer; SCREEN will send output normally destined for the disk to the screen.
The normal destination is DISK. SET DESTINATION affects only files transferred
with SEND, GET, or RECEIVE; it cannot be used to reroute the output from REMOTE
server commands.
SET DISPLAY
Syntax: SET DISPLAY {QUIET, REGULAR, SERIAL, 7-BIT, 8-BIT}
During file transfer, MS-DOS Kermit's regular display is a formatted screen
whose fields are randomly updated with file names, packet numbers, error
counts, percent done, error messages, and so forth:
Kermit-MS: Version 2.30
File name: FOT.
KBytes transferred: 7
Sending: In progress
Percent done: 52%
Number of packets: 74
Number of retries: 2
Last error: None
Last warning: None
The items in the right-hand column are updated more or less at random. In the
current version, the percent done is filled in only when sending files, not
when receiving.
If you wish to run Kermit-MS interactively through the back port, for instance
after the operator has done CTTY COM1, you must give the command SET REMOTE ON
(which, currently at least, is equivalent to SET DISPLAY QUIET); this sup-
presses the file transfer display screen, so that the display won't interfere
with the file transfer itself. You can also use this command to suppress the
display in local mode, in case you are using a system that allows you to do
other work while file transfer proceeds in the background.
If you have your PC connected to a speaking device (a common practice for
visually impaired people), or you are logging the display screen to a printer
(using DOS ^P or kermit > prn), the random nature of the regular display will
make the results of little use. SET DISPLAY SERIAL is provided for this pur-
pose; it causes the program to report progress "serially" on the screen. In
serial mode, error messages are preceeded with the word "Error" and repeat mes-
sages with the word "Retry". Packets are numbered as dots with every tenth be-
ing a plus sign. The packet display is automatically broken across lines at
every 70th packet. The serial display makes much more sense when spoken than
does the regular display.
The serial display does not show the percent and kilobytes transferred. It is
the default display style for generic MS-DOS Kermit; REGULAR is the default for
all others.
The last two parameters, 7-BIT and 8-BIT, control the size of characters sent
to the screen during terminal emulation. 7-BIT is the default and includes all
ASCII characters. 8-BIT is useful with national and line drawing characters.
SET DUMP
Syntax: SET DUMP filespec
On those systems that support this feature, change the file or device name of
the screen dump file. The normal file name is KERMIT.SCN. See the section on
terminal emulation for details about screen dumps. If the specified file al-
ready exists then new material is appended to old.
SET END-OF-LINE
Syntax: SET END-OF-LINE number
If the remote system needs packets to be terminated by anything other than car-
riage return, specify the decimal value, 0-31, of the desired ASCII character.
Equivalent to SET SEND END-OF-LINE (SET END-OF-LINE is kept only for historical
reasons, and the parameter really should be called END-OF-PACKET anyway.)
SET EOF
Syntax: SET EOF {CTRL-Z, NOCTRL-Z}
Controls how the end of file is handled. CTRL-Z specifies a Control-Z charac-
ter should be appended to the end of an incoming file, unless it already ends
with a Control-Z. Certain MS-DOS text editors and other applications require
files to be in this format. For outbound files, treat the first Control-Z as
the end of the local file, and do not send it or any subsequent characters.
NOCTRL-Z is the default; incoming files are stored, and MS-DOS files are sent,
exactly as is, in their entirety.
SET ESCAPE
Syntax: SET ESCAPE character
Specify the control character you want to use to "escape" from remote connec-
tions back to Kermit-MS. On most systems the default is "^]" (Control-
Rightbracket), which was chosen because it is a character you would otherwise
rarely type.
The character is entered literally after SET ESCAPE or in backslash number form
(\29), and should be chosen from the ASCII control range. It is not possible
to use non-ASCII characters (like function keys) for this purpose (but see SET
KEY for a way around this restriction).
SET FLOW-CONTROL
Syntax: SET FLOW-CONTROL {XON/XOFF, NONE}
Specify the full duplex flow control to be done on the currently selected port.
The options are XON/XOFF and NONE. The specified type of flow control will be
done during both terminal emulation and file transfer. By default, XON/XOFF
flow control is selected. XON/XOFF should not be used on half-duplex (local
echo) connections. If XON/XOFF is used, HANDSHAKE should be set to NONE.
SET HANDSHAKE
Syntax: SET HANDSHAKE {CODE number, BELL, CR, LF, NONE, XOFF, XON}
@@@@@@@@@@@@@@@@@@@@ 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]tr@thumper.bellcore.com (tom reingold) (12/31/87)
@@@@@@@@@@@@@@@@@@@@ Cut and concatenate here. @@@@@@@@@@@@@@@@@@@@
Specify any half-duplex line turnaround handshake character for the currently
selected port. The CODE number form allows any ASCII character to be specified
by its decimal ASCII code. The specified handshaking is done during file
transfer only. Handshake is NONE by default; if set to other than NONE, then
FLOW-CONTROL should be set to NONE. In operation the handshake character is
sought at the end of each received packet, following the normal END-OF-LINE
character, but is not sent for outgoing packets.
SET INCOMPLETE
Syntax: SET INCOMPLETE {DISCARD, KEEP}
Specifies what to do with files that arrive incompletely: discard them or keep
them. They are normally discarded.
SET INPUT
Syntax: SET INPUT {CASE, DEFAULT-TIMEOUT, ECHO, TIMEOUT-ACTION}
SET INPUT controls the behavior of the script INPUT command (see the section on
scripts for more information):
SET INPUT CASE {IGNORE, OBSERVE}
Says whether or not to distinguish upper and lower case letters
when doing a matchup in the INPUT command. OBSERVE causes up-
per and lower case letters to be distinguished. The default is
to IGNORE case distinctions.
SET INPUT DEFAULT-TIMEOUT seconds
Changes the waiting time from 1 second to this new value.
SET INPUT ECHO {ON, OFF}:
Show on the screen characters read from the serial port during
the script operation, or not. Default is ON, show them.
SET INPUT TIMEOUT-ACTION {PROCEED, QUIT}
Determines whether or not the current script file is to be con-
tinued or exited if a timeout occurs. PROCEED is the default
and means that timeouts are ignored. QUIT causes the current
script file to be exited and control passed to either the next
higher level script file (if there is one) or to Kermit's main
prompt.
SET KEY
Syntax: SET KEY {[key-specifier [key-definition]], ON, OFF, CLEAR}
WARNING: The format and functions of this command have changed substan-
tially since version 2.29B and earlier. The changes were made in order
to allow key redefinition to work on a wider variety of systems and
keyboards without customization of the program source code for each
configuration. See section 1.10 for further details.
The SET KEY command is one of the most useful -- and confusing -- features of
MS-Kermit. Typical uses:
- You're used to having the ESC key in the upper left corner of the
keyboard, but your new PC keyboard has an accent grave ("`") there.
You can use SET KEY to make the accent key transmit an ESC, and you
can assign accent grave to some other key.
- You send a lot of electronic mail, and always sign it the same way.
You can put your "signature" on a single key to save yourself a lot
of repetitive typing.
- You must set up your PC's function keys or numeric keypad to work
properly with a host application.
The SET KEY command does these things and more, and SHOW KEY gives us assis-
tance. A key can be defined to:
- send a single character other than what it would normally send,
- send a string of multiple characters,
- invoke a CONNECT-mode Kermit action verb,
- send itself again.
SET KEY specifies that when the designated key is struck during terminal emula-
tion, the specified character or string is sent or the specified Kermit action
verb is performed. Key definitions operate only during CONNECT, not at
Kermit-MS> or DOS command level.
The key-specifier is the identification of the key expressed in system-depend-
ent terms. This can be a letter, such as Q for the key which emits an upper
case Q, or the numeric ASCII value of the letter in backslash notation (e.g.
"\81"), or else the numerical "scan code" observed by the system when the key
is pressed (e.g. "\3856" for Ctrl-Alt-Q on an IBM PC). Material printed on
keycaps is not necessarily a guide to what the key-specifier should be. When
the word CLEAR is used in place of a key-specifier, all key definitions are
cleared and then any built-in definitions are restored.
A string definition is one or more characters, including 8-bit values expressed
in backslash form, such as
SET KEY \315 top \13 list\13 IBM F1 key sends "top <cr> list<cr>"
SET KEY S L S key sends upper case L
SET KEY T \27[m T key sends three bytes ESC [ m
The string begins with the first non-spacing character following the key iden-
tification and continues until the end of line, exclusive of any trailing
spaces. If a semicolon comment is used and the definition is given in a TAKE
file, the line ends at the last non-spacing character before the semicolon.
Curly braces, {...}, can be use to delimit the string in case you want the
definition to include trailing spaces. All text after the closing bracket is
ignored.
SET KEY \315 {login } this extra text is ignored
This manual does not contain a list of all the scan codes for all the keys on
all the keyboards on all the PCs supported by MS-Kermit -- that would be a
manual in itself. Rather, in order to obtain the key-specifier for the SET KEY
command, you must type a SHOW KEY command and press the desired key or key com-
bination. This will report a scan code that you can use as the key specifier
in a SET KEY command. To do this for many keys is a laborious process, so you
should collect all your SET KEY commands into a file, which you can TAKE, or
put them in your MSKERMIT.INI file.
If you enter SET KEY by itself, with no key specifier, the command will prompt
you to press the selected key and again for the definition string. Certain
characters, like ESC and CR, may not be entered literally into the string, but
can be included by inserting escape codes of the form \nnn, a backslash fol-
lowed by a 1- to 4-digit number corresponding to the ASCII value of the desired
character. Where an ASCII digit follows directly after a backslash number,
confusion can be avoided by placing curly braces {} around the backslashed num-
ber; thus, \{27}5 represents the two ASCII characters ESC 5.
Here is an example of the use of SET KEY to assign ESC (ASCII 27) to the accent
grave key. First the user gets the key-specifier for the key:
Kermit-MS>show key
Push key to be shown (? shows all): `
ASCII char: ` \96 decimal is defined as
Self, no translation.
Free space: 145 keys and 96 string definitions, 894 string characters.
The free space report says that 145 more keys may be redefined, and up to 96 of
them may have multi-character strings assigned to them (as opposed to single
characters), and that there are 984 bytes left for these strings, in total.
Confident that there is enough space left for a new key definition, the user
proceeds:
Kermit-MS>set key
Push key to be defined: `
Enter new definition: \27
Once a key definition is constructed and tested, it may be entered on a single
line in a command file (such as MSKERMIT.INI):
set key \96 \27
To prevent accidents, SET KEY shows the current definition before asking for a
new one; enter a Control-C to keep the current definition, or a carriage return
to undefine the key, or a query mark (?) to see available choices.
A more exact definition of SET KEY follows these construction rules:
SET KEY [<key-ident><whitespace><definition>]
where
<key-ident> is:
- a single ordinary printable ASCII character, or
- the numerical equivalent of an ASCII character (ESC is \27), or
- a scan code written as a backslashed number (e.g. \3856 for
Ctrl-Alt-Q), or
- keyword SCAN followed by a backslashed scan code number
(obsolete), or
- keyword CLEAR which removes all current key definitions and then
restores any built-in definitions.
- ? (a question mark), which displays a help message.
Scan codes, non-printing ASCII characters, 8-bit characters, and other bi-
nary codes are written in backslash form (see Table 1-1 for ASCII codes):
\123 a decimal number (decimal is the default number base)
\d789 a decimal number (also \D)
\o177 an octal number (also \O)
\x0d a hexadecimal number (also \X)
\{b###} braces around material following the slash, where the
numerical base letter b is d, o, x, or absent.
<whitespace> is one or more spaces and or tabs.
<definition> is:
missing altogether which "undefines" a key.
\number (a number in backslash notation between 0 and 255 decimal)
- assigns a character with the corresponding 8-bit value.
\Kverb for a Kermit action verb; upper or lower case K is OK.
\{Kverb} Same. Verb is the name of an action verb.
text a string with allowed embedded whitespace and embedded bi-
nary chars as above. This kind of string may not commence
with sequences \K or \{K. The string begins with the first
non-whitespace character and ends at the end of the line
(exclusive of trailing spaces and comments).
{text} string confined to material within but excluding the
braces. Note, where the number of opening braces exceeds
the number of closing braces the end of line terminates the
string:
{ab{}{{c}d ==> ab{}{{c}d
but
{ab}{{c}d ==> ab
? Displays help message and lists all action verbs.
Control-C Quits the Set Key command without making changes.
Curly braces can be used to separate backslash numbers from regular ASCII text,
such as when we want to send the two bytes ESC 8 (ESC is decimal 27):
SET KEY T \{27}8 T key sends ESC 8
SET KEY L {words \{27}8 more words} trailing junk to be ignored
If a string begins with a left curly brace then Kermit counts them and ends the
string on the matching right curly brace (or end of line); the SET KEY L ex-
ample above relies on brace matching to omit the trailing comment. The outer
curly brace delimiters are not sent but the inner ones are; for example:
SET KEY U {a {b}\{27}8} sends the 7 bytes "a {b}ESC8"
SET KEY U a{ {b}\{27}8} sends the 9 bytes "a{ {b}ESC8}"
SET KEY U a{ {b}\{{27}}8} sends the 15 bytes "a{ {b}\{{27}}8}"
A definition is removed, that is a key is defined as itself, by giving an empty
definition:
SET KEY q q key sends q again
SET KEY \331 IBM left arrow key is undefined.
The keyboard can be restored to its startup state, that is all redefinitions
removed and all built-in defitions restored, by using the keyword CLEAR in
place of the key identification:
SET KEY CLEAR
Undefined keys which do not send ASCII characters are trapped by the keyboard
translator and are rejected; a beep results from using an undefined non-ASCII
key.
SET KEY OFF disables the key definition mechanism entirely, but leaves the cur-
rent definitions in place. SET KEY OFF also directs MS-Kermit to read keycodes
from DOS, rather than BIOS, so that console drivers like ANSI.SYS that operate
at the DOS level, may be used during Kermit CONNECT sessions. This would also
apply to any special keyboards that come with DOS-level drivers. SET KEY ON
turns key definition back on, and returns Kermit to processing keystrokes at
the BIOS level.
Kermit Action Verbs:
An action verb is the shorthand expression for a named Kermit procedure, such
as "generate the proper sequence for a left arrow," "show status," "send a
BREAK," and others; verbs are complex actions and each verb has a name. In a
key definition the verb name is preceeded by backslash K (\K) to avoid being
confused with a string. Verbs and strings cannot be used together on a key.
SET KEY \331 \Klfarr
SET KEY \2349 \Kexit
makes the IBM keyboard left arrow key execute the verb named lfarr which sends
the proper escape sequence for a VT102 left arrow key (which changes depending
on the internal state of the VT102). The leading \K identifies the definition
as a Kermit verb, so no string can start as \K or as \{K in upper or lower case
(use \92K). The second example has Alt-X invoking the Leave-Connect-Mode verb
"exit" (same as Kermit escape character "^]" followed by C).
Each system has its own list of verbs and predefined keys. Table 1-3 shows
those available for the IBM PC family (there are also some additional verbs for
reassigning Heath or VT100 function keys, see section 1.15.1). The SET KEY
command shows the list of available verbs when a query mark (?) is given as a
definition. SHOW KEY displays all currently defined keys or individually
selected ones; SHOW KEY can be executed only interactively.
-------------------------------------------------------------------------------
Verb Meaning
\Kupscn Roll up (back) to previous screen
\Kdnscn Roll down (forward) to next screen
\Khomscn Roll up to top of screen memory
\Kendscn Roll down to end of screen memory (current position)
\Kupone Roll screen up one line
\Kdnone Roll screen down one line
\Kprtscn Print the current screen
\Kdump Append the current screen to dump file
\Klogoff Turn off session logging
\Klogon Turn on session logging
\Ktermtype Toggle terminal type
\Kreset Reset terminal emulator to initial state
\Kmodeline Toggle modeline off/on
\Kbreak Send a BREAK signal
\Klbreak Send a "long BREAK" signal
\Khangup Drop DTR so modem will hang up phone
\Knull Send a null (ASCII 0)
\Kdos "Push" to DOS
\Khelp Display CONNECT help message
\Kstatus Display STATUS message
\Kexit Escape back from CONNECT mode
\Kgold,\Kpf1 VT102 keypad function key PF1
\Kpf2..\Kpf4 VT102 keypad function keys
\Kkp0..\Kkp9 VT102 keypad numeric keys
\Kkpdot,\Kkpminus,\Kkpcoma,\Kkpenter Other VT102 keypad keys
\Kuparr,\Kdnarr,\Klfarr,\Krtarr VT102 cursor (arrow) keys
Table 1-3: Kermit-MS Verbs for the IBM PC Family
-------------------------------------------------------------------------------
Some systems have preset key definitions when Kermit first begins (those for
the IBM PC are shown in section 1.15.1). You can find out what they are on
your system by typing SHOW KEY, and then question mark on the next line. You
may supplement or change the predefined keys with SET KEY commands typed inter-
actively or in MSKERMIT.INI or other command files.
The MS-Kermit CONNECT command may be used in conjunction with certain console
drivers that do their own key redefinitions. Since MS-Kermit intercepts
keystrokes at the BIOS level, drivers like ANSI.SYS which work at the DOS level
will have no effect during CONNECT, even though they work at MS-Kermit command
level. Other drivers, like SuperKey and ProKey, work at the BIOS level, and
their key assignments will remain effective during Kermit terminal sessions,
and additional Kermit SET KEY assignments may be made "on top" of them.
SET LOCAL-ECHO
Syntax: SET LOCAL-ECHO {ON, OFF}
Specify how characters are echoed during terminal emulation on the currently
selected port. ON specifies that characters are to be echoed by Kermit-MS
(because neither the remote computer nor the communications circuitry will be
echoing), and is appropriate for half-duplex connections. LOCAL-ECHO is OFF by
default, for full-duplex, remote echo operation.
SET MODE-LINE
Syntax: SET MODE-LINE {ON, OFF}
On systems, like the IBM PC family, which are capable of displaying a status,
or "mode" line on the 25th line during terminal connection, disable or enable
this function. This command has no effect on systems that do not display a
mode line during connect.
The mode line shows several important facts about the connection, like which
port is being used, the baud rate and parity, the current escape character,
etc. When the mode line is enabled, it may be turned on and off using the CON-
NECT escape-level command M or the Kermit verb "modeline".
The mode line occupies the 25th line of those systems that have such a thing,
and is not affected by scrolling (on some systems that have large screens, the
mode line should appear on whatever the bottom line is, e.g. the 43rd). When
emulating a VT102 or Heath-19, Kermit will allow the host to address the 25th
line directly using cursor positioning commands. If this happens, Kermit will
remove its mode line and relinquish control of the 25th line to the host (as if
you had typed SET MODE OFF). When no terminal is being emulated, the 25th line
(if any) is available for scrolling. If the mode line is disabled by an ap-
plication or by the command SET MODE OFF then the only way to revive Kermit's
mode line display is to give the command SET MODE ON. On IBM systems support-
ing different length displays, the host needs to address the bottom line ex-
plicitly. Also, note the line is saved and restored when CONNECT mode is
exited and reentered so an old "fossil" mode line may reappear unexpectedly.
If this happens, you can escape back to the Kermit prompt, say SET MODE ON,
CONNECT, and toggle it off ("^]M") to clear the line.
SET PARITY
Syntax: SET PARITY {EVEN, ODD, MARK, SPACE, NONE}
Specify the character parity to be used on the currently selected port. NONE
means no parity processing is done, and the 8th bit of each character can be
used for data when transmitting binary files. This is the normal case. If
parity is other than none, then there will be 7 data bits (use of parity with 8
data bits is not supported).
You will need to SET PARITY to ODD, EVEN, MARK, or possibly SPACE when com-
municating with a system, or over a network, or through modems, concentrators,
multiplexers, or front ends that require or impose character parity on the com-
munication line. For instance, Telenet normally uses MARK parity. If you
neglect to SET PARITY when the communications equipment requires it, the
symptom may be that terminal emulation works (well or maybe only partially),
but file transfer or script INPUT commands do not work at all.
If parity is in use, then the display during terminal emulation, as well as any
session log, will be 7-bit ASCII, unless you have SET DEBUG ON (q.v.).
There may be situations in which you require 7-bit ASCII with no parity during
terminal emulation, but still want to force 8th bit prefixing during file
transfer. To accomplish this, SET PARITY SPACE.
The INPUT and TRANSMIT commands use 7 or 8 bits if parity is NONE, according to
the SET DISPLAY command, and this may upset recognition of received characters
when the host unexpectedly sends them with its own parity.
If you have set parity to ODD, EVEN, MARK, or SPACE, then Kermit-MS will re-
quest that binary files be transferred using 8th-bit-prefixing. If the other
Kermit knows how to do 8th-bit-prefixing (this is an optional feature of the
Kermit protocol, and some implementations of Kermit don't have it), then binary
files can be transmitted successfully. If NONE is specified, 8th-bit-prefixing
will not be requested. Note that there is no advantage to using parity. It
reduces Kermit's file transfer efficiency without providing additional error
detection. The SET PARITY command is provided only to allow Kermit to adapt to
conditions where parity is required, or 8-bit transmission is otherwise
thwarted.
SET PORT
Syntax: SET PORT {number, COM1, COM2, NET [nodename]}
On machines with more than one communications port, select the port to use for
file transfer and CONNECT. This command lets you use a different asynchronous
adapter, or switch between two or more simultaneous remote sessions. Sub-
sequent SET BAUD, PARITY, HANDSHAKE, FLOW, and LOCAL-ECHO commands will apply
to this port only -- each port remembers its own parameters, so that you may
set them for each port and then switch between ports conveniently with the SET
PORT command.
SET PORT 1 selects COM1, SET PORT 2 selects COM2. All versions default to port
1, except for the IBM PCjr, which uses port 2 if its internal modem is in-
stalled. Additionally, COM3 and COM4 are supported for IBM PC's if the system
is informed of their presence (as explained in section 1.16.5).
In "generic" MS-DOS Kermit, the following alternate forms allow you to experi-
ment with device names or numbers until you find the communication port:
SET PORT {DEVICE, FILE-HANDLE}
Just type a carriage return after either of these commands, and you will be
prompted for a device name or a numeric port-handle. Keep trying till you find
one that works. File-handle 3, the system auxillary device, is conventional on
many machines, as are device names COM1, COM2, and AUX.
MS-Kermit for the IBM PC family is able to operate over local area networks
through the NetBios interface. The command
SET PORT NET [nodename]
redirects communications the LAN board installed in the local computer and the
associated NetBios emulator software, if active, rather than the serial port or
the COM device driver. It installs a unique Kermit node name in the local LAN,
so that other nodes can refer to it when files are transferred or terminal
emulation is done. This name is displayed when you give the SET PORT NET com-
mand.
Both the regular serial port and a network connection can be kept alive simul-
taneously; clearly, only one can be used at a time under MS-DOS. MS-DOS 3.x is
not required for Kermit network usage, but most LANS do need DOS 3.1 or later
for conventional file server work. Kermit needs only the NetBios emulator net-
work software.
SET PROMPT
Syntax: SET PROMPT [string]
This command allows you to change the MS-DOS Kermit program's prompt. The
string may be enclosed in curly braces. Control characters like ESC can be in-
cluded as backslashed numbers like "(\27)". ANSI.SYS and similar console
drivers can be programmed through this command. The string must be less than
128 characters. If the string is omitted (missing) Kermit's original prompt of
"Kermit-MS>" is restored.
SET RECEIVE
Syntax: SET RECEIVE parameter value
This command lets you modify the ways in which MS-Kermit asks the other Kermit
to behave. That is, it controls the file transfer protocol options for packets
sent to MS-Kermit by the other Kermit. The parameters and values you specify
in the SET RECEIVE command are sent to the other Kermit during initial negotia-
tions.
END-OF-LINE number
ASCII value of packet terminator to look for on incoming packets. Nor-
mally carriage return. Use this command if the other Kermit is ter-
minating its packets with some other control character.
PACKET-LENGTH number
Ask the remote Kermit to use the specified maximum length for packets
that it sends to Kermit-MS. The normal length is 94 bytes. Use this
command to shorten packets if the communication line is noisy or ter-
minal buffers somewhere along the path are too small. Shorter packets
decrease the probability that a particular packet will be corrupted,
and will reduce the retransmission overhead when corruption occurs, but
will increase the protocol overhead.
If a length greater than 94 is specified, a protocol option called
"long packets" will be used, provided the other Kermit also supports
it. Kermit-MS handles extended-length packets up to 1000 bytes long.
Long Packets can improve efficiency by reducing the per-packet overhead
for a file, but they will not be used unless you issue this command.
Before using this option, ensure that the equipment on the communica-
tions pathway can absorb a long packet, and that the connection is
clean (retransmission of long packets is expensive!). You should also
SET BLOCK-CHECK 2 or 3 for more reliable error checking.
PADCHAR number
Ask the remote Kermit to use the given control character (expressed as
a decimal number 0-31, or 127) for interpacket padding. Kermit-MS
should never require any padding.
PADDING number
Ask the remote Kermit to insert the given number of padding characters
before each packet it sends. MS-Kermit never needs padding, but this
mechanism might be required to keep some intervening communication
equipment happy.
START-OF-PACKET number
If the remote Kermit will be marking the beginning of packets with a
control character other than Control-A, use this command to tell
Kermit-MS about it (the number should be the decimal ASCII value of a
control character). This will be necessary only if the hosts or com-
munication equipment involved cannot pass a Control-A through as data,
or if some piece of communication equipment is echoing packets back at
you.
TIMEOUT number
Ask the remote Kermit to time out after the given number of seconds if
a packet expected from Kermit-MS has not arrived. Use this command to
change the other Kermit's normal timeout interval.
SET REMOTE
Syntax: SET REMOTE {ON, OFF}
SET REMOTE ON removes the file transfer display (as if you had given the com-
mand SET DISPLAY QUIET). It should be used when you are running Kermit-MS in
remote mode when coming in from another PC through the Kermit-MS's "back port",
to which the console has been reassigned using the DOS CTTY command, e.g.
CTTY COM1
It is necessary to issue the SET REMOTE ON command because (a) Kermit-MS has no
way of knowing that its console has been redirected, and (b) when the console
is the same as the port, the file transfer display will interfere with the file
transfer itself. SET REMOTE OFF returns the file transfer display to its
preferred style (REGULAR or SERIAL). When you SET REMOTE ON, you might also
want to SET DELAY 5 or thereabouts, to allow yourself time to escape back to
the local system before MS-Kermit starts sending packets.
WARNING: During CTTY console redirection, many programs still output to the
real screen and require input from the real keyboard and will hang the system
until keyboard requests are satisfied. On the IBM PC, CTTY CON returns control
to the normal keyboard and screen (other systems may use other device names).
See section 1.16.7 for further details about remote operation.
SET RETRY
Syntax: SET RETRY number
Sets the number of times a packet is retransmitted before the protocol gives
up. The number of retries can be between 1 and 63, and is 5 by default. This
is an especially useful parameter when the communications line is noisy or the
remote host is very busy. The initial packet of a file exchange is given three
times as many retries to allow both systems to become ready.
SET SEND
Syntax: SET SEND parameter value
The SET SEND command is used primarily to override negotiated protocol options,
or to establish them before they are negotiated.
END-OF-LINE number
ASCII value of packet terminator to put on outbound packets. Normally
carriage return. Use this command if the other Kermit needs its pack-
ets terminated with a nonstandard control character.
PACKET-LENGTH number
Use this as the maximum length for outbound packets. Normally, you
would use this command only to send shorter packets than the other Ker-
mit requests, because you know something the other Kermit doesn't know,
e.g. there's a device on the communication path with small buffers.
PADCHAR number
Use the specified control character for interpacket padding. Some
hosts may require some padding characters (normally NUL or DEL) before
a packet, and certain front ends or other communication equipment may
need certain control characters to put them in the right modes. The
number is the ASCII decimal value of the padding character, (0 - 31, or
127).
PADDING number
How many copies of the pad character to send before each packet, nor-
mally zero.
PAUSE number
How many milliseconds to pause before sending each packet, 0-127, nor-
mally zero. This helps half-duplex systems prepare for reception of
our packet. Padding characters are sent only after the time limit ex-
pires.
QUOTE number
Use the indicated printable character for prefixing (quoting) control
characters and other prefix characters. The only reason to change this
would be for sending a very long file that contains very many "#"
characters (the normal control prefix) as data.
START-OF-PACKET number
Mark the beginning of outbound packets with some control character
other than Control-A. This will be necessary if the remote host or the
communication channel cannot accept a Control-A as data, or if it
echoes back your packets. The remote host must have been given the
corresponding SET SEND START-OF-PACKET command.
TIMEOUT number
Change Kermit-MS's normal timeout interval; this command is effective
only if TIMER is set to be ON; it is normally ON so that both Kermits
can control timeouts. When the timer is ON, the default interval is 13
seconds.
SET SPEED
Syntax: SET SPEED rate
Same as SET BAUD, q.v.
SET TAKE-ECHO
Syntax: SET TAKE-ECHO {ON, OFF}
Specifies whether screen display should occur during implicit or explicit TAKE
operations on MSKERMIT.INI or other Kermit-MS command files, and during evalua-
tion of macro definitions by the DO command. Handy for finding errors.
SET TERMINAL
Syntax: SET TERMINAL parameter [value]
This command controls most aspects of terminal emulation. Most of the
parameters are only settable (or meaningful) on the IBM PC family and com-
patibles. (Programmers who are proficient on other MS-DOS systems are invited
to fill in these functions for those systems and send the results back to
Columbia.) On systems, built-in setup modes or DOS commands can be used to ac-
complish the same functions.
The first group of parameters tells which kind of terminal to emulate. When
Kermit-MS uses its built-in software for emulation, incoming characters are ex-
amined for screen control commands (escape sequences) specific to that ter-
minal, and if encountered, the commands are executed on the PC screen.
NONE Act as a dumb terminal. All incoming characters will be sent to the
screen "bare", as-is, through DOS. If you have loaded a device driver
into DOS for the CON device, such as ANSI.SYS, then that driver will be
able to interpret the codes itself. Many non-IBM systems have their
own screen control code interpreter built into DOS or firmware, or
available as a loadable device driver.
VT52 The DEC VT-52 terminal.
HEATH The Heath/Zenith-19 terminal (H19), which supports all the VT52 com-
mands, plus line and character insert/delete editing functions, an ANSI
mode, and a 25th line.
VT102 The DEC VT102 (ANSI) terminal, which is the same as a VT100 but also
supports line/character insert/delete editing functions and ANSI
printer controls.
TEK A Tektronix 4010 graphics terminal. Currently only available on IBM,
TI, and Victor PCs. On the IBM family, Kermit automatically senses and
adapts to the CGA, EGA, or Hercules color board.
The specific escape sequences supported by Kermit for each of these terminal
types are listed in section 1.15. Note that when a Kermit program includes
Tektronix emulation, it is invoked automatically while in character mode
(VT102, VT52, or Heath emulation) when the emulator receives the escape se-
quence ESC Ctrl-L. The emulator returns to character mode upon receipt of
Ctrl-X. On color systems, foreground and background screen colors during
Tektronix emulation obey the SET TERMINAL COLOR settings. If sufficient memory
is available on the graphics board, the graphics screen will be preserved
across CONNECT sessions.
The remaining SET TERMINAL commands specify setup options for the selected ter-
minal:
CHARACTER-SET {UK, US}
UK displays "#" (ASCII 35, number sign) as a pound sterling sign, US
displays "#" as "#". This command applies during VT100/102 emulation.
COLOR number [, number [, number]]
Several numbers, applied in left to right sequence, separated by commas
@@@@@@@@@@@@@@@@@@@@ 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]tr@thumper.bellcore.com (tom reingold) (12/31/87)
@@@@@@@@@@@@@@@@@@@@ Cut and concatenate here. @@@@@@@@@@@@@@@@@@@@
or spaces:
0 Reset the colors to normal intensity white characters on a black
background and use the "no-snow" mode on the IBM Color Graphics
Adapter (CGA).
1 High intensity foreground
10 Request fast screen updating for use on the IBM Mono, EGA, or PGA
(usually sensed and set internally by Kermit), and some non-IBM
CGAs.
3x Foreground color
4x Background color
where x is a single digit from 0 to 7, which is the sum of the desired
colors:
1 Red
2 Green
4 Blue
Example: 0, 1, 37, 44 on an IBM CGA would produce bold white characters
on a blue field with no snow. The snow removal business has to do with
whether the program should synchronize with vertical retrace when up-
dating screen memory. This is necessary with certain color adaptors
(like the CGA) and unnecessary for others (like the EGA).
CURSOR-STYLE {BLOCK, UNDERLINE}
Sets the cursor rendition to your preference. Note that on some early
IBM PCs and compatibles, the cursor may not be restored correctly after
escaping back from CONNECT because of a bug in the early IBM BIOS.
KEYCLICK {ON, OFF}
Turns electronic keyclick ON or OFF. If your keyboard has a mechanical
clicker (as IBM boards do), you may not notice the effect of this com-
mand.
MARGIN-BELL {ON, OFF}
Controls whether the bell should be sounded when the cursor passes
column 72 near the right screen margin; wider displays set the bell 8
columns from the right edge.
NEWLINE-MODE {ON, OFF}
ON sends a carriage-return-linefeed combination (CRLF) when you type
carriage return (CR) during terminal emulation. OFF (default) just
sends a CR when you type CR.
ROLL {ON, OFF}
ON unrolls the screen to the bottom before adding new material if the
screen had been rolled back, e.g. by Ctrl-PgUp. ROLL OFF (the default)
displays new material on the current screen, possibly overwriting old
material.
SCREEN-BACKGROUND {NORMAL, REVERSE}
NORMAL means dark background, light characters. REVERSE means light
background, dark characters.
TAB {AT n, CLEAR AT n, CLEAR ALL}
Sets tab stops or clears one or all tab stops; n is the numeric posi-
tion of the tab to be set or cleared. By default, tabs are every 8
spaces, at positions 9, 17, 25, etc. Only meaningful when emulating a
terminal that has settable tabs (the VT52 doesn't really but the
emulator can set them anyway). More than one tabstop may be specified
by separating column numbers with commas, spaces, or tabs. 132 columns
are supported.
WRAP {ON, OFF}
ON automatically breaks screen lines (by inserting a CRLF) when they
reach the right margin. OFF disables wrapping -- if a line is too
long, the excess characters go off the screen. WRAP is OFF by default,
since most hosts format lines to fit on your screen.
SET TIMER
Syntax: SET TIMER {ON, OFF}
This command enables or disables the timer that is used during file transfer to
break deadlocks that occur when expected packets do not arrive. By default,
the timer is ON. If the other Kermit is providing timeouts, you can safely
turn the timer OFF to avoid packet collisions that might occur when two timers
go off simultaneously.
SET TRANSLATION
Syntax: SET TRANSLATION INPUT {ON, OFF, char1 char2}
This command provides multi-language support (and perhaps other special
effects) during CONNECT, but not during file transfer or at MS-Kermit command
level. A character that arrives at the communication port (char1) will be
translated to another character (char2) before display on the screen. As many
as 256 characters may have translations specified concurrently. But to see
characters with ASCII values higher than 127, you must also SET DISPLAY 8 and
SET PARITY NONE. Translation has no effect during file transfers. It is ap-
plied to the INPUT, OUTPUT, PAUSE, and TRANSMIT script commands.
SET TRANSLATION INPUT ON enables translation (the keyword INPUT is required to
allow future translation mechanisms). OFF disables the translation and is the
default. So even if you have set up a translation table, you must SET TRANS-
LATION INPUT ON before it will take effect. SHOW TRANSLATION tells whether
translation is OFF or ON, and displays any current table entries.
Translation table entries are made by specifying byte pairs in ASCII or numeri-
cal backslash form:
SET TRANS INPUT \3 \13
converts incoming ASCII ETX characters (decimal 3) to ASCII CR (decimal 13).
8-bit values are allowed, and refer to characters in the "upper half" of the
PC's character set, either the ROM characters supplied with the PC or else sub-
stitutions provided by a special device driver.
A more practical example shows how the user of a German PC could use the SET
TRANSLATION and SET KEY commands to make the PC's umlaut-a key (key code 132)
send a left curly brace ("{", ASCII 123), and to display incoming curly braces
as umlaut-a's:
SET KEY \d132 \d123
SET TRANS INP { \d132
(This example applies to the IBM PC German keyboard, and assumes the German
keyboard driver, KEYBGR, has been loaded. This is usually done in
AUTOEXEC.BAT.)
SET WARNING
Syntax: SET WARNING {ON, OFF}
Specify what to do when an incoming file is about to be stored under the same
name as an existing file in the target device and directory. If ON, Kermit
will warn you when an incoming file has the same name as an existing file, and
automatically rename the incoming file (as indicated in the warning message) so
as not to destroy (overwrite) any existing one. If OFF, the pre-existing file
is destroyed, even if the incoming file does not arrive completely. WARNING is
ON by default as a safety measure.
The new name is formed by adding numbers to the part of the name before the
dot. For instance, ABC.TXT becomes ABC00001.TXT, ABC00001.TXT becomes
ABC00002.TXT, etc.
The STATUS Command
Syntax: STATUS
The STATUS command displays the values of all the current SET options. There
are currently no operands for the STATUS command. It always displays all the
options, and the display fills the screen.
The SHOW Command
Syntax: SHOW option
Most parameters that may be altered with SET commands are displayed by the
STATUS command. The SHOW command is used for displaying macro definitions, key
redefinitions, file transfer statistics, and translations.
SHOW MACROS
displays the definitions of all currently defined macros, as well as
the amount of space left for new macro definitions.
SHOW KEY
allows you to determine a key's identification code and what it will
send in CONNECT mode, most useful for obtaining the identification of a
key when SET KEY commands will be placed in a TAKE FILE. This command
can be done only interactively (use a ? to see all defined keys).
Refer to the terminal emulation section for examples.
SHOW MODEM
displays the status of the modem signals DSR (dataset ready, modem
tells the PC that it is turned on and in data mode), CTS (clear to
send, modem grants the PC permission to send data), and CD (carrier
detect, local modem tells the PC that it is connected to the remote
modem).
SHOW STATISTICS
displays counts of characters sent and received during file transfers,
for both the most recent transfer and the entire session, and an es-
timate of the average baud rate while sending and listening.
SHOW TRANSLATION
displays the entries in the 256 byte input translation table. Values
are expressed numerically to avoid confusion with different display
adapters, and the command shows only entries for which input and output
codes differ.
1.7. SCRIPTS
A script is a file containing Kermit commands to be executed. It is the same
as a TAKE file, in Kermit terminology, but includes INPUT, OUTPUT, PAUSE, ECHO,
and CLEAR commands to automatically detect and respond to information flowing
though the serial port, actions which otherwise would be performed by the user
during CONNECT. The login sequence of a host computer is a classical example.
The script commands INPUT, OUTPUT, PAUSE, and ECHO may be terminated by typing
Control-C at the keyboard.
The CLEAR command
Syntax: CLEAR
The CLEAR command flushes the buffers of the serial port to forget any earlier
material and help the INPUT command with a clean start. (This command was
called CLRINP in 2.29B and earlier, and CLEAR was used to erase macro and key
definition memory).
The INPUT command
Syntax: INPUT [timeout] {search-string | @filespec}
INPUT is the most powerful of the script commands. It reads characters from
the serial port continuously until one of two things occurs: the received
characters match the search string or the time limit expires. Matching strings
is the normal use, as in
Kermit-MS>input 5 Login please:
to recognize the phrase "Login please:", or else time out after trying for 5
seconds. A special binary character \255 or \o377 or \xFF stands for the com-
bination carriage return and a line feed, in either order, to simplify pattern
matching. Be aware of characters arriving with parity set because the pattern
matching considers all 8 bits of a byte unless the local parity is other than
NONE or SET DISPLAY 7 is active.
The INPUT and OUTPUT commands have a special syntax to replace the normal
string with text obtained from a file or device:
OUTPUT @filespec
INPUT @filespec
Both forms read one line of text from the file or device and use it as the
desired string. A common use is to wait for a password prompt and then read
the password from the console keyboard. A string starts with the first
non-spacing character and ends at either the end of line or, if executed within
a TAKE file, at a semicolon. Indirectly obtained strings, the @filespec form,
read the first line of the file up to but not including the explicit carriage
return. Note if a trailing carriage return is needed it must be expressed
numerically, such as \13 decimal.
The behavior of the INPUT command can be controlled by SET INPUT parameters:
CASE, TIMEOUT-ACTION, DEFAULT-TIMEOUT, and ECHO. If the TIMEOUT-ACTION is
PROCEED then failure to match strings is ignored and the script continues with
the next command. Otherwise, QUIT causes the current script file to be exited
immediately; the next higher level script file or the Kermit prompt is done
next. CASE controls whether upper and lower case letters should be considered
the same during matching. DEFAULT-TIMEOUT supplies a different default for how
long to wait, in case an explicit value is not given in the INPUT command.
Finally, ECHO controls displaying of serial port data during matching and
during the other script commands.
When a script fails because an INPUT command did not encounter the desired
string within the timeout interval, the message is "?Not confirmed".
The OUTPUT command
Syntax: OUTPUT {string | @filespec}
The OUTPUT command writes the indicated character string to the serial port as
ordinary text. The string may contain control or other special binary charac-
ters by representing them in the backslash numerical form. Carriage Return
(CR), for example, is \13 decimal, \o15 octal, or \x0D hexadecimal. The string
may use 8-bit characters if the communications parity is type NONE.
The OUTPUT string may not contain Kermit CONNECT-mode action verbs, but it does
recognize a special code \b or \B, which causes a BREAK signal to be trans-
mitted.
The string to be transmitted starts with the first non-spacing character after
the OUTPUT command and ends at either the end of line or, if executed within a
TAKE file, at a semicolon (if you need to output a semicolon from within a TAKE
file, use backslash notation, e.g. "\59"). Indirectly obtained strings, the
@filespec form, read the first line of the file up to but not including the ex-
plicit carriage return.
As a convenience, text arriving at the serial port during the OUTPUT command is
shown on the screen if SET INPUT-ECHO is ON, and stored in a 128-byte internal
buffer for rereading by a following INPUT command.
The PAUSE command
Syntax: PAUSE [number]
PAUSE simply waits one or more seconds before Kermit executes the next script
command. Pauses are frequently necessary to avoid overdriving the host and to
let a modem proceed through a dialing sequence without interruptions from Ker-
mit. The default waiting time is set by SET INPUT DEFAULT-TIMEOUT and is nor-
mally one second. The optional integer number selects the number of seconds to
pause for this command. An explicit value of zero produces a pause of just a
few milliseconds which can be useful in some situations.
Text arriving during the PAUSE interval is shown on the screen, if SET
INPUT-ECHO is ON, and stored in a 128-byte internal buffer for rereading by a
following INPUT command.
Script Examples
Here's a simple script file that dials a Hayes modem and logs in to a computer,
prompting the user for her password, and then connects as a terminal.
CLEAR
SET SPEED 1200
OUTPUT AT\13 ; Wakeup modem.
PAUSE 2 ; Let it get ready.
INPUT OK ; Its response.
OUTPUT ATDT 9,555-1212\13 ; Dial the phone.
INPUT 30 CONNECT ; Wait for connection.
PAUSE 2 ; Breathing space for modems.
OUTPUT \13 ; Send carriage returns to
PAUSE 2 ; awaken host, wait 2 secs
OUTPUT \13 ; between them.
INPUT 15 Please login: ; Get expected prompt.
OUTPUT Sari\13 ; Send username and CR.
SET INPUT ECHO OFF ; Privacy, please.
INPUT Enter password: ; Quietly wait for this.
ECHO Type your password now. ; Make our own prompt.
OUTPUT @CON ; Send console keystrokes.
OUTPUT \13 ; Add a real carriage return
SET INPUT ECHO ON ; Go verbose again.
CONNECT ; Start terminal emulation
Notice the semicolons used to indicate comments in TAKE files. If these same
commands were typed by hand at the Kermit prompt the semicolon material would
be considered part of a string! Typing a Control-C will interrupt and ter-
minate any of the commands.
The MS-Kermit script package maintains a small memory buffer to allow the INPUT
command to inspect characters received during the previous few script commands.
CLEAR removes them and any others in a lower level main serial port buffer.
As with any TAKE file, scripts can be nested by using the TAKE command within a
script. If an INPUT command fails to obtain a match and uses the QUIT option
or if the script simply finishes normally the TAKE file is exited and control
resumes where it left off in the next higher TAKE file or at the Kermit prompt.
A slightly more complicated combination of DOS Batch and Kermit Script files is
given below (see your DOS manual for an explanation of the batch file syntax).
The purpose is to allow a user to say "SEND filename" at the DOS prompt. The
DOS batch shell, SEND.BAT, and the login script, KX, are combined to login to a
VAX through a data switch, run VMS Kermit in server mode, transfer the file,
submit it to VMS Mail, delete the disk file, shut down the server and logout
from the VAX, and report the overall transfer status. The user is asked to
provide a password interactively.
File SEND.BAT, DOS batch program:
echo off
Rem Kermit, one-line file mailer, by Joe Doupnik.
Rem Logon to VAX, run Kermit, Send user's file,
Rem post via MAIL, logout from VAX.
if ".%2" == "." goto usage
if exist %1 goto proceed
echo No file to send!
:usage
echo Usage is SEND filename username
goto done
:proceed
echo Logging onto the Vax ...
kermit take kx,send %1,pau,rem host mail %1 %2,rem del %1\;0,pau 2,bye,
if errorlevel 3 goto badrem
if errorlevel 2 goto badrcv
if errorlevel 1 goto badsnd
echo File(s) "%1" has been mailed to %2.
goto done
:badrem
echo Mail did not cooperate!
:badrcv
echo Receive failed!
goto done
:badsnd
echo Send failed!
goto done
:done
echo on
File KX, Kermit script:
Comment Login script for VAXA via Micom data PBX Switch.
set input timeout quit
set input echo off
set display quiet
output \13
comment - The keywords "slowly." and "CLASS" are part of...
comment - the switch's prompt string
input 10 slowly.
input 10 CLASS
pause
comment - Tell the Switch, very slowly, that we want to connect...
comment - to machine vaxa and then look for the beep response.
output v
output a
output x
output a
output \13
pause
input 5 \7
comment - Done with Switch, wake up the VAX and log in.
pause
output \13
pause
input 5 Username:
set input timeout proceed
output MYNAME\13
input 2 Password:
comment - Notice we prompt ourselves and then...
comment - read the password from the console.
echo Enter password:
output @con
comment - use spaces to hide the information which DOS echos.
echo {\13 } ; this should be enough
comment - send a real carriage return at the end of the password.
output \13
comment - Expect ESC Z from the VAX's Set Term/Inquire...
comment - Respond ESC [ <query symbol> 6 ; 2 c (say we are VT102).
comment - An explicit query symbol (decimal 63) would invoke help,
comment - even in this comment, and a bare semicolon would
comment - make the rest of the response be a comment.
input 15 \27Z
output \27[\{63}6\;2c
comment Look for VMS dollar sign prompt
input 15 $
comment Start VMS Kermit and place it in server mode
output Kermit\13
pause 2
output server\13
comment - allow server's message to finish, "machine." appears twice.
input 10 machine.
input 10 machine.
pause
Scripts are illustrated further in the next section.
1.8. Initialization Files Revisited
At Columbia University, we have IBM 370-series mainframes running VM/CMS,
DECSYSTEM-20 mainframes running TOPS-20, a VAX 8700 running Unix. All of these
systems are accessible through a Gandalf PACX port contention unit. The IBM
systems have two different kinds of front ends, a COMTEN 3695 (similar to IBM
3705) for linemode half-duplex connections, and various Series/1-style protocol
converters (including the 7171 and 4994) for full-screen, full-duplex 3270
emulation, all of which use various combinations of parity and other settings.
The following MSKERMIT.INI file was composed by Vace Kundakci of Columbia to
automate the task of switching among all these systems. It illustrates the
creative use of macros and scripts. Numerous site- and system-dependent key
definitions have been omitted.
; MSKERMIT.INI for IBM PC/AT Kermit 2.30
COMMENT - INPUT command defaults for scripts
set inp tim quit
set inp echo off
set inp case observe
COMMENT - Macros for connecting to PACX and selecting various systems
def cu20b do pacx,o cu20b\13,do 2065
def cu20d do pacx,o cu20d\13,do 2065
def sima do pacx,o sima\13,do 7171
def simb do pacx,o simb\13,do 4994
def cunixc do pacx,o cunixc\13,do 8700
def cuvma do pacx,o cuvm\13,do 3695,o vma\13,do 3083
def cuvmb do pacx,o cuvm\13,do 3695,o vmb\13,do 3083
COMMENT - Macros for logging in to various systems.
def pacx cle,set par e,o \13,i 5 Enter node name =>\32,pau
def 3695 i 5 SWITCHING CHARACTERS:\32\32
def 3083 i 5 ONLINE,o L\32,do pwd,do vml,c
def 8700 i 5 login:\32,do pwd,do dec,c
def 2065 i 5 \13\10\64,o ter vt102\13,do pwd,do dec,c
def 7171 pau,cle,o \13,i 5 TERMINAL TYPE:\32,o vt-100\13,do 3270
def 4994 pau,cle,o \13,i 5 terminal type:\32,pau,o vt100\13,do 3270
def 3270 pau,cle,o \13,o L\32,do pwd,do xed,c
COMMENT - Macros for communicating with various systems
def vml set par m,set k \270 \8,set k \3 \Kbreak,do tty
def xed set par e,set k \270 \8,set k \3,do def
def dec set par n,set k \270 \127,set k \3,do def
def def set tim of,set loc of,set ter wr of,set han non,set flo xon
def tty set tim on,set loc on,set ter wr on,set han xon,set flo non
COMMENT - Macro for obtaining user ID and password
def pwd echo user:,o @con,o \13, do pw2
def pw2 echo Password:\27[8m,o @con,echo \27[0m,o \13
A bit of explanation might clarify some of this. PACX is our port contention
unit. Its output appears in even parity. It prompts us to "Enter node name
=>", and we respond with the name of one of our systems or front ends, like
CU20B or CU20D (DEC-20s), SIMA or SIMB (7171s), CUVMA or CUVMB (IBM mainframes
front ended by COMTEN), or CUNIXC (a VAX). To connect to a given system, Vace
types "do cu20b" or "do sima" to invoke a "connecting" macro. Each of these,
in turn, invokes the PACX macro to navigate through the PACX to the desired
system, and then invokes the appropriate macro (3695, 7171, etc) to get past
any associated front end (e.g. to tell the COMTEN which IBM mainframe is
wanted, or to tell the protocol converter what terminal to emulate), and then
to login on the desired system, prompting on the screen for user ID and
password. Since Vace has ANSI.SYS loaded, the escape sequences shown in the
"pwd" macro disable echoing of the password. Finally, a macro like "vml" (VM
linemode), "xed" (XEDIT, i.e. VM full screen), or "dec" (DEC-20 or VAX) is ex-
ecuted to set the communication parameters for the system just logged in to.
The key definitions that are shown in the "vml", "xed", and "dec" macros assign
the host's character deletion code (backspace or rubout) to the AT's backarrow
key.
1.9. MS-Kermit Features for Different Systems
As noted early on, MS-Kermit was designed primarily for the IBM PC family, and
later adapted to various non-IBM-compatible MS-DOS (and even non-MS-DOS) sys-
tems. Some of these adaptations provide all the features of the IBM PC ver-
sion, others provide only a subset, and still others may include features not
available on the IBM family. These features are all of the system-dependent
variety; the Kermit file transfer protocol should be implemented identically on
all versions of MS-Kermit. The most obvious differences are in the terminal
emulation options and the keyboards. Table 1-4 shows the terminal emulation
options for the systems presently supported by Kermit-MS, and Table 1-5, shows
which keys are used for screen rollback on the various systems supported by
MS-Kermit.
-------------------------------------------------------------------------------
System EscChar Capabilities Terminal Service
ACT Apricot ^] K VT52 ???
DEC Rainbow ^] R P K D VT102 firmware
DECmate/DOS ^] K VT100 ???
Generic DOS ^] K Depends on system
Grid Compass ^] K ???
HP-110 ^] K Dumb terminal
HP-150 ^] R K HP-2623 firmware
IBM PC family ^] R M P K D H19,VT52,VT102,Tek emulation
Intel 3xx ^] K Uses real terminal
NEC APC3 ^] R M P K D H19,VT52,VT102 emulation
NEC APC ^] R P K VT100, ADM3A firmware
Olivetti M24 ^] R M P K D Same as IBM PC
Sanyo MBC55x ^] R M P K D H19,VT52,VT102 emulation
Wang PC ^A K Wang firmware
TI Pro ^] M P K VT100/Tektronix
Victor 9000 Alt-] M P K D H19,VT52,VT102 and/or Tek4010
Zenith Z100 ^] K Heath-19 emulation
R=Rollback, M=Modeline, P=Printer control, K=Key redefinition, D=screen Dump
Table 1-4: Kermit-MS Terminal Emulation Options
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
System Screen Down Line Down Screen Up Line Up
IBM PC PgUp Ctrl-PgUp PgDn Ctrl-PgDn
Rainbow PrevScreen Ctrl-PrevScreen NextScreen Ctrl-NextScreen
HP-150 Prev Shift-UpArrow Next Shift-DownArrow
NEC APC Uparrow Ctrl-UpArrow DownArrow Ctrl-DownArrow
NEC APC3 PgUp Ctrl-PgUp PgDn Ctrl-PgDn
Sanyo 55x PgUp Ctrl-RtArrow PgDn Ctrl-PgDn
The IBM PC also allows use of the Home key to get to the top of its display
memory and End key to get to the bottom, and the keypad minus (-) key to toggle
the mode line on and off. The Rainbow uses Shift-Next-Screen to get to the
bottom of its display memory, but provides no key for moving directly to the
top.
Table 1-5: Kermit-MS Screen Scroll Keys
-------------------------------------------------------------------------------
Another difference is the default communication port, the number of communica-
tion ports supported, and the names given to them. For instance, the IBM PC
family supports COM1 and COM2, and uses COM1 by default (except the PCjr, which
uses COM2 by default unless there is no modem port). MS-Kermit may be per-
suaded to support higher-numbered IBM ports using the method outlined in sec-
tion 1.16.5. For remote operation, IBM's name for the console is CON, so if
you CTTY COM1, you do CTTY CON to put the PC back to normal.
The DEC Rainbow
The DEC Rainbow version of MS-Kermit 2.30 uses the built-in VT102 terminal
firmware and setup modes, and can operate at speeds up to 9600 baud. It has no
25th screen line, and therefore no Kermit mode line during CONNECT. It sup-
ports only the Rainbow's single communication port, and not the printer port,
so SET PORT for the Rainbow is not implemented (but of course the printer may
be used for printing.) The Rainbow may be put in remote mode by CTTY AUX, and
returned to normal with CTTY SCRN. The Rainbow supports several SET TERMINAL
commands: VT102, VT52, and ROLL.
The keypad and cursor keys all work properly in VT102 and VT52 modes and in ap-
plication as well as native states (they never had in previous versions).
Newline mode is activated for received characters (LF ==> CR/LF). Screen roll
back is almost 11 screenfuls. Table 1-6 shows the verb names and default key
assignments for the Rainbow. On the main typewriter keyboard the shifted comma
and period are converted to special keys available for Set Key assignment with-
out impacting the normal unshifted ASCII actions; Shift Lock has no effect on
these keys.
The DECmate II
MS-Kermit for the DECmate II with the XPU option is somewhat similar to Rainbow
Kermit. It uses built-in terminal VT100 firmware and setup modes and baud
rates up to 9600 on the single communication port. The printer port is not
available for communications in this version. There is no mode line, but other
connect-mode escapes are supported, including sending BREAK. Disks A through I
are supported, and the floppy disk format is compatible with the Rainbow. DEC
utilities are available for file conversion between DOS and WPS-8 files.
The NEC APC3
The NEC APC3 version of MS-Kermit assumes that the ANSI.SYS driver has been in-
stalled and that a color monitor is being used; the color graphics option is
not used by Kermit. Although the display should be entirely sensible with a
monochrome system, it has not been tested. Differences from the IBM PC version
include:
SET BAUD: The useful baud rates supported range from 300 to 9600.
SET PORT: The available ports are 1, 2, 3, or their equivalents AUX, AUX2,
AUX3.
SET TERMINAL COLOR: Instead of specifying colors by number, the words BLUE,
RED, MAGENTA, GREEN, CYAN, YELLOW, or WHITE are appropriate. This is the color
-------------------------------------------------------------------------------
Rainbow Key Verb Name Operation
PF1 \Kpf1,\Kgold Keypad function key
PF2..PF4 \Kpf2..\Kpf4 Keypad function keys
keypad 0..9 \Kkp0..\Kkp9 Keypad digit keys
keypad - \Kkpminus Keypad minus key
keypad , \Kkpcoma Keypad commma
keypad . \Kkpdot Keypad dot (period) key
keypad Enter \Kkpenter Keypad Enter key
up arrow \Kuparr Cursor keys
down arrow \Kdnarr
left arrow \Klfarr
right arrow \Krtarr
shift Prev Screen \Khome Rewind to start of screen buffer
shift Next Screen \Kend Unwind to end of screen buffer
ntrol Prev screen \Kupone Backup one screen line
Control Next screen \Kdnone Advance one screen line
Prev screen \Kupscn Backup one screen
Next screen \Kdnscn Advance one screen
Print Screen \Kprtscr Copy screen to printer
Control Print Screen \Ktoggle_prn Toggle echoing screen to printer
(printer failure resets toggle)
Do \Kdump Copy screen to file (KERMIT.SCN)
Break \Kbreak Send a BREAK
Shift Break \Klbreak Send a Long BREAK
Main Screen \KDOS Push to DOS
Help \Khelp Show Connect mode help menu
Exit \Kexit Exit Connect mode
* \Knull send a null out the serial port
* \Khangup hangup phone by dropping DTR & RTS
* \Klogon resume logging, if active
* \Klogof suspend logging
* \Kstatus display status table
* (verbs not pre-assigned to keys)
Table 1-6: Kermit-MS Verbs for the DEC Rainbow
-------------------------------------------------------------------------------
of the text in connect mode; background colors are not available. Monochrome
monitors will respond with display changing from most dim to most bright if the
colors are specified in the order given.
SET TERMINAL KEYCLICK: Not implemented in Kermit; use the NEC provided command.
SET TERMINAL SCREEN-BACKGROUND: Not implemented.
During terminal emulation, screen scroll is handled by the PgUp and PgDn keys.
If used in combination with the Ctrl key, the display moves but one line. If
used in combination with the Fnc key, the display scrolls to the end of the
buffer. The Fnc-INS combination toggles the mode line on/off. The Fnc-DEL
combination toggles the terminal emulation type. The Fnc-Break combination
resets the emulator. The Help key pulls down the connect mode menu. The ANSI
escape sequence for disable/enable cursor is implemented.
1.10. Compatibility with Older Versions of MS-DOS Kermit
The last monolithic (single source file) release of MS-DOS Kermit was 1.20.
Meanwhile, implementations based on versions of this vintage will have at least
the following incompatibilies from the version described here:
- "RECEIVE filespec" is used instead of "GET filespec". There is no
GET command in older versions, and no way to specify a new name for
an incoming file.
@@@@@@@@@@@@@@@@@@@@ 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]tr@thumper.bellcore.com (tom reingold) (12/31/87)
@@@@@@@@@@@@@@@@@@@@ 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<H6@P40j4l6RRH0083l17@PP?`1M@?YSP20o0Ee0nUD0h3l
1WD3jO@3]0VjW03=8L?X4`N0o01h1\H6~20l>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]tr@thumper.bellcore.com (tom reingold) (12/31/87)
@@@@@@@@@@@@@@@@@@@@ Cut and concatenate here. @@@@@@@@@@@@@@@@@@@@
ESC [ > Ps h SM Same as ESC x Ps
ESC [ > Ps l RM Same as ESC y Ps
Plus most of the ANSI escape sequences listed for the VT102.
1.16. More Technical Summaries
Under normal circumstances, MS-Kermit takes advantage of the computer's
hardware, and often bypasses DOS (sometimes even BIOS) to achieve high perfor-
mance, to exercise special machine features, or to produce an attractive screen
display. Thus, it is not in all respects a "well behaved" DOS program.
MS-Kermit redirects interrupts 0BH (COM2/4) or 0CH (COM1/3), 14H, 23H, 24H and
returns them when done. It uses the BIOS for keyboard, video display, and sys-
tem information interrupts. It examines segment 40H for EGA operating modes
and it does direct screen reads and writes. Memory for the screen roll back
buffer is negotiated with DOS to leave room for a second copy of COMMAND.COM to
run tasks within Kermit; about 80KB to 120KB is needed for the entire program.
Video page zero is normally used, but page one is employed to save screens with
non-standard dimensions. Hercules and graphics mode displays are not sup-
ported. Kermit's timing delays are dynamically adjusted each time the serial
port is started to accomodate machines of different speeds; duration of the
normal software timing loop is measured with the hardware timer chip and loop-
ing is adjusted to produce uniform delays on 8088 through 80386 machines.
1.16.1. Use of MS-Kermit in Windowing Environments
Kermit-MS can operate with various environments, such as TopView, DESqview, and
MS Windows. It runs in an active window under MS Windows, accepts cut and
paste material, talks with mice, and shrinks to an icon (a boxed Ker). Con-
struction of .PIF files can proceed by stating that Kermit-MS is unusually well
behaved (not really true of course but it's an effective strategy), does not
use the serial ports (sic! MS Windows), needs from 80KB to 120KB; some ex-
perimenting may be needed for your system. Two items, however: manual screen
roll back does not work well under MS Windows and Windows may object when the
terminal mode screen size is commanded to change.
1.16.2. Use of MS-Kermit with External Device Drivers
1.16.3. Use of Kermit-MS with External Device Drivers
It is often desirable to supplement or modify the behavior of a DOS program by
loading it with special external device drivers. These drivers may operate at
either the DOS or BIOS level. When Kermit-MS accesses the BIOS directly,
DOS-level drivers are ineffective. When Kermit accesses the hardware directly,
both the DOS and the BIOS level drivers are locked out. Kermit-MS provides
several mechanisms to allow these external drivers to operate as intended.
Here are a few examples:
- IBM's ANSI.SYS console driver operates at the DOS level. It allows
the major IBM PC keys to be redefined, and also interprets selected
ANSI-format escape sequences for screen control. It works fine at
Kermit-MS command level, except SHOW KEY does not recognize strings
assigned to keys via ANSI.SYS, and fine at CONNECT level. To use
ANSI.SYS at CONNECT level, issue the Kermit-MS commands SET KEY OFF
(to read keys via DOS) and SET TERMINAL NONE (to display characters
through DOS).
- Blind people often have speaking or Braille machines attached to
their PCs. DOS-level device drivers are generally used to redirect
screen output to these devices, which works OK at DOS or MS-Kermit
command level. SET TERMINAL NONE will allow this redirection to take
place during CONNECT. But these devices also need to have the
computer's output appear as a coherent stream of text, so users
should also take care to inform the remote host to format its output
for a "dumb" or hardcopy terminal. In addition, Kermit-MS' normal
file transfer display does not mesh well with these devices, but that
can be remedied using SET DISPLAY SERIAL.
- People with motor impairments may be using special keyboard replace-
ments supported by DOS-level device drivers. As with ANSI.SYS,
Kermit-MS may be directed to use such keyboard drivers with the com-
mand SET KEY OFF.
- Other keyboard drivers are available that work, like Kermit-MS, at
BIOS level. Examples include ProKey and SuperKey. These may be used
at DOS or Kermit-MS command level as well as during CONNECT.
- Conceivably, drivers exist that allow DOS communication programs to
emulate terminals other than ANSI. You should be able to use them,
if they exist, in conjunction with Kermit-MS by telling Kermit to SET
TERMINAL NONE, but the speed may not be high because of the interven-
ing DOS call.
1.16.4. Treatment of Inbound Characters During Terminal Emulation
Many things can happen to a character that arrives at the communication port
before you see it, depending on all the factors mentioned above. The actual
sequence of events is:
1. Obtain character from serial port
2. Remove high bit if parity is other than none
3. Detect and remove xon/xoff if FLOW is XON/XOFF
4. If DEBUG is active (ON or SESSION) then put character to debug style
display, otherwise:
5. If transparent printing is active (for VT102 emulators) then print
the character but do not show it on the display, otherwise:
6. Remove high-order bit if DISPLAY is 7-bit
7. Translate if TRANSLATE INPUT is ON, but skip this step if an escape
sequence is in progress
8. If LOG SESSION is active then copy character to the log file
9. Pass the character to the terminal emulator for interpretation or
display.
1.16.5. Kermit-MS/IBM Serial Port Information, a Technical Description
Kermit-MS for IBM PC's and compatibles does testing of serial ports before use.
This section describes those tests so users may understand what Kermit does.
When a serial port is selected by the SET PORT COMx command Kermit looks at low
memory addresses in segment 40H assigned to hold the base address of each COMx
port; COM1 is in word 40:0H, COM2 is in word 40:2H, and so on. If the value in
the appropriate word is binary zero then Kermit declares the port to be un-
available. Otherwise, Kermit runs read-only (i.e., safe) tests at the base ad-
dress to validate the presence of an official 8250 UART chip. If the tests fail
Kermit indicates it will do i/o through the slow Bios pathway; some PC clones
need to work this way even though the Bios has speed problems even at 1200
baud. Otherwise, interrupt driven i/o will be done through the 8250 UART (that
is very fast).
The IBM PCjr has a special case when the internal modem is present but a normal
COM1 serial port is not. Kermit detects this situation and makes a copy of the
modem's base address into the COM2 address word at 40:0H so that the modem can
be used as a COM2 device. If both items are present Kermit begins with the
modem on COM2. If the modem is absent, then the serial port on COM1 is chosen.
In other words, Kermit tries to find the modem wherever it is and then calls it
COM2.
Many machines now have more than two serial ports, yet there is no standard
about addresses for COM3 and COM4. PC DOS 3.30 does not assign them either be-
cause it is really a problem of the system ROM Bios boot code run when the
power is turned on. However, Kermit will use COM3 and/or COM4 if the base ad-
dress of a port is placed in low memory words 40:4H (COM3) or 40:6H (COM4); the
tests described above are then carried out. One restriction is that the Inter-
rupt ReQuest number (IRQ in the serial port board manual) must be IRQ4 for COM3
(and for COM1) and IRQ3 for COM4 (and for COM2). Check the board and its
manual. DOS utility DEBUG can be used to create a short program to insert the
board's addresses into the segment 40H memory locations; a sample program is
given below.
-------------------------------------------------------------------------------
Serial Port Base Address IRQ Conventions
COM1 03F8H 4 IBM standard
COM2 02F8H 3 IBM standard
COM3 ? 4 Board, Kermit wants IRQ4
COM4 ? 3 Board, Kermit wants IRQ3
Table 1-7: IBM PC/XT/AT Serial Port Numbers
-------------------------------------------------------------------------------
The addresses shown as query marks are to be found in the board's reference
manual; values such as 2E8H and 2E0H would be common. However, there is no
standard for anything to do with COM3 and COM4.
Assuming that you have selected an address in harmony with the rest of the sys-
tem (good luck on that part), set the board's switches or jumpers, and use
DEBUG to insert the address(es) in segment 40H memory. The example below
creates a small program named SETCOM3.COM to put address 02E8H into the memory
word 40:04H for COM3 and writes the program to drive A. (Disregard the xxxx
items below):
A> DEBUG don't type these comments
-n a:setcom3.com sets name of output file
-a assemble command
xxxx:100 mov ax,40 value 40h
xxxx:103 mov es,ax put it into register es
xxxx:105 mov ah,02 the 02 part of 02E8H
xxxx:107 mov al,e8 the E8 part of same
xxxx:109 es:
xxxx:10A mov [4],ax store in 40:4 for com3 ([6] for com4)>
xxxx:10D int 20 return to DOS
xxxx:10F blank line to end assemble mode
-r cx show contents of register cx
CX 0000
: 0f set register cx to write 0fh bytes
-w write material to the disk file
-q quit debug
A> DEBUG setcom3.com
-u unassemble to see if all is well
-q quit debug
Note, for COM4, use [6] above rather than [4], and of course employ your
board's port address in place of 02E8H. Check the manual.
Finally, try it:
A> setcom3 run the program
A> DEBUG now see what's down there
-d 40:00 display bytes in seg 40H
( Shows many bytes. See yours? Good. )
-q
A
A small side effect noted in practice is the first time the extra port is used
there may be garbage from it. Just return to the Kermit prompt and try again,
if necessary SET PORT to the other COM lines momentarily, all should be well
the second time.
More technical comments, for those with an interest. When Kermit finishes with
a port it disables interrupts for that serial port and the IRQ level since many
devices can share the same Interrupt ReQuest line but only one device at a time
can be active on an IRQ. If you find that transmissions are good but there is
no reception then another device has stolen the IRQ; disable it or find a guru.
Kermit will work with non-standard addresses for COM1 and COM2 but the IRQ's
must be as in the table above. Accessing a non-existent port produces a mes-
sage and all communications are discarded safely in the bit bucket.
1.16.6. Kermit-MS/IBM Printer Control, a Technical Description
Kermit-MS accesses the system printer through DOS calls several ways; neither
the Bios nor the hardware are used. Files directed to the printer by the SET
DESTINATION PRINTER command are written by opening a file with the name PRN
(DOS's name for the system printer) and writing to it the same as to a disk
file; DOS provides limited buffering. LOGging to device PRN works the same
way, as can be noticed by the last line or so not being printed until the log
file is CLOSED. DOS is used again while emulating a terminal in CONNECT mode.
If the VT102 emulator found in the IBM PC is used for transparent or Controller
printing (via arcane escape sequences sent from the host) single characters are
written to DOS file handle 4, the DOS standard print device. If the screen is
echoed to the printer via the typical Control PrtSc key combination, or equiv-
alent, single characters are written by the DOS function 05H Printer Output
call. In both cases of terminal emulation the printer's ready status is found
by the DOS IOCTL 44H call. Only the Control PrtSc case results in the PRN mes-
sage being displayed on the status line. Finally, the classical IBM PC Shift
PrtSc command to copy the whole screen to the printer is unknown to Kermit be-
cause the system Bios traps the key combination and does not tell Kermit about
it. If the Control P command is given to DOS before Kermit starts then again
characters are echoed by the system Bios without Kermit's knowledge; this
situation can result in lost characters.
Print spoolers generally operate by being told an existing filename and then in
the background they steal cpu cycles to read from disk and write to the
printer. The DOS PRINT command invokes such a spooler. Although an active
Kermit does not feed these software programs directly the spooler and Kermit
can compete for cpu cycles and characters can be lost. If a non-DOS resident
program intercepts characters destined for the printer device and spools them
Kermit does not know about it and similar competion can occur.
During file transfers printing is carefully sequenced to occur only when the
local Kermit is in control of the communications line so that a small pause
will not result in missing characters arriving at the serial port. When ter-
minal emulation is active then printing competes for cpu time with the serial
port routines. Generally, the serial port wins such contests if the port is
interrupt driven (Generic Kermit is not interrupt driven, so beware). However,
the printing itself can use enough cpu cycles to delay processing of characters
to the screen and eventually the receive buffer of the serial port fills to the
high water mark and an XOFF flow control character is sent to the host to
suspend further transmissions until we send an XON. If FLOW is NONE then ex-
pect lost characters at the serial port. Experience with ordinary IBM PC's
through 80386 machines at very high baud rates indicates no characters are lost
when FLOW is XON/XOFF. However, it is possible on some machines for the
printer to have priority over the serial port, and hence to have lost charac-
ters, especially if a Terminate Stay Resident program intercepts characters
destined for the printer and keeps interrupts turned off too long.
1.16.7. CTTY COMx for IBM Machines
The DOS command CTTY COMx redirects the standard input and output from the
keyboard and screen, respectively, to the indicated communications channel. If
a Kermit Server is operated this way, "through the back port", then both DOS
and Kermit can access the port hardware simultaneously; a deadlock develops on
IBM machines. The items below refer to only the IBM version of Kermit-MS.
Kermit-MS/IBM version 2.30 successfully resolves the deadlock in the following
manner. When Kermit requires the serial port it also attaches itself to Inter-
rupt 14H, the Bios RS232 serial port routine. Code within Kermit receives the
DOS serial port requests via Interrupt 14H and either passes the request to the
Bios if the COM line is not that used by Kermit or it handles the request in-
ternally for conflicting situations. When the same port is used by both DOS
and Kermit, Kermit discards DOS output material (typically a prompt, but could
be the dreaded Abort, Retry, Ignore message) and returns a success code to DOS,
it returns an ascii Backspace code to DOS read requests (this is a key item to
keep DOS complacent while Kermit communicates), and it returns reasonable
status for modem status. The interception ceases when Kermit releases the
port, such as when the Kermit prompt is displayed, and this lets DOS converse
out the serial port.
It is worth restating that a large number of programs bypass DOS to achieve
higher performance. When such programs are started through the back door they
may still require input from the real keyboard and will hang, waiting for it.
There is nothing to do about this situation except a) don't let it happen, b)
contact the local operator to push some keys, c) wait for better operating sys-
tems (OS/2?); some choices! Kermit-MS is not a Bulletin Board Server.
1.16.8. Screen sizes and the EGA board, IBM versions
Support has been included for Enhanced Graphics Adapter (EGA) video display
boards which can be configured for other than the standard 80 columns by 25
lines, say 132 columns or 43 lines or other. One board, the Tseng Labs EVA
board with the 132 column kit installed, can be controlled directly by Kermit
for 80/132 column changes. Other boards need to be placed in the desired dis-
play mode by the user. Kermit then adapts to the settings if the board obeys
standard rules for using the Bios EGA memory areas in segment 40H. The Video-7
Vega Deluxe board has been used successfully in all screen sizes, including 132
columns by 43 lines, with an NEC Multisync monitor.
The IBM EGA board has several noteworthy bugs which are now standards. One is
the cursor dots are not always on the correct scan lines when the number of
screen lines is other than 25. Kermit-MS attempts to compensate for this at-
tribute. Screen roll back space is fixed in size so there are fewer pages for
more dense screens; standard screens use an internal buffer, non-standard
screens use a buffer plus video page 1. ANSI.SYS is hard coded for 25 line dis-
plays so all DOS i/o will eventually overwrite itself on line 25; the emulator
does not use DOS i/o. Commercial replacements for ANSI.SYS should be able to
use all screen lines.
Screen dumps work correctly if done with Kermit commands. DOS PrintScreen may
or may not, depending on your EGA board.
When the VT102 receives escape sequences to change between 80 and 132 column
modes the screen is reset and the Tseng Labs EVA board is asked to change modes
(but only if that board is present); other display adapters are left in their
current state. The right margin is enforced strongly so a board in 132 column
mode will not display material to the right of column 80 if the emulator is in
80 column mode. Similarly, material to the right of column 80 is not preserved
in the emulator if the display adapter is operating in 80 column mode; real
VT102s keep that invisible material in hardware memory whereas the emulator
does not.
Reference is made to line 25 in the emulator; this is normally the status/mode
line in Kermit. Real VT102's have only 24 line displays. If the display
adapter is set for a different number of lines per screen then the 25th line is
interpreted to mean the bottom display adapter line, such as line 43. Should
the host access the status/mode line then the line is declared to be disabled
(same as SET MODE OFF) so that Kermit's own status information does not over-
write the host's when the screen is restored. Toggling a disabled mode line
has no effect; only SET MODE ON will enable it again. The Heath-19 terminal
has the unusual feature that disabling the mode line (ESC y 1) also clears it.
1.16.9. Kermit-MS/IBM on Local Area Networks, a Technical Description
The IBM version of Kermit-MS has support for the IBM Local Area Network NetBios
(and emulators) interface, Interrupt 5CH, with additional support for selected
vendor specific features (presently just AT&T STARLAN), activated by the SET
PORT NET command, described above. Communications across a LAN occur through
the NetBios interface using virtual circuits (Sessions), named nodes, and con-
ventional NetBios packets. Kermit-MS does not use LAN terminal interface
packages nor the Redirector or similar functions.
Kermit LAN operations are harmonious with normal network activity and many
pairs of Kermits can communicate simultaneously. Kermit does not use conven-
tional LAN File Server functions.
Kermit uses the standard NetBios interrupt 5CH interface, for those who need to
know such things, which means it will run on most LANS including IBM PC Net,
IBM Token Ring, AT&T STARLAN, and many others, and will run with Novell NetWare
software. Presently, Kermit knows some details of STARLAN and is able to send
a BREAK across the net and can use ISN node names with long path parts. If
STARLAN is not operating these features are not available. As more detailed
information becomes available special features of other networks can be
built-in.
The sequence of operations is similar for a client or server Kermit. The SET
PORT NET command is issued by both. This command causes Kermit to validate the
presence of the Interrupt 5CH interface, test for vendor additions, test for a
session already underway, establish and display a unique Kermit node name, but
not make a network session.
If an earlier LAN session is still active then the current remote node name
field of the command is examined for presence of a name. If a name is given
then Kermit asks the user whether to RESUME the session or start a NEW one.
Starting a new one results in Kermit hanging up the old session before proceed-
ing; resuming an old one requires no further work at this point.
When Kermit attaches to the network for the first time it needs to select a
unique node name so that two systems can form a Session by using these names as
addresses. Kermit uses a simple algorithm to make the name. Kermit probes the
network adapter board/software for the name of the local system. If the name
is present Kermit makes its own name by appending a dot K (.K) to the local
name. If the local name is absent then Kermit first tries a standard name of
"mskermit.K"; should the network report that the name is not unique (another
node is using the name) then the user is asked to choose a name. This process
continues until a unique name is obtained or the user decides to quit. The
final Kermit node name is reported on the screen; client Kermits will need to
know the name of the server Kermit.
Communication across the LAN begins differently for client and server Kermits.
The server must be started first, by simply placing a Kermit in server mode.
This results in a network Listen request being posted so that arriving packets
with the correct node name can be delivered to the server Kermit. Next, a
client Kermit tries to connect to the server by issuing a Kermit server command
to the proper node name (as given in the client's SET PORT NET node command);
REMOTE WHO is a satisfactory choice. The client machine actually issues a net-
work Call to the server's node name to make a connection and then follows it
with data packets holding the Kermit server request. The initial exchange of
packets establishes a particular virtual circuit between the two nodes. If the
connection cannot be started then the client Kermit reports this fact to the
user. The most common causes of a failure at this point are:
1. The client Kermit did not specify the correct server Kermit node
name (spelling errors, wrong case for letters, missing dot K),
2. One or both machines are using a network adapter board which is not
the first in the machine; Kermit uses only the first board,
3. The LAN NetBios emulator does not fully support IBM standard virtual
circuits,
4. The server machine was not started on the network before the client.
A virtual circuit will be broken if a sender or receiver gets no response to a
request within a short time interval set by the LAN hardware/software.
However, the LAN procedures within Kermit automatically reestablish the circuit
transparently to the user when new information is communicated; the last used
remote node name is remembered internally for this purpose. This also means
the server Kermit will respond to a connection from a new client Kermit if the
first client is idle for say a minute or so. A session can be terminated by the
user by issuing the HANGUP command or by exiting Kermit. A session will not be
broken this way if the user on the client Kermit changes to a regular serial
port.
Finally, when Kermit returns control to DOS, but not via the Push command, its
unique Kermit node name is removed from the network adapter board.
During network communications Kermit uses network packets holding 256 bytes of
data. If both Kermits are given the command
SET RECEIVE PACKET 1000
then the network and Kermit will be used to best efficiency. Experience has
shown that the client Kermit should have its TIMER OFF because the server may
be asked to do an operation via DOS which does not complete before the client
side would timeout. An observation of some token passing networks indicates
that Kermit packets slightly longer than 256, 512, etc bytes result in marked
slowing down because the remaining small piece is not sent until a net timer
expires. Carrier sense (Ethernet, STARLAN) boards seem to be more agressive
and export small packets immediately.
Kermit can access files on the LAN file server via DOS even while using the LAN
as a communications medium. Network administrators should note this point be-
cause a user operating Kermit in Server mode can allow his or her file server
directories to be available to other network users also running Kermit, without
additional security checking of the other users. The network drives visible to
the Server Kermit can become devices available for Kermit-to-Kermit file trans-
fers, etc, unless the DISABLE command is used to confine access to the current
disk and directory. A corollary is when files are accessible to DOS commands
they can become public.
@@@@@@@@@@@@@@@@@@@@ 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]