Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!husc6!bbn!uwmcsd1!leah!emb978 From: emb978@leah.Albany.Edu ( Eric M. Boehm) Newsgroups: comp.sys.ibm.pc Subject: Re: Request for Kermit 2.30. Summary: Docs for Kermit-MS 2.30, Part 4 of 6 Message-ID: <577@leah.Albany.Edu> Date: 23 Jan 88 21:50:53 GMT References: <20064@amdcad.AMD.COM> <574@leah.Albany.Edu> <575@leah.Albany.Edu> <576@leah.Albany.Edu> Organization: The University at Albany, Computer Services Center Lines: 1009 ------------------------------------------------------------------------------- SET SEND Syntax: SET SEND parameter value The SET SEND command is primarily used 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, regardless of what was negotiated with the other Kermit. Normally, you would use this command only to send shorter packets than the other Kermit 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 RECEIVE 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 in TAKE files or macro definitions. 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 other systems, built-in setup modes or DOS commands can be used to accomplish 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. TEK4010 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.1. Note that when a Kermit program includes Tektronix emulation, this can be invoked automatically while in character mode (VT102, VT52, or Heath emulation) when the emulator receives certain escape se- quences. This can be turned off using the DISABLE TEK command. 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 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, and during execution of the INPUT, OUTPUT, PAUSE, and TRANSMIT script commands, 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. 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 numeric 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). The results may be misleading if your asynchronous adapter, or the connector or cable that is attached to it, is strapped to supply these modem signals itself. 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 to 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. Beware of characters arriving with parity set because the pattern matching con- siders all 8 bits of a byte unless the local parity is other than NONE and SET DISPLAY is 7-BITS. Arriving characters are modified by first removing the parity bit, if parity is other than NONE, then they are passed through the SET TRANSLATION INPUT converter, the high bit is again suppressed if SET DISPLAY is 7-BITs, the result is logged and stored for pattern matching. 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 Figure 1-2 shows 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 Figure 1-2: MS-Kermit Script for Dialing Up and Logging In ------------------------------------------------------------------------------- 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 shown in Figures 1-3 and 1-4 (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. Scripts are illustrated further in the next section. ------------------------------------------------------------------------------- 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 set disp q,take kx,send %1,pau,rem host mail %1 %2,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 Figure 1-3: MS-DOS Batch File Invoking Kermit to Send VAX Mail ------------------------------------------------------------------------------- 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. Figure 1-5 shows an MSKERMIT.INI file composed by Vace Kundakci of Columbia to automate the task of switching his PC/AT among all these systems. It il- lustrates the creative use of macros and scripts. Numerous site- and system- dependent key definitions have been omitted. 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. Finally, a macro like "vml" (VM linemode), "xed" (XEDIT, i.e. VM full screen), or "dec" (DEC-20 or VAX) is executed 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 dele- tion 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-5 shows the terminal emulation options for the systems presently supported by Kermit-MS, and Table 1-6, shows which keys are used for screen rollback on the various systems supported by MS-Kermit. ------------------------------------------------------------------------------- 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 - "slowly." and "CLASS" are part of the switch's prompt. input 10 slowly. input 10 CLASS pause comment - Slowly tell switch "vaxa", wait for beep. 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 - Prompt ourselves, then get password from console. echo Enter password: output @con comment - Send a carriage return at the end of the password. output \13 comment - Expect ESC Z from the VAX's Set Term/Inquire... comment - Respond ESC [ 6 ; 2 c (say we are VT102). comment - Note syntax for including question mark and semicolon! 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 server\13 comment - allow server's message to finish, "machine." appears twice. input 10 machine. input 10 machine. pause Figure 1-4: MS-Kermit Script for Logging into VAX and Sending Mail ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- ; MSKERMIT.INI for IBM PC/AT Kermit 2.30, by Vace Kundakci 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:,o @con,o \13 Figure 1-5: An Advanced MS-Kermit Initialization File ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- 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-5: 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-6: 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. MS-Kermit may be per- suaded to support higher-numbered IBM ports using the method outlined in sec- tion 1.16.3. 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-7 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 of the text in connect mode; background colors are not available. Monochrome ------------------------------------------------------------------------------- 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 Ctrl Prev screen \Kupone Backup one screen line Ctrl 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 Ctrl 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-7: Kermit-MS Verbs for the DEC Rainbow ------------------------------------------------------------------------------- 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 that 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. - 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. - DIAL command, telephone directory, explicit support for various modems. - A way to play back session logs directly from disk to screen. - Trapping of carrier loss. - Pause at end of screen during local TYPE. - Piped operation a la UNIX (e.g. "compress foo.bar | kermit send"). - Transaction file logging. - A way to accept default values for omitted trailing fields in com- mands. - A better built-in help facility. - Simple Control and Meta key reassignment. - Separation of STATUS output into several screens for terminal, com- munication, and protocol parameters. - 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 -- with the transmission speed 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. You will probably also want to create an MS-Kermit initialization file. A sample is distributed with MS-Kermit as MSVIBM.INI. This should be tailored to your requirements, and then renamed to MSKERMIT.INI, and stored where Kermit can find it (according to the DOS PATH and APPEND commands). Finally, if you run Kermit often, you might want to have your AUTOEXEC.BAT file copy Kermit, the initialization file, and a copy of COMMAND.COM to a RAM disk. The procedure is explained in section 1.5. ".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") 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.