home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / m / mskdoc.zip / MSKERM.DOC next >
Text File  |  1993-01-02  |  333KB  |  6,570 lines

  1.  
  2.                            MS-DOS KERMIT USER GUIDE
  3.  
  4.  
  5.          FOR THE IBM PC FAMILY, COMPATIBLES, AND OTHER MS-DOS SYSTEMS
  6.  
  7.  
  8.                                 VERSION 2.32/A
  9.  
  10.  
  11.                             C. Gianone, F. da Cruz
  12.  
  13.               Columbia University Center for Computing Activities
  14.                            New York, New York 10027
  15.  
  16.  
  17.                                  J.R. Doupnik
  18.  
  19.               CASS and EE, Utah State University, Logan, UT 84322
  20.  
  21.  
  22.                                January 24, 1989
  23.  
  24.  
  25.  
  26.                             Copyright (C) 1981,1988
  27.             Trustees of Columbia University in the City of New York
  28.  
  29.      Permission is granted to any individual or institution to use, copy,
  30.     or redistribute this document so long as it is not sold for profit, and
  31.                   provided this copyright notice is retained.
  32. 1. MS-DOS KERMIT
  33.  
  34. --------
  35. This  document  is  formatted  as an ordinary, plain text ASCII disk file, from
  36. SCRIBE text formatter source.   Typeset  copies  are  available  from  Columbia
  37. University.
  38. --------
  39.  
  40. Program:        Joe  R.  Doupnik (Utah State University), with contributions by
  41.                 James  Harvey  (Indiana/Purdue  University),  James  Sturdevant
  42.                 (A.C.  Nielsen Company), and many others.  Originally by Daphne
  43.                 Tzoar and Jeff Damens (Columbia University).  See History.
  44.  
  45. Language:       Microsoft Macro Assembler (MASM)
  46.  
  47. Version:        2.32/A
  48.  
  49. Released:       December 11, 1988.
  50.  
  51. Documentation:  Christine Gianone, Frank da Cruz (Columbia University),
  52.                 Joe R. Doupnik (Utah State University)
  53.  
  54. Dedicated To:   Peppi
  55.  
  56.  
  57. Kermit-MS Capabilities At A Glance:
  58.  
  59.    Local operation:                Yes
  60.    Remote operation:               Yes
  61.    Transfers text files:           Yes
  62.    Transfers binary files:         Yes
  63.    Wildcard send:                  Yes
  64.    File transfer interruption:     Yes
  65.    Filename collision avoidance:   Yes
  66.    Can time out:                   Yes
  67.    8th-bit prefixing:              Yes
  68.    Repeat count compression:       Yes
  69.    Alternate block check types:    Yes
  70.    Terminal emulation:             VT102, H19, VT52, Tektronix 4010
  71.    Communication settings:         Speed, Parity, Flow Control, Echo
  72.    Transmit BREAK:                 Yes (and Long BREAK)
  73.    IBM mainframe communication:    Yes
  74.    Transaction logging:            Yes
  75.    Session logging (raw download): Yes
  76.    Raw upload:                     Yes
  77.    Act as server:                  Yes
  78.    Talk to server:                 Yes
  79.    Advanced server functions:      Yes
  80.    Advanced commands for servers:  Yes
  81.    Local file management:          Yes
  82.    Command/init files:             Yes
  83.    Command macros:                 Yes
  84.    Extended-length packets:        Yes
  85.    Local area networks:            Yes (NetBIOS and other support)
  86.    MS-Windows compatibility:       Yes
  87.    Attribute packets:              Yes
  88.    Sliding windows:                No
  89.  
  90.     -----------------------------------------------------------------------
  91.  
  92.     IMPORTANT NOTICE: The user manual for the  current  release  of  MS-DOS
  93.     Kermit  is "Using MS-DOS Kermit", by Christine M. Gianone, published by
  94.     Digital Press, Bedford, MA, 1991, order  number  EY-E893E-DP,  and  in-
  95.     cludes  a  current  MS-DOS  Kermit diskette.  Call 1-800-344-4825 (toll
  96.     free, USA) to order (VISA, MC).  This chapter has been retained in  the
  97.     Kermit  User  Guide  as  a courtesy.  Version 3.0 (and later) of MS-DOS
  98.     Kermit includes many new capabilities not described in this chapter.
  99.     -----------------------------------------------------------------------
  100.  
  101. MS-DOS Kermit, or "Kermit-MS" (or MS-Kermit), is a program that implements  the
  102. Kermit  file transfer protocol for the entire IBM PC family, including the PS/2
  103. series, IBM compatibles, and several other machines based  on  the  Intel  8086
  104. processor  series (8088, 80286, 80386, etc) and the DOS operating system family
  105. (PC-DOS or MS-DOS, henceforth referred to  collectively  as  MS-DOS  or  simply
  106. DOS).
  107.  
  108. It  is  assumed  you are acquainted with your PC and with DOS, and that you are
  109. familiar with the general ideas of data communication and Kermit file transfer.
  110. A very brief overview is given here, but for details consult the early chapters
  111. of the Kermit User Guide (of which this document is a  chapter),  or  the  book
  112. Kermit, A File Transfer Protocol, by Frank da Cruz, Digital Press (1987), order
  113. number EY-6705E-DP  (phone  1-800-343-8321),  which  also  includes  background
  114. tutorials on computers, file systems, and data communication (including modems,
  115. cabling, etc).  For further information about  Kermit  documentation,  updates,
  116. lists of current available versions, and ordering information, write to:
  117.  
  118.     Kermit Distribution
  119.     Columbia University Center for Computing Activities
  120.     612 West 115th Street
  121.     New York, NY  10025  (USA)
  122.  
  123.  
  124. 1.1. System Requirements
  125.  
  126. Kermit-MS  version  2.32/A runs in as little as 100K of memory, but will occupy
  127. up to 160K or so if it can be found for extra  screen  rollback  memory,  macro
  128. definitions,  etc.   Versions not using screen rollback memory will not require
  129. the additional space.  It will also try to leave 24 Kbytes free  for  a  second
  130. copy of COMMAND.COM which is needed for execution of certain commands.
  131.  
  132. On  the  IBM  PC family, Kermit-MS 2.32/A performs almost complete emulation of
  133. the DEC VT-102 and Heath/Zenith-19 terminals at speeds up  to  19,200  baud  or
  134. greater, lacking only the VT102's smooth scrolling and (on most display boards)
  135. 132 column features.  And as of version 2.30, Kermit-MS also performs Tektronix
  136. 4010/4014  graphics  terminal  emulation on IBM PC family systems equipped with
  137. CGA, EGA, or other graphics adapters, with either color or monochrome monitors.
  138.  
  139. Much of Kermit's speed is accomplished by direct writes to screen  memory,  but
  140. this  is done in a "TopView-aware" manner to allow successful operation in win-
  141. dowing environments like MS-Windows, DesqView, and TopView itself.    Speed  is
  142. also due to direct access of the serial port 8250  UART (Universal Asynchronous
  143. Receiver/Transmitter) chip, with buffered, interrupt-driven receipt of  charac-
  144. ters  and selectable XON/XOFF  flow control.  Full speed 9600 baud operation is
  145. possible on 4.77Mhz systems without flow control, but flow control is  required
  146. on  these  systems  for 19,200 baud or higher rates.  The IBM PC version should
  147. also run on near-clones like the DG/1 that differ from true PCs only  in  their
  148. choice   of  UART;  non-8250  UARTs  are  detected  automatically,  and  slower
  149. non-interrupt driven Bios serial port i/o is used, in which case the top  speed
  150. is in the 1200 baud range.
  151.  
  152. Kermit-MS  2.32/A runs on the entire IBM PC family (the PC, XT, AT, PCjr, Port-
  153. able PC, PC Convertible, PS/2) and compatibles (Compaq,  VAXmate,  Z150,  etc),
  154. and there are also specially tailored versions for non-IBM-compatibles like the
  155. DEC Rainbow, HP-110, HP-150, HP Portable Plus, Grid Compass  II,  Victor  9000,
  156. and  others,  plus  a  "generic  DOS"  version  that should run (slowly) on any
  157. 8086-based MS-DOS machine.  This document concentrates on the IBM version; some
  158. of  the  system-dependent  capabilities  described  here  may be lacking in the
  159. non-IBM versions.  See section 1.11 for features of different systems.
  160.  
  161. KERMIT.EXE for the IBM PC family occupies  about  102K  of  disk  storage  (the
  162. figure  will vary for other versions).  This can be reduced by about 15K if you
  163. run it through EXEPACK.  MS-Kermit is not distributed in packed  form,  because
  164. problems  have  been  reported on certain systems when this is done.  So if you
  165. decide to pack it, make sure to keep an unpacked version available to fall back
  166. to in case of problems.
  167.  
  168.  
  169. 1.2. History
  170.  
  171. Over  the  years,  MS-Kermit has grown from a Kermit file transfer program that
  172. embodied a simple terminal emulator into a complex and  powerful  communication
  173. program that includes the Kermit file transfer protocol.  As a result, the bulk
  174. of this manual is devoted to the communication  features,  rather  than  Kermit
  175. protocol operation.  Skip ahead to the next section if you're not interested in
  176. the history of MS-Kermit.
  177.  
  178. MS-DOS Kermit (like the Kermit file transfer protocol itself) is a  product  of
  179. the  Systems  Group of the Columbia University Center for Computing Activities,
  180. and it was one of the four original Kermit programs (with the CP/M, DEC-20, and
  181. IBM  mainframe versions).  It was initially written for the IBM PC with DOS 1.1
  182. by Daphne Tzoar in 1981-1982, based largely on Bill Catchings's  original  CP/M
  183. 8080  assembler version.  PC-Kermit (as it was called then) provided basic Ker-
  184. mit file transfer and VT52 emulation.  Joellen Windsor  of  the  University  of
  185. Arizona  added  conditional  assembly  support for the Heath/Zenith-100 shortly
  186. thereafter, and soon after that Dave King of Carnegie-Mellon  University  added
  187. Heath-19  terminal emulation, and some patches to let the program run under the
  188. new DOS version, 2.0.  During this era, the program version numbers  went  from
  189. 1.0 to 1.20.
  190.  
  191. With  the  appearance  in the marketplace of many new MS-DOS machines that were
  192. not compatible with the IBM PC, it became apparent that conditionally assembled
  193. code  supporting  each of these machines within a single monolithic source file
  194. was not the best way to organize the program.   Therefore  Daphne,  along  with
  195. Jeff  Damens of Columbia, undertook to reorganize the program in a modular way,
  196. isolating system dependencies into separate files.    The  result  was  version
  197. 2.26,  released  in  July  1984.   It included support for the DEC Rainbow, the
  198. HP-150, the Wang PC, and generic MS-DOS, as well as for the IBM PC  family  and
  199. the  H/Z-100.  It also included many new features, like 8th-bit prefixing (code
  200. contributed by The Source  Telecomputing),  alternate  block  check  selection,
  201. byte-count  compression,  server/client operation, access to local file and DOS
  202. operations, command macros, initialization and command files, screen  rollback,
  203. key  redefinition,  and  more.    For  the  2.26 release, the executable Kermit
  204. programs were encoded printably as ".BOO" files, designed by Bill Catchings  as
  205. part of this effort, for network and electronic-mail distribution.
  206.  
  207. Release 2.27 was produced by Daphne and Jeff in December 1984.  Unlike 2.26, it
  208. ran correctly on the new PC/AT under DOS 3.0, and included support for the  NEC
  209. APC  from  Ron  Blanford  of  Seattle, WA, and Ian Gibbons of the University of
  210. Hawaii, and for the TI Professional from Joe Smith of the  Colorado  School  of
  211. Mines,  plus  some bug fixes and reorganization.  2.27 is the last version that
  212. runs under pre-2.0 versions of DOS.
  213.  
  214. Version 2.28 (Daphne, Jeff, June  1985)  added  dynamic  memory  allocation  to
  215. reduce  disk  storage for the .EXE file, and to allow the program to adjust it-
  216. self to the PC's memory size, plus the inevitable bug fixes (many of them  con-
  217. tributed  by  Edgar  Butt  of the University of Maryland and Gregg Small of the
  218. University of California at Berkeley).  During this  period,  support  for  ad-
  219. ditional MS-DOS systems was added by various people.
  220.  
  221. In  December 1985, a tape showed up at Columbia sent by Prof. Joe R. Doupnik of
  222. the Center for Atmospheric and Space Studies and EE Department  at  Utah  State
  223. University.  This tape contained version 2.28 modified to fully support the DOS
  224. 2.0 file system, and to which many new features had  been  added,  notably  the
  225. ability  of  the  MS-DOS Kermit server to process various REMOTE commands (DIR,
  226. CWD, SPACE, etc).  And at about the same time, a tape arrived from James Harvey
  227. of  Indiana/Purdue University, who had changed Kermit's CONNECT command to emu-
  228. late the popular DEC VT100 terminal.  James's material was  sent  to  Joe,  who
  229. then laboriously fitted the VT100 emulation into his own code, keeping the VT52
  230. and H19 emulation alive as options, and upgrading the VT100 emulation to  VT102
  231. by  adding  features  such  as  line and character insertion and deletion.  The
  232. result was version 2.29, released in May 1986.
  233.  
  234. Soon after the release of 2.29, some disks were sent in by James Sturdevant  of
  235. the A.C. Nielson Company, containing a full implementation of the Kermit script
  236. facility, as described in the Kermit book.  This material was sent to Joe,  who
  237. had by now become keeper of MS-DOS Kermit and had already begun work on version
  238. 2.30 by adding support for extended-length packets.  Joe had been  carrying  on
  239. voluminous  network  correspondence  (Thanks,  BITNET!)  with Columbia and with
  240. MS-DOS Kermit users and testers all over the world, giving birth  to  many  new
  241. features,  including  Tektronix graphics terminal emulation, support for opera-
  242. tion over local area networks, support for 8-bit ASCII terminal connections and
  243. international  character  sets,  ANSI  printer  control, and a redesigned, more
  244. powerful, more portable key redefinition mechanism.
  245.  
  246. Version 2.30 was formally released on January 1, 1988, after many  "alpha"  and
  247. "beta"  tests.    Among the many contributors to this version were Brian Holley
  248. and Joe Smith for the Tektronix emulation, Robert Goeke for the  NEC  AP3  sup-
  249. port,  Brian  Peterson  and Andreas Stumpf for the Victor 9000, Bob Babcock and
  250. Joe White for the Sanyos, Christopher Lent for the Wang PC, Jack Bryans for  an
  251. Intel  iRMX  version, Jim Noble for the Grid Compass, Geoff Mulligan and others
  252. for the Zenith 100, and David Knoell for the  special  Rainbow  edition.    And
  253. thanks  to  Gisbert  Selke,  Jack Bryans, and others for proofreading drafts of
  254. this manual, with apologies to anyone we neglected to mention.
  255.  
  256. Work on version 2.31 began within weeks of the release of 2.30.  The major  new
  257. features were an improved command interface, a fully capable script programming
  258. language, and inclusion of file attributes packets to send the time,  date  and
  259. size  of files along with the data.  Support for Ungermann-Bass Net One LAN was
  260. also added, thanks to contributions from Henrik Levkowetz  and  Renne  Rehmann.
  261. These changes led to a fairly thorough revision of the interior while providing
  262. the familiar commands and new features.  Meanwhile, Horofumi Fujii and  Akihiro
  263. Shirahasi  of  the  National  Laboratory for High-Energy Physics (KEK) in Japan
  264. adapted 2.31 to the NEC  PC-9801,  and  for  this  machine  added  support  for
  265. Japanese Kana and Kanji character sets.
  266.  
  267. Version  2.32  was  issued  by Joe in December 1988.  It included the usual bug
  268. fixes, plus several new script programming features, and improved  support  for
  269. international  use,  allowing  for  languages like Hebrew and Arabic that print
  270. right to left, adapted from work by Baruch Cochavy, IIT, Technion,  Haifa,  Is-
  271. rael.    Thanks also to Glenn Trewitt, Mark Zinzow, and Ken Ridley for valuable
  272. suggestions and contributions to this release.
  273.  
  274. Like all Kermit programs, MS-DOS Kermit may be freely  copied  and  shared,  so
  275. long as it is not done for profit.
  276.  
  277.  
  278. 1.3. Using MS-Kermit
  279.  
  280. MS-DOS  Kermit performs two major functions, terminal emulation and file trans-
  281. fer.  File transfer can be done using either the Kermit file transfer protocol,
  282. or  else  (without  error checking), ASCII or XON/XOFF capture and transmission
  283. methods.  To use Kermit for "raw" uploading or downloading of  files,  see  the
  284. descriptions of the TRANSMIT and LOG SESSION commands.
  285.  
  286. Before  you  can  transfer files with another system using Kermit protocol, you
  287. must first connect to it as a terminal, login if necessary, and start up a Ker-
  288. mit program there.  Kermit's CONNECT command lets you do this by making your PC
  289. act like a terminal.  After setting things up on the other computer,  you  must
  290. return  to  the PC and tell it what to do.  Returning to the PC is accomplished
  291. by typing a special sequence of characters, called the "escape sequence."
  292.  
  293. The following example shows this process; the other computer is a Unix  system,
  294. but the method is the same with most others.  The parts you type are underlined
  295. (if this document was printed on a printer that can underline),  and  when  you
  296. type a command, you terminate it with a carriage return, which you can't see in
  297. the example.  The mysterious "^]c" is MS-Kermit's escape  sequence,  which  you
  298. enter  by  holding  down  the Control (Ctrl) key and pressing "]" (right square
  299. bracket), and then typing the letter  C.  The  example  assumes  the  MS-Kermit
  300. program is stored on disk as KERMIT.EXE.
  301.  
  302.     Program Dialog:             Explanation:
  303.  
  304.     A>kermit
  305.     IBM PC Kermit-MS V2.32/A 24 Jan 1989                                   
  306.     Type ? or HELP for help
  307.  
  308.     Kermit-MS>set speed 1200    Set the right baud rate.
  309.     Kermit-MS>connect           Connect as a terminal.
  310.     ATDT7654321                 Dial the modem if necessary.
  311.     CONNECT 1200                The modem says you're connected.
  312.  
  313.       Now you're talking to the Unix system.
  314.       Type a carriage return to get its attention.
  315.  
  316.     Login: max                  Login to the host.
  317.     password:                   (Passwords normally don't echo.)
  318.     % kermit                    Run Kermit on the host.
  319.     C-Kermit>receive            Tell it to receive a file.
  320.     ^]c                         Escape back to the PC.
  321.     Kermit-MS>send autoexec.bat Send a file.
  322.  
  323.       (The file is transferred...)
  324.  
  325.     Kermit-MS>                  Transfer complete, prompt reappears.
  326.  
  327. In this example, the user types "kermit", and sees the program's herald and its
  328. prompt, "Kermit-MS>".  Then she sets the appropriate communication speed ("baud
  329. rate"),  connects as a terminal, issues a dialing command to a Hayes-like modem
  330. (you would skip this step if you had a direct connection), logs in to her ID on
  331. the  Unix  system  which  she has dialed, starts "C-Kermit" on the Unix system,
  332. tells it to receive a file, escapes back to the PC, and tells MS-Kermit to send
  333. a file.  After the file is transferred, the user would normally connect back to
  334. the Unix system, exit from the Kermit program there, and log out:
  335.  
  336.     Kermit-MS>connect        Connect again.
  337.     C-Kermit>exit
  338.     % ^D                     Logout from Unix by typing Ctrl-D.
  339.     ^]c                      Escape back to the PC.
  340.     Kermit-MS>exit           Return to DOS.
  341.  
  342. To transfer a file in the other  direction,  simply  exchange  the  "send"  and
  343. "receive"  commands  above.  That's the easiest and quickest way to use Kermit.
  344. If this simple scenario does not work for you, issue the  MS-Kermit  SHOW  COM-
  345. MUNICATIONS  command  and look for any obvious incorrect settings (port, speed,
  346. parity), fix them with SET commands (described  in  Section  1.6.10),  and  try
  347. again.   (IBM mainframe linemode connections have so many "different" settings,
  348. there's a special command to do them all at once, "do  ibm",  which  you  would
  349. type  as  the  first  Kermit-MS command above.)  If that doesn't help, read on.
  350. Many problems can crop up when you attempt to connect two unlike systems over a
  351. possibly hostile communication medium.  And if you intend to be a frequent user
  352. of Kermit, there are many options you can take advantage of to adapt  MS-Kermit
  353. to different systems, improve its performance, and automate common tasks.
  354.  
  355.  
  356. 1.4. The MS-DOS File System
  357.  
  358. The features of the MS-DOS file system of greatest interest to Kermit users are
  359. the form of the file specifications, and the formats of the files themselves.
  360.  
  361.  
  362. 1.4.1. File Specifications
  363.  
  364. MS-DOS file specifications (in version 2.0 or later of DOS) are of the form
  365.  
  366.     DEVICE:\PATHNAME\NAME.TYPE
  367.  
  368. where the DEVICE is a single character identifier  (for  instance,  A  for  the
  369. first  floppy disk, C for the first fixed disk, D for a RAM disk emulator) fol-
  370. lowed by a colon (":"), PATHNAME is up to 63 characters of identifier(s) (up to
  371. 8 characters each) surrounded by backslashes ("\"), NAME is an identifier of up
  372. to 8 characters, and TYPE is an identifier of up to  3  characters  in  length.
  373. Device and pathname may be omitted.  The first backslash in the pathname may be
  374. omitted if the specified path is relative to the current  directory.    In  the
  375. path  field,  "." means the current directory, ".." means the parent directory.
  376. Some DOS implementations (like Wang) may use slash ("/") rather than  backslash
  377. as a directory separator.
  378.  
  379. Pathname  is  normally  omitted, but can be specified in all Kermit-MS commands
  380. (as of version 2.29).  Device and directory pathnames, when omitted, default to
  381. either  the  user's  current  disk  and  directory, or to the current directory
  382. search path as specified in the DOS PATH environment variable, depending on the
  383. context in which the file name appears.
  384.  
  385.     When  this  document  says  that a file is searched for "in the current
  386.     path," it means that Kermit-MS looks on the current disk and  directory
  387.     first, and if the file is not found, then the directories listed in the
  388.     PATH environment variable are searched.  If the PATH environment  vari-
  389.     able is empty, Kermit looks only at the current disk and directory.
  390.  
  391. NAME.TYPE  is  sufficient  to specify a file on the current disk and directory,
  392. and only this information is sent along by Kermit-MS with an outgoing file.
  393.  
  394. The device, path, name, and type fields may contain uppercase letters,  digits,
  395. and the special characters "-" (dash), "_" (underscore), "$" (dollar sign), "&"
  396. (ampersand), "#" (number sign), "@" (at sign), "!"    (exclamation  mark),  "'"
  397. (single  quote),  "()"  (parentheses),  "{}" (curly braces), "^" (caret or cir-
  398. cumflex), "~" (tilde), and "`" (accent grave).  Normally,  you  should  confine
  399. your  filenames  to  letters and digits for maximum transportability to non-DOS
  400. systems.  When you type lowercase letters  in  filenames,  they  are  converted
  401. automatically  to  uppercase.  There are no imbedded or trailing spaces.  Other
  402. characters may not be included; there is no mechanism for  "quoting"  otherwise
  403. illegal  characters in filenames.  The fields of the file specification are set
  404. off from one another by the punctuation indicated above.
  405.  
  406. The name field is the primary identifier for the file.  The type,  also  called
  407. the  extension or suffix, is an indicator which, by convention, tells what kind
  408. of file we have.  For instance FOO.BAS is the source of a BASIC  program  named
  409. FOO;  FOO.OBJ  might  be  the  relocatable  object module produced by compiling
  410. FOO.BAS; FOO.EXE could be an executable program produced  by  loading  FOO.OBJ,
  411. and so forth.  .EXE and .COM are the normal suffixes for executable programs.
  412.  
  413. MS-DOS  allows  a group of files to be specified in a single file specification
  414. by including the special "wildcard" characters, "*" and "?".  A "*" matches any
  415. string of characters from the current position to the end of the field, includ-
  416. ing no characters at all; a "?" matches any single character.   Here  are  some
  417. examples:
  418.  
  419.   *.BAS   All files of type BAS (BASIC source files) in the current directory.
  420.  
  421.   FOO.*   Files of all types with name FOO.
  422.  
  423.   F*.*    All files whose names start with F.
  424.  
  425.   *.?     All files whose types are exactly one character long, or have no type
  426.           at all.
  427.  
  428. Wildcard notation is used on many computer systems in similar ways, and  it  is
  429. the mechanism most commonly used to instruct Kermit to send a group of files.
  430.  
  431. Users  of Kermit-MS should bear in mind that other (non-MS-DOS) systems may use
  432. different wildcard characters.  For instance VMS and the DEC-20 use "%" instead
  433. of  "?"  as  the  single  character wildcard; when using Kermit-MS to request a
  434. wildcard file group from a Kermit-20 server, the DOS "?" must  be  replaced  by
  435. the DEC-20 "%".
  436.  
  437.  
  438. 1.4.2. File Formats
  439.  
  440. MS-DOS  systems  store files as streams of 8-bit bytes, with no particular dis-
  441. tinction among text, program code, and binary files.  ASCII text files  consist
  442. of lines separated by carriage-return-linefeed sequences (CRLFs), and this con-
  443. forms exactly to the way Kermit represents text files during  transmission,  so
  444. Kermit-MS  has  no  need  for a SET FILE TYPE BINARY command.  But since a non-
  445. MS-DOS receiving system might need to make distinctions as to  file  type,  you
  446. will  probably have to issue SET FILE TYPE commands there if you are sending it
  447. non-text files.  In transmitting files between Kermit-MS  programs,  regardless
  448. of  file contents, the receiving MS-DOS system is equally capable of processing
  449. text, code, and data, and in fact requires no knowledge of how the bytes in the
  450. file are to be used.
  451.  
  452. MS-DOS  (unlike  CP/M)  knows  the  exact end of a file because it keeps a byte
  453. count in the directory, so one would expect no  particular  confusion  in  this
  454. regard.    However, certain MS-DOS programs continue to use the CP/M convention
  455. of terminating a text file with a Control-Z character, and won't  operate  cor-
  456. rectly unless this terminating byte is present.  Therefore, you should be aware
  457. of a special SET EOF option for both incoming  and  outbound  files,  described
  458. later.
  459.  
  460. Non-MS-DOS  systems  may  be  confused  by  nonstandard  ASCII  files  sent  by
  461. Kermit-MS:
  462.  
  463.    - Files containing any of the 8-bit  "extended  ASCII"  characters  may
  464.      need conversion (or translation) to 7-bit ASCII.
  465.  
  466.    - Files  produced by word processing programs like Word Perfect or Word
  467.      Star may contain special binary formatting codes, and could need con-
  468.      version  to  conventional  7-bit  ASCII format prior to transmission,
  469.      using an "export" procedure.
  470.  
  471.    - Files created by word processors that store formatting  data  at  the
  472.      end of the file, after the Control-Z and before physical end, may re-
  473.      quire special processing via SET EOF to strip  the  formatting  data,
  474.      lest they confuse non-MS-DOS recipients.
  475.  
  476.    - Spreadsheet  or  database files usually need special formatting to be
  477.      meaningful to non-MS-DOS recipients (though they can  be  transmitted
  478.      between  MS-DOS  systems with Kermit-MS).  Such programs usually come
  479.      with an "export" procedure to convert  their  files  to  plain  ASCII
  480.      text.
  481.  
  482.    - BASIC  programs are normally saved in a binary "tokenized" form.  Use
  483.      BASIC's ",a" SAVE option to save them as regular ASCII text, as in
  484.  
  485.          save"foofa",a
  486.  
  487. In general, when attempting to transfer non-text files  between  MS-DOS  and  a
  488. different kind of system, consult the Kermit manual for that system.
  489.  
  490.  
  491. 1.5. Program Setup and Invocation
  492.  
  493. The  MS-DOS Kermit program can be run from any disk without any special instal-
  494. lation procedure.  On hard disk systems, it is convenient to store the  program
  495. in one of the directories listed in your DOS PATH, and it is often desirable to
  496. customize Kermit's operation to your communications and  computing  environment
  497. by creating an initialization file.
  498.  
  499. Kermit-MS  can  be  run  interactively, from a batch file, as an "external" DOS
  500. command, or from redirected standard input.  Commands consist of  one  or  more
  501. fields, separated by "whitespace" -- one or more spaces or tabs.
  502.  
  503. Upon  initial  startup,  the  program  executes  any commands found in the file
  504. MSKERMIT.INI on the current disk, or (if not found on the current disk) in  the
  505. first  directory containing a file by that name, from the list in your DOS PATH
  506. environment variable.  The Kermit initialization file may contain command macro
  507. definitions,  communications  settings  for  one  or  more  ports, or any other
  508. Kermit-MS commands, and you may create it using  any  text  editor  capable  of
  509. saving files in plain ASCII text format.  Here is a sample:
  510.  
  511. comment -- MSKERMIT.INI, MS-DOS Kermit initialization file
  512.  
  513. comment -- Don't overwrite my files!
  514.  set warning on
  515.  
  516. comment -- Define macros for the systems I use...
  517.  define unix set local-echo off,set par non,set flow xon,set timer off
  518.  def ibm set par odd,set loc on,set hands xon,set flo none,set tim on
  519.  def modem set port 2, set speed 1200
  520.  
  521. comment -- Define macros for quickly adapting to varying
  522.  def noisy  set block-check 3, set receive packet 40, set retry 20
  523.  def normal set block-check 1, set rec pack 94, set retry 5
  524.  def clean  set block-check 2, set rec pack 500, set retry 5
  525.  
  526. comment -- I always start out by connecting to my UNIX system...
  527.  set port 1
  528.  set speed 4800
  529.  do unix
  530.  connect
  531.  
  532. A  different file may be substituted for MSKERMIT.INI by using "-f filename" on
  533. the DOS command line, e.g.
  534.  
  535.     kermit -f monday.ini
  536.  
  537. The meanings of these commands will emerge below.  For now, just note  how  you
  538. can  use  command  files (and "macro definitions") to easily adapt MS-Kermit to
  539. widely differing communication environments.  A  more  advanced  initialization
  540. file is shown in section 1.9.
  541.  
  542.  
  543. Interactive Operation:
  544.  
  545. To  run  Kermit-MS  interactively, invoke the program from DOS command level by
  546. typing its name, normally "kermit" (this means the program should be stored  in
  547. your path with the name KERMIT.EXE).  When you see the program's prompt,
  548.  
  549.     Kermit-MS>
  550.  
  551. you  may  type  Kermit  commands  repeatedly  until  you  are ready to exit the
  552. program, as in the following example (which assumes there's  already  a  Kermit
  553. "server" set up on the other end):
  554.  
  555.     A>
  556.     A>kermit
  557.  
  558.     IBM PC Kermit-MS V2.32/A  24 Jan 1989
  559.     Type ? or HELP for help
  560.  
  561.     Kermit-MS>set speed 19200
  562.     Kermit-MS>send foo.*
  563.  
  564.       The files are sent.
  565.  
  566.     Kermit-MS>get fot.*
  567.  
  568.       The requested files are received.
  569.  
  570.     Kermit-MS>exit
  571.     A>
  572.  
  573. Interactive commands are described in Section 1.6.
  574.  
  575.  
  576. Command Line Invocation:
  577.  
  578. Kermit-MS  may  be  invoked with command line arguments from DOS command level,
  579. for instance:
  580.  
  581.     A>kermit send peter.amy
  582.  
  583. or
  584.  
  585.     A>kermit set port 1, set speed 9600, connect
  586.  
  587. In this case, help and completion  are not available (because the program  that
  588. provides  them  won't  start  running  until  after you type the entire command
  589. line), and Kermit-MS will exit back to DOS after completing the specified  com-
  590. mand  or  commands.    Therefore,  when  invoked  with  command line arguments,
  591. Kermit-MS will behave as if it were an external DOS command, like MODE.    Note
  592. that  several  commands  may be given on the command line, separated by commas.
  593. This can't be done interactively or from TAKE command files.
  594.  
  595. Two special Kermit commands can be given on the DOS command line.  First is the
  596. keyword STAY which prevents Kermit from exiting naturally when the last command
  597. has completed (unless, of course, EXIT or QUIT was among the  commands).    The
  598. second command is
  599.  
  600.     -F filename
  601.  
  602. This  means  use  the indicated filename as the initialization file rather than
  603. MSKERMIT.INI.  The PATH will be searched for this file, if necessary.  A  space
  604. or  tab  must separate -F from the filename, and the F may be in upper or lower
  605. case.  Example:
  606.  
  607.     kermit -f tuesday.ini, set port 2, do ibm, stay
  608.  
  609. You can run Kermit with no initialization file at all by using the command
  610.  
  611.     kermit -f nul
  612.  
  613. If -F is the only command line option, STAY is implied.
  614.  
  615.  
  616. Redirected Input and Output
  617.  
  618. Kermit-MS also can be operated by redirecting input to it from a file, as in:
  619.  
  620.     C>kermit < myscript.txt > myscript.log
  621.  
  622. or from a DOS "pipe", as in
  623.  
  624.     C>sort < sends.txt | kermit
  625.  
  626. The file MYSCRIPT.TXT contains Kermit commands as if they were typed  manually.
  627. The DOS symbol "<" means that Kermit should read from the following file rather
  628. from the keyboard.
  629.  
  630. Kermit knows this is occurring and  takes  special  steps  to  avoid  the  real
  631. keyboard  and to quit when the file has been completely examined.  The filename
  632. can also be the name of a device, such as COM1, to converse on the same or dif-
  633. ferent  line  as  file  transfer  traffic.  Information destined for the screen
  634. still goes to the screen unless the phrase "> filespec" is added to the command
  635. line  above  to  send the normal screen output to a file or device (device COM1
  636. also works).  Note that the terminal emulation screen cannot be redirected.
  637.  
  638.  
  639. Batch Operation:
  640.  
  641. Like many other MS-DOS programs, Kermit-MS may be operated under DOS batch with
  642. command  line  arguments.   If you invoke it without command line arguments, it
  643. will run interactively, reading commands from the keyboard and  not  the  batch
  644. file.    When  it exits, batch processing will continue to the end of the batch
  645. file.
  646.  
  647. Kermit-MS returns the "errorlevel"  parameter  used  as  program  exit  status.
  648. Present  values  are  in  the range 0 to 7 with three areas yielding success or
  649. failure reports for the entire Kermit session. The errorlevel values are:
  650.    errorlevel   Kermit session status
  651.         0       entirely successful operation
  652.         1       a Send command completed unsuccessfully
  653.         2       a Receive or GET command completed unsuccessfully
  654.         4       a REMOTE command completed unsuccessfully
  655.      3,5,6,7    combinations (addition) of the above conditions
  656.  
  657. Note that failures are remembered for the whole session and are not canceled by
  658. a  following successful operation of the same type. Thus, sending several files
  659. individually yields an errorlevel of 0 only if all the files were sent success-
  660. fully.  The "errorlevel" parameter also applies to script commands where OUTPUT
  661. corresponds to SEND and INPUT to RECEIVE.  An example of  Batch  invocation  of
  662. Kermit is shown in Figure 1-4.
  663.  
  664. You  may  also  force  Kermit  to  return any desired errorlevel, using the SET
  665. ERRORLEVEL command.  DOS batch parameters may be passed along  to  Kermit;  see
  666. section 1.7 for details.
  667.  
  668.  
  669. Remote Operation:
  670.  
  671. The MS-DOS CTTY command allows an MS-DOS system to be used from a terminal con-
  672. nected to its communication port.  Such sessions must be conducted  with  great
  673. care, since many programs assume that they are running on the real console, and
  674. explicitly reference screen memory or the physical keyboard.    Kermit  can  be
  675. used in this manner too, but before you give it any file transfer commands, you
  676. must inform it that it is running in "remote mode" rather than its normal  "lo-
  677. cal mode."  Use the SET REMOTE ON command for this purpose, to prevent the file
  678. transfer display from being sent out the port.
  679.  
  680.  
  681. RAM Disk Operation:
  682.  
  683. If you invoke Kermit frequently, and you have sufficient memory on your PC, you
  684. may find it convenient to copy Kermit and its initialization file to a RAM disk
  685. when you start your system.  This allows Kermit to be started and used  quickly
  686. and silently, with no mechanical disk operations.
  687.  
  688. For  instance, if you're using IBM's VDISK facility to create the RAM disk, you
  689. might put statements like this in your CONFIG.SYS file:
  690.  
  691.     DEVICE=VDISK.SYS 384 512 128 /e
  692.  
  693. This assumes you have 384K of extended (/e) memory installed and  VDISK.SYS  is
  694. in  the  root directory of the boot disk.  It creates a 384K RAM disk with 512B
  695. sector size and space for 128 directories in the extended memory, assigning  it
  696. the  disk letter of your first unused disk.  And then in your AUTOEXEC.BAT file
  697. (assuming the RAM disk is disk D:)...
  698.  
  699.     COPY KERMIT.EXE   D: >NUL
  700.     COPY MSKERMIT.INI D: >NUL
  701.     COPY COMMAND.COM  D: >NUL
  702.     SET COMSPEC=D:\COMMAND.COM
  703.     PATH D:\; ...
  704.  
  705. The PATH command allows DOS to find KERMIT.EXE, and Kermit to find MSKERMIT.INI
  706. and COMMAND.COM, on the RAM disk.  If you use Kermit transfer files to your RAM
  707. disk, remember to copy those files to a real disk before you turn off the  sys-
  708. tem.
  709.  
  710.  
  711. Use of MS-Kermit in Windowing and Multiprocessing Environments:
  712.  
  713. Kermit-MS  can  operate  within  windowing  environments  like such as TopView,
  714. DESqview, and MS-Windows.  It runs in an active window  under  MS-Windows,  ac-
  715. cepts  cut and paste material, talks with mice, and shrinks to an icon (a boxed
  716. "KER").  An MS-Windows .PIF file  can  be  constructed  for  Kermit  using  the
  717. PIFEDIT  program,  supplied with Windows.  Memory requirements should be listed
  718. as 102 to 160KB.  It should state that  Kermit  does  not  modify  the  screen,
  719. keyboard,  memory,  COM1, or COM2 (not true but it satisfies Windows).  Program
  720. switch and exchange should be marked as Text, and Close Window on  Exit  should
  721. be  checked.    This configuration will let you run Kermit with all the Windows
  722. features, but slowly.  To run at full speed under Windows,  tell  PIFEDIT  that
  723. Kermit modifies the screen.  Then you lose the Windows features (cutting, past-
  724. ing, running the clock at the same time, etc), but you still get  back  to  the
  725. Windows interface when you EXIT Kermit.
  726.  
  727. MS-Kermit  has also been reported to operate successfully under Concurrent DOS.
  728. However, since  it  does  not  interact  explicitly  with  the  Concurrent  DOS
  729. time-slice scheduler, Kermit will tend use a lot of CPU cycles.
  730.  
  731.  
  732. Local Area Network Operation:
  733.  
  734. MS-Kermit is capable of using a serial port on another local area network (LAN)
  735. node, so long as that node is running an asynchronous communication server  and
  736. you have installed a device driver on your own PC that makes COM1 or other com-
  737. munication port i/o use the network server.  This type of connection works  be-
  738. cause  MS-Kermit  2.30 and later releases on IBM PCs check the selected port to
  739. see if it's a real 8250 UART chip, and if it isn't, Kermit uses only Bios calls
  740. for  port i/o, and the network routes these through your network device driver.
  741. It may be desirable to give the command SET PORT BIOSn (n is a  digit  1-4)  to
  742. actively  select  the Bios port rather than a real hardware device.  This style
  743. of operation should be transparent to Kermit, but  not  all  asynchronous  com-
  744. munications servers utilize this technique.
  745.  
  746. As  of version 2.30, the IBM PC version of Kermit can also communicate directly
  747. with another PC on a local area network through the IBM NetBIOS  emulator  dis-
  748. tributed  with  the  LAN.  In essence, the LAN substitutes for the serial port,
  749. modem, and other wiring.  Kermit running on one user machine can transfer files
  750. with  another  Kermit  also  on  the  network much as if they were connected by
  751. modems, and Kermit can talk with some larger machines the same way.  The impor-
  752. tant network command is
  753.  
  754.     SET PORT NETBIOS nodename
  755.  
  756. for NetBios, or
  757.  
  758.     SET PORT UB-NET1 nodename
  759.  
  760. for  Ungermann-Bass Net-One NETCI.  For details, see the description of the SET
  761. PORT and SERVER commands, and (if you're interested) Section 1.18.1 for a tech-
  762. nical description.
  763.  
  764. Kermit  can  even  communicate with some other computers, such as Unix systems,
  765. which accept logins via this remote pathway.  The initial startup is  the  same
  766. as  calling a mainframe and logging in except the command SET PORT NET nodename
  767. is used instead of SET PORT COM1.  A connection is established with  the  first
  768. use  of the communications circuit, such as CONNECT, REMOTE DIR, SEND, or other
  769. file transfer command, and terminated with the HANGUP command.
  770.  
  771.  
  772. 1.6. Kermit-MS Commands
  773.  
  774. MS-DOS Kermit has the following commands:
  775.  
  776.            -F  specify alternate init file name on DOS command line.
  777.           ASK  user to type text, in response to a prompt.
  778.        ASSIGN  the value of one variable to another.
  779.           BYE  to remote server, exit from MS-Kermit.
  780.         CLEAR  serial port buffer.
  781.         CLOSE  log files and stop logging remote session.
  782.       COMMENT  For including comments in command files.
  783.       CONNECT  as terminal to remote system (C).
  784.     CWD or CD  change local working directory.
  785.        DEFINE  a macro of Kermit-MS commands.
  786.        DELETE  local files.
  787.     DIRECTORY  listing of local files.
  788.       DISABLE  server recognition of selected commands.
  789.            DO  a command macro.
  790.          ECHO  a line of text on the screen.
  791.        ENABLE  server recognition of selected commands.
  792.          EXIT  from Kermit-MS.
  793.        FINISH  Shut down a remote Kermit server.
  794.           GET  remote files from server.
  795.          GOTO  jump to labeled line in script file.
  796.        HANGUP  the phone or network connection.
  797.          HELP  about Kermit-MS.
  798.            IF  decision-making in Take or Macro scripts.
  799.         INPUT  specified string from serial port, for scripts.
  800.           LOG  remote terminal session, transactions, or packets.
  801.        LOGOUT  remote server, don't exit from Kermit-MS.
  802.          MAIL  send file to remote Mailer via Kermit.
  803.        OUTPUT  string out serial port, for scripts.
  804.         PAUSE  between commands.
  805.           POP  exit Take file or Macro.
  806.          PUSH  to MS-DOS command level.
  807.          QUIT  from Kermit-MS (same as EXIT).
  808.       RECEIVE  files from remote Kermit (R).
  809.       REINPUT  reread script Input buffer.
  810.        REMOTE  Prefix for remote file management commands.
  811.           RUN  an MS-DOS program or command.
  812.          SEND  files to remote Kermit (S).
  813.        SERVER  mode of remote operation.
  814.           SET  various parameters.
  815.          SHOW  various parameters.
  816.         SPACE  inquiry (about disk space).
  817.        STATUS  inquiry (about settings).
  818.          STAY  stay within Kermit after DOS command line invocation.
  819.          STOP  exit all Take files or Macros.
  820.          TAKE  commands from a file.
  821.      TRANSMIT  a file "raw" (no error checking).
  822.          TYPE  a local file on the screen.
  823.       VERSION  display Kermit-MS program version number.
  824.          WAIT  for the specified modem signal to appear.
  825.  
  826. Not all of these commands are necessarily available on all MS-DOS systems,  and
  827. some of the commands may work somewhat differently between DOS versions.
  828.  
  829. A  command  keyword,  such  as SEND, RECEIVE, HELP, etc, may be abbreviated, so
  830. long as you have typed enough letters to distinguish  it  from  other  keywords
  831. that  are valid in that position.  For instance, you can type CLE for CLEAR and
  832. CLO for CLOSE.  Several common commands also have special non-unique  abbrevia-
  833. tions,  like  C  for CONNECT, S for SEND, and R for RECEIVE. Kermit will notify
  834. you if you have typed a word with too few letters.
  835.  
  836. During interactive operation, you may edit the command you're currently  typing
  837. using  BACKSPACE  to  erase the character most recently typed, Ctrl-W to delete
  838. the most recent field, or Ctrl-U to delete the entire  command.    The  editing
  839. characters  may be used in any combination until the command is finally entered
  840. by typing RETURN (Carriage Return, Enter) or Ctrl-L.
  841.  
  842. You may use the help ("?") and keyword completion  (ESC) features freely  while
  843. typing Kermit-MS commands.  A question mark typed at almost any point in a com-
  844. mand produces a brief description, or "menu", of what is expected  or  possible
  845. at  that point.  ESC typed at any point, except in a local filename, will cause
  846. the current field to be filled out if what you have typed so far is  sufficient
  847. to  identify  it,  and will leave you in position to type the next field (or to
  848. type a "?" to find out what the next field is);  otherwise,  the  program  will
  849. beep at you and wait for you to type more characters.
  850.  
  851. As of version 2.31, Kermit-MS recognizes full 8-bit character inputs, with only
  852. NUL, ESC, DEL/BS, Ctrl-W (delete word), Ctrl-U (delete line), and Ctrl-C  being
  853. special.   This is to enhance support for various languages and keyboards.  The
  854. SET KEY and SHOW KEY commands can prompt  for  keyboard  input  and  understand
  855. 8-bit characters but only at their interactive prompt.  The SET KEY, INPUT, and
  856. OUTPUT commands accept "backslash number format"  on the  main  Kermit  command
  857. line.  Thus, national characters which are full 8-bit codes can be expressed on
  858. command lines in backslash number form (\ddd), provided the Kermit command  it-
  859. self  can  understand  the  form.    Most  commands that want numbers or single
  860. characters as operands understand this notation.  To enter characters in  back-
  861. slash  number format, type a backslash ("\") followed by a number corresponding
  862. to the ASCII code for the character.  MS-Kermit accepts  many  different  back-
  863. slash  codes in different contexts.  These are summarized in Table 1-1; letters
  864. following the backslach may be either upper or lower case.
  865.  
  866. -------------------------------------------------------------------------------
  867.  
  868.  
  869.   \123    (up to 3 decimal digits) - A decimal number
  870.   \d123   (up to 3 decimal digits) - A decimal number
  871.   \o123   (up to 3 octal digits) - An octal (base 8) number
  872.   \x123   (up to 3 hexadecimal digits) - a hexadecimal (base 16) number
  873.   \{ }    For grouping, e.g. \{12}6 = Ctrl-L 6, not ~
  874.   \;      Include a semicolon in a TAKE-file command or macro definition.
  875.   \%      Introduce a Kermit variable, \%1, \%2, ..., \%a, \%b, ... \%z
  876.   \K      A Kermit connect-mode verb like \Kexit (see Table 1-6)
  877.   \B      Send a BREAK (OUTPUT command only)
  878.   \255    Shorthand for CRLF or LFCR (INPUT command only)
  879.   \CD     Carrier Detect RS-232 signal (WAIT command only)
  880.   \DSR    Data Set Ready RS-232 signal (WAIT command only)
  881.   \CTS    Clear to Send RS-232 signal (WAIT command only)
  882.  
  883.                    Table 1-1:  MS-DOS Kermit Backslash Codes
  884.  
  885. -------------------------------------------------------------------------------
  886.  
  887. Table 1-2 shows all of the 7-bit ASCII codes in decimal.  Most Kermit  commands
  888. understand  backslash-ASCII  codes, both imbedded within character strings, and
  889. alone, as when a single character or number is to be specified.
  890.  
  891. -------------------------------------------------------------------------------
  892.  
  893.  
  894.     Dec Name Ctrl            Dec Char      Dec Char     Dec Char
  895.  
  896.      0   NUL  ^@           |  32  SP    |   64   @   |   96  `
  897.      1   SOH  ^A           |  33   !    |   65   A   |   97  a
  898.      2   STX  ^B           |  34   "    |   66   B   |   98  b
  899.      3   ETX  ^C           |  35   #    |   67   C   |   99  c
  900.      4   EOT  ^D           |  36   $    |   68   D   |  100  d
  901.      5   ENQ  ^E           |  37   %    |   69   E   |  101  e
  902.      6   ACK  ^F           |  38   &    |   70   F   |  102  f
  903.      7   BEL  ^G beep      |  39   '    |   71   G   |  103  g
  904.      8   BS   ^H backspace |  40   (    |   72   H   |  104  h
  905.      9   HT   ^I tab       |  41   )    |   73   I   |  105  i
  906.     10   LF   ^J linefeed  |  42   *    |   74   J   |  106  j
  907.     11   VT   ^K           |  43   +    |   75   K   |  107  k
  908.     12   FF   ^L formfeed  |  44   ,    |   76   L   |  108  l
  909.     13   CR   ^M return    |  45   -    |   77   M   |  109  m
  910.     14   SO   ^N shift out |  46   .    |   78   N   |  110  n
  911.     15   SI   ^O shift in  |  47   /    |   79   O   |  111  o
  912.     16   DLE  ^P           |  48   0    |   80   P   |  112  p
  913.     17   DC1  ^Q XON       |  49   1    |   81   Q   |  113  q
  914.     18   DC2  ^R           |  50   2    |   82   R   |  114  r
  915.     19   DC3  ^S XOFF      |  51   3    |   83   S   |  115  s
  916.     20   DC4  ^T           |  52   4    |   84   T   |  116  t
  917.     21   NAK  ^U           |  53   5    |   85   U   |  117  u
  918.     23   ETB  ^W           |  54   6    |   86   V   |  118  v
  919.     22   SYN  ^V           |  55   7    |   87   W   |  119  w
  920.     24   CAN  ^X           |  56   8    |   88   X   |  120  x
  921.     25   EM   ^Y           |  57   9    |   89   Y   |  121  y
  922.     26   SUB  ^Z           |  58   :    |   90   Z   |  122  z
  923.     27   ESC  ^[ escape    |  59   ;    |   91   [   |  123  {
  924.     28   FS   ^\           |  60   <    |   92   \   |  124  |
  925.     29   GS   ^]           |  61   =    |   93   ]   |  125  }
  926.     30   RS   ^^           |  62   >    |   94   ^   |  126  ~
  927.     31   US   ^_           |  63   ?    |   95   _   |  127  RUBOUT,DELETE
  928.  
  929.             Table 1-2:  The US ASCII Character Set (ANSI X3.4-1977)
  930.  
  931. -------------------------------------------------------------------------------
  932.  
  933. Some Kermit-MS commands like GET, SHOW KEY, and SET KEY,  may  prompt  for  ad-
  934. ditional  information  on  subsequent  lines.  If you have reached one of these
  935. prompts and then wish to cancel the command, you may type Control-C to get back
  936. to the main Kermit-MS> prompt.
  937.  
  938.  
  939. Summary of Kermit-MS command editing characters:
  940.  
  941.     SPACE   Separates fields within the command.
  942.  
  943.     TAB     Same  as  Space,  and echoes as Space.  You may also use Ctrl-I for
  944.             Tab.
  945.  
  946.     BACKSPACE
  947.             Deletes the character most recently typed.  May be typed repeatedly
  948.             to delete all the way back to the prompt.  You may also use DELETE,
  949.             RUBOUT, Ctrl-H, or equivalent keys.
  950.  
  951.     Ctrl-W  Deletes the most recent "word", or field, on the command line.  May
  952.             be typed repeatedly.
  953.  
  954.     Ctrl-U  Deletes the entire command line, back to the prompt.
  955.  
  956.     Ctrl-C  Cancels the current command and returns to the "Kermit-MS>" prompt.
  957.             Also, terminates execution of a TAKE command file.
  958.  
  959.     ESC     If  enough  characters have been supplied in the current keyword to
  960.             identify it uniquely the remainder of the field is supplied and the
  961.             cursor  is positioned to the next field of the command.  Otherwise,
  962.             a beep is sounded.  ESC does not provide filename completion.
  963.  
  964.     ?       Displays a brief message describing what may be typed in  the  cur-
  965.             rent  command  field.    Also,  wildcard character for matching any
  966.             single character in all but the first position of a filename.
  967.  
  968.     #       Wildcard character for matching  single  characters  in  filenames.
  969.             Equivalent  to  MS-DOS  "?",  but  used  in the first position of a
  970.             filename only, so that "?" may be used to get help at the beginning
  971.             of a filename field.
  972.  
  973.     ENTER   Enters  the command.  On most keyboards, you may also use RETURN or
  974.             Ctrl-M.
  975.  
  976.     Ctrl-L  Clears the screen and enters the command.
  977.  
  978. Liberal use of "?" allows you to feel your way through the commands  and  their
  979. fields.    This  feature  is sometimes called "menu on demand" or "context sen-
  980. sitive help" -- unlike systems that force you to negotiate menus at every turn,
  981. menu-on-demand provides help only when it is needed.
  982.  
  983. Command  reading is done through DOS calls and Kermit key redefinition does not
  984. apply at Kermit-MS command level.   But  ANSI.SYS  or  other  external  console
  985. drivers  can  be  used for this purpose, for instance to assign ESC to the PC's
  986. backquote key (ANSI.SYS is the IBM-supplied extended screen and keyboard device
  987. driver,  described  in  the IBM DOS Technical Reference Manual).  Other console
  988. drivers available include ProKey, SuperKey, NANSI.SYS (a public-domain replace-
  989. ment for ANSI.SYS), and FANSICONSOLE.
  990.  
  991. The notation used in command descriptions is as follows:
  992.  
  993.     [square brackets]
  994.             An optional field.  This field may be omitted.
  995.  
  996.     {curly braces}
  997.             A  list  of  alternatives,  separated by commas.  Choose one of the
  998.             items from the list.
  999.  
  1000.     italics Shows parameters, such  as  numbers  or  filenames,  are  shown  in
  1001.             italics  (providing  the  printer  is capable of printing italics).
  1002.             You substitute the actual number or filename.
  1003.  
  1004.     underlining
  1005.             In  dialog  examples, the characters you should type are underlined
  1006.             (on printers that can show it) to distinguish  them  from  computer
  1007.             typeout.
  1008.  
  1009.     hh:mm:ss
  1010.             A time of day, in 24-hour notation (10:00:00 is 10 AM; 23:30:00  is
  1011.             11:30  PM), which may not be more than 12 hours later than the cur-
  1012.             rent time.
  1013.  
  1014. The following sections describe all the MS-DOS Kermit  commands.    Since  some
  1015. command descriptions may contain references to other commands that haven't been
  1016. explained yet, you might find that this manual makes more  sense  on  a  second
  1017. reading.
  1018.  
  1019.  
  1020. 1.6.1. Program Management Commands
  1021.  
  1022. "Program  management" is a rubric for Kermit-MS commands like TAKE, EXIT, HELP,
  1023. COMMENT, ECHO, and VERSION, that don't fall into any other category.
  1024.  
  1025. HELP displays a one screen introduction to frequently used Kermit commands  and
  1026. their  editing  keys,  and  suggests using the question mark command to see the
  1027. terse list of primary level Kermit commands.
  1028.  
  1029. VERSION displays the MS-Kermit program version number, which you should know in
  1030. case you are reporting bugs or seeking technical assistance.
  1031.  
  1032. Other program management commands require a bit more explanation.
  1033. The EXIT Command
  1034.  
  1035. Syntax: EXIT  or  QUIT
  1036.  
  1037. EXIT and QUIT are synonyms for each other.  They cause MS-Kermit to return con-
  1038. trol to DOS or whatever program invoked MS-Kermit.  The specific actions  taken
  1039. are:
  1040.  
  1041.    - Close any open log or other files.
  1042.    - Close any open network connection.
  1043.    - Release all memory claimed by the program.
  1044.    - Return  interrupts for the currently selected communication device to
  1045.      their original owner.
  1046.    - Terminate execution.
  1047.  
  1048. The serial port RS-232 signals are left alone upon EXIT, so that modem  connec-
  1049. tions  are  not broken.  Kermit-MS may be restarted with the connection intact.
  1050. Use HANGUP to explicitly break a modem connection; and use SHOW MODEM  or  SHOW
  1051. COMMUNICATIONS  to  view  the status of modem signals CD (Carrier Detect), Data
  1052. Set (modem) Ready (DSR), and Clear To Send (CTS).
  1053.  
  1054.  
  1055. The STAY Command
  1056.  
  1057. Syntax: STAY
  1058.  
  1059. The STAY command, if included among command line arguments, instructs MS-Kermit
  1060. not  to  exit upon completion but rather to enter interactive mode, unless EXIT
  1061. or QUIT was among the command arguments.  STAY has no effect when  entered  in-
  1062. teractively or from a TAKE file.
  1063.  
  1064.  
  1065. The PUSH Command
  1066.  
  1067. Syntax: PUSH
  1068.  
  1069. PUSH  is  similar  to  EXIT,  except  it leaves MS-Kermit intact by invoking an
  1070. MS-DOS command processor "under"  Kermit-MS,  either  COMMAND.COM  or  whatever
  1071. shell  you  have  specified with COMSPEC (or SHELL, depending on the system) in
  1072. your CONFIG.SYS file.  You can return to Kermit-MS by typing  the  MS-DOS  EXIT
  1073. command,  and you will find Kermit-MS as you left it, with all settings and the
  1074. terminal emulation screen intact.  The same function is invoked by the  CONNECT
  1075. escape-level command P. Example:
  1076.  
  1077.     Kermit-MS>push           Push to DOS.
  1078.     Command v. 3.30          COMMAND.COM program herald.
  1079.  
  1080.     C>diskcopy a: b:         Run a DOS program.
  1081.  
  1082.       DISKCOPY dialog here...
  1083.  
  1084.     C>dir b:                 More DOS commands...
  1085.  
  1086.       DOS session continues...
  1087.  
  1088.     C>exit                   When done, type DOS EXIT command.
  1089.     Kermit-MS>               Back at Kermit.
  1090.  
  1091.  
  1092. The TAKE Command
  1093.  
  1094. Syntax: TAKE filespec
  1095.  
  1096. The  TAKE  command  gives you way a to collect MS-Kermit commands into a single
  1097. file, so that you can execute many commands by typing a single (TAKE)  command.
  1098. TAKE  instructs  MS-Kermit  to execute commands from the file that you specify.
  1099. The current directory is searched for the file first, and then any  directories
  1100. listed  in  the  PATH  environment  variable.  The command file may include any
  1101. valid Kermit-MS commands, including TAKE, but it cannot include  characters  to
  1102. be  sent  to  a  remote  host  after  a  CONNECT command (use scripts for that,
  1103. described below).  Execution  of  a  TAKE  file  may  be  cancelled  by  typing
  1104. Control-C at the keyboard.
  1105.  
  1106. An implicit TAKE command is executed upon the initialization file, MSKERMIT.INI
  1107. (or another file specified in the "-f"  command-line  argument),  whenever  you
  1108. start  MS-Kermit.    The MSKERMIT.INI file contains any commands you want to be
  1109. executed each time you run Kermit.  A sample is shown above,  and  a  more  am-
  1110. bitious example is shown in section 1.9.
  1111.  
  1112. Commands  within  TAKE files, unlike interactive commands, may include trailing
  1113. comments, preceded by semicolons:
  1114.  
  1115.     set port 2      ; Select the modem port.
  1116.     set speed 1200  ; Set the baud rate for the modem.
  1117.     connect         ; Conduct a terminal session.
  1118.     hangup          ; Hang up the phone after escaping back.
  1119.  
  1120. Note the HANGUP command after CONNECT.  The HANGUP command is not executed  un-
  1121. til  after you escape back from your CONNECT session.  If this file were called
  1122. MODEM.CMD, the following TAKE command would execute it:
  1123.  
  1124.     Kermit-MS>take modem.cmd
  1125.  
  1126. This directs MS-Kermit to find the MODEM.CMD file, open it,  execute  the  com-
  1127. mands  in  it,  close  it, and return to the MS-Kermit> prompt when done.  This
  1128. process can take a while on floppy-disk based systems.
  1129.  
  1130. Since TAKE file processing discards all characters from a line  beginning  with
  1131. the  first semicolon, it is normally not possible to include semicolons as part
  1132. of the commands themselves, e.g.
  1133.  
  1134.     get dska:foo.bar;6
  1135.  
  1136. To get around this restriction, you may precede such semicolons  with  a  back-
  1137. slash:
  1138.  
  1139.     get dska:foo.bar\;6
  1140.  
  1141. Commands  from  the  TAKE  file  will  normally not be displayed on your screen
  1142. during execution.  If you want to see them as they are executing, you  can  SET
  1143. TAKE-ECHO ON (for instance, at the beginning or end of your MSKERMIT.INI file).
  1144. With the echoing ON, comments are also displayed for reference, but  the  semi-
  1145. colon is not shown.
  1146.  
  1147. TAKE  files  may  be nested to a reasonable level.  A command file that was in-
  1148. voked by another command file normally returns to its  invoking  command  file,
  1149. rather  than  to  the  MS-Kermit>  prompt,  when the end of the command file is
  1150. reached.
  1151.  
  1152. TAKE files have two commands to quit processing before the end of the  file  is
  1153. reached.    The  POP command exits the current TAKE file (or macro) and returns
  1154. control to the previously executing TAKE or macro, where one is invoked  within
  1155. another.  The STOP command exits all TAKE files and macros and returns directly
  1156. to the Kermit prompt.
  1157.  
  1158. In TAKE files (and macro definitions, which are discussed later), long commands
  1159. may  be continued on subsequent lines by terminating each continued line with a
  1160. hyphen (minus sign).  If a line needs to terminate with a real  minus  sign  it
  1161. may  be expressed numerically as \45 or can be extented with extra spaces.  The
  1162. overall command length is normally 127 bytes (a beep sounds near this limit).
  1163.  
  1164. An explicit question mark ("?") in a TAKE file will cause a help message to  be
  1165. displayed  and  the  rest  of the line will be read as another command.  If you
  1166. need to include a question mark in a command, use the ASCII backslash  notation
  1167. "\63".
  1168.  
  1169.  
  1170. The -F Command
  1171.  
  1172. Syntax: -F filespec
  1173.  
  1174. The  "-f"  command  is  effective  only  on the DOS command line.  It instructs
  1175. MS-Kermit to use the specified file as its  initialization  file,  rather  than
  1176. MSKERMIT.INI.    Unlike other command-line arguments, "-f" does not, of itself,
  1177. cause MS-Kermit to exit upon completion.  Example:
  1178.  
  1179.     C>kermit -f sunday.ini
  1180.     Kermit-MS>
  1181.  
  1182. The -F command line option allows different MS-Kermit initialization  files  to
  1183. coexist.  You can create batch commands to invoke Kermit in different ways, for
  1184. instance MONDAY.BAT might contain "kermit -f monday.ini",  TUESDAY.BAT  "kermit
  1185. -f tuesday.ini", etc.
  1186.  
  1187.  
  1188. The ECHO Command
  1189.  
  1190. Syntax: ECHO [string]
  1191.  
  1192. The  ECHO  command  writes  the string to the screen, without adding a carriage
  1193. return or line feed.  ECHO may be used to report progress during execution of a
  1194. TAKE command file, or to issue prompts during the execution of a script.
  1195.  
  1196.     ECHO Part one completed...\13
  1197.  
  1198. The  number  at the end is a "backslash codes" for ASCII control characters, in
  1199. this case carriage return (\13).  Since the ECHO command  interprets  backslash
  1200. codes, ANSI.SYS and similar console drivers can be programmed through this com-
  1201. mand by embedding ANSI escape  sequences  (see  section  1.17.3)  in  the  echo
  1202. string.  The ECHO command always outputs a linefeed before the string.
  1203.  
  1204.  
  1205. The COMMENT Command
  1206.  
  1207. Syntax: COMMENT text
  1208.  
  1209. The  COMMENT  command  lets  you add comments to a TAKE command file.  The word
  1210. COMMENT (or any unique prefix thereof) must appear as the  first  word  on  the
  1211. line.  The COMMENT command may also be entered interactively.  It has no effect
  1212. at all.  Example:
  1213.  
  1214.     COMMENT - MS-Kermit command file to connect port 2 to an IBM mainframe
  1215.     set port 2
  1216.     set speed 4800   ; Transmission rate is 4800
  1217.     do ibm           ; Set parameters for IBM linemode
  1218.     connect          ; Be a terminal
  1219.  
  1220. Question marks can be included in comments without invoking the help function.
  1221.  
  1222.  
  1223. 1.6.2. Local File Management Commands
  1224.  
  1225. These commands are executed on your local PC, and  generally  invoke  DOS  ser-
  1226. vices.  This allows you to perform common DOS functions without leaving Kermit.
  1227. All file specifications may include device and/or directory fields.  The  local
  1228. file management commands are:
  1229.  
  1230. CWD path
  1231.         Changes  the  current  working  directory  to  the  given  path.    All
  1232.         references  to  local  file  names without explicit paths will refer to
  1233.         that path.  A drive letter may be included to also change disk  drives.
  1234.         This  command  affects Kermit and any inferior programs that you RUN or
  1235.         PUSH to, but your previous disk and directory  are  restored  when  you
  1236.         exit from Kermit.  For consistency with DOS, you may also type CD.
  1237.  
  1238.  
  1239. DELETE filespec
  1240.         Deletes the specified file or files.  As  in  DOS,  the  names  of  the
  1241.         deleted  files  are  not  listed, only the message "file(s) deleted" or
  1242.         "file(s) not  found",  and  if  you  give  the  command  "delete  *.*",
  1243.         Kermit-MS will prompt "Are you sure?" since DOS is doing the work.
  1244.  
  1245.  
  1246. DIRECTORY [filespec]
  1247.         Lists the names, sizes, and creation dates  of  files  that  match  the
  1248.         given  file  specification.    If  no filespec is given, the command is
  1249.         equivalent to DIR *.*.  Normal DOS switches are effective.
  1250.  
  1251.  
  1252. SPACE   Tells how much space is available on the current disk.
  1253.  
  1254.  
  1255. RUN command
  1256.         Passes  the  command  line to COMMAND.COM for execution.  Any legal DOS
  1257.         operation is permitted: running a program (perhaps  with  command  line
  1258.         arguments  or i/o redirection), executing a DOS command, or executing a
  1259.         batch file.  Kermit is suspended while  the  command  is  executed  and
  1260.         automatically resumes afterward.  The command will be executed directly
  1261.         by COMMAND.COM so follow the rules of DOS.  Example:
  1262.  
  1263.             Kermit-MS>run more < xmas.txt
  1264.  
  1265.  
  1266.  
  1267. TYPE filespec
  1268.         Displays  the  specified  local file on the screen.  Automatic pause is
  1269.         not available at the end of a page (but see above example  for  how  to
  1270.         accomplish this).  On most systems, Ctrl-S can be typed to stop scroll-
  1271.         ing and Ctrl-Q to continue scrolling.
  1272.  
  1273. In most cases when you issue a local command, Kermit attempts to run the equiv-
  1274. alent  DOS command.  If you get a message like "?Unable to execute program", it
  1275. means that Kermit could not find COMMAND.COM, or  that  there  was  not  enough
  1276. memory left to load it.  To ensure that Kermit can find COMMAND.COM, you should
  1277. include a PATH statement in your AUTOEXEC.BAT file, which includes  the  device
  1278. and directory where COMMAND.COM resides.
  1279.  
  1280. You can add your own local commands by defining macros for them.  For example:
  1281.  
  1282.     define edit run epsilon \%1
  1283.     define more run more < \%1
  1284.     define rename run ren \%1 \%2
  1285.  
  1286. Then  you  can  use  these  commands at Kermit-MS prompt level: "edit foo.bar",
  1287. "more oofa.txt", "rename  old.txt  new.txt".    However,  you  cannot  redefine
  1288. built-in commands, for example:
  1289.  
  1290.     define send receive \%1
  1291.  
  1292. See Section 1.7 for further information about macros.
  1293. 1.6.3. COMMANDS FOR TERMINAL CONNECTION
  1294.  
  1295. The CONNECT command connects your PC as a terminal to the remote system so that
  1296. you may conduct a session there, and the HANGUP command may be used to  discon-
  1297. nect  your  modem (if you have one) from the remote system.  There is presently
  1298. no built-in DIAL command.  Modems may be dialed "manually" during  CONNECT,  or
  1299. you  can  construct your own DIAL command by using scripts, which are described
  1300. in detail in subsequent sections.
  1301.  
  1302. For completeness, the descriptions below contain copious reference to  the  SET
  1303. commands,  which  let  you  modify  all  sorts  of  terminal  and communication
  1304. parameters (the SET commands are described in a later section).   MS-Kermit  is
  1305. initially  set up with the following parameters, so that you only need to issue
  1306. SET commands for those that need to be changed:
  1307.  
  1308.     PORT                    1 (in most cases, e.g. COM1 on the IBM PC family)
  1309.     TERMINAL                VT102(*) emulation (IBM PC, DEC Rainbow)
  1310.     SPEED                   Whatever the serial card is currently set to.
  1311.     PARITY                  None
  1312.     FLOW-CONTROL            XON/XOFF
  1313.     HANDSHAKE               None
  1314.     LOCAL-ECHO              Off
  1315.     DISPLAY                 7-bit characters
  1316.     INPUT TRANSLATION       Off
  1317.     ESCAPE                  Control-Rightbracket
  1318.  
  1319. (*) The VT102 terminal is compatible with the VT100, but  includes  a  few  ad-
  1320. ditional functions.
  1321.  
  1322.  
  1323. The CONNECT Command
  1324.  
  1325. Syntax: CONNECT -or- C
  1326.  
  1327. The  CONNECT  command  establishes  an  interactive  terminal connection to the
  1328. remote system using the currently selected communications port (SET  PORT  COM1
  1329. or  COM2,  COM1  is the default) with all settings currently in effect for that
  1330. port, emulating the currently selected type of terminal.
  1331.  
  1332. During CONNECT, the characters you type are sent out  the  communication  port,
  1333. and  the  characters that arrive at the port are displayed on the screen or in-
  1334. terpreted by the selected  terminal  emulator.    If  you  SET  LOCAL-ECHO  ON,
  1335. MS-Kermit itself will display the characters you type on the screen.
  1336.  
  1337. Before  you issue the CONNECT command, be sure to set the correct communication
  1338. speed (SET SPEED) and any other necessary communication  parameters  (e.g.  SET
  1339. PARITY,  SET LOCAL-ECHO).  If you have SET DEBUG ON, then (on most DOS systems,
  1340. particularly the IBM PC), received control characters will be displayed in spe-
  1341. cial notation and no particular terminal will be emulated.
  1342.  
  1343. By  default,  7-bit  ASCII  characters are displayed on the screen.  If you SET
  1344. DISPLAY 8, then 8-bit characters will be used (useful for "national"  character
  1345. sets).  Character translation will be done according to any SET TRANSLATION IN-
  1346. PUT and SET KEY commands you have issued.  In  addition,  characters  that  are
  1347. sent  to the screen will also be recorded in a disk file or on a printer if you
  1348. have issued a LOG SESSION command.
  1349.  
  1350. The CONNECT command turns your PC into a terminal to the other  computer.    To
  1351. get  back  to  the  PC, type the escape character followed by the letter C (for
  1352. "Close connection").  On most MS-DOS systems the  escape  character  is  Ctrl-]
  1353. (Control-Rightbracket).    That  means,  hold down the Ctrl key, press "]", and
  1354. then type the letter C.
  1355.  
  1356.     Kermit-MS>connect        Connect to remote system.
  1357.  
  1358.       Conduct terminal session here...
  1359.  
  1360.     ^]c                      Escape back to PC.
  1361.     Kermit-MS>               Prompt reappears.
  1362.  
  1363. This is called "escaping back".  You can use the SET ESCAPE command  to  change
  1364. the escape character to something besides "^]", or you can assign the escaping-
  1365. back operation to a single key or key combination with SET KEY (on the  IBM  PC
  1366. the default for this is Alt-X).
  1367.  
  1368. You can include the CONNECT command in a TAKE command file, but not "bare" text
  1369. to be sent to the remote system during CONNECT (use scripts for that, see  Sec-
  1370. tion  1.8).    When a TAKE file includes a CONNECT command, no further commands
  1371. will be executed from the file until after you escape back.  A curious side ef-
  1372. fect  of  allowing  Kermit  to accept input redirected from a file or device is
  1373. that Connect mode will read characters from that file  or  device;  not  really
  1374. that useful but it works if you happen to need it.
  1375.  
  1376. When  you CONNECT, the program attempts to raise the DTR and RTS RS-232 signals
  1377. (see Table 1-3), and it takes no specific action to lower them unless  you  ex-
  1378. plicitly issue the HANGUP command; thus you can EXIT from Kermit-MS and restart
  1379. it without dropping a dialup connection.  While CONNECTed, you can  communicate
  1380. directly  with  an  autodialer  or  "smart modem" to control the communications
  1381. line, hang it up, and the like, for instance, by typing AT commands to a Hayes-
  1382. like modem.
  1383.  
  1384.     Kermit-MS>set speed 2400 (See Section 1.6.10)
  1385.     Kermit-MS>connect
  1386.     AT                       Now you're talking to the modem.
  1387.     OK                       Your modem responds
  1388.     ATDT8765432              Type the modem's dialing command.
  1389.     RINGING
  1390.     CONNECT 2400
  1391.     Welcome to ...           Now you're talking to the host computer.
  1392.     Please login:
  1393.  
  1394. MS-Kermit  makes  no attempt to monitor the modem's Carrier Detect (CD) or Data
  1395. Set Ready (DSR) signals (see Table 1-3), and will take no notice if they  drop.
  1396. Thus  it is not possible to automatically terminate a session if the connection
  1397. is broken.  However, you may query or test the status of  these  modem  signals
  1398. yourself using Kermit's SHOW MODEM, SHOW COMMUNICATIONS, and WAIT commands.
  1399.  
  1400. -------------------------------------------------------------------------------
  1401.  
  1402.  
  1403.   Signal DB25 DB9 Description
  1404.    FG     1   -   Frame (protective) ground
  1405.    TD     2   3   Transmitted data (from PC to modem)
  1406.    RD     3   2   Received data (by PC from modem)
  1407.    RTS    4   7   Request to Send (by PC)
  1408.    CTS    5   8   Clear to Send (by modem)
  1409.    DSR    6   6   Dataset Ready (Modem is turned on)
  1410.    SG     7   5   Signal Ground
  1411.    CD     8   1   Carrier Detect (Modem is communicating with remote modem)
  1412.    DTR   20   4   Data Terminal Ready (PC is online)
  1413.    RI    22   9   Ring Indicate (Modem tells PC phone is ringing)
  1414.  
  1415.                       Table 1-3:  RS-232-C Modem Signals
  1416.  
  1417. -------------------------------------------------------------------------------
  1418.  
  1419. When  using Kermit to connect two PCs "back to back," SET LOCAL-ECHO ON so that
  1420. when you CONNECT to the other PC to send messages to its operator, you can  see
  1421. what  you  are typing.  You should also SET TERMINAL NEWLINE ON, so that that a
  1422. linefeed will be automatically supplied for each carriage return you type.
  1423.  
  1424.  
  1425. The HANGUP Command
  1426.  
  1427. On serial port connections, the HANGUP command attempts  to  momentarily  lower
  1428. the modem signals DTR and RTS (Table 1-3).  It may be used to hang up the phone
  1429. when dialed up through a modem, or to get  the  attention  of  port  contention
  1430. units or terminal concentrators that operate in this manner.  On direct connec-
  1431. tions, it will probably have no effect.  On local area network connections, the
  1432. network  session  is  fully  terminated.    HANGUP  affects  only the currently
  1433. selected port.
  1434.  
  1435.  
  1436. TERMINAL EMULATION
  1437.  
  1438. The IBM PC version of Kermit-MS emulates the DEC VT102 terminal by default, and
  1439. may  also  be  instructed  to  emulate  the  DEC VT52, the Heath/Zenith-19, the
  1440. Tektronix 4010 graphics terminal, or no terminal at all,  selectable  with  the
  1441. SET  TERMINAL  command  (or  you may "toggle" among the different emulations by
  1442. typing the Alt-Minus key).  Emulation of each of these terminals is nearly com-
  1443. plete.    VT102  emulation  lacks  only  smooth scroll and 132 column mode (132
  1444. column mode is supported for a number of popular EGA and VGA boards).   Double-
  1445. height,  double-width  characters  are  supported, but simulated using ordinary
  1446. characters.
  1447.  
  1448. The IBM PC's 40-column (large character) screen mode may be used during CONNECT
  1449. (but you may also have to inform the remote host that your screen width is 40).
  1450. This can provide improved readability to  visually  impaired  persons.  To  use
  1451. 40-column  mode,  enter  the  DOS  command  "MODE 40" (or CO40 or BW40).  Other
  1452. screen sizes are also sensed and used automatically, provided you have set them
  1453. from DOS, before starting Kermit.
  1454.  
  1455. On  color  monitors,  the foreground and background colors may be set using SET
  1456. TERMINAL COLOR, and inverse/normal video display may also  be  selected,  along
  1457. with  many other terminal parameters.  A complete list of the commands, default
  1458. key configurations, and escape sequences accepted by the IBM PC Kermit terminal
  1459. emulator  is  given  in  section 1.17.1.  Non-IBM-compatible PCs have different
  1460. terminal emulation options.  See section 1.11.
  1461.  
  1462.  
  1463. Escape-Level Commands
  1464.  
  1465. The escape character, normally Control-], is used to regain  the  attention  of
  1466. Kermit-MS  during  CONNECT  (you  can change the escape character using SET ES-
  1467. CAPE).  When you type the escape character, Kermit-MS waits for you  to  follow
  1468. it with a single character command.  For instance, the single character command
  1469. "?" produces a list of available single character commands.   This  command  is
  1470. executed immediately; it may not be edited, and the program does not wait for a
  1471. carriage return to confirm it.  Table 1-4 shows CONNECT  escape-level  commands
  1472. available  in  Kermit-MS.    Typing  any other character (except the space bar,
  1473. which is the "null command") after the escape character will cause Kermit-MS to
  1474. beep,  but will do no harm.  These actions are also Kermit action verbs and can
  1475. be assigned to single keys.  See SET KEY for details.
  1476.  
  1477.  
  1478. The Mode Line
  1479.  
  1480. When you first issue the CONNECT command, a message (on some  systems,  an  in-
  1481. verse  video  "mode line") will display the most important facts about the con-
  1482. nection you've just established, so that you can quickly diagnose any problems.
  1483. Here's what the IBM PC mode line looks like:
  1484.  
  1485. Esc-chr:^] help:^]? port:1 speed:9600 parity:odd echo:rem VT102 .... PRN
  1486.  
  1487. This  shows that the escape character is Ctrl-Rightbracket, that you would type
  1488. Ctrl-rightbracket followed by question mark ("^]?") to get help during CONNECT,
  1489. that  you are connected on port 1 at 9600 baud with odd parity and remote echo,
  1490. and that a VT102 terminal is being emulated.    The  four  dots  represent  the
  1491. VT102s LEDs (they turn into the digits 1,2,3,4 when "lit") and PRN will show up
  1492. if the printer is activated (e.g. by Ctrl-PrintScreen).
  1493.  
  1494. -------------------------------------------------------------------------------
  1495.  
  1496.  
  1497.     ?   Help -- Lists the available single-character commands.
  1498.     0   (the digit zero) Transmit a NUL (ASCII 0).
  1499.     B   Transmit a BREAK signal.
  1500.     L   Transmit a Long BREAK signal (on some systems).
  1501.     C   Close the connection and return to Kermit-MS prompt level.
  1502.     H   Hangup the phone by lowering DTR and CTS momentarily.
  1503.     F   File the current screen in the screen dump file.
  1504.     M   Toggle the mode line, i.e. turn it off if it is on or vice versa.
  1505.     P   Push to DOS; get back to CONNECT by typing EXIT.
  1506.     Q   Temporarily quit logging the remote session.
  1507.     R   Resume logging the remote session.
  1508.     S   Show the status of the connection.
  1509.     ^]  (or whatever you have set the escape character to be)
  1510.         Typing the escape character twice sends one copy of it to the connected
  1511.         host.
  1512.  
  1513.         Table 1-4:  Kermit-MS Single-Character CONNECT Escape Commands
  1514.  
  1515. -------------------------------------------------------------------------------
  1516.  
  1517.  
  1518. The mode line may be turned on and off using SET MODE, or  the  CONNECT  escape
  1519. character followed by the letter M.
  1520.  
  1521.  
  1522. Screen Rollback
  1523.  
  1524. On  the  IBM  PC  and  some  other  systems (see Table 1-7), Kermit-MS provides
  1525. several pages of screen memory which let you recall earlier  terminal  screens.
  1526. These  may  be  scrolled up and down using keys as shown in Table 1-8.  For in-
  1527. stance, the IBM PC uses PgUp (previous screen), PgDn (next  screen),  Ctrl-PgUp
  1528. and  Ctrl-PgDn (one line at a time), Home (top of screen memory), and End (bot-
  1529. tom of screen memory).  Lines that scroll off the top of the screen are  saved.
  1530. When  an application clears the screen using a recognized screen-clear sequence
  1531. (ESC [ 2 J), the whole screen is saved.  The screen scrolling functions may  be
  1532. assigned to different keys with the SET KEY command.
  1533.  
  1534. If  you  have  rolled the screen back and a new character must be displayed, it
  1535. will normally appear at the current cursor position on the old screen.  This is
  1536. useful  when  you  are trying to copy something from a previous screen.  If you
  1537. wish new characters to appear in their proper place on the "newest" screen, you
  1538. can SET TERMINAL ROLL ON.
  1539.  
  1540. The  number  of  lines  in the roll back buffer depends on the machine, 10 full
  1541. screens for IBM PCs and DEC Rainbows, and on the amount of memory available  in
  1542. the  machine.  Each  screen needs 4KB on IBM PCs. Denser displays receive fewer
  1543. roll back lines.
  1544.  
  1545.  
  1546. Screen Dump
  1547.  
  1548. The screen dump feature writes the contents of the current  screen  to  a  file
  1549. (KERMIT.SCN  unless another file was selected by the SET DUMP command) when the
  1550. CONNECT escape-level command F is typed.  The screen dump file is  appended  to
  1551. on  each  successive  screen  dump,  with  each  screen separated by a formfeed
  1552. (Ctrl-L).  This feature may be used in conjunction with screen  rollback  --  a
  1553. handy  way  to recapture screenfuls of laboriously typed-in text after a remote
  1554. host has crashed without saving your work.  The corresponding  action  verb  is
  1555. "dump".  Screen dump does not function when in Tektronix graphics mode; instead
  1556. one of many graphics screen capture programs may be used independently commonly
  1557. via the DOS Shift PrtSc key combination or by LOGging the incoming byte stream.
  1558.  
  1559. A  screen  dump  differs  from  a session log in two ways.  First, each desired
  1560. screen must be manually filed, and  second,  the  screen  dump  file  has  been
  1561. stripped of any escape sequences, whereas the session log records them (see LOG
  1562. SESSION).
  1563.  
  1564.  
  1565. Printer Control
  1566.  
  1567. During terminal emulation, a locally attached printer may be controlled in  the
  1568. normal  manner,  on  most  systems.  Pushing the "Print Screen" key (shifted on
  1569. some systems) will cause the current contents of the screen to  be  printed  by
  1570. DOS; holding down Ctrl while depressing Print Screen will alternately start and
  1571. stop the spooling of incoming characters to the printer.  On the  IBM  PC,  the
  1572. mode line will show PRN when the printer is activated in this manner.  ^P or ^N
  1573. are sent to the host during terminal emulation and do not  toggle  printing  as
  1574. they  do  when  you're talking directly to DOS.  CTRL-Print-Screen can be simu-
  1575. lated with the Kermit-MS LOG PRN  and  CLOSE  commands.    VT102  (ANSI)  style
  1576. host-controlled transparent printing is also supported on the IBM PC.  See sec-
  1577. tion 1.18.6 for technical information about MS-Kermit's printer control.
  1578.  
  1579. Unix users may use the following shell script to print files on a  locally  at-
  1580. tached printer:
  1581.  
  1582.     #!/bin/sh
  1583.     # pcprint
  1584.     # usage: pcprint file(s)
  1585.     #  or <any UNIX process that writes to standard output> | pcprint
  1586.     #
  1587.     echo -n '<ESC>[5i'
  1588.     if [ $# -eq 0 ]; then
  1589.       cat
  1590.     else
  1591.       cat $*
  1592.     fi
  1593.     echo -n '<ESC>[4i'
  1594.  
  1595. Note  that  "<ESC>"  above should be replaced by a real Escape, ASCII character
  1596. 27.
  1597.  
  1598.  
  1599. Graphics
  1600.  
  1601. MS-Kermit on the IBM PC, compatibles, and several other systems, is capable  of
  1602. emulating  a Tektronix 4010 graphics terminal, for use with host-based software
  1603. that can generate Tektronix control codes.  When you enter Tektronix emulation,
  1604. your  cursor will disappear.  Don't be alarmed, this is how Tektronix terminals
  1605. behave.
  1606.  
  1607. The Tektronix emulator implements a mixture of Tek 4010 and  4014  features  to
  1608. draw  characters,  lines, and dots in graphics mode.  These Tektronix terminals
  1609. have a graphics display 780 dots high by 1024 dots wide.  They use storage tube
  1610. technology  whereby  a  dot  stays illuminated until the full screen is erased.
  1611. They also lack cursor keys.  Kermit's Tek emulator maps the  1024  by  780  dot
  1612. display  to  the  PC's  current screen dimensions, say 640 across by 200 or 350
  1613. dots high, and retains limited use of the cursor keys.  It automatically senses
  1614. the  active  display adapter (EGA, CGA, Hercules, Mono, and AT&T/Olivetti style
  1615. 640x400) and retains screen coloring (EGA) and the current graphics image  (EGA
  1616. and  Hercules)  if the adapter has sufficient memory.  Automatic sensing can be
  1617. manually overriden to select a particular display mode, such as VGA  (640x480),
  1618. by  SET  TERMINAL  GRAPHICS <display type>. Pure monochrome systems, of course,
  1619. lack a graphics capability; in this case Kermit approximates the graphic  image
  1620. by writing dots as plus signs.
  1621.  
  1622. Tektronix graphics mode is entered two different ways, automatically and volun-
  1623. tarily:
  1624.  
  1625.    1. Automatically (which you can prevent via the Kermit command  DISABLE
  1626.       TEK).   While emulating a VT102, VT52, or Heath-19, reception of the
  1627.       byte pair ESCAPE Control-L causes the PC to change to graphics mode,
  1628.       clear  the  screen,  and  obey  new  input as Tektronix commands.  A
  1629.       second  automatic  entry  is  reception  of  the   escape   sequence
  1630.       "ESC  [  ?  3 8 h" which does the same as above except the screen is
  1631.       not cleared.  Automatic  mode  is  exited  by  either  reception  of
  1632.       Control-X or "ESC [ ? 3 8 l" (lower case L), or by toggling the ter-
  1633.       minal type (ALT minus, Kermit verb\KTermtype) to VT102, or something
  1634.       other  than TEK.  (These "ESC [ ? 3 8 h/l" sequences derive from the
  1635.       DEC VT340 terminal.)
  1636.  
  1637.    2. Voluntary mode is when terminal type TEK4010 is selected by the Ker-
  1638.       mit  command  SET  TERMINAL  TEK4010  or  by  toggling  to  it using
  1639.       Alt-Minus.  It is exited by SET TERMINAL another-kind or by toggling
  1640.       to another kind.  ENABLE or DISABLE TEK and the exit-Tek-mode escape
  1641.       sequences are not applicable to voluntary mode.
  1642.  
  1643. Here are several common questions about Tek mode, and their answers:
  1644.  
  1645.    1. "How do I escape from graphics mode back to  being  a  regular  ter-
  1646.       minal?"  Within CONNECT mode, you can type the \KTermtype key, which
  1647.       is assigned by default to Alt-Minus.  Repeated pressing of this  key
  1648.       "toggles"  among Kermit's terminal types, VT102, VT52, Heath-19, and
  1649.       Tektronix.  You can also escape back to Kermit-MS command level  and
  1650.       issue an explicit SET TERMINAL command to change the terminal type.
  1651.  
  1652.    2. "How  can  I return to the graphics screen without erasing it?"  The
  1653.       graphics screen is preserved if your graphics adapter has sufficient
  1654.       memory  (see  Table 1-5).  In this case, both your text and graphics
  1655.       screens will be preserved when you toggle back and forth  between  a
  1656.       character terminal (e.g. VT102) and Tektronix.
  1657.  
  1658.    3. "How do I erase the graphics screen?"  You can type the \KReset key,
  1659.       which is normally assigned to Alt-=.  The screen also clears if  the
  1660.       host sends a Control-L or ESC Control-L.
  1661.  
  1662.    4. "How  do I print or save the graphics screen?"  Kermit does not cur-
  1663.       rently provide a way to do this,  but  you  can  load  drivers  like
  1664.       GRAPHICS.COM alongside Kermit for this purpose.
  1665.  
  1666. While acting as a Tek terminal Kermit uses the keyboard translation appropriate
  1667. to the VT102 terminal.  However, received escape sequences are  interpreted  by
  1668. the  Tek emulator and VT102 escape codes are inoperative.  The Tek emulator ab-
  1669. sorbs the ESCAPE and following character  and  treats  any  additional  unknown
  1670. items as ordinary text.
  1671.  
  1672. The  emulator  can  display text characters from a built-in 8-by-8 dot font for
  1673. characters Space through DELete (no  control  codes  nor  special  characters).
  1674. Tabs  are  converted to single spaces. Only the low 7 bits of the character are
  1675. used.
  1676.  
  1677. While in Tek mode the emulator behaves as a simple TTY device for ordinary text
  1678. and  as  a  line  or  dot drawing Tektronix device for commands listed in Table
  1679. 1-10.  The screen resolution is governed by the kind of active display  adapter
  1680. and  monitor  in  the  PC  (Table  1-5).  Kermit senses this automatically when
  1681. graphics mode is entered.  Graphics are saved on page  one  of  screen  memory.
  1682. Coloring  is  determined  by  the  current  terminal status, either the default
  1683. screen or that overridden by the command SET TERMINAL COLOR.
  1684.  
  1685. The technical details of Tektronix emulation are presented in section 1.17.7.
  1686.  
  1687. -------------------------------------------------------------------------------
  1688.  
  1689. Display Adapter Display       Mode    Screen Resolution and Coloring
  1690. VGA             Hi res color  18      640x480, graphics saved (407 lines),
  1691.  
  1692.                                        16 colors.
  1693. VGA             Monochrome    17      640x480, graphics saved (407 lines)
  1694. EGA w/256KB     Hi res color  16 dec  640x350, graphics saved, 16 colors.
  1695.                 Med res color 14      640x200, graphics saved, 8 colors.
  1696.                 Monochrome    15      640x350, graphics saved, b/w.
  1697. EGA w/64KB      Hi res color  16      640x350, graphics not saved,
  1698.                                        4 colors of red, white, blue, black.
  1699.                 Med res color 14      640x200, graphics saved, 8 colors.
  1700.                 Monochrome    15      640x350, graphics not saved.
  1701. CGA             Color         6       640x200, graphics not saved, b/w.
  1702. Hercules        Monochrome    none    720x348, graphics saved if memory.
  1703. Monochrome      Monochrome    7       80 by 25 text, graphics not saved.
  1704. AT&T/Olivetti   any           72      640x400, grahics not saved, b/w.
  1705. DEC VAXMATE     any           208     640x400, graphics not saved, b/w.
  1706. TOSHIBA T3100   any           116     640x400, graphics not saved, b/w.
  1707.  
  1708.   Table 1-5:  Adapters Supported by IBM PC MS-Kermit for Tektronix Emulation
  1709.  
  1710. -------------------------------------------------------------------------------
  1711. 1.6.4. COMMANDS FOR FILE TRANSFER
  1712.  
  1713. MS-Kermit's SEND, GET, and RECEIVE invoke the Kermit file transfer protocol for
  1714. error-checked  transmission  of  files  between  MS-Kermit  and  another Kermit
  1715. program on the other end of the connection.  There are also commands for  "raw"
  1716. transfer  of  files  (no  error  checking)  with systems that don't have Kermit
  1717. programs: LOG SESSION (for capturing text files on your PC) and  TRANSMIT  (for
  1718. uploading  text files to the remote system).  The LOG TRANSACTION command opens
  1719. a file to record the status, time, date, names, sizes of each file transfer.
  1720.  
  1721. During file transfer, MS-Kermit normally displays its progress on the screen as
  1722. shown  in  Figure  1-1.  The items in the right-hand column are updated more or
  1723. less at random.  The percent done is always filled in when sending  files,  and
  1724. when  receiving  if  the  other  Kermit  sends  the  file's  size  in a special
  1725. file-attribute packet.  The number of retries indicates how many  times  Kermit
  1726. had to correct transmission errors.  Several other file transfer display format
  1727. options are also available; see SET DISPLAY.
  1728.  
  1729. -------------------------------------------------------------------------------
  1730.  
  1731.  
  1732.                Kermit-MS: V2.32/A  24 Jan 1989
  1733.  
  1734.                File name: FOT.
  1735.       KBytes transferred: 7
  1736.      Percent transferred: 52%
  1737.                  Sending: In progress
  1738.  
  1739.        Number of packets: 74
  1740.            Packet length: 93
  1741.        Number of retries: 2
  1742.               Last error: None
  1743.             Last warning: None
  1744.  
  1745.               Figure 1-1:  MS-Kermit File Transfer Display Screen
  1746.  
  1747. -------------------------------------------------------------------------------
  1748.  
  1749. Although MS-Kermit makes no distinction between text  and  binary  files,  most
  1750. other  Kermit  programs  do.   Therefore, before you attempt to transfer binary
  1751. files with another type of system (say, a VAX, or an IBM mainframe), be sure to
  1752. give  the  appropriate command -- usually SET FILE TYPE BINARY -- to the Kermit
  1753. on the remote end.  Kermit-MS itself neither has nor needs the command SET FILE
  1754. TYPE,  because the MS-DOS format for text files is exactly the same as Kermit's
  1755. text-file transfer format, which means that MS-Kermit never  needs  to  convert
  1756. file data, no matter whether it be text or binary.
  1757.  
  1758. File  transfers  involving floppy disks will be slow and noisy.  Hard disks are
  1759. much faster (and quieter), and RAM disks faster  still  (and  totally  silent).
  1760. But  if  you store new files on a RAM disk, be sure to move them to a real disk
  1761. before turning off your PC.
  1762.  
  1763. Before attempting to transfer files to the PC, make sure you have  enough  room
  1764. on  the selected device.  Kermit does not provide a way for you to change disks
  1765. during a file transfer.  However, the Kermit protocol will help you out a  lit-
  1766. tle  bit  by attempting to prevent transfer of files that are too big to fit in
  1767. the available space.  As of version 2.31, MS-Kermit supports "file  attributes"
  1768. exchange,  and if the other Kermit supports this option too, then the receiving
  1769. program will check  free  disk  space  before  letting  the  transfer  proceed.
  1770. MS-Kermit  allows  a margin of 6 percent inflation upon reception, because file
  1771. construction differs markedly between systems.  A  multiple-file  transfer  can
  1772. even  skip  automatically past files that are too big, allowing the little ones
  1773. to pass though.
  1774.  
  1775. Other attributes exchanged by MS-Kermit include the file's  creation  date  and
  1776. time,  and  the system of origin.  When two Kermit programs both have attribute
  1777. capability, then files will be stored with the same timestamp on the  receiving
  1778. system as they had on the sending system.
  1779.  
  1780. Since  exchange  of  attributes is a new feature to MS-Kermit, and a relatively
  1781. scarce one elsewhere, it is possible that  two  Kermit  programs  might  misun-
  1782. derstand  each  other  because of differing interpretations by the programmers,
  1783. and this could prevent otherwise normal file transfers from taking place.    An
  1784. escape  clause  is  provided  by  the  command  SET ATTRIBUTES OFF, which makes
  1785. MS-Kermit forget that it has attribute capability.
  1786.  
  1787. You may record the progress of a file transfer in a log  file  by  issuing  the
  1788. command LOG TRANSACTIONS.
  1789.  
  1790.  
  1791. The SEND Command
  1792.  
  1793. Syntax:  SEND filespec1 [filespec2]
  1794.  
  1795. The  SEND  command causes a file or file group to be sent from the local MS-DOS
  1796. system to the Kermit on the remote system.  The remote Kermit may be running in
  1797. server  or  interactive mode; in the latter case, you should already have given
  1798. it a RECEIVE command and escaped back to your PC.  S is  a  special  non-unique
  1799. abbreviation for SEND.
  1800.  
  1801. filespec1  may  contain  the    wildcard  characters  "*" to match zero or more
  1802. characters within a field, and/or "#" (first position) or  "?"  (elsewhere)  to
  1803. match  any single character (a question mark in first position gives you a help
  1804. message).  If filespec1 contains wildcard characters then  all  matching  files
  1805. will  be  sent,  in  the  same order that MS-DOS would show them in a directory
  1806. listing.  If filespec1 specifies a single file, you  may  direct  Kermit-MS  to
  1807. send that file with a different name, given in filespec2, as in:
  1808.  
  1809.     Kermit-MS>send foo.bar framus.widget
  1810.  
  1811. filespec2  begins  with  the  first nonblank character after filespec1 and ends
  1812. with the carriage return; thus it may contain blanks or other  unusual  charac-
  1813. ters  that  may  be  appropriate on the target machine.  The alphabetic case of
  1814. text in filespec2 is preserved in transmission, so if case matters on the  tar-
  1815. get system, be sure to type filespec2 appropriately.
  1816.  
  1817. If  the  SEND command is specified by itself on the command line, then you will
  1818. be prompted separately for the name of the file to send, and the name  to  send
  1819. it under:
  1820.  
  1821.     Kermit-MS>send
  1822.      Local Source File: c:\stuff\xcom1.txt
  1823.      Remote Destination File: com1.txt
  1824.  
  1825. If  a  file  can't be opened for read access, the message "Unable to find file"
  1826. will be shown or else the standard MS-DOS recovery procedures will take place:
  1827.  
  1828.     Not ready error reading drive A
  1829.     Abort, Retry, Ignore?
  1830.  
  1831. Kermit remains active even if you select "Abort" (DOS's word, not ours).
  1832.  
  1833. Files will be sent with  their  MS-DOS  filename  and  filetype  (for  instance
  1834. FOO.TXT,  no  device or pathname).  Special characters in the file name are not
  1835. converted.  If there is no filetype, then only the name will be  sent,  without
  1836. the  terminating dot.  Each file is sent as is, with no conversions done on the
  1837. data, except for possibly stopping at a terminating  Control-Z  character  (see
  1838. the SET EOF command).
  1839.  
  1840. Once  you  give  Kermit-MS the SEND command, the name of each file will be dis-
  1841. played on your screen as the transfer begins.  Packet, retry, and other  counts
  1842. will be displayed along with informational messages during the transfer, in the
  1843. style specified by SET DISPLAY.  If the file is successfully  transferred,  you
  1844. will  see  "Complete",  otherwise  there  will  be  an error message.  When the
  1845. specified operation is done, the program will sound a beep.
  1846.  
  1847. Several single-character commands may be given while  a  file  transfer  is  in
  1848. progress:
  1849.  
  1850.   ^X  (Control-X)  Stop  sending the current file and go on to the next one, if
  1851.       any.
  1852.  
  1853.   ^Z  Stop sending this file, and don't send any further files.
  1854.  
  1855.   ^C  Return to Kermit-MS command level immediately without sending any kind of
  1856.       notification to the remote system.  (^Z or even ^E is preferable.)
  1857.  
  1858.   ^E  Like  ^C,  but send an Error packet to the remote Kermit in an attempt to
  1859.       bring it back to server or interactive command level.
  1860.  
  1861.   CR  Simulate a timeout: resend the current packet, or NAK the expected one.
  1862.  
  1863. Control-X, Control-Z, and Control-E send the proper protocol  messages  to  the
  1864. remote  Kermit  to  bring it gracefully to the desired state.  Control-C leaves
  1865. the remote Kermit in whatever state it happens to be in,  possibly  retransmit-
  1866. ting  its  last  packet  over and over, up to its retry limit.  You should only
  1867. have to use Control-C in dire emergencies (the  remote  Kermit  is  stuck,  the
  1868. remote  system  crashed, etc), or at those times when you realize that you have
  1869. given a file transfer command to Kermit-MS without first having told the remote
  1870. Kermit about it.
  1871.  
  1872. MS-Kermit  does  not  have a built-in mechanism for sending an entire directory
  1873. structure, but this may still be done using command files.   A  program  called
  1874. XSEND,  distributed  along  with  MS-Kermit, will construct such a command file
  1875. automatically.
  1876.  
  1877.  
  1878. The RECEIVE Command
  1879.  
  1880. Syntax: RECEIVE [filespec]
  1881.  
  1882. The RECEIVE command tells Kermit-MS to receive a file or file  group  from  the
  1883. other  system.   The file is stored under the name it was transmitted with, ex-
  1884. cept that any illegal characters are translated to X's.    Kermit-MS  passively
  1885. waits  for the file to arrive; this command is not to be used when talking to a
  1886. Kermit server (use GET for that).  You should already have issued a  SEND  com-
  1887. mand  to  the  remote  Kermit  and escaped back to Kermit-MS before issuing the
  1888. RECEIVE command.  The RECEIVE command is intended for situations where the file
  1889. name and sending operation originates at the other side; GET originates the re-
  1890. quest from our side and asks the server to perform the operation.  R is a  spe-
  1891. cial non-unique abbreviation for RECEIVE.
  1892.  
  1893. If  the optional filespec is provided, incoming files will be stored under that
  1894. name.  If the filespec is really just a path then files are  stored  where  the
  1895. path indicates.  If it is an actual filename the first incoming file is renamed
  1896. and any additional files either overwrite the first (if FILE WARNING is OFF) or
  1897. are renamed slightly from the filespec (digits are added to the end of the main
  1898. filename part before the  dot  and  extension)  if  FILE  WARNING  is  ON  (the
  1899. default). The filespec may include any combination of the following fields:
  1900.  
  1901.   Device designator
  1902.       Store the file on the designated device, in  the  current  directory  for
  1903.       that  device.   If no device designator is given, store it on the current
  1904.       default device.
  1905.  
  1906.   Directory path
  1907.       Store  the  file  in the designated directory on the current disk.  If no
  1908.       path given, store the file in the current directory.
  1909.  
  1910.   File name
  1911.       Store the file under the name given.  If no name is given, store it under
  1912.       the name it was sent under, converted, if necessary, to suit DOS  conven-
  1913.       tions,  and modified, if SET WARNING ON, to avoid overwriting any file of
  1914.       the same name in the same directory.
  1915.  
  1916. If an incoming file does not arrive in its entirety,  Kermit-MS  will  normally
  1917. discard  it  and it will not appear in your directory.  You may change this be-
  1918. havior by using the command SET INCOMPLETE KEEP, which will cause  as  much  of
  1919. the file as arrived to be saved on the disk.
  1920.  
  1921. The same single-character commands are available as during SEND:
  1922.  
  1923.   ^X  Request that the remote Kermit stop sending the current file, and proceed
  1924.       to the next one immediately.  Since this is an optional  feature  of  the
  1925.       Kermit protocol, the remote Kermit might not honor the request.
  1926.  
  1927.   ^Z  Request  that  the  remote  Kermit terminate the entire transfer; this is
  1928.       also an optional feature that may or may not be supported by  the  remote
  1929.       Kermit.
  1930.  
  1931.   ^C, ^E, and CR operate in the same way as they do during SEND.  In this case,
  1932.       ^E should always do what ^Z is supposed to do.
  1933.  
  1934. If WARNING is OFF and you type ^X or ^Z to interrupt the transfer,  you'll  ei-
  1935. ther get a partial new file, or else both the old and the new file of that name
  1936. will be lost, depending on SET INCOMPLETE.  In any case, when WARNING  is  off,
  1937. old files with the same name as incoming files will not survive.
  1938.  
  1939. Caution: If an incoming file's name (the part before the dot) corresponds to an
  1940. MS-DOS device name, such as NUL, COM1, CON, AUX, or PRN, output will go to that
  1941. device, rather than to a file with that name.  This is a feature of MS-DOS.
  1942.  
  1943.  
  1944. 1.6.5. Hints for Transferring Large Files
  1945.  
  1946. During  a  prolonged file transfer session, things can go wrong that are beyond
  1947. Kermit's control.  The longer the session, the greater the probability it  will
  1948. be fatally interrupted.  But you can take a few precautions:
  1949.  
  1950.    - Make  sure  there  is sufficient disk space at the receiving end.  If
  1951.      possible, first run a disk utility (such as CHKDSK) to clean out  any
  1952.      bad disk blocks.
  1953.  
  1954.    - If you are using a telephone connection, make sure your session won't
  1955.      be interrupted by call waiting, people picking up  other  extensions,
  1956.      etc.
  1957.  
  1958.    - Don't  attempt  to  transfer  a  single file of many megabytes over a
  1959.      telephone connection.  The longer the call, the greater the chance of
  1960.      disconnection  (carrier  loss).   Although it's a bother, it may save
  1961.      time in the long run to break the file up into smaller pieces, trans-
  1962.      fer the pieces, and then recombine on the other end.
  1963.  
  1964.    - SET  INCOMPLETE  KEEP  on  the receiving end, so that if the transfer
  1965.      fails, then the partial file will be retained.  Then  chop  the  part
  1966.      that wasn't transferred into a separate file, reconnect, and send it.
  1967.      Then join the pieces together.
  1968.  
  1969. Consider moving truly massive amounts of data on magnetic media.  "Never under-
  1970. stimate  the  bandwidth  of  a station wagon full of magnetic tapes!"  (or dis-
  1971. kettes).
  1972.  
  1973.  
  1974. 1.6.6. Commands for Raw Uploading and Downloading
  1975.  
  1976. MS-Kermit can be used to send files to, or capture files from,  remote  systems
  1977. that do not have Kermit programs available.  No error checking or correction is
  1978. done, so the results can very likely contain corrupted  characters,  spurts  of
  1979. noise, gaps, or extraneous system messages or prompts.  The command for upload-
  1980. ing is TRANSMIT, and for downloading LOG SESSION.
  1981.  
  1982. To minimize  loss  of  data  during  these  operations,  be  sure  to  SET  the
  1983. FLOW-CONTROL  and HANDSHAKE parameters to match the characteristics of the sys-
  1984. tem on the other end.
  1985.  
  1986.  
  1987. The TRANSMIT Command
  1988.  
  1989. Syntax: TRANSMIT filespec [prompt-character]
  1990.  
  1991. The TRANSMIT command provides a basic raw  upload  (export)  facility  to  send
  1992. straight  ASCII  text  files  to  the  host without packets, error checking, or
  1993. retransmissions, but using all the currently selected communication  parameters
  1994. for  flow  control, parity, etc.  Information is read from the disk file a line
  1995. at a time, sent out the serial port, and the command waits for a single charac-
  1996. ter prompt (normally linefeed) from the host before sending the next file line.
  1997. A disk file line ends with carriage-return-linefeed (CRLF), but only  the  car-
  1998. riage  return  is  sent,  just as you only type carriage return at the end of a
  1999. line, not CR and LF.  Most remote systems will echo the CR and then also supply
  2000. a  LF,  which  indicates  that  they  have processed the line and are ready for
  2001. another one.  Setting the prompt to binary zero, \0, makes the TRANSMIT command
  2002. proceed  without waiting for a prompt.  Pressing the local Return key simulates
  2003. arrival of a prompt character.
  2004.  
  2005. Typically, before using this command to upload a file, you would start  a  text
  2006. editor  (preferably  a  line-oriented,  rather than full-screen, editor) on the
  2007. remote host and put it into text insertion mode.  When the file has  been  com-
  2008. pletely transmitted, you would manually enter the required sequence for getting
  2009. the editor out of text insertion mode, and then make any necessary  corrections
  2010. by hand.  Here's an example for VAX/VMS:
  2011.  
  2012.     Kermit-MS>set flow xon/xoff Set flow control to match VAX/VMS.
  2013.     Kermit-MS>connect           Connect to VAX.
  2014.     $ edt foo.txt               Start the EDT editor.
  2015.     *i                          Put it into "insert" mode.
  2016.     ^]c                         Escape back to Kermit-MS.
  2017.     Kermit-MS>transmit foo.txt  Upload the file a line at a time.
  2018.      ...                        Each line is displayed on the screen.
  2019.     Kermit-MS>connect           When done, connect back to the VAX.
  2020.     ^Z                          Type Ctrl-Z to exit EDT insert mode.
  2021.     *exit                       Exit from EDT to save the file.
  2022.     $
  2023.  
  2024. If  transmission  appears  to be stuck, you can wake it up by typing a carriage
  2025. return on the keyboard.  You can  cancel  the  TRANSMIT  command  by  typing  a
  2026. Control-C.    Control-Z's  or other control characters in the file may have ad-
  2027. verse effects on the host.  For this reason, you should use TRANSMIT  only  for
  2028. files  that  contain  7-bit  printing  ASCII characters, spaces, tabs, carriage
  2029. returns, linefeeds, and possibly formfeeds.
  2030.  
  2031.  
  2032. The LOG SESSION Command
  2033.  
  2034. Syntax: LOG SESSION [filespec]
  2035.  
  2036. The LOG SESSION command lets you copy the characters that appear on your screen
  2037. during  CONNECT into the specified file on the PC.  You can use this command to
  2038. download files by displaying (usually with a command like TYPE) the file on the
  2039. remote system while logging is in effect.  Example:
  2040.  
  2041.     Kermit-MS>set flow xon/xoff Set flow control to match VAX/VMS.
  2042.     Kermit-MS>connect           Connect to the VAX.
  2043.     $ type foo.bar              Type this command without a CR.
  2044.     ^]c                         Escape back.
  2045.     Kermit-MS>log session foo.bar                                          
  2046.     Kermit-MS>connect           Connect back.
  2047.                                 Now type the carriage return.
  2048.     This is the file FOO.BAR.   The file is displayed on your screen
  2049.     Blah blah ...               and captured into PC file FOO.BAR.
  2050.     $                           The prompt is captured too.
  2051.     ^]c                         When done, escape back
  2052.     Kermit-MS>close session     and close the log file.
  2053.  
  2054. The  PC  file  FOO.BAR  now  contains a (possibly mutilated) copy of the remote
  2055. computer's FOO.BAR file.  It probably has the remote  system's  prompt  at  the
  2056. end,  which  you  can  edit  out.    The session log can also be used to record
  2057. typescripts, editing sessions, Tektronix graphics output, or any  other  output
  2058. from, or dialog with, the remote computer.
  2059.  
  2060. During  terminal emulation, the LOG command records all the characters that ar-
  2061. rive from the remote host in the specified file,  including  escape  sequences,
  2062. with  any input character translations applied according to SET TRANSLATION IN-
  2063. PUT.  If you have SET LOCAL-ECHO ON, the  characters  you  type  will  also  be
  2064. recorded.   Logging may be suspended and resumed within a terminal session with
  2065. the CONNECT escape-level commands Q and R. The log file  will  be  composed  of
  2066. 7-bit ASCII bytes if (a) PARITY is other than NONE, or (b) DISPLAY is SET to 7.
  2067. If DISPLAY is 8 and PARITY is NONE, or if DEBUG is ON, then the log  will  con-
  2068. tain 8-bit bytes.
  2069.  
  2070. You may LOG SESSION PRN to cause the logging information to be printed directly
  2071. on your printer.  Any escape sequences that are sent to  the  screen  are  also
  2072. sent to the printer.
  2073.  
  2074. If  you  want  to record information without imbedded escape sequences, use the
  2075. screen dump feature, invoked by the CONNECT escape-level command  F,  which  is
  2076. described under the CONNECT command.
  2077.  
  2078. A  session  log cannot be played back directly on the PC from the log file.  To
  2079. relive the session, you must transfer it to the remote system and display it in
  2080. "binary mode" (e.g. cat in Unix) while CONNECTed.
  2081.  
  2082.  
  2083. 1.6.7. Kermit Server Commands
  2084.  
  2085. Kermit-MS  can  act as a Kermit server, and can also interact with other Kermit
  2086. servers.  Normally, the remote Kermit is put into server mode.  Then the  local
  2087. Kermit  becomes a "client", and may issue repeated commands to the server with-
  2088. out having to connect and escape back repeatedly.  Servers can not only  trans-
  2089. fer  files,  but  can also provide a variety of file management functions.  The
  2090. SERVER command puts MS-Kermit into server mode, and the DISABLE and ENABLE com-
  2091. mands modify the behavior of the server.
  2092.  
  2093. Kermit  servers respond only to information sent as Kermit protocol packets and
  2094. not to ordinary CONNECT-mode commands.  When MS-Kermit is the client,  it  uses
  2095. the  SEND  command (described above) to send files to a server, the GET command
  2096. (not RECEIVE) to get files from a server, the REMOTE  commands  to  invoke  the
  2097. file  management  functions  of the server, and the BYE, FINISH, or LOGOUT com-
  2098. mands to shut down the server.  The MS-Kermit server can also  be  returned  to
  2099. interactive  mode  by typing Ctrl-C or Ctrl-Break on the PC's console keyboard;
  2100. if the SERVER command was issued from a command file, execution of the  command
  2101. file will resume with the next command after SERVER.
  2102.  
  2103.  
  2104. The SERVER Command
  2105.  
  2106. Syntax: SERVER [timeout]
  2107.  
  2108. Kermit-MS is capable of acting as a full-fledged Kermit server for users coming
  2109. in through one of the communication ports or a local  area  network.    To  put
  2110. Kermit-MS  into server mode, first issue any desired SET commands to select and
  2111. configure the desired port, then DISABLE any undesired functions, and then type
  2112. the  SERVER  command.    Kermit-MS will await all further instructions from the
  2113. client Kermit on the other end of the connection, which may  be  hardwired,  or
  2114. connected through a network or autoanswer modem.
  2115.  
  2116. In the following example, a Kermit server is set up for dialing in:
  2117.  
  2118.     Kermit-MS>set port 1
  2119.     Kermit-MS>set speed 1200
  2120.     Kermit-MS>hangup
  2121.     Kermit-MS>connect
  2122.     ATS0=1
  2123.     OK
  2124.     ^]c
  2125.     Kermit-MS>set server timeout 0
  2126.     Kermit-MS>set warning on
  2127.     Kermit-MS>disable all
  2128.     Kermit-MS>server
  2129.  
  2130. Before  putting  Kermit in server mode in this case it was necessary to connect
  2131. to the modem (in this example, a Hayes) and put  it  into  autoanswer  mode  by
  2132. typing  the  ATS0=1  command.  Since  Kermit  packets  typically  start  with a
  2133. Control-A character check the modem's manual to ensure that character is not  a
  2134. modem command signal; some brands regard Control-A as a hangup request!
  2135.  
  2136. Note  the  command  SET SERVER TIMEOUT 0.  This disables the MS-Kermit server's
  2137. normal behavior of timing out periodically and sending a NAK packet while wait-
  2138. ing for a connection.  This might be necessary with certain modems or PBXs that
  2139. can be taken out of answer mode if they receive any characters from the PC  be-
  2140. fore a call is received.
  2141.  
  2142. An optional timeout value can be specified to exit server mode automatically at
  2143. a certain time.  The timeout can be expressed as a number, meaning seconds from
  2144. now,  or  as  the  hh:mm:ss form, in 24-hour time of day.  Both forms recognize
  2145. times greater than 12 hours from now as being in the past.   For  instance,  if
  2146. you  want  to  run  a  Kermit server for an hour, and then have it exit so that
  2147. another program can run, use a command file like:
  2148.  
  2149.     set port 1        ; Use COM1
  2150.     set speed 2400    ; at 2400 bps.
  2151.     disable all       ; Only allow file transfers in current directory.
  2152.     server 3600       ; Be a server for 3600 seconds = 1 hour.
  2153.     exit              ; Exit when done.
  2154.  
  2155. MS-Kermit 2.32/A server mode supports the following requests:
  2156.  
  2157.     SEND           REMOTE CWD (CD)     REMOTE MESSAGE
  2158.     GET            REMOTE DELETE       REMOTE SEND
  2159.     FINISH         REMOTE DIRECTORY    REMOTE SPACE
  2160.     BYE            REMOTE HELP         REMOTE TYPE
  2161.     LOGOUT         REMOTE HOST         REMOTE WHO
  2162.                    REMOTE LOGIN
  2163.  
  2164. REMOTE CWD (CD) can be used to change both directories and devices.  The REMOTE
  2165. MESSAGE  command  accepts  a one line message on the command line which will be
  2166. displayed on the operator's console.  An MS-Kermit Server  can  DISABLE  recog-
  2167. nition of selected REMOTE commands to help reduce accidents.
  2168.  
  2169.     CAUTION: The method used for most of the REMOTE commands is to invoke a
  2170.     task with the user's command line, redirect standard output to  a  tem-
  2171.     porary  file,  $KERMIT$.TMP, send that file back to the remote end, and
  2172.     then delete the file.  Sufficient space must be available to store this
  2173.     file.    To  service DOS commands or user tasks COMMAND.COM must be lo-
  2174.     cated on the DOS PATH.
  2175.  
  2176.     FURTHER CAUTION: Any of these DOS tasks or programs  may  encounter  an
  2177.     error,  and  in  that case, DOS will generally put the familiar "Abort,
  2178.     Retry, Ignore?"  message on the server's screen, and will wait  for  an
  2179.     answer  from  the  keyboard.    This will hang the server until a human
  2180.     comes to the keyboard and gives a response.  The same thing will happen
  2181.     when any program is invoked that interacts with the real console.  DIS-
  2182.     ABLE ALL seems to avoid most unpleasant situations of this kind.
  2183.  
  2184. For local network operation with NetBios, the SET PORT  NET  command  (with  no
  2185. node  name) must be issued before the SERVER command.  MS-Kermit then becomes a
  2186. network-wide server, and other client Kermits can start a network session  with
  2187. it  by  using  the  name  of  the Kermit Server, which is shown on the server's
  2188. screen when SET PORT NET is given.  The Kermit Server accepts connections  from
  2189. other  Kermits, but only one at a time. There may be many Kermit Servers active
  2190. on the network simultaneously because each has a unique node name.   Operations
  2191. are exactly the same as with serial port usage and the session (equivalent to a
  2192. dialed phone connection) is maintained between the pair until too many timeouts
  2193. occur, or the client Kermit issues a HANGUP command, exits to DOS, or SETs PORT
  2194. NET to another node.  In the latter cases, the server remains available for use
  2195. by  other client Kermits.  If a client Kermit issues the BYE or FINISH command,
  2196. the network server is shut down (unless it was started with FIN disabled).
  2197.  
  2198.  
  2199. The DISABLE and ENABLE Commands
  2200.  
  2201. For security purposes, it may be desirable to leave your PC  in  Kermit  server
  2202. mode  so that it can be dialed in to, but with certain functions unavailable to
  2203. those who dial in.  The DISABLE and ENABLE commands provide this control.
  2204.  
  2205. The DISABLE and ENABLE commands affect the following functions, with the effect
  2206. of DISABLEs noted:
  2207.  
  2208.     CWD     (CD) Changing of directories, disabled entirely.
  2209.     DEL     Deletion of files confined to current directory.
  2210.     DIR     Production of directory listings confined to current directory.
  2211.     FIN     Shutting down the server (applies also to BYE) disabled entirely.
  2212.     GET     Getting files from the server confined to current directory.
  2213.     HOST    Execution of all REMOTE HOST (DOS) commands disabled entirely.
  2214.     SEND    Forces files sent to server into current directory.
  2215.     SPACE   Asking the server for a disk space report, disabled.
  2216.     TYPE    REMOTE TYPE files confined to current directory.
  2217.     ALL     All of the above.
  2218.     TEK     Automatic  invocation  of Tektronix graphics mode by host commands.
  2219.             This function is not related to server mode, and is not included in
  2220.             the ALL term.
  2221.  
  2222. For  reasons  which  should  be  obvious,  the Kermit server does not provide a
  2223. REMOTE ENABLE command!
  2224.  
  2225.  
  2226. The GET Command
  2227.  
  2228. Syntax: GET remote-filespec
  2229.  
  2230. The GET command requests a Kermit  server  to  send  the  file  or  file  group
  2231. specified by remote-filespec.  This command can be used only when Kermit-MS has
  2232. a Kermit server active on the other end of the connection.  This usually  means
  2233. that  you  have  CONNECTed  to  the  other system, logged in, run Kermit there,
  2234. issued the  SERVER  command,  and  escaped  back  (e.g.  "^]C")  to  the  local
  2235. Kermit-MS.  In the case of LAN operation, a Kermit server must be running some-
  2236. where on the network.  If the remote Kermit does not  have  a  SERVER  command,
  2237. then you should use SEND and RECEIVE as described above.
  2238.  
  2239. You  may  use  the GET command in a special way to specify a different name for
  2240. storing the incoming file.  Just type GET alone on a  line,  and  you  will  be
  2241. prompted separately for the remote filespec and the local filespec:
  2242.  
  2243.     Kermit-MS>get
  2244.      Remote Source File: com1 txt
  2245.      Local Destination File: a:xcom1.txt
  2246.  
  2247. The  local  file name may contain a device field, and/or a directory specifica-
  2248. tion.  Device and directory specifications in the local destination  file  name
  2249. work  the  same  way  as  in the RECEIVE command.  The multiline GET command is
  2250. provided so that the distinction between the two files is always  clear,  which
  2251. would not otherwise be the case if the foreign filename had spaces in it.
  2252.  
  2253. The  remote  filespec  is any string that can be a legal file specification for
  2254. the remote system; it is not parsed or  validated  locally.    It  can  contain
  2255. whatever wildcard or file-group notation is valid on the remote system, includ-
  2256. ing spaces. If the string needs to begin with a question mark (?)  then  use  a
  2257. sharp  sign  (#) instead to avoid Kermit's help message; it will be transmitted
  2258. as a question mark.
  2259.  
  2260. Once the file transfer begins, the GET command behaves exactly like the RECEIVE
  2261. command.
  2262.  
  2263. Warning:  If the remote filespec is to contain a semicolon, and the GET command
  2264. is being issued from a TAKE command file, you must prefix the semicolon with  a
  2265. backslash.   Otherwise, all characters beginning with the semicolon will be ig-
  2266. nored:
  2267.  
  2268.     get me.home\;2
  2269.  
  2270.  
  2271. 1.6.8. Commands for Controlling Remote Kermit Servers
  2272.  
  2273. The BYE, FINISH, and LOGOUT commands allow you to shut  down  a  remote  Kermit
  2274. server:
  2275.  
  2276. BYE     When  communicating with a remote Kermit server, use the BYE command to
  2277.         shut down the server, log out its job, and exit locally from  Kermit-MS
  2278.         to  DOS.   On local area networks, BYE also terminates the network ses-
  2279.         sion.
  2280.  
  2281.  
  2282. FINISH  Like BYE, FINISH shuts down the remote server.   However,  FINISH  does
  2283.         not  log  out the server's job.  You are left at Kermit-MS prompt level
  2284.         so that you can connect back to the job on the remote system.  On local
  2285.         area  nets,  FINISH  shuts down the MS-Kermit server, but in a way that
  2286.         allows it to be restarted as if no interruption had occurred.
  2287.  
  2288.  
  2289. LOGOUT  The LOGOUT command is identical to the BYE  command,  except  you  will
  2290.         remain  at Kermit-MS prompt level, rather than exit to DOS, so that you
  2291.         can establish or use  another  connection  without  having  to  restart
  2292.         MS-Kermit.
  2293.  
  2294.  
  2295. The REMOTE Commands
  2296.  
  2297. The REMOTE keyword is a prefix for a number of commands.  It indicates that the
  2298. command is to be performed by a remote Kermit server.  Not all  Kermit  servers
  2299. are  capable of executing all of these commands, and some Kermit servers may be
  2300. able to perform functions for which Kermit-MS does not yet have the correspond-
  2301. ing  commands.    In case you send a command the server cannot execute, it will
  2302. send back a message stating that the command is unknown to it.  If  the  remote
  2303. server  can  execute  the  command,  it  will send the results, if any, to your
  2304. screen.
  2305.  
  2306. Here are the REMOTE commands that Kermit-MS may issue:
  2307.  
  2308. REMOTE CWD [directory]
  2309.         (Also REMOTE CD) Ask the server to Change your Working Directory on the
  2310.         remote host, that is, the default source and destination area for  file
  2311.         transfer  and  management.   You will be prompted for a password, which
  2312.         will not echo as you type it.  If you do not supply  a  password  (i.e.
  2313.         you type only a carriage return), the server will attempt to access the
  2314.         specified directory without a password.  If you do not supply a  direc-
  2315.         tory name, your default or login directory on the remote system will be
  2316.         assumed and you will not be prompted for a password.
  2317.  
  2318.  
  2319. REMOTE DELETE filespec
  2320.         Ask the server to delete the specified file or files on the remote sys-
  2321.         tem.  In response, the server may display a list of the files that were
  2322.         or were not successfully deleted.
  2323.  
  2324.  
  2325. REMOTE DIRECTORY [filespec]
  2326.         Ask the server to display a directory listing of the  specified  files.
  2327.         If  no  files  are specified, then the list should include all files in
  2328.         the current working directory.
  2329.  
  2330.  
  2331. REMOTE HELP
  2332.         Ask the server to list the services it provides.
  2333.  
  2334.  
  2335. REMOTE HOST [command]
  2336.         Ask the server to send the  command  to  the  remote  system's  command
  2337.         processor for execution.
  2338.  
  2339.  
  2340. REMOTE KERMIT command
  2341.         Send the command to the remote Kermit for interpretation  as  a  Kermit
  2342.         command in the remote Kermit server's own command syntax.
  2343.  
  2344.  
  2345. REMOTE LOGIN user
  2346.         Password and account are always  solicted  via  prompts.    A  carriage
  2347.         return  response  corresponds  to an empty entry.  REMOTE LOGIN applies
  2348.         only to a remote Kermit server and not to a remote operating system; an
  2349.         MS Kermit server does not understand the command.
  2350.  
  2351.  
  2352. REMOTE MESSAGE text
  2353.         Send the one line text message to be displayed on the Server's screen.
  2354.  
  2355.  
  2356. REMOTE SPACE [directory]
  2357.         Ask  the  server  to  provide  a  brief  summary  of  disk usage in the
  2358.         specified area on the remote host or, if none specified, the default or
  2359.         current area.
  2360.  
  2361.  
  2362. REMOTE TYPE filespec
  2363.         Ask the server to display the contents of the specified remote file  or
  2364.         files on your screen.
  2365.  
  2366.  
  2367. REMOTE WHO [who-spec]
  2368.         Ask the server to list actively  logged  on  users;  optional  who-spec
  2369.         qualifies the list and uses the syntax of the server system.
  2370.  
  2371.  
  2372. The Mail Command
  2373.  
  2374. Syntax:  MAIL filespec address
  2375.  
  2376. The MAIL command is a very close relative of Kermit's SEND command.  Mail sends
  2377. a file, or file group, to a Kermit server with instructions  (in  an  Attribute
  2378. packet)  to  submit  the file(s) to the host's Mailer utility rather than store
  2379. them on disk.  To round out a mail request a field following  the  filename  is
  2380. required, and into it we place the address to which the files are to be mailed.
  2381. Mail addresses vary substantially, but several  common  forms  are  "username",
  2382. "username@host",  and "host::username".  The MAIL command will work only if the
  2383. Kermit server understands it, otherwise the mail request will be  rejected  be-
  2384. fore any files are sent.  Kermit-MS can send mail but it cannot receive it, be-
  2385. cause MS-DOS does not have a mail facility.  When sending, there is no  way  to
  2386. transmit  any  fields  other than the recipient's address and the message body;
  2387. fields like subject and cc are not supported.
  2388.  
  2389.  
  2390. 1.6.9. The LOG and CLOSE Commands
  2391.  
  2392. Syntax: LOG {PACKET, SESSION, TRANSACTION} [filespec]
  2393.         CLOSE {PACKET, SESSION, TRANSACTION}
  2394.  
  2395. The LOG command tells MS-Kermit to record the terminal session,  file  transfer
  2396. transactions,  or  the file transfer protocol packets themselves in a log file.
  2397. If the log file already exists then new material is appended to it.   Open  log
  2398. files  may be closed (and the associated logging disabled) using the CLOSE com-
  2399. mand.  Open log files are also closed when you EXIT from Kermit.
  2400.  
  2401. LOG SESSION is used to record your  terminal  emulation  typescript.    It  was
  2402. described above, in the section on file transfer.
  2403.  
  2404.  
  2405. The LOG TRANSACTION Command
  2406.  
  2407. Syntax: LOG TRANSACTION [filespec]
  2408.  
  2409. The  Transaction  log  is a file recording a pair of text lines describing each
  2410. file transfer (SEND, GET, RECEIVE, or some REMOTE commands). The lines indicate
  2411. the  local  filename  (and  remote name if different), the time and date of the
  2412. start of the transfer, the number of bytes transferred, and the status  of  the
  2413. transfer.    New entries are always appended to old to prevent loss of records.
  2414. The default filename is TRANSACT.LOG.  The command SHOW  LOGGING  displays  the
  2415. current  names  and  which logs are active.  The command CLOSE TRANSACTION will
  2416. voluntarily terminate this class of log; otherwise, it will be closed automati-
  2417. cally when Kermit exits.
  2418.  
  2419.  
  2420. The LOG PACKETS Command
  2421.  
  2422. Syntax: LOG PACKETS [filespec]
  2423.  
  2424. The  packet  log  is  for  diagnostic purposes and records each Kermit protocol
  2425. packet sent and received in printable format.  Control characters  are  written
  2426. as  caret-letter  and characters with the high bit set are shown as their 7-bit
  2427. part preceeded by a tilde.  The default filename is PACKET.LOG.    If  you  ex-
  2428. perience difficulty with file transfers the packet log is valuable in discover-
  2429. ing who said what to whom, even though a copy of the Kermit book is  needed  to
  2430. unravel the meaning of each character in a packet.
  2431. 1.6.10. The SET Command
  2432.  
  2433. Syntax: SET parameter [parameter] value
  2434.  
  2435. The  SET  command  establishes or modifies parameters for file transfer or ter-
  2436. minal connection.  You can examine their values with the SHOW  or  STATUS  com-
  2437. mands.  The following SET commands are available in Kermit-MS:
  2438.  
  2439.                ALARM  Set alarm clock time, for IF ALARM testing
  2440.           ATTRIBUTES  Controls whether MS-Kermit uses Attribute packets
  2441.                 BAUD  Communications port line speed (synonym for SPEED)
  2442.                 BELL  Whether to beep at the end of a transaction
  2443.     BLOCK-CHECK-TYPE  Level of error checking for file transfer
  2444.                COUNT  Variable for TAKE file and macro IF COUNT testing
  2445.                DEBUG  Display packet contents during file transfer
  2446.         DEFAULT-DISK  Default disk drive for file i/o
  2447.                DELAY  Wait number seconds before Sending a file
  2448.          DESTINATION  Default destination device for incoming files
  2449.              DISPLAY  For selecting the type of file transfer display
  2450.                 DUMP  Screen dump file (or device) name
  2451.          END-OF-LINE  Packet termination character
  2452.                  EOF  Method for determining or marking end of file
  2453.           ERRORLEVEL  Value returned to DOS Batch files
  2454.               ESCAPE  Escape character for CONNECT
  2455.         FLOW-CONTROL  Enable or disable XON/XOFF
  2456.            HANDSHAKE  Half-duplex line turnaround option
  2457.           INCOMPLETE  What to do with an incompletely received file
  2458.                INPUT  Behavior of INPUT command for scripts
  2459.                  KEY  Specify key redefinitions
  2460.           LOCAL-ECHO  Specify which computer does the echoing during CONNECT
  2461.            MODE-LINE  Whether to display a mode line during terminal emulation
  2462.               PARITY  Character parity to use
  2463.                 PORT  Select a communications port
  2464.               PROMPT  Change the "Kermit-MS>" prompt to something else
  2465.              RECEIVE  Request remote Kermit to use specified parameters
  2466.               REMOTE  For running Kermit-MS interactively from back port
  2467.                RETRY  Packet retransmission threshold
  2468.                 SEND  Use the specified parameters during file transfer
  2469.               SERVER  Parameters for server mode (command wait timeout)
  2470.                SPEED  Communications port line speed (synonym for BAUD)
  2471.            TAKE-ECHO  Control echoing of commands from TAKE files
  2472.             TERMINAL  Emulation and parameters
  2473.                TIMER  Enable/disable timeouts during file transfer
  2474.          TRANSLATION  Enable/disable/specify conversion of arriving characters
  2475.              WARNING  Specify how to handle filename collisions
  2476.  
  2477. The SET commands are now described in detail, in alphabetical order.
  2478.  
  2479.  
  2480. SET ALARM
  2481.  
  2482. Syntax: SET ALARM {seconds, hh:mm:ss}
  2483.  
  2484. The  alarm  is  a timer, like an alarm clock, available for testing by IF ALARM
  2485. statements.  The alarm time is given as  seconds  from  the  present  or  as  a
  2486. 24-hour  specific  time of day.  Both need to be within 12 hours of the present
  2487. to avoid being mistaken for times in the past.  SHOW SCRIPT displays  the  cur-
  2488. rent alarm setting.
  2489.  
  2490.  
  2491. SET ATTRIBUTES
  2492.  
  2493. Syntax: SET ATTRIBUTES {ON, OFF}
  2494.  
  2495. Disables  or  enables use of Kermit file Attribute protocol packets, which con-
  2496. tain the size, time, and date of files transferred using the  Kermit  protocol.
  2497. This  command is a safety feature so that a small misunderstanding with another
  2498. Kermit cannot block transfers.  SHOW FILE tells whether attributes  are  on  or
  2499. off; they are normally ON.
  2500.  
  2501.  
  2502. SET BAUD
  2503.  
  2504. Syntax: SET BAUD number
  2505.  
  2506. Synonym for SET SPEED (q.v.).
  2507.  
  2508.  
  2509. SET BELL
  2510.  
  2511. Syntax: SET BELL {ON, OFF}
  2512.  
  2513. Specifies  whether  the  bell  (beeper)  should sound upon completion of a file
  2514. transfer operation.  Normally ON.
  2515.  
  2516.  
  2517. SET BLOCK-CHECK-TYPE
  2518.  
  2519. Syntax: SET BLOCK-CHECK-TYPE {1, 2, 3}
  2520.  
  2521. Selects the error detection method: a 1-character 6-bit  checksum  (the  normal
  2522. case), a 2-character 12-bit checksum, or a 3-character 16-bit cyclic redundancy
  2523. check (CRC).  If the other Kermit program is not capable of type 2 or 3  check-
  2524. ing  methods,  automatic fallback to type 1 will occur.  The more secure type 2
  2525. and 3 block checks take essentially no more execution time than  the  simple  1
  2526. character  checksum.    SET  BLOCK 3 is a stronger check than SET BLOCK 2.  SET
  2527. BLOCK 2 or 3 is recommended for use with long packets (see below),  noisy  com-
  2528. munication lines, binary (8-bit data) files, and text files containing critical
  2529. data (budgets, grades, etc).
  2530.  
  2531.  
  2532. SET COUNT
  2533.  
  2534. Syntax: SET COUNT number
  2535.  
  2536. Set the value of the script COUNT variable to be between 0 and 65535. COUNT  is
  2537. used  with IF COUNT to construct counted loops in script TAKE files and macros.
  2538. Each active TAKE file or macro uses a private version of COUNT.    The  default
  2539. value is zero, and the SHOW SCRIPT command displays the current value (meaning-
  2540. ful only when given within a TAKE file or macro).
  2541.  
  2542.  
  2543. SET DEBUG
  2544.  
  2545. Syntax: SET DEBUG {PACKET, SESSION, ON, OFF}
  2546.  
  2547. With DEBUG PACKET, Kermit will display the actual packets on your screen during
  2548. file  transfer.   With the normal file transfer display, regular-length packets
  2549. sent  and  received  are  displayed  in  fixed-size  slots.    The  display  of
  2550. extended-length  packets,  however  (see  SET  RECEIVE PACKET-LENGTH), tends to
  2551. overlap.  If this bothers you, then also SET DISPLAY SERIAL, or LOG the packets
  2552. rather than displaying them.
  2553.  
  2554. With  DEBUG  SESSION,  during terminal emulation (on the IBM PC, Rainbow, and a
  2555. few others), control characters are displayed in  uparrow  ("^")  notation  and
  2556. characters  with the 8th bit set are preceded by the tilde ("~") sign, and your
  2557. session log (if any) will record 8-bit bytes, rather than 7-bit ASCII,  regard-
  2558. less  of SET DISPLAY or SET PARITY.  Character translation (SET TRANSLATION IN-
  2559. PUT) is not done during session debugging.  The effect  of  SET  DEBUG  SESSION
  2560. during  terminal connection can be disconcerting, but it gives you a convenient
  2561. line monitor equivalent to a specialized device  that  costs  several  thousand
  2562. dollars,  and  it  can  prove  very  handy for tracking down data communication
  2563. problems.
  2564.  
  2565. SET DEBUG ON turns on both SESSION and PACKET  debugging,  and  SET  DEBUG  OFF
  2566. turns them both off.
  2567.  
  2568.  
  2569. SET DEFAULT-DISK
  2570.  
  2571. Syntax: SET DEFAULT-DISK x:[directory]
  2572.  
  2573. Specify  the  default  disk drive to use for file transfer, directory listings,
  2574. and so forth.  Equivalent to typing the DOS command for changing disks (A:, B:,
  2575. etc).    Affects Kermit and all inferior processes, but when you exit from Ker-
  2576. mit, you will still have the same default disk as when you entered.  As a  con-
  2577. venience,  a directory may be specified with or without the drive to change one
  2578. or the other or both.  This command is a synonym for CWD (CD).
  2579.  
  2580.  
  2581. SET DELAY
  2582.  
  2583. Syntax: SET DELAY number
  2584.  
  2585. Wait the specified number of seconds before starting a file transfer.  Intended
  2586. for  use  when  the  other side needs appreciable time to become ready, such as
  2587. rearranging cables, changing programs, etc.,  or  when  MS-DOS  Kermit  is  the
  2588. remote  Kermit  (e.g.  after  CTTY COM1, SET REMOTE ON).  The number is 0 to 63
  2589. seconds, normally 0.
  2590.  
  2591.  
  2592. SET DESTINATION
  2593.  
  2594. Syntax: SET DESTINATION {DISK, PRINTER, SCREEN}
  2595.  
  2596. SET DESTINATION PRINTER will cause incoming files to be sent  directly  to  the
  2597. printer;  SCREEN will send output normally destined for the disk to the screen.
  2598. The normal destination is DISK.  SET DESTINATION affects only files transferred
  2599. with SEND, GET, or RECEIVE; it cannot be used to reroute the output from REMOTE
  2600. server commands.
  2601.  
  2602.  
  2603. SET DISPLAY
  2604.  
  2605. Syntax: SET DISPLAY {QUIET, REGULAR, SERIAL, 7-BIT, 8-BIT}
  2606.  
  2607. During file transfer, MS-DOS Kermit's regular display  is  a  formatted  screen
  2608. whose  fields  are  randomly  updated  with  file  names, packet numbers, error
  2609. counts, percent done, error messages, and so forth, as shown in Figure 1-1.
  2610.  
  2611. If you wish to run Kermit-MS interactively through the back port, for  instance
  2612. after  the operator has done CTTY COM1, you must give the command SET REMOTE ON
  2613. (which, currently at least, is equivalent to  SET  DISPLAY  QUIET);  this  sup-
  2614. presses  the  file transfer display screen, so that the display won't interfere
  2615. with the file transfer itself.  You can also use this command to  suppress  the
  2616. display  in  local  mode,  in case you are using a system that allows you to do
  2617. other work while file transfer proceeds in the background.
  2618.  
  2619. If you have your PC connected to a  speaking  device  (a  common  practice  for
  2620. visually  impaired  people), or you are logging the display screen to a printer
  2621. (using DOS ^P or kermit > prn), the random nature of the regular  display  will
  2622. make  the  results of little use.  SET DISPLAY SERIAL is provided for this pur-
  2623. pose; it causes the program to report progress "serially" on the  screen.    In
  2624. serial mode, error messages are preceeded with the word "Error" and repeat mes-
  2625. sages with the word "Retry".  Packets are numbered as dots with every tenth be-
  2626. ing  a  plus  sign.  The packet display is automatically broken across lines at
  2627. every 70th packet.  The serial display makes much more sense when  spoken  than
  2628. does the regular display.
  2629.  
  2630. The  serial display does not show the percent and kilobytes transferred.  It is
  2631. the default display style for generic MS-DOS Kermit; REGULAR is the default for
  2632. all others.
  2633.  
  2634. The  last  two parameters, 7-BIT and 8-BIT, control the size of characters sent
  2635. to the screen during terminal emulation.  7-BIT is the default and includes all
  2636. ASCII characters.  8-BIT is useful with national and line drawing characters.
  2637.  
  2638.  
  2639. SET DUMP
  2640.  
  2641. Syntax: SET DUMP filespec
  2642.  
  2643. On  those  systems that support this feature, change the file or device name of
  2644. the screen dump file.  The normal file name is KERMIT.SCN.  See the section  on
  2645. terminal  emulation  for details about screen dumps.  If the specified file al-
  2646. ready exists then new material is appended to old.  If you want to start a  new
  2647. screen dump file, delete the old one first.
  2648.  
  2649.  
  2650. SET END-OF-LINE
  2651.  
  2652. Syntax: SET END-OF-LINE number
  2653.  
  2654. If the remote system needs packets to be terminated by anything other than car-
  2655. riage return, specify the decimal value, 0-31, of the desired ASCII  character.
  2656. Equivalent to SET SEND END-OF-LINE (SET END-OF-LINE is kept only for historical
  2657. reasons, and the parameter really should be called END-OF-PACKET anyway.)
  2658.  
  2659.  
  2660. SET EOF
  2661.  
  2662. Syntax: SET EOF {CTRL-Z, NOCTRL-Z}
  2663.  
  2664. Controls how the end of file is handled.  CTRL-Z specifies a Control-Z  charac-
  2665. ter  should  be  appended  to the end of an incoming file.  Certain MS-DOS text
  2666. editors and other applications require files to be in this format.    For  out-
  2667. bound files, treat the first Control-Z as the end of the local file, and do not
  2668. send it or any subsequent characters.  NOCTRL-Z is the default; incoming  files
  2669. are  stored,  and MS-DOS files are sent, exactly as is, in their entirety.  Use
  2670. SHOW FILE to see the current SET EOF status.
  2671.  
  2672.  
  2673. SET ERRORLEVEL
  2674.  
  2675. Syntax: SET ERRORLEVEL number
  2676.  
  2677. Forces the DOS "errorlevel" variable to a given value.  This is used in scripts
  2678. when  other controls or tests determine that the cumulative errorlevel reported
  2679. to DOS Batch when Kermit exits needs to be modified.  The number can  be  0  to
  2680. 255 decimal.
  2681.  
  2682.  
  2683. SET ESCAPE
  2684.  
  2685. Syntax: SET ESCAPE character
  2686.  
  2687. Specify  the  control character you want to use to "escape" from remote connec-
  2688. tions back to Kermit-MS.   On  most  systems  the  default  is  "^]"  (Control-
  2689. Rightbracket),  which  was chosen because it is a character you would otherwise
  2690. rarely type.
  2691.  
  2692. The character is entered literally after SET ESCAPE or in backslash number form
  2693. (\29),  and  should be chosen from the ASCII control range.  It is not possible
  2694. to use non-ASCII characters (like function keys) for this purpose (but see  SET
  2695. KEY for a way around this restriction).
  2696.  
  2697.  
  2698. SET FLOW-CONTROL
  2699.  
  2700. Syntax: SET FLOW-CONTROL {XON/XOFF, NONE}
  2701.  
  2702. Specify the full duplex flow control to be done on the currently selected port.
  2703. The options are XON/XOFF and NONE.  The specified type of flow control will  be
  2704. done  during  both  terminal emulation and file transfer.  By default, XON/XOFF
  2705. flow control is selected.  XON/XOFF should not be used  on  half-duplex  (local
  2706. echo)  connections,  or when the other system does not support it.  If XON/XOFF
  2707. is used, HANDSHAKE should be set to NONE.
  2708.  
  2709.  
  2710. SET HANDSHAKE
  2711.  
  2712. Syntax: SET HANDSHAKE {CODE number, BELL, CR, LF, NONE, XOFF, XON}
  2713.  
  2714. Specify any half-duplex line turnaround handshake character to be  used  during
  2715. file  transfer on the currently selected port.  The CODE number form allows any
  2716. ASCII character to be specified by its decimal ASCII code.  Handshake  is  NONE
  2717. by default; if set to other than NONE, then FLOW-CONTROL should be set to NONE.
  2718. In operation the handshake character is sought at  the  end  of  each  received
  2719. packet,  following  the  normal END-OF-LINE character, but is not sent for out-
  2720. going packets.
  2721.  
  2722.  
  2723. SET INCOMPLETE
  2724.  
  2725. Syntax: SET INCOMPLETE {DISCARD, KEEP}
  2726.  
  2727. Specifies what to do with files that arrive incompletely: discard them or  keep
  2728. them.  They are normally discarded.
  2729.  
  2730.  
  2731. SET INPUT
  2732.  
  2733. Syntax: SET INPUT {CASE, DEFAULT-TIMEOUT, ECHO, TIMEOUT-ACTION}
  2734.  
  2735. This command is described in Section 1.8, SCRIPTS.
  2736.  
  2737.  
  2738. SET KEY
  2739.  
  2740. Syntax: SET KEY key-specifier [key-definition]
  2741.   Also: SET KEY {ON, OFF, CLEAR}
  2742.  
  2743.     WARNING: The format and functions of this command have changed substan-
  2744.     tially since version 2.29B and earlier.  The changes were made in order
  2745.     to  allow  key  redefinition  to work on a wider variety of systems and
  2746.     keyboards without customization of the program  source  code  for  each
  2747.     configuration.  See section 1.12 for further details.
  2748.  
  2749. Typical uses of SET KEY:
  2750.  
  2751.    - You're  used  to  having  the ESC key in the upper left corner of the
  2752.      keyboard, but your new PC keyboard has an accent grave  ("`")  there.
  2753.      You  can  use SET KEY to make the accent key transmit an ESC, and you
  2754.      can assign accent grave to some other key.
  2755.  
  2756.    - You send a lot of electronic mail, and always sign it the  same  way.
  2757.      You  can  put your "signature" on a single key to save yourself a lot
  2758.      of repetitive typing.
  2759.  
  2760.    - You must set up your PC's function keys or  numeric  keypad  to  work
  2761.      properly with a host application.
  2762.  
  2763.    - You  have  trouble  with  Kermit's 2-character escape sequences (like
  2764.      Ctrl-] C), and you want to assign these  functions  to  single  keys,
  2765.      like F10.
  2766.  
  2767. The  SET  KEY  command does these things and more, and SHOW KEY gives us assis-
  2768. tance.  A key can be defined to:
  2769.  
  2770.    - send a single character other than what it would normally send,
  2771.    - send a string of multiple characters,
  2772.    - invoke a CONNECT-mode Kermit action verb,
  2773.    - send itself again.
  2774.  
  2775. SET KEY specifies that when the designated key is struck during terminal emula-
  2776. tion,  the specified character or string is sent or the specified Kermit action
  2777. verb is performed.   Key  definitions  operate  only  during  CONNECT,  not  at
  2778. Kermit-MS> or DOS command level.
  2779.  
  2780. The  key-specifier is the identification of the key expressed in system-depend-
  2781. ent terms.  This can be a letter, such as Q for the key which produces  an  up-
  2782. percase Q, or the numeric ASCII value of the letter in backslash notation (e.g.
  2783. "\81"), or else the numerical "scan code" observed by the system when  the  key
  2784. is  pressed (e.g. "\3856" for Ctrl-Alt-Shift-Q on an IBM PC).  Material printed
  2785. on keycaps is not necessarily a guide to  what  the  key-specifier  should  be.
  2786. When  the  word  CLEAR is used in place of a key-specifier, all key definitions
  2787. are cleared and then any built-in definitions are restored.
  2788.  
  2789. A string definition is one or more characters, including 8-bit values expressed
  2790. in backslash form, such as
  2791.  
  2792.     SET KEY \315 directory\13     IBM F1 key sends "directory<cr>"
  2793.     SET KEY S X                   S key sends upper case X (a mean trick)
  2794.     SET KEY T \27[m               T key sends three bytes: ESC [ m
  2795.     SET KEY \2336 {del }xxx       Alt-D sends "del "
  2796.     SET KEY \324 \Kexit           F10 escapes back to Kermit-MS> prompt.
  2797.  
  2798. The  string begins with the first non-spacing character following the key iden-
  2799. tification and continues until the end  of  line,  exclusive  of  any  trailing
  2800. spaces.    If a semicolon comment is used and the definition is given in a TAKE
  2801. file, the line ends at the last non-spacing  character  before  the  semicolon.
  2802. Curly  braces,  {...},  can  be  use to delimit the string in case you want the
  2803. definition to include trailing spaces.  All text after the closing  bracket  is
  2804. ignored.
  2805.  
  2806. This  manual  does not contain a list of all the scan codes for all the keys on
  2807. all the keyboards on all the PCs supported by MS-Kermit  --  that  would  be  a
  2808. manual in itself.  Rather, in order to obtain the key-specifier for the SET KEY
  2809. command, you must type a SHOW KEY command and then press the desired key or key
  2810. combination.    This  will  report  a  scan  code  that  you can use as the key
  2811. specifier in a SET KEY command.  To do  this  for  many  keys  is  a  laborious
  2812. process, so you should collect all your SET KEY commands into a file, which you
  2813. can TAKE, or put them in your MSKERMIT.INI file.
  2814.  
  2815. If you enter SET KEY by itself, with no key specifier, the command will  prompt
  2816. you  to  press  the  selected key and again for the definition string.  Certain
  2817. characters, like ESC and CR, may not be entered literally into the string,  but
  2818. can  be  included  by inserting escape codes of the form \nnn, a backslash fol-
  2819. lowed by a 1- to 4-digit number corresponding to the ASCII value of the desired
  2820. character.    Where  an  ASCII digit follows directly after a backslash number,
  2821. confusion can be avoided by placing curly braces {} around the backslashed num-
  2822. ber; thus, \{27}5 represents the two ASCII characters ESC and 5.
  2823.  
  2824. Here is an example of the use of SET KEY to assign ESC (ASCII 27) to the accent
  2825. grave key.  First the user gets the key-specifier for the key:
  2826.  
  2827.     Kermit-MS>show key
  2828.       Push key to be shown (? shows all): `
  2829.       ASCII char: ` \96 decimal is defined as
  2830.       Self, no translation.
  2831.     Free space: 129 key and 100 string definitions, 837 string characters.
  2832.  
  2833. The free space report says that 129 more keys may be redefined, and up  to  100
  2834. of them may have multi-character strings assigned to them (as opposed to single
  2835. characters), and that there are 837 bytes left for  these  strings,  in  total.
  2836. Confident  that  there  is enough space left for a new key definition, the user
  2837. proceeds:
  2838.  
  2839.     Kermit-MS>set key
  2840.       Push key to be defined: `
  2841.       Enter new definition: \27
  2842.  
  2843. Once a key definition is constructed and tested, it may be entered on a  single
  2844. line in a command file (such as MSKERMIT.INI):
  2845.  
  2846.     set key \96 \27
  2847.  
  2848. To  prevent accidents, SET KEY shows the current definition before asking for a
  2849. new one; enter a Control-C to keep the current definition, or a carriage return
  2850. to undefine the key, or a query mark (?) to see available choices.
  2851.  
  2852. The  keyboard  can  be restored to its startup state, that is all redefinitions
  2853. removed and all built-in defitions restored, by  using  the  keyword  CLEAR  in
  2854. place of the key identification:
  2855.  
  2856.     SET KEY CLEAR
  2857.  
  2858. Undefined  keys  which do not send ASCII characters are trapped by the keyboard
  2859. translator and are rejected; a beep results from using an  undefined  non-ASCII
  2860. key.
  2861.  
  2862. SET  KEY  OFF directs MS-Kermit to read keycodes from DOS, rather than BIOS, so
  2863. that console drivers like ANSI.SYS that operate at the DOS level  may  be  used
  2864. during  Kermit CONNECT sessions.  This would also apply to any special keyboard
  2865. replacements that come with DOS-level drivers.  SET KEY ON turns key definition
  2866. back on, and returns Kermit to processing keystrokes at the BIOS level.
  2867.  
  2868.  
  2869. Kermit Action Verbs
  2870.  
  2871. An  action  verb is the shorthand expression for a named Kermit procedure, such
  2872. as "generate the proper sequence for a left  arrow,"  "show  status,"  "send  a
  2873. BREAK,"  and  others; verbs are complex actions and each verb has a name.  In a
  2874. key definition the verb name is preceeded by backslash K (\K)  to  avoid  being
  2875. confused with a string.  Verbs and strings cannot be used together on a key.
  2876.  
  2877.     SET KEY \331 \Klfarr
  2878.     SET KEY \2349 \Kexit
  2879.  
  2880. makes  the IBM keyboard left arrow key execute the verb named lfarr which sends
  2881. the proper escape sequence for a VT102 left arrow key (which changes  depending
  2882. on  the internal state of the VT102).  The leading \K identifies the definition
  2883. as a Kermit verb, so no string can start as \K or as \{K in upper or lower case
  2884. (use  \92K).  The second example has Alt-X invoking the Leave-Connect-Mode verb
  2885. "exit" (same as Kermit escape character "^]" followed by C).
  2886.  
  2887. Each system has its own list of verbs and predefined keys.    Table  1-6  shows
  2888. those available for the IBM PC family (there are also some additional verbs for
  2889. reassigning Heath or VT100 function keys, see section 1.17.2).    The  SET  KEY
  2890. command  shows  the list of available verbs when a query mark (?) is given as a
  2891. definition.  SHOW KEY displays  all  currently  defined  keys  or  individually
  2892. selected ones; SHOW KEY can be executed only interactively.
  2893.  
  2894. -------------------------------------------------------------------------------
  2895.  
  2896.  
  2897.   Verb           Meaning
  2898.   \Kupscn        Roll up (back) to previous screen
  2899.   \Kdnscn        Roll down (forward) to next screen
  2900.   \Khomscn       Roll up to top of screen memory
  2901.   \Kendscn       Roll down to end of screen memory (current position)
  2902.   \Kupone        Roll screen up one line
  2903.   \Kdnone        Roll screen down one line
  2904.   \Kprtscn       Print the current screen
  2905.   \Kdump         Append the current screen to dump file
  2906.   \Kholdscrn     Toggle hold screen mode
  2907.   \Klogoff       Turn off session logging
  2908.   \Klogon        Turn on session logging
  2909.   \Ktermtype     Toggle terminal type
  2910.   \Kreset        Reset terminal emulator to initial state
  2911.   \Kmodeline     Toggle modeline off/on
  2912.   \Kbreak        Send a BREAK signal
  2913.   \Klbreak       Send a "long BREAK" signal
  2914.   \Khangup       Drop DTR so modem will hang up phone
  2915.   \Knull         Send a null (ASCII 0)
  2916.   \Kdos          "Push" to DOS
  2917.   \Khelp         Display CONNECT help message
  2918.   \Kstatus       Display STATUS message
  2919.   \Kterminals    Invoke user-defined macro TERMINALS, if any
  2920.   \Kterminalr    Invoke user-defined macro TERMINALR, if any
  2921.   \Kexit         Escape back from CONNECT mode
  2922.   \Kgold,\Kpf1   VT102 keypad function key PF1
  2923.   \Kpf2..\Kpf4   VT102 keypad function keys
  2924.   \Kkp0..\Kkp9   VT102 keypad numeric keys
  2925.   \Kkpdot,\Kkpminus,\Kkpcoma,\Kkpenter   Other VT102 keypad keys
  2926.   \Kuparr,\Kdnarr,\Klfarr,\Krtarr   VT102 cursor (arrow) keys
  2927.  
  2928.                Table 1-6:  Kermit-MS Verbs for the IBM PC Family
  2929.  
  2930. -------------------------------------------------------------------------------
  2931.  
  2932. Some  systems  have  preset key definitions when Kermit first begins (those for
  2933. the IBM PC are shown in section 1.17.2).  You can find out  what  they  are  on
  2934. your  system  by typing SHOW KEY, and then question mark on the next line.  You
  2935. may supplement or change the predefined keys with SET KEY commands typed inter-
  2936. actively or in MSKERMIT.INI or other command files.
  2937.  
  2938. The  MS-Kermit  CONNECT command may be used in conjunction with certain console
  2939. drivers that do their  own  key  redefinitions.    Since  MS-Kermit  intercepts
  2940. keystrokes at the BIOS level, drivers like ANSI.SYS which work at the DOS level
  2941. will have no effect during CONNECT, even though they work at MS-Kermit  command
  2942. level.    Other  drivers, like SuperKey and ProKey, work at the BIOS level, and
  2943. their key assignments will remain effective during  Kermit  terminal  sessions,
  2944. and additional Kermit SET KEY assignments may be made "on top" of them.
  2945.  
  2946.  
  2947. SET LOCAL-ECHO
  2948.  
  2949. Syntax: SET LOCAL-ECHO {ON, OFF}
  2950.  
  2951. Specify  how  characters  are echoed during terminal emulation on the currently
  2952. selected port.  ON specifies that characters are to be echoed by Kermit-MS (be-
  2953. cause neither the remote computer nor the communications circuitry has been re-
  2954. quested to echo), and is appropriate for half-duplex connections.    LOCAL-ECHO
  2955. is OFF by default, for full-duplex, remote echo operation.
  2956.  
  2957.  
  2958. SET MODE-LINE
  2959.  
  2960. Syntax: SET MODE-LINE {ON, OFF}
  2961.  
  2962. On  systems,  like the IBM PC family, which are capable of displaying a status,
  2963. or "mode" line on the 25th (or bottom) line during terminal connection, disable
  2964. or  enable  this  function.   This command has no effect on systems that do not
  2965. display a mode line during connect.
  2966.  
  2967. The mode line shows several important facts about the  connection,  like  which
  2968. port  is  being  used,  the  transmission  speed and parity, the current escape
  2969. character, etc.  When the mode line is enabled, it may be  turned  on  and  off
  2970. using the CONNECT escape-level command M or the Kermit verb "modeline".
  2971.  
  2972. The  mode  line occupies the 25th line of those systems that have such a thing,
  2973. and is not affected by scrolling (on some systems that have large screens,  the
  2974. mode  line  should appear on whatever the bottom line is, e.g. the 43rd).  When
  2975. emulating a VT102 or Heath-19, Kermit will allow the host to address  the  25th
  2976. line  directly using cursor positioning commands.  If this happens, Kermit will
  2977. remove its mode line and relinquish control of the 25th line to the host (as if
  2978. you had typed SET MODE OFF).  When the Tektronix, or no terminal at all, is be-
  2979. ing emulated, the 25th line (if any) is available for scrolling.  If  the  mode
  2980. line is disabled by an application or by the command SET MODE OFF then the only
  2981. way to revive Kermit's mode line display is to give the command SET MODE ON.
  2982.  
  2983.  
  2984. SET PARITY
  2985.  
  2986. Syntax: SET PARITY {EVEN, ODD, MARK, SPACE, NONE}
  2987.  
  2988. Specify the character parity to be used on the currently selected  port.    You
  2989. will  need to SET PARITY to ODD, EVEN, MARK, or possibly SPACE when communicat-
  2990. ing with a system, or over a network, or through  modems,  concentrators,  mul-
  2991. tiplexers,  or  front  ends that require or impose character parity on the com-
  2992. munication line.  For instance, most IBM mainframe computers use EVEN  or  MARK
  2993. parity;  Telenet  normally uses MARK parity.  If you neglect to SET PARITY when
  2994. the communications equipment requires it, the  symptom  may  be  that  terminal
  2995. emulation works (well or maybe only partially), but file transfer or script IN-
  2996. PUT commands do not work at all.
  2997.  
  2998. NONE means that no parity processing is done, and the 8th bit of each character
  2999. can  be used for data when transmitting binary files.  This is the normal case.
  3000. If parity is other than none, then there will be 7 data  bits  (use  of  parity
  3001. with 8 data bits is not supported).
  3002.  
  3003. If  you  have  set parity to ODD, EVEN, MARK, or SPACE, then Kermit-MS will re-
  3004. quest that binary files be transferred using 8th-bit-prefixing.  If  the  other
  3005. Kermit  knows  how  to do 8th-bit-prefixing (this is an optional feature of the
  3006. Kermit protocol, and some implementations of Kermit don't have it), then  8-bit
  3007. binary  files  can be transmitted successfully.  If NONE is specified, 8th-bit-
  3008. prefixing will not be requested.  Note that there  is  no  advantage  to  using
  3009. parity.    It  reduces  Kermit's file transfer efficiency without providing ad-
  3010. ditional error detection.  The SET PARITY command is  provided  only  to  allow
  3011. Kermit  to  adapt to conditions where parity is required, or 8-bit transmission
  3012. is otherwise thwarted.
  3013.  
  3014. If parity is in use, then the display during terminal emulation, as well as any
  3015. session log, will be 7-bit ASCII, unless you have SET DEBUG ON (q.v.).
  3016.  
  3017. There  may be situations in which you require 7-bit ASCII with no parity during
  3018. terminal emulation, but still want to  force  8th  bit  prefixing  during  file
  3019. transfer.  To accomplish this, SET PARITY SPACE.
  3020.  
  3021. The INPUT and TRANSMIT commands use 7 or 8 bits if parity is NONE, according to
  3022. the SET DISPLAY command, and this may upset recognition of received  characters
  3023. when the host unexpectedly sends them with its own parity.
  3024.  
  3025. WARNING:  The  SET  PARITY  command  has no effect on a port used for printing.
  3026. This is because printing is done by DOS,  not  Kermit.    Since  Kermit  clears
  3027. hardware parity on COM1 at startup, it is not recommended that COM1 be used for
  3028. a serial printer, unless the printer works with no parity.
  3029. SET PORT
  3030.  
  3031. Syntax: SET PORT {number, COMn, BIOSn, NET [nodename], UB-NET1 [nodename]}
  3032.  
  3033. On machines with more than one communications port, select the port to use  for
  3034. file  transfer and CONNECT.  This command lets you use a different asynchronous
  3035. adapter, or switch between two or more  simultaneous  remote  sessions.    Sub-
  3036. sequent  SET SPEED, PARITY, HANDSHAKE, FLOW, and LOCAL-ECHO commands will apply
  3037. to this port only -- each port remembers its own parameters, so  that  you  may
  3038. set  them for each port and then switch between ports conveniently with the SET
  3039. PORT command.
  3040.  
  3041. SET PORT 1 selects COM1, SET PORT 2 selects COM2.  All versions default to port
  3042. 1,  except  for  the  IBM  PCjr, which uses port 2 if its internal modem is in-
  3043. stalled.  Additionally, COM3 and COM4 are supported for IBM PC/AT's and PS/2's,
  3044. as explained in Section 1.18.3.
  3045.  
  3046. SET  PORT  BIOSn,  on  machines which support it, instructs Kermit to do serial
  3047. port input and output by Bios calls rather than going directly to the  hardware
  3048. (n  is  a  digit between 1 and 4).  The most important use is allowing selected
  3049. network packages to intercept such Bios calls and relay the  characters  across
  3050. the network.
  3051.  
  3052. In  "generic" MS-DOS Kermit, the following alternate forms allow you to experi-
  3053. ment with device names or numbers until you find the communication port:
  3054.  
  3055.     SET PORT {DEVICE, FILE-HANDLE}
  3056.  
  3057. Just type a carriage return after either of these commands,  and  you  will  be
  3058. prompted for a device name or a numeric port-handle.  Keep trying till you find
  3059. one that works. File-handle 3, the system auxillary device, is conventional  on
  3060. many machines, as are device names COM1, COM2, and AUX.
  3061.  
  3062. MS-Kermit  for  the  IBM  PC family is able to operate over local area networks
  3063. through the NetBIOS interface.  The command
  3064.  
  3065.     SET PORT NET [nodename]
  3066.  
  3067. redirects communications the LAN board installed in the local computer and  the
  3068. associated NetBIOS emulator software, if active, rather than the serial port or
  3069. the COM device driver.  It installs a unique Kermit node name in the local LAN,
  3070. so  that  other  nodes  can  refer to it when files are transferred or terminal
  3071. emulation is done.  This name is displayed when you give the SET PORT NET  com-
  3072. mand.    The server should use SET PORT NET, and the client should use SET PORT
  3073. NET nodename, specifying the server's name, e.g. mskermit.K.    Note  that  al-
  3074. phabetic case is significant in node names!
  3075.  
  3076. Both  the regular serial port and a network connection can be kept alive simul-
  3077. taneously; clearly, only one can be used at a time under MS-DOS.  MS-DOS 3.x is
  3078. not  required  for Kermit network usage, but most LANS do need DOS 3.1 or later
  3079. for conventional file server work.  Kermit needs only the NetBIOS emulator net-
  3080. work software.
  3081.  
  3082. SET  PORT  UB-NET1 is implemented on the IBM PC version of Kermit to allow con-
  3083. nection to Ungermann-Bass Net One LAN NETCI interface and behaves similarly  to
  3084. the NetBIOS method.
  3085.  
  3086.  
  3087. SET PROMPT
  3088.  
  3089. Syntax: SET PROMPT [string]
  3090.  
  3091. This  command  allows  you  to  change the MS-DOS Kermit program's prompt.  The
  3092. string may be enclosed in curly braces.  Control characters like ESC can be in-
  3093. cluded as backslashed numbers like "\27".  ANSI.SYS and similar console drivers
  3094. can be programmed through this command  to  get  a  boldface,  inverse,  and/or
  3095. blinking  prompt.   The prompt string must be less than 128 characters.  If the
  3096. string is omitted (missing) Kermit's original prompt of  "Kermit-MS>"  is  res-
  3097. tored.
  3098.  
  3099.  
  3100. SET RECEIVE
  3101.  
  3102. Syntax: SET RECEIVE parameter value
  3103.  
  3104. This  command lets you modify the ways in which MS-Kermit asks the other Kermit
  3105. to behave.  That is, it controls the file transfer protocol options for packets
  3106. sent  to  MS-Kermit by the other Kermit.  The parameters and values you specify
  3107. in the SET RECEIVE command are sent to the other Kermit during initial negotia-
  3108. tions.   Numbers may be specified as ordinary decimal numbers (74), or in back-
  3109. slash notation (\x03F).
  3110.  
  3111. END-OF-LINE number
  3112.         The  ASCII value of terminating character to look for on incoming pack-
  3113.         ets.  Normally carriage return.  Use this command if the  other  Kermit
  3114.         is terminating its packets with some other control character.
  3115.  
  3116.  
  3117. PACKET-LENGTH number
  3118.         Ask the remote Kermit to use the specified maximum length  for  packets
  3119.         that  it  sends to Kermit-MS.  The normal length is 94 bytes.  Use this
  3120.         command to shorten packets if the communication line is noisy  or  ter-
  3121.         minal  buffers somewhere along the path are too small.  Shorter packets
  3122.         decrease the probability that a particular packet  will  be  corrupted,
  3123.         and will reduce the retransmission overhead when corruption occurs, but
  3124.         will increase the file transfer throughput.
  3125.  
  3126.  
  3127.         If a length greater than 94 is  specified,  a  protocol  option  called
  3128.         "long  packets"  will  be used, provided the other Kermit also supports
  3129.         it.  Kermit-MS can receive extended-length packets  up  to  1000  bytes
  3130.         long.    Long Packets can improve efficiency by reducing the per-packet
  3131.         overhead for a file, but they will not be used unless  you  issue  this
  3132.         command.    Before  using this option, ensure that the equipment on the
  3133.         communications pathway can absorb a long packet, and that  the  connec-
  3134.         tion  is  clean  (retransmission  of  long packets is expensive!).  You
  3135.         should also SET BLOCK-CHECK 2 or 3 for more reliable error checking.
  3136.  
  3137.  
  3138. PADCHAR number
  3139.         Ask  the remote Kermit to use the given control character (expressed as
  3140.         a decimal number 0-31, or 127)  for  interpacket  padding.    Kermit-MS
  3141.         should never require any padding.
  3142.  
  3143.  
  3144. PADDING number
  3145.         Ask the remote Kermit to insert the given number of padding  characters
  3146.         before  each  packet it sends.  MS-Kermit never needs padding, but this
  3147.         mechanism might be required  to  keep  some  intervening  communication
  3148.         equipment happy.
  3149.  
  3150.  
  3151. START-OF-PACKET number
  3152.         If the remote Kermit will be marking the beginning of  packets  with  a
  3153.         control  character  other  than  Control-A,  use  this  command to tell
  3154.         Kermit-MS about it (the number should be the decimal ASCII value  of  a
  3155.         control  character).   This will be necessary only if the hosts or com-
  3156.         munication equipment involved cannot pass a Control-A through as  data,
  3157.         or  if some piece of communication equipment is echoing packets back at
  3158.         you.
  3159.  
  3160.  
  3161. TIMEOUT number
  3162.         Ask the remote Kermit to time out and retransmit after the given number
  3163.         of seconds if a packet expected from Kermit-MS has not  arrived.    Use
  3164.         this command to change the other Kermit's normal timeout interval.
  3165.  
  3166.  
  3167. SET REMOTE
  3168.  
  3169. Syntax: SET REMOTE {ON, OFF}
  3170.  
  3171. SET  REMOTE  ON removes the file transfer display (as if you had given the com-
  3172. mand SET DISPLAY QUIET).  It should be used when you are running  Kermit-MS  in
  3173. remote mode when coming in from another PC through the Kermit-MS's "back port",
  3174. to which the console has been reassigned using the DOS CTTY command, e.g.
  3175.  
  3176.     CTTY COM1
  3177.  
  3178. It is necessary to issue the SET REMOTE ON command because (a) Kermit-MS has no
  3179. way  of  knowing that its console has been redirected, and (b) when the console
  3180. is the same as the port, the file transfer display will interfere with the file
  3181. transfer  itself.    SET  REMOTE  OFF  returns the file transfer display to its
  3182. preferred style (REGULAR or SERIAL).  When you SET REMOTE ON,  you  might  also
  3183. want  to  SET  DELAY 5 or thereabouts, to allow yourself time to escape back to
  3184. the local system before MS-Kermit starts sending packets.
  3185.  
  3186. On the IBM PC, CTTY CON returns control  to  the  normal  keyboard  and  screen
  3187. (other  systems may use other device names, e.g. SCRN).  See section 1.18.4 for
  3188. further details about remote operation.
  3189.  
  3190. If you are using a port other than COM1 on the remote MS-Kermit, you must  give
  3191. it an appropriate SET PORT command.
  3192.  
  3193. WARNING:  During  CTTY  console  redirection, many programs still output to the
  3194. real screen and require input from the real keyboard and will hang  the  system
  3195. until keyboard requests are satisfied.
  3196.  
  3197.  
  3198. SET RETRY
  3199.  
  3200. Syntax: SET RETRY number
  3201.  
  3202. Sets  the  number  of times a packet is retransmitted before the protocol gives
  3203. up.  The number of retries can be between 1 and 63, and is 5 by default.   This
  3204. is  an especially useful parameter when the communications line is noisy or the
  3205. remote host is very busy.  The initial packet of a file exchange is given three
  3206. times as many retries to allow both systems to become ready.
  3207.  
  3208.  
  3209. SET SEND
  3210.  
  3211. Syntax: SET SEND parameter value
  3212.  
  3213. The SET SEND command is used primarily to override negotiated protocol options,
  3214. or to establish them before they are negotiated.
  3215.  
  3216. END-OF-LINE number
  3217.         ASCII  value of packet terminator to put on outbound packets.  Normally
  3218.         carriage return.  Use this command if the other Kermit needs its  pack-
  3219.         ets terminated with a nonstandard control character.
  3220.  
  3221.  
  3222. PACKET-LENGTH number
  3223.         Use this as the maximum length for outbound packets, regardless of what
  3224.         the  other  Kermit asks for.  Normally, you would use this command only
  3225.         to send shorter packets than the other  Kermit  requests,  because  you
  3226.         know something the other Kermit doesn't know, e.g.  there's a device on
  3227.         the communication path with small buffers.
  3228.  
  3229.  
  3230. PADCHAR number
  3231.         Use  the  specified  control  character  for interpacket padding.  Some
  3232.         hosts may require some padding characters (normally NUL or DEL)  before
  3233.         a  packet,  and certain front ends or other communication equipment may
  3234.         need certain control characters to put them in the right  modes.    The
  3235.         number is the ASCII decimal value of the padding character, (0 - 31, or
  3236.         127).
  3237.  
  3238.  
  3239. PADDING number
  3240.         How  many  copies of the pad character to send before each packet, nor-
  3241.         mally zero.
  3242.  
  3243.  
  3244. PAUSE number
  3245.         How  many milliseconds to pause before sending each packet, 0-127, nor-
  3246.         mally zero.  This may help half-duplex  or  slow  systems  prepare  for
  3247.         reception  of  our  packet.  Padding characters are sent only after the
  3248.         time limit expires.
  3249.  
  3250.  
  3251. QUOTE number
  3252.         Use  the  indicated printable character for prefixing (quoting) control
  3253.         characters and other prefix characters.  The only reason to change this
  3254.         would  be  for  sending  a  very  long file that contains very many "#"
  3255.         characters (the normal control prefix) as data.
  3256.  
  3257.  
  3258. START-OF-PACKET number
  3259.         Mark  the  beginning  of  outbound  packets with some control character
  3260.         other than Control-A.  This will be necessary if the remote host or the
  3261.         communication  channel  cannot  accept  a  Control-A  as data, or if it
  3262.         echoes back your packets.  The remote host must  have  been  given  the
  3263.         corresponding SET RECEIVE START-OF-PACKET command.
  3264.  
  3265.  
  3266. TIMEOUT number
  3267.         Change Kermit-MS's normal timeout interval; this command  is  effective
  3268.         only if TIMER is set to be ON; it is normally ON, with a default inter-
  3269.         val of 13 seconds.
  3270.  
  3271.  
  3272. SET SERVER
  3273.  
  3274. Syntax: SET SERVER TIMEOUT seconds
  3275.  
  3276. Specify how often the MS-DOS Kermit server should send NAK packets while  wait-
  3277. ing  for  commands.   These NAK packets are used to recover from deadlocks that
  3278. might occur when the other Kermit sends an initial packet which  is  lost,  but
  3279. does  not have the capability to time out and retransmit it.  These NAKs can be
  3280. supressed entirely by specifying a value of zero.  This  may  be  necessary  to
  3281. avoid  interfering with certain modems or PBXs that go into originate mode when
  3282. they receive input from the PC, when in fact you  want  the  device  to  be  in
  3283. answer mode.
  3284.  
  3285.  
  3286. SET SPEED
  3287.  
  3288. Syntax: SET SPEED rate
  3289.  
  3290. Set  the  transmission  speed (in bits per second, commonly called baud) of the
  3291. currently selected terminal communications port to 300, 1200, 1800, 2400, 4800,
  3292. 9600,  or other common speed, and on the IBM PC family, higher speeds including
  3293. 19200, 38400, 57600, and 115200.  Both connected systems, as well as any inter-
  3294. vening communication equipment, must be able to support the specified transmis-
  3295. sion speed, and both systems should be set to the same speed.
  3296.  
  3297. Some implementations do not support the  SET  SPEED  command.    But  Kermit-MS
  3298. leaves  the current communication port settings alone unless you issue explicit
  3299. SET commands to change them, so you may use MODE or other DOS programs  to  es-
  3300. tablish the desired settings before running Kermit.
  3301.  
  3302. On certain systems, when you first run Kermit after powering the system up, you
  3303. may get a message "Unrecognized baud rate".  This means that  Kermit  tried  to
  3304. read  the  baud  rate from the port and none was set.  Simply use SET SPEED (if
  3305. available) or the DOS MODE command to set the desired baud rate.
  3306.  
  3307. SET BAUD is a synonym for SET SPEED.
  3308.  
  3309.  
  3310. SET TAKE-ECHO
  3311.  
  3312. Syntax: SET TAKE-ECHO {ON, OFF}
  3313.  
  3314. Specifies whether screen display should occur during implicit or explicit  TAKE
  3315. operations on MSKERMIT.INI or other Kermit-MS command files, and during evalua-
  3316. tion of macro definitions by the DO command.  Handy for finding errors in  TAKE
  3317. files or macro definitions.
  3318.  
  3319.  
  3320. SET TERMINAL
  3321.  
  3322. Syntax: SET TERMINAL {type, parameter [value]}
  3323.  
  3324. This  command  controls  most  aspects  of  terminal  emulation.    Most of the
  3325. parameters are only settable (or meaningful) on the  IBM  PC  family  and  com-
  3326. patibles.   (Programmers who are proficient on other MS-DOS systems are invited
  3327. to fill in these functions for those systems  and  send  the  results  back  to
  3328. Columbia.)   On other systems, built-in setup modes or DOS commands can be used
  3329. to accomplish the same functions.
  3330.  
  3331. The first group of parameters tells which kind of terminal to  emulate.    When
  3332. Kermit-MS uses its built-in software for emulation, incoming characters are ex-
  3333. amined for screen control commands (escape sequences)  specific  to  that  ter-
  3334. minal, and if encountered, the commands are executed on the PC screen.
  3335.  
  3336. NONE    Act  as  a  dumb terminal.  All incoming characters will be sent to the
  3337.         screen "bare", as-is, through DOS.  If you have loaded a device  driver
  3338.         into DOS for the CON device, such as ANSI.SYS, then that driver will be
  3339.         able to interpret the codes itself.  Many non-IBM  systems  have  their
  3340.         own  screen  control  code  interpreter  built into DOS or firmware, or
  3341.         available as a loadable device driver.
  3342.  
  3343. VT52    The DEC VT-52 terminal.
  3344.  
  3345. HEATH   The Heath/Zenith-19 terminal (H19), which supports all  the  VT52  com-
  3346.         mands, plus line and character insert/delete editing functions, an ANSI
  3347.         mode, and a 25th line.
  3348.  
  3349. VT102   The DEC VT102 (ANSI) terminal, which is the same as the VT100 but  also
  3350.         supports   line/character  insert/delete  editing  functions  and  ANSI
  3351.         printer controls.
  3352.  
  3353. TEK4010 A Tektronix 4010 graphics terminal.  Currently only available  on  IBM,
  3354.         TI, and Victor PCs.  On the IBM family, Kermit automatically senses and
  3355.         adapts to the CGA, EGA, Monochrome, Hercules, or ATT style board.
  3356.  
  3357. On the IBM family, you may "toggle" among the supported terminal emulations  by
  3358. typing Alt-Minus.
  3359.  
  3360. The  specific  escape  sequences supported by Kermit for each of these terminal
  3361. types are listed in section 1.17.1.  Note that when a Kermit  program  includes
  3362. Tektronix  emulation, this can be invoked automatically while in character mode
  3363. (VT102, VT52, or Heath emulation) when the emulator receives certain escape se-
  3364. quences.  This can be turned off using the DISABLE TEK command.
  3365.  
  3366. The remaining SET TERMINAL commands specify setup options for the selected ter-
  3367. minal:
  3368.  
  3369. CHARACTER-SET {UK, US, ALTERNATE-ROM}
  3370.         UK  displays  "#"  (ASCII 35, number sign) as a pound sterling sign, US
  3371.         displays "#" as "#".  ALTERNATE-ROM maps accent grave and the lowercase
  3372.         letters  to  be national characters in the IBM video adapter.  That is,
  3373.         character codes of 60h to 7Ah (accent grave, lower case a-z) are mapped
  3374.         to  codes  80h  to 9Ah.  The SET TERMINAL CHARACTER-SET command applies
  3375.         only during VT100/102 emulation.
  3376.  
  3377.  
  3378. CLEAR-SCREEN
  3379.         Clears  the  screen, so that a subsequent CONNECT command shows a blank
  3380.         screen.  The action taken is identical to Kermit's \Kreset verb.
  3381.  
  3382.  
  3383. COLOR number [, number [, number]]
  3384.         Several numbers, applied in left to right sequence, separated by commas
  3385.         or spaces:
  3386.  
  3387.           0   Reset the colors to normal intensity white characters on a  black
  3388.               background  and  use the "no-snow" mode on the IBM Color Graphics
  3389.               Adapter (CGA).
  3390.  
  3391.           1   High intensity foreground
  3392.  
  3393.           10  Request fast screen updating for use on the IBM Mono, EGA, or VGA
  3394.               (usually  sensed  and set internally by Kermit), and some non-IBM
  3395.               CGAs.
  3396.  
  3397.           3x  Foreground color
  3398.  
  3399.           4x  Background color
  3400.  
  3401.         where x is a single digit from 0 to 7, which is the sum of the  desired
  3402.         colors:
  3403.  
  3404.           1   Red
  3405.  
  3406.           2   Green
  3407.  
  3408.           4   Blue
  3409.  
  3410.         Example:  "SET  TERMINAL  COLOR  0 1 37 44" on an IBM CGA would produce
  3411.         bold white characters on a blue field with no snow.  The  snow  removal
  3412.         business  has  to  do  with whether the program should synchronize with
  3413.         vertical retrace when updating screen memory.  This is  necessary  with
  3414.         certain  color adaptors (like the CGA) and unnecessary for others (like
  3415.         the EGA).
  3416.  
  3417.  
  3418. CURSOR-STYLE {BLOCK, UNDERLINE}
  3419.         Sets  the cursor rendition to your preference.  Note that on some early
  3420.         IBM PCs and compatibles, the cursor may not be restored correctly after
  3421.         escaping back from CONNECT because of a bug in the early IBM BIOS.
  3422.  
  3423.  
  3424. DIRECTION {LEFT-TO-RIGHT, RIGHT-TO-LEFT}
  3425.         Controls the direction of screen display during CONNECT.  You  may  use
  3426.         Right-to-Left  for  Hebrew or Arabic, provided you have the appropriate
  3427.         character sets loaded.
  3428.  
  3429.  
  3430. KEYCLICK {ON, OFF}
  3431.         Turns electronic keyclick ON or OFF.  If your keyboard has a mechanical
  3432.         clicker (as IBM boards do), you may not notice the effect of this  com-
  3433.         mand.
  3434.  
  3435.  
  3436. GRAPHICS {AUTO-SENSING, CGA, EGA, VGA, HERCULES, ATT}
  3437.         Manually selects the kind of display adapter  for  Tektronix  graphics.
  3438.         AUTO-SENSING  is  the default, VGA means 640x480x16 colors, and ATT en-
  3439.         compasses the ATT 6300 series, Olivetti M24/M28, DEC  VAXmate  II,  and
  3440.         the Toshiba T3100 in 640x400 b/w (see Table 1-5).
  3441.  
  3442.  
  3443. MARGIN-BELL {ON, OFF}
  3444.         Controls whether the bell should be  sounded  when  the  cursor  passes
  3445.         column  72  near the right screen margin; wider displays set the bell 8
  3446.         columns from the right edge.
  3447.  
  3448.  
  3449. NEWLINE-MODE {ON, OFF}
  3450.         ON  sends  a  carriage-return-linefeed combination (CRLF) when you type
  3451.         carriage return (CR) during terminal emulation.    OFF  (default)  just
  3452.         sends a CR when you type CR.  Useful in conjunction with SET LOCAL-ECHO
  3453.         ON when CONNECTing two PC's back-to-back.
  3454.  
  3455.  
  3456. ROLL {ON, OFF}
  3457.         ON  unrolls  the screen to the bottom before adding new material if the
  3458.         screen had been rolled back, e.g. by Ctrl-PgUp.  ROLL OFF (the default)
  3459.         displays  new  material on the current screen, possibly overwriting old
  3460.         material.
  3461.  
  3462.  
  3463. SCREEN-BACKGROUND {NORMAL, REVERSE}
  3464.         NORMAL  means  dark  background, light characters.  REVERSE means light
  3465.         background, dark characters.
  3466.  
  3467.  
  3468. TAB {AT n, CLEAR AT n, CLEAR ALL}
  3469.         Sets  tab  stops or clears one or all tab stops; n is the numeric posi-
  3470.         tion of the tab to be set or cleared.  By default,  tabs  are  every  8
  3471.         spaces,  at positions 9, 17, 25, etc.  Only meaningful when emulating a
  3472.         terminal that has settable  tabs  (the  VT52  doesn't  really  but  the
  3473.         emulator  can set them anyway).  More than one tabstop may be specified
  3474.         by separating column numbers with commas, spaces, or  tabs.    You  may
  3475.         also use the notation "m:n" to specify regularly spaced tabs across the
  3476.         screen, where m is the initial tab position, and n is the  spacing  be-
  3477.         tween tabs.  132 columns are supported.
  3478.  
  3479.  
  3480. WRAP {ON, OFF}
  3481.         ON automatically breaks screen lines (by inserting a  CRLF)  when  they
  3482.         reach  the  right  margin.    OFF disables wrapping -- if a line is too
  3483.         long, the excess characters go off the screen.  WRAP is OFF by default,
  3484.         since most hosts format lines to fit on your screen.
  3485.  
  3486.  
  3487. SET TIMER
  3488.  
  3489. Syntax: SET TIMER {ON, OFF}
  3490.  
  3491. This command enables or disables the timer that is used during file transfer to
  3492. break deadlocks that occur when expected packets do not arrive.    By  default,
  3493. the  timer  is  ON.   If the other Kermit is providing timeouts, you can safely
  3494. turn the timer OFF to avoid unnecessary retransmissions  that  occur  when  two
  3495. timers go off simultaneously.
  3496.  
  3497.  
  3498. SET TRANSLATION
  3499.  
  3500. Syntax: SET TRANSLATION INPUT {ON, OFF, char1 char2}
  3501.  
  3502. This  command  provides  multi-language  support (and perhaps other special ef-
  3503. fects) during CONNECT, and during execution of the INPUT,  OUTPUT,  PAUSE,  and
  3504. TRANSMIT  script commands, but not during file transfer or at MS-Kermit command
  3505. level.  A character that arrives at the  communication  port  (char1)  will  be
  3506. translated  to another character (char2) before display on the screen.  As many
  3507. as 256 characters may have translations specified concurrently.    But  to  see
  3508. characters  with  ASCII values higher than 127, you must also SET DISPLAY 8 and
  3509. SET PARITY NONE.
  3510.  
  3511. SET TRANSLATION INPUT ON enables translation (the keyword INPUT is required  to
  3512. allow  future translation mechanisms).  OFF disables the translation and is the
  3513. default.  So even if you have set up a translation table, you must  SET  TRANS-
  3514. LATION  INPUT  ON  before  it will take effect.  SHOW TRANSLATION tells whether
  3515. translation is OFF or ON, and displays any current table entries.
  3516.  
  3517. Translation table entries are made by specifying byte pairs in ASCII or numeric
  3518. backslash form:
  3519.  
  3520.     SET TRANS INPUT \3 \13
  3521.  
  3522. converts  incoming  ASCII  ETX characters (decimal 3) to ASCII CR (decimal 13).
  3523. 8-bit values are allowed, and refer to characters in the "upper  half"  of  the
  3524. PC's character set, either the ROM characters supplied with the PC or else sub-
  3525. stitutions provided by a special device driver.
  3526.  
  3527. A more practical example shows how the user of a German PC could  use  the  SET
  3528. TRANSLATION  and  SET KEY commands to make the PC's umlaut-a key (key code 132)
  3529. send a left curly brace ("{", ASCII 123), and to display incoming curly  braces
  3530. as umlaut-a's:
  3531.  
  3532.     SET KEY \d132 \d123
  3533.     SET TRANS INP { \d132
  3534.  
  3535. (This  example  applies  to  the IBM PC German keyboard, and assumes the German
  3536. keyboard  driver,  KEYBGR,  has  been  loaded.    This  is  usually   done   in
  3537. AUTOEXEC.BAT.)
  3538.  
  3539.  
  3540. SET WARNING
  3541.  
  3542. Syntax: SET WARNING {ON, OFF}
  3543.  
  3544. Specify  what  to do when an incoming file is about to be stored under the same
  3545. name as an existing file in the target device and directory.    If  ON,  Kermit
  3546. will  warn you when an incoming file has the same name as an existing file, and
  3547. automatically rename the incoming file (as indicated in the warning message) so
  3548. as  not to destroy (overwrite) any existing one.  If OFF, the pre-existing file
  3549. is destroyed, even if the incoming file does not arrive completely.  WARNING is
  3550. ON  by  default as a safety measure, and the current setting may be observed in
  3551. the SHOW FILE display.
  3552.  
  3553. The new name is formed by adding numbers to the part of  the  name  before  the
  3554. dot.     For  instance,  ABC.TXT  becomes  ABC00001.TXT,  ABC00001.TXT  becomes
  3555. ABC00002.TXT, etc.  If the name  already  has  eight  characters,  then  digits
  3556. replace the rightmost characters.
  3557.  
  3558.  
  3559. 1.6.11. The STATUS and SHOW Commands
  3560.  
  3561. The  values of MS-Kermit options that can be SET, DEFINEd, ENABLEd, or DISABLEd
  3562. can be displayed using the STATUS or SHOW commands.
  3563.  
  3564.  
  3565. The STATUS Command
  3566.  
  3567. Syntax: STATUS
  3568.  
  3569. The STATUS command displays the values of the current SET options on  a  single
  3570. screen.  There are no operands for the STATUS command.  Use the SHOW command to
  3571. see logically-grouped settings, e.g. SHOW COMMUNICATIONS, SHOW TERMINAL.
  3572.  
  3573.  
  3574. The SHOW Command
  3575.  
  3576. Syntax: SHOW option
  3577.  
  3578. The SHOW command is used for displaying communication parameters, protocol set-
  3579. tings,  macro  definitions, key redefinitions, file transfer statistics, trans-
  3580. lations, and other common groupings.
  3581.  
  3582. SHOW COMMUNICATIONS
  3583.         displays  the settings of the current serial port (port, speed, parity,
  3584.         echo, etc) and the status of modem signals  Carrier  Detect,  Data  Set
  3585.         (modem) Ready, and Clear To Send.
  3586.  
  3587.  
  3588. SHOW FILE
  3589.         displays the file transfer control settings, such as the current  path,
  3590.         file  discard,  attributes packets on/off, warning, end-of-file conven-
  3591.         tion, etc.
  3592.  
  3593.  
  3594. SHOW KEY
  3595.         allows  you  to  determine a key's identification code and what it will
  3596.         send in CONNECT mode, most useful for obtaining the identification of a
  3597.         key  when SET KEY commands will be placed in a TAKE file.  This command
  3598.         can be done only interactively (use a  ?  to  see  all  defined  keys).
  3599.         Refer to the SET KEY description for details.
  3600.  
  3601.  
  3602. SHOW LOGGING
  3603.         Displays the names of the session, packet, and  transaction  logs,  and
  3604.         tells whether logging is in effect.
  3605.  
  3606.  
  3607. SHOW MACROS [macroname]
  3608.         displays the definitions of all currently defined macros,  as  well  as
  3609.         the  amount  of  space left for new macro definitions. A macro name, or
  3610.         abbreviation, can be included to restrict the list, e.g. SHOW MACRO IBM
  3611.         will  display  the  definition  of the IBM macro, and SHOW MACRO X will
  3612.         list the definitions of all macros whose names begin with X.
  3613.  
  3614.  
  3615. SHOW MODEM
  3616.         displays  the  status  of  the  modem signals DSR (dataset ready, modem
  3617.         tells the PC that it is turned on and in  data  mode),  CTS  (clear  to
  3618.         send,  modem  grants  the  PC permission to send data), and CD (carrier
  3619.         detect, local modem tells the PC that it is  connected  to  the  remote
  3620.         modem).  The results may be misleading if your asynchronous adapter, or
  3621.         the connector or cable that is attached to it, is  strapped  to  supply
  3622.         these modem signals itself.
  3623.  
  3624.  
  3625. SHOW PROTOCOL
  3626.         displays the values of the Kermit protocol-related parameters,  includ-
  3627.         ing  all  the  SET  SEND  and  SET RECEIVE parameters, plus whether the
  3628.         timer, attribute packets, and logging are enabled.
  3629.  
  3630.  
  3631. SHOW SCRIPTS
  3632.         displays the script-related variables.
  3633.  
  3634.  
  3635. SHOW SERVER
  3636.         displays which server functions are enabled and disabled.
  3637.  
  3638.  
  3639. SHOW STATISTICS
  3640.         displays  counts of characters sent and received during file transfers,
  3641.         for both the most recent transfer and the entire session,  and  an  es-
  3642.         timate of the average baud rate while sending and listening.
  3643.  
  3644.  
  3645. SHOW TERMINAL
  3646.         displays the terminal settings, which terminal is being  emulated,  the
  3647.         tab stops, etc.
  3648.  
  3649.  
  3650. SHOW TRANSLATION
  3651.         displays the entries in the 256 byte input translation table.    Values
  3652.         are  expressed  numerically  to  avoid confusion with different display
  3653.         adapters, and the command shows only entries for which input and output
  3654.         codes differ.
  3655.  
  3656.  
  3657. 1.7. Macros
  3658.  
  3659. Like TAKE files, macros provide a way of collecting many commands into a single
  3660. command.  The difference between a macro and a TAKE file is that  Kermit  keeps
  3661. all  its macro definitions in memory, and can execute them as many times as you
  3662. like, without having to look them up on disk, whereas every time  you  issue  a
  3663. TAKE  command,  Kermit  has to access a disk.  But... you can have as many TAKE
  3664. command files as you like, and they  can  be  as  long  as  you  want,  whereas
  3665. MS-Kermit's memory for storing macro definitions is limited.  You can put macro
  3666. definitions and DO commands for them in TAKE files, or for that matter, you can
  3667. put  TAKE commands in macro definitions.  There is a limit of 25 simultaneously
  3668. active TAKE files plus active macros; a TAKE file or macro  remains  active  if
  3669. the  last item invokes another TAKE or macro command.  Active here means Kermit
  3670. is reading commands from them, not just storing them for later.
  3671.  
  3672.  
  3673. The DEFINE Command
  3674.  
  3675. Syntax: DEFINE macro-name [command [, command [, ...]]]
  3676.  
  3677. Kermit-MS command  macros  are  constructed  with  the  DEFINE  command.    Any
  3678. Kermit-MS commands may be included.  Example:
  3679.  
  3680.     define telenet set parity mark, set speed 1200, connect
  3681.  
  3682. A macro can be undefined by typing an empty DEFINE command for it, like
  3683.  
  3684.     define telenet
  3685.  
  3686. A  macro definition may be up to 255 character long.  This example shows a long
  3687. definition in which lines are continued with hyphenation:
  3688.  
  3689.     define setup set port 1, set speed 19200, set parity even,-
  3690.     set flow none, set handshake xon, set local-echo on,-
  3691.     set timer on, set terminal color 1 31 45,-
  3692.     set warning on, set incomplete keep, connect
  3693.  
  3694. Longer definitions can be accomplished by "chaining."  Example:
  3695.  
  3696.     define setup set port 1, set speed 19200, set par even, do setup2
  3697.     define setup2 set flo no, set handsh xon, set local on, do setup3
  3698.     define setup3 set timer on, set terminal color 1 31 45, do setup4
  3699.     define setup4 set warning on, set incomplete keep, connect
  3700.  
  3701. DO SETUP or just SETUP will invoke all of these commands.  Commas are  used  to
  3702. separate  commands in macro definitions; carriage returns (\13) cannot be used.
  3703. When control or other special characters are needed in a macro they may be  ex-
  3704. pressed in backslash number form, \nnn.
  3705.  
  3706. The  SHOW  MACROS  command displays the values of currently defined macros, and
  3707. tells how much space is left for further definitions.
  3708.  
  3709. The definition of the macro is entered literally; variables are  not  evaluated
  3710. (see ASSIGN, below).
  3711.  
  3712.  
  3713. The DO Command
  3714.  
  3715. Syntax: [DO] macro-name [parameters...]
  3716.  
  3717. A  Kermit-MS  macro  is  invoked using the DO command.  For instance, Kermit-MS
  3718. comes with a predefined macro to  allow  convenient  setup  for  IBM  mainframe
  3719. line-mode  communications;  to invoke it, you would type DO IBM.  The IBM macro
  3720. is defined as "set timer on, set local-echo on, set parity mark, handshake xon,
  3721. set  flow  none".    You  can  use the DEFINE command to redefine this macro or
  3722. remove the definition altogether.
  3723.  
  3724. There is no automatic way to undo the effect of a macro.  If you  need  to  ac-
  3725. complish  this  effect,  you should define another macro for that purpose.  For
  3726. instance, to undo the effect of "do ibm" so that you could connect to,  say,  a
  3727. DEC VAX, you could:
  3728.  
  3729.   def vax set parity none, set handshake none, set flow xon/xoff,-
  3730.   set timer off, set local-echo off
  3731.  
  3732. Then  you  can  "do  ibm" whenever you want to use the IBM system, and "do vax"
  3733. whenever you want to use the VAX.
  3734.  
  3735. If you wish to view the macro expansion whenever you issue a  DO  command,  you
  3736. can SET TAKE-ECHO ON.
  3737.  
  3738. As  a convenience the word DO may be omitted.  However, when question-mark help
  3739. is sought at the Kermit prompt, only the main keyword help table will be shown.
  3740. If you want to see the available macros, type "do ?" or SHOW MACROS.  Use of DO
  3741. is recommended for overall clarity unless a favorite  macro  is  executed  fre-
  3742. quently.
  3743.  
  3744.  
  3745. Variables
  3746.  
  3747. Macros  can use substitution variables similar to those of DOS Batch.  The name
  3748. of a substitution variable is of  the  form  "\%character",  where  the  single
  3749. character  is a digit or a letter or other 8-bit character whose ASCII value is
  3750. 48 decimal or larger; upper and lower case letters are  considered  to  be  the
  3751. same  character.  A substitution variable is defined as a string of text by the
  3752. DEFINE command (the variables are in fact macros) and  Kermit  replaces  occur-
  3753. rences of the variable name with that text, hence the word "substitution".  For
  3754. example,
  3755.  
  3756.     Kermit-MS>define \%a this is substituted material
  3757.     Kermit-MS>echo I wonder if \%a or not.
  3758.  
  3759. yields the display:
  3760.  
  3761.     I wonder if this is substituted material or not.
  3762.  
  3763. Another example:
  3764.  
  3765.     Kermit-MS>define \%c set port 1,set speed 9600,set parity even,connect
  3766.  
  3767. Then
  3768.  
  3769.     Kermit-MS>\%c
  3770.  
  3771. is equivalent to
  3772.  
  3773.     Kermit-MS>set port com1
  3774.     Kermit-MS>set speed 9600
  3775.     Kermit-MS>set parity even
  3776.     Kermit-MS>connect
  3777.  
  3778. The special subset of substitution variables, \%1 .. \%9, is similar to the DOS
  3779. Batch  variable  set  %1  .. %9.  The DO command can accept arguments after the
  3780. macro name and the individual words in the arguments become the definitions  of
  3781. \%1,  etc,  for  up  to nine words, in order.  For example, given the following
  3782. definition:
  3783.  
  3784.     def dial ATDT\%1\13,input 30 CONNECT,connect,in Login:,out \%2\13
  3785.  
  3786. the following command can be used to dial any phone number:
  3787.  
  3788.     Kermit-MS>do dial 555-1212 myname
  3789.  
  3790. The word DO may be omitted, as in:
  3791.  
  3792.     Kermit-MS>dial 555-1212 myname
  3793.  
  3794. This command automatically assigns the value "555-1212" to variable the \%1 and
  3795. "myname" to \%2, and uses these values while dialing the phone and logging into
  3796. the host system.  If fewer than nine words are seen the remaining variables are
  3797. not  changed.    For example, if the line above was busy, you could dial a dif-
  3798. ferent number and omit the username because it will  be  remembered  from  last
  3799. time.
  3800.  
  3801. If  it  is  desired  to assign multiple words to a single variable, they can be
  3802. grouped in braces, for example
  3803.  
  3804.     Kermit-MS>dial {212 555 1212} myname
  3805.  
  3806. Substitution variables can reference  other  substitution  variables  in  their
  3807. definitions.    Care  is needed to prevent circular definitions, but even those
  3808. are detected by Kermit.  Subtle circular executions could cause  Kermit  to  go
  3809. into  an  endless loop; if you think this is happening, type a Control-C to in-
  3810. terrupt the process.  To clarify matters, the definition string of  a  variable
  3811. is  substituted  for the variable's name when the name is observed in a left to
  3812. right scan of a command.  For example,
  3813.  
  3814.     Kermit-MS>define \%a echo This is \%b example: \%b.
  3815.     Kermit-MS>define \%b a mac\%c expansion
  3816.     Kermit-MS>define \%c ro string
  3817.     Kermit-MS>\%a
  3818.  
  3819. displays:
  3820.  
  3821.     This is a macro string expansion example: a macro string expansion.
  3822. If this example is entered manually then when the final \%a is typed  the  com-
  3823. mand  line is immediately replaced with the fully expanded command and more in-
  3824. put is solicited (such as a carriage return).  Try  it.    Check  the  variable
  3825. definitions with the SHOW MACRO command.
  3826.  
  3827. A variable can be undefined (deleted) by defining it as an empty string:
  3828.  
  3829.     Kermit-MS>define \%c
  3830.  
  3831. DOS  batch  file  arguments  may be transformed into Kermit variables.  Suppose
  3832. file TEST.BAT holds the line:
  3833.  
  3834.     Kermit define \%%1 %1, define \%%a %2, stay
  3835.  
  3836. Invoking the Batch file by:
  3837.  
  3838.     C>test one two
  3839.  
  3840. results in creating Kermit variables \%1 with definition of "one" and \%a  with
  3841. definition  "two".  The doubled percent symbols in the Batch file are needed to
  3842. compensate for one of them being consumed by the DOS Batch processor.    %1  is
  3843. the  first Batch argument word, %2 is the second word.  The syntax \%%1 is con-
  3844. verted by Batch to be \%1 when seen by Kermit, without further substitution  by
  3845. Batch.
  3846.  
  3847.  
  3848. The ASSIGN Command
  3849.  
  3850. Syntax: ASSIGN
  3851.  
  3852. The DEFINE command does not evaluate the definition.  For instance, the command
  3853.  
  3854.     define \%a \%1
  3855.  
  3856. simply defines the variable \%a to be "\%1", not the current value of \%1 -- if
  3857. \%1  changes,  then so does \%a.  To copy the value of one variable to another,
  3858. use the ASSIGN command:
  3859.  
  3860.     assign \%a \%1
  3861.  
  3862. This copies the value of \%1 to \%a, so that if \%1 changes,  \%a  will  retain
  3863. the previous value.  Example:
  3864.  
  3865.     Kermit-MS>define \%a foo
  3866.     Kermit-MS>define \%b \%a
  3867.     Kermit-MS>echo \%a \%b
  3868.     foo foo
  3869.     Kermit-MS>assign \%c \%a
  3870.     Kermit-MS>define \%a new
  3871.     Kermit-MS>echo \%a \%b
  3872.     new new
  3873.     Kermit-MS>echo \%a \%c
  3874.     new foo
  3875.  
  3876.  
  3877. 1.8. SCRIPTS
  3878.  
  3879. A  script is a file or a macro containing Kermit commands to be executed.  What
  3880. distinguishes a script from ordinary TAKE files or macros is  the  presence  of
  3881. INPUT, REINPUT, OUTPUT, PAUSE, ECHO, ASK, CLEAR, IF, GOTO, and WAIT commands to
  3882. automatically detect and respond to information flowing though the serial port,
  3883. actions  which  otherwise  would  be performed by the user during CONNECT.  The
  3884. login sequence of a host computer is a classical example.
  3885.  
  3886. It is a common, but incorrect, assumption that text to be sent  to  the  remote
  3887. computer can be included in a TAKE file after the CONNECT command:
  3888.  
  3889.     set speed 9600        ; MS-Kermit command
  3890.     connect               ; MS-Kermit command
  3891.     run kermit            ; Text to be sent to other system
  3892.     send foo.bar          ; Text to be sent to other system
  3893.     ^]c                   ; Escape sequence to get back to MS-Kermit
  3894.     receive               ; MS-Kermit command
  3895.  
  3896. The  reason  this  doesn't  work is that during CONNECT, MS-Kermit always reads
  3897. from the real keyboard, and not from the take file.  Even if this technique did
  3898. work,  it  would  still  run  into  synchronization problems.  But these can be
  3899. avoided when there is a way to coordinate the commands that we  send  with  the
  3900. remote  system's  responses.    Kermit's  script commands provide this ability.
  3901. They may be freely intermixed in a TAKE file or macro  with  any  other  Kermit
  3902. commands to achieve any desired effect.  The OUTPUT command sends the specified
  3903. characters as if the user had typed them; the INPUT command reads the responses
  3904. and compares them with specified character strings, just as the user would do.
  3905.  
  3906. The script commands include INPUT, REINPUT, OUTPUT, PAUSE, WAIT, ECHO, IF, ASK,
  3907. and GOTO.  These commands may be interrupted by typing Ctrl-C at the  keyboard.
  3908. The  INPUT,  REINPUT,  PAUSE,  and WAIT commands accept a following number as a
  3909. timeout value. The number is interpreted as seconds from  the  present  or,  if
  3910. given in hh:mm:ss form, as a specific time of day.  In either case, the timeout
  3911. interval must be within 12 hours of the present to avoid it being considered as
  3912. in the past (expired).
  3913.  
  3914. HINT:    It  is  recommended  that  a console driver such as ANSI.SYS be loaded
  3915. during executing of a script.  This is because Kermit's  terminal  emulator  is
  3916. active only during the CONNECT command, and any PC/host interactions that occur
  3917. during script execution may appear fractured on  the  screen.    This  is  par-
  3918. ticularly  true  of  full-screen  login  applications, like through an IBM 3270
  3919. protocol converter.
  3920.  
  3921.  
  3922. The CLEAR Command
  3923.  
  3924. Syntax: CLEAR
  3925.  
  3926. The CLEAR command empties the buffers of the serial port to forget any  earlier
  3927. material.  This gets the INPUT command off to a clean start.  (This command was
  3928. called CLRINP in 2.29B and earlier, and CLEAR was used to erase macro  and  key
  3929. definition memory).
  3930.  
  3931.  
  3932. The ECHO Command
  3933.  
  3934. Syntax: ECHO text
  3935.  
  3936. The ECHO command is useful for reporting progress of a script, or prompting the
  3937. user for interactive input.  The text is displayed on the screen, and  may  in-
  3938. clude  backslash notation for control or 8-bit characters.  An implied linefeed
  3939. is included at the beginning of the text.
  3940.  
  3941.  
  3942. SET INPUT
  3943.  
  3944. Syntax: SET INPUT {CASE, DEFAULT-TIMEOUT, ECHO, TIMEOUT-ACTION}
  3945.  
  3946. The SET INPUT command controls the behavior of the script INPUT command:
  3947.  
  3948. SET INPUT CASE {IGNORE, OBSERVE}
  3949.     Says  whether or not to distinguish upper and lower case letters when doing
  3950.     a matchup in the INPUT command.  OBSERVE causes upper and lower  case  let-
  3951.     ters to be distinguished.  The default is to IGNORE case distinctions.
  3952.  
  3953.  
  3954. SET INPUT DEFAULT-TIMEOUT seconds
  3955.     Changes the default waiting time from one second to this new  value.    The
  3956.     value is used when an INPUT command has no timeout specified.
  3957.  
  3958.  
  3959. SET INPUT ECHO {ON, OFF}
  3960.     Show on the screen characters read from the serial port during  the  script
  3961.     operation, or not.  Default is ON, show them.
  3962.  
  3963.  
  3964. SET INPUT TIMEOUT-ACTION {PROCEED, QUIT}
  3965.     Determines whether or not the current macro or TAKE command file is  to  be
  3966.     continued  or exited if a timeout occurs.  PROCEED is the default and means
  3967.     that timeouts are ignored.  QUIT causes  the  current  script  file  to  be
  3968.     exited  and  control passed to either the next higher level script file (if
  3969.     there is one) or to Kermit's main prompt.
  3970.  
  3971. The SHOW SCRIPTS command displays the SET INPUT values.
  3972.  
  3973.  
  3974. The INPUT command
  3975.  
  3976. Syntax: INPUT [timeout] {search-string, @filespec}
  3977.  
  3978. INPUT is the most powerful of the script commands.  It  reads  characters  from
  3979. the  serial  port  continuously  until  one  of two things occurs: the received
  3980. characters match the search string or the time limit expires.  Matching strings
  3981. is the normal use, as in:
  3982.  
  3983.     Kermit-MS>input 5 Login please:
  3984.  
  3985. to  recognize  the phrase "Login please:", or else time out after waiting for 5
  3986. seconds.  A special binary character \255 or \o377 or \xFF stands for the  com-
  3987. bination  carriage return and a line feed, in either order, to simplify pattern
  3988. matching.  The command reports a testable status of SUCCESS or FAILURE and sets
  3989. the  DOS  ERRORLEVEL parameter to 2 if it fails to match within the timeout in-
  3990. terval.  Characters are stored in a 128 byte buffer for  later  examination  by
  3991. REINPUT, discussed below.
  3992.  
  3993. Beware of characters arriving with parity set because the pattern matching con-
  3994. siders all 8 bits of a byte unless the local parity is other than NONE and  SET
  3995. DISPLAY  is  7-BITS.    Arriving  characters are modified by first removing the
  3996. parity bit, if parity is other than NONE, then they are passed through the  SET
  3997. TRANSLATION INPUT converter, the high bit is again suppressed if SET DISPLAY is
  3998. 7-BITs, the result is logged and stored for pattern matching.
  3999.  
  4000.  
  4001. The REINPUT command
  4002.  
  4003. Syntax: REINPUT [timeout] {search-string, @filespec}
  4004.  
  4005. The REINPUT command is like INPUT except that characters are read from the  128
  4006. byte serial port history buffer rather than always seeking fresh input from the
  4007. port.  The purpose is to permit the current text to be examined several  times,
  4008. looking for different match strings.  A common case is reading the results of a
  4009. connection message from a modem which  might  be  "CONNECT  1200"  or  "CONNECT
  4010. 2400",  depending  on the other modem.  If the history buffer has less than 128
  4011. bytes then fresh input may be requested while seeking a match, until the buffer
  4012. is full.  REINPUT match searches begin at the start of the buffer whereas INPUT
  4013. searches never go back over examined characters.   REINPUT  sets  the  testable
  4014. status of SUCCESS or FAILURE and DOS ERRORLEVEL, just as for INPUT.
  4015.  
  4016. When  a  script fails because an INPUT or REINPUT command did not encounter the
  4017. desired string within the timeout interval the message "?Timeout" is displayed.
  4018. The OUTPUT command
  4019.  
  4020. Syntax: OUTPUT {string, @filespec}
  4021.  
  4022. The OUTPUT command writes the indicated character string to the serial port  as
  4023. ordinary  text.  The string may contain control or other special binary charac-
  4024. ters by representing them in backslash form.  Carriage  Return  (CR),  for  ex-
  4025. ample,  is  \13  decimal,  \o15 octal, or \x0D hexadecimal.  The string may use
  4026. 8-bit characters if the communications parity is type NONE.  A special notation
  4027. is also provided, \b or \B, which causes a BREAK signal to be transmitted.
  4028.  
  4029. The  string to be transmitted starts with the first non-spacing character after
  4030. the OUTPUT command and ends at either the end of line or, if executed within  a
  4031. TAKE file, at a semicolon (if you need to output a semicolon from within a TAKE
  4032. file, use backslash notation, e.g. "\59").  Indirectly  obtained  strings,  the
  4033. @filespec form, read the first line of the file up to but not including the ex-
  4034. plicit carriage return.
  4035.  
  4036. As a convenience, text arriving at the serial port during the OUTPUT command is
  4037. shown  on the screen if SET INPUT-ECHO is ON, and stored in a 128-byte internal
  4038. buffer for rereading by subsequent (RE)INPUT commands.
  4039.  
  4040. The INPUT, REINPUT, and OUTPUT commands have a special syntax  to  replace  the
  4041. normal string with text obtained from a file or device:
  4042.  
  4043.     OUTPUT @filespec
  4044.     INPUT @filespec
  4045.  
  4046. Both  forms  read  one  line  of text from the file or device and use it as the
  4047. desired string.  A common use is to wait for a password prompt  and  then  read
  4048. the  password  from  the  console  keyboard.    A  string starts with the first
  4049. non-spacing character and ends at either the end of line or, if executed within
  4050. a  TAKE file, at a semicolon.  Indirectly obtained strings, the @filespec form,
  4051. read the first line of the file up to but not including the  explicit  carriage
  4052. return.    Note  if  a  trailing carriage return is needed it must be expressed
  4053. numerically, such as \13 decimal.  Example:
  4054.  
  4055.     input 7 Password:
  4056.     echo Please type your password:
  4057.     output @con
  4058.     output \13
  4059.     echo \13\10Thank you!
  4060.  
  4061. In this example, a TAKE file requests the user to type in the  password  inter-
  4062. actively,  so  that  it  does not have to be stored on disk as part of the TAKE
  4063. file.
  4064.  
  4065.  
  4066. The PAUSE command
  4067.  
  4068. Syntax: PAUSE [{number, hh:mm:ss}]
  4069.  
  4070. PAUSE turns on the DTR signal, and then waits one or more seconds, or until the
  4071. specified  time  of  day.  Pauses are frequently necessary to avoid overdriving
  4072. the host and to let a modem proceed through a dialing sequence  without  inter-
  4073. ruptions  from  Kermit.   The default waiting time is set by SET INPUT DEFAULT-
  4074. TIMEOUT and is normally one second.  The optional integer  number  selects  the
  4075. number  of  seconds  to  pause  for  this  command,  and the hh:mm:ss selects a
  4076. specific time of day.  An explicit value of zero produces a pause of just a few
  4077. milliseconds which can be useful in some situations.
  4078.  
  4079. Text  arriving  during  the  PAUSE  interval  is  shown  on  the screen, if SET
  4080. INPUT-ECHO is ON, and stored in a 128-byte internal buffer for rereading  by  a
  4081. following INPUT command.
  4082.  
  4083. PAUSE  is interrupted if there is any activity on the keyboard.  Thus PAUSE can
  4084. be useful for operations like:
  4085.  
  4086.     echo "Type any key when ready..."
  4087.     pause 9999
  4088.  
  4089. PAUSE is useful in scripts that are to be executed at some future  time.    For
  4090. instance,  if  you  want  your PC to dial up another computer and transfer some
  4091. files at 9:30pm, when the phone rates are lower, you can put the command
  4092.  
  4093.     PAUSE 21:30:00
  4094.  
  4095. in your script file.  Note that you cannot specify a time more than 12 hours in
  4096. the  future.    If you need to pause until a specific time that is more than 12
  4097. hours away, you can use multiple PAUSE statements:
  4098.  
  4099.     PAUSE 21:30:00  ; Pause until 9:30pm tonight
  4100.     PAUSE  9:30:00  ; Pause until 9:30am tomorrow morning
  4101.  
  4102. Because PAUSE turns on the DTR signal, it can be useful in  scripts  where  DTR
  4103. must be asserted for a second or two to wake up the device your PC is connected
  4104. to, before you can send any characters to it:
  4105.  
  4106.     pause 1         ; Assert DTR and pause for 1 second
  4107.     output \13      ; Send a carriage return
  4108.  
  4109.  
  4110. The WAIT Command
  4111.  
  4112. Syntax: WAIT [{number, hh:mm:ss}] [\CD] [\CTS] [\DSR]
  4113.  
  4114. WAIT performs a timed PAUSE, as above, but also examines the modem control sig-
  4115. nals  Carrier Detect (\CD), Clear To Send (\CTS), and/or Data Set (modem) Ready
  4116. (\DSR).  If all of the signals specified in the WAIT statement are ON,  or  be-
  4117. come  ON before the timeout interval, the wait operation ceases with an indica-
  4118. tion of SUCCESS.  If the time interval expires without  all  of  the  specified
  4119. signals on, the status is FAILURE.  Example:
  4120.  
  4121.     Kermit-MS> wait 12:45:00 \cd \dsr
  4122.  
  4123. This  waits  until  both  CD  and  DSR  asserted or until 45 minutes past noon,
  4124. whichever happens first, returning SUCCESS or FAILURE respectively.
  4125.  
  4126. If no modem signals are specified, then WAIT is the same as PAUSE.
  4127.  
  4128.  
  4129. Labels and the GOTO Command
  4130.  
  4131. Labels and the GOTO command work together in the same fashion as in  DOS  Batch
  4132. files.   A label is a line which starts with a colon (:) in the leftmost column
  4133. followed immediately by a word of text (no intervening spaces); material on the
  4134. line  after the label is ignored.  The GOTO command is followed by a label, the
  4135. leading colon is optional in the GOTO command.  The label may be located either
  4136. before  or  after  the  GOTO command and is found by searching the TAKE file or
  4137. macro from the beginning.  Thus, duplicated labels will always  use  the  first
  4138. occurrence.    The  target label must be in the current TAKE file or macro; one
  4139. may not GOTO a label in another TAKE file or macro.  Example:
  4140.  
  4141.     :LOOP
  4142.     echo again and\32
  4143.     goto loop
  4144.  
  4145. will print "again and again and again and..." forever (until you type  Ctrl-C).
  4146. As a macro:
  4147.  
  4148.     define test :loop,echo again and\32,goto loop
  4149.     do test
  4150.  
  4151. Note  that  if  a label follows a comma in a macro definition, there must be no
  4152. intervening spaces:
  4153.  
  4154.     define test ..., :top, ..., goto top  ; bad, space before colon.
  4155.     define best ...,:top, ..., goto top   ; good, no space.
  4156.  
  4157. In this example, the best macro will work, the test macro won't.
  4158.  
  4159.  
  4160. The IF Command
  4161.  
  4162. Syntax: IF test-condition MS-Kermit Command
  4163.  
  4164. The IF command gives MS-Kermit scripts the ability to  make  a  decision  based
  4165. upon  the  criterion specified as the test-condition.  If the test condition is
  4166. true, then the command is executed.  Otherwise, it is skipped.  The  test  con-
  4167. ditions are:
  4168.  
  4169.     NOT     Modifier for other conditions below.
  4170.  
  4171.     ALARM   True if the current time of day is at or later than the alarm clock
  4172.             time.  The alarm clock time is set by the command SET  ALARM  time.
  4173.             IF  ALARM  distinguishes  early  from  late with a 12 hour field of
  4174.             view.
  4175.  
  4176.     COUNT   True if the current COUNT variable is greater than zero.  COUNT  is
  4177.             a  special  Kermit variable for each active TAKE file or macro.  It
  4178.             is set by the command SET COUNT and it is both tested and  modified
  4179.             by  the IF COUNT command.  The intent is to construct simple script
  4180.             loops where the IF COUNT command first decreases COUNT by one  (but
  4181.             never  below  zero) and then if COUNT is greater than zero the fol-
  4182.             lowing Kermit command is executed.  Because COUNT exists  only  for
  4183.             TAKE  files  and macros it cannot be used interactively.  Each TAKE
  4184.             file or macro has its own distinct copy of COUNT, and  nested  TAKE
  4185.             files  or  macros  do not interact through their COUNTs.  Initially
  4186.             COUNT is zero.
  4187.  
  4188.     DEFINED symbol
  4189.             True  if  the named macro or variable is defined.  You can use this
  4190.             feature to remember things for future reference.
  4191.  
  4192.     EQUAL word1 word2 command
  4193.             True  if the two words are lexically equal.  Alphabetic case is ig-
  4194.             nored unless SET INPUT CASE OBSERVE.  If they match, the  following
  4195.             command  is  executed.   The modifier NOT may be inserted to invert
  4196.             the sense of the test.  Substitution variables may be used in place
  4197.             of  word1  and word2, but the command will only work if these vari-
  4198.             ables contain single words, not phrases.  If word1 or  word2  begin
  4199.             with  @,  then  the  rest  of  the  word  is  interpreted as a file
  4200.             specification, and the first word in the file is used.
  4201.  
  4202.     ERRORLEVEL number
  4203.             True  if  the  DOS  errorlevel  number matches or exceeds the given
  4204.             (decimal) number.
  4205.  
  4206.     EXIST filespec
  4207.             True if the specified file exists.
  4208.  
  4209.     FAILURE True  if  the  previous  status-returning  Kermit  command reported
  4210.             failure.
  4211.  
  4212.     SUCCESS True if the previous status-returning Kermit command reported  suc-
  4213.             cess.  When using IF SUCCESS and IF FAILURE, it is important to SET
  4214.             INPUT TIMEOUT PROCEED, otherwise the script will  quit  immediately
  4215.             upon  a  failing  INPUT or REINPUT, before getting to the IF state-
  4216.             ment.
  4217. IF commands are closely modeled on those of DOS Batch files,  for  familiarity.
  4218. They consist of a test condition, perhaps modified by the leading word NOT, and
  4219. then any legal Kermit command.  GOTO is an especially useful  command  here  to
  4220. branch in the TAKE file or macro.
  4221.  
  4222. The "object" of an IF command is a Kermit command, which can be:
  4223.  
  4224.    - A  regular, predefined Kermit command, like SEND FOO.BAR or SET SPEED
  4225.      1200.
  4226.  
  4227.    - A GOTO, allowing subsequent statements to be skipped.
  4228.  
  4229.    - Another IF command, as in  IF  DEFINED  \%3  IF  EXIST  FOO.BAR  SEND
  4230.      FOO.BAR.  The SEND command is executed only if both IF conditions are
  4231.      true.
  4232.  
  4233.    - A macro.  This allows a semblence of structured programming, with  an
  4234.      implied "begin" and "end" around the commands that compose the macro.
  4235.      For instance:
  4236.  
  4237.          define giveup echo I give up!, hangup, stop
  4238.          input 10 Login:
  4239.          if failure giveup
  4240.          output myusername
  4241.  
  4242. The Kermit commands which yield SUCCESS or FAILURE conditions are:  GET,  SEND,
  4243. RECEIVE, the REMOTE commands, INPUT, REINPUT, BYE, FINISH, LOGOUT, and WAIT.
  4244.  
  4245.  
  4246. The POP and STOP Commands
  4247.  
  4248. Use these commands for terminating execution of a TAKE file or macro.  POP ter-
  4249. minates the current level and returns to the previous level.  For  example,  if
  4250. you  gave  the  command  "take shower", and the SHOWER file contained a command
  4251. "take bath", and the BATH file contained a command "take hike", and a POP  com-
  4252. mand  was encountered in the HIKE file, then the next command executed would be
  4253. the one following the "take hike" command in the BATH file.  If a STOP  command
  4254. was  encountered  in  any of these files, MS-Kermit would return immediately to
  4255. interactive command level.  POP and STOP work in similar  fashion  with  nested
  4256. macro  invocations:  POP returns to the invoking macro, STOP returns to command
  4257. level.
  4258.  
  4259.  
  4260. Script Examples
  4261.  
  4262. A counting loop.  This TAKE file excerpt says  hello  three  times,  then  says
  4263. goodbye:
  4264.  
  4265.     set count 3             ; Prime the loop counter for three passes
  4266.     :TOP                    ; A label for GOTO
  4267.     echo Hello\13           ; Something to see, with carriage return
  4268.     if count goto top       ; Loop if COUNT is greater than zero
  4269.     echo Goodbye!\13
  4270.  
  4271. Figure 1-2 shows a simple script file that logs in to a computer, prompting the
  4272. user for her password using the @con construction, and then connects as a  ter-
  4273. minal.    Notice  the  semicolons  used to indicate comments in TAKE files.  If
  4274.  
  4275. -------------------------------------------------------------------------------
  4276.  
  4277.  
  4278.     define ermsg echo \%1\13, stop       ; Define an error handling macro.
  4279.     clear                                ; Clear the input buffer.
  4280.     set speed 9600                       ; Set the transmission speed.
  4281.     output \13                           ; Carriage return to awaken host.
  4282.     input 15 Login:                      ; Wait up to 15 secs for prompt.
  4283.     if failure ermsg No_login_prompt!    ; Give up if none.
  4284.     output Sari\13                       ; Send username and CR.
  4285.     set input echo off                   ; Privacy, please.
  4286.     input 5 Password:                    ; Quietly wait for this.
  4287.     if failure ermsg No_password_prompt! ; Give up if it doesn't come.
  4288.     echo Type your password now...       ; Make our own prompt.
  4289.     output @CON                          ; Send console keystrokes.
  4290.     output \13                           ; Add a real carriage return.
  4291.     input 30 $                           ; Wait for system prompt.
  4292.     if failure ermsg No_system_prompt!   ; Give up if none.
  4293.     connect                              ; Start terminal emulation.
  4294.  
  4295.                  Figure 1-2:  MS-Kermit Script for Logging In
  4296.  
  4297. -------------------------------------------------------------------------------
  4298.  
  4299. these same commands were typed by hand  at  the  Kermit  prompt  the  semicolon
  4300. material  would be considered part of a string!  Typing a Control-C will inter-
  4301. rupt and terminate any of the commands.
  4302.  
  4303. Figure 1-3 illustrates some detailed control of the Hayes 2400 modem.  Some un-
  4304. derstanding  of  the  Hayes  dialing  language  is helpful for deciphering this
  4305. script (consult your Hayes modem manual).  If the script is stored  in  a  file
  4306. called HAYES.SCR, then a DIAL macro can be defined like this:
  4307.  
  4308.     define dial take hayes.scr
  4309.  
  4310. The  trick  here is that any invocation of the "dial" or "do dial" command with
  4311. an operand will set the variable \%1, which is used in the TAKE file,  for  in-
  4312. stance:
  4313.  
  4314.     dial 765-4321
  4315.  
  4316. will set \%1 to "765-4321", the number to be dialed.  You can also type
  4317.  
  4318.     dial {212 765 4321}
  4319.  
  4320. if  you  want to include spaces in the phone number.  This script requires ver-
  4321. sion 2.32 of Kermit or later.
  4322.  
  4323. -------------------------------------------------------------------------------
  4324.  
  4325.  
  4326.     def errstop echo \%1\13, def \%1, hang, stop ; Error handler.
  4327.     if not defined \%1 errstop {Please supply a phone number!}
  4328.     assign \%n \%1                       ; Copy the phone number.
  4329.     clear                                ; Clear the input buffer.
  4330.     set speed 2400                       ; Dial at high speed.
  4331.     wait 2 \cts                          ; Is modem turned on?
  4332.     if fail errstop {Please turn on your modem.} ; No.
  4333.     echo Initializing modem...\13\10     ; Yes.
  4334.     output ATZ\13                        ; Reset the modem.
  4335.     pause 2                              ; Give it a little time.
  4336.     output AT F1 Q0 V1 X4 S0=0\13        ; Put modem in known state.
  4337.     input 8 OK                           ; Look for response.
  4338.     if fail errstop {Can't initialize modem.}
  4339.     pause 1                              ; Pause for a second first.
  4340.     set count 5                          ; Set the redial limit.
  4341.     define \%d \13Dialing                ; Initial dial message.
  4342.     :REDIAL
  4343.     echo \%d \%n...\13\10                ; Tell them we're dialing.
  4344.     output ATDT\%n\13                    ; Dial the phone number.
  4345.     clear                                ; Clear away the command echo.
  4346.     input 60 CONNECT                     ; Wait for CONNECT message.
  4347.     if success goto speed                ; Got it, go check speed.
  4348.     define \%m No dialtone or no answer. ; Make this the error message.
  4349.     reinput BUSY                         ; Didn't connect.  Was it busy?
  4350.     if failure errstop {\%m\10\13Try again later.} ; No
  4351.     Echo \13Busy...                      ; It's busy, let them know.
  4352.     hangup                               ; Drop DTR momentarily.
  4353.     pause 60                             ; Wait one minute.
  4354.     define \%d \13Redialing              ; Change message to "Redialing".
  4355.     if count goto redial                 ; Then go redial.
  4356.     define \%m \13Line busy.             ; After 5 tries set this message.
  4357.     :SPEED                               ; Connected!
  4358.     pause 1                              ; Wait for text after CONNECT.
  4359.     define \%s 2400                      ; Assume speed is 2400.
  4360.     reinput 1 2400                       ; Rescan current text for "2400"
  4361.     if success goto done                 ; It is.
  4362.     define \%s 1200                      ; It isn't, so assume 1200.
  4363.     reinput 1 1200                       ; Is it?
  4364.     if failure define \%s 300            ; It isn't, so it must be 300.
  4365.     :DONE                                ; We know the speed.
  4366.     set speed \%s                        ; So set it.
  4367.     echo Connecting at \%s bps...\13     ; Tell the user.
  4368.     pause 2                              ; Give her a chance to read it.
  4369.     set terminal clear                   ; Clear screen.
  4370.     define \%1                           ; Clear argument.
  4371.     connect                              ; And start terminal emulation.
  4372.  
  4373.    Figure 1-3:  MS-Kermit Script for More Control of a Hayes 2400 bps Modem
  4374.  
  4375. -------------------------------------------------------------------------------
  4376.  
  4377. A combination of DOS Batch and Kermit Script files is shown in Figures 1-4  and
  4378. 1-5  (see  your  DOS  manual for an explanation of the batch file syntax).  The
  4379. purpose is to allow a user to say "SEND filename" at the DOS prompt.   The  DOS
  4380. batch shell, SEND.BAT, and the login script, KX, are combined to login to a VAX
  4381. through a data switch, run VMS Kermit in server mode, transfer the file, submit
  4382. it  to VMS Mail, delete the disk file, shut down the server and logout from the
  4383. VAX, and report the overall transfer status.  The user is asked  to  provide  a
  4384. password interactively.
  4385.  
  4386.  
  4387. 1.9. Initialization Files Revisited
  4388.  
  4389. At  Columbia  University, we have IBM 370-series mainframes running VM/CMS, and
  4390. VAX and SUN systems running Unix.  All of these systems are accessible  through
  4391. an  IBM/Rolm  (now Siemens/Rolm) voice/data CBX.  The IBM systems have two dif-
  4392. ferent kinds of front ends, a COMTEN 3695 (similar to IBM  3705)  for  linemode
  4393. half-duplex  connections,  and  various Series/1-style protocol converters (in-
  4394. cluding the 7171 and 4994) for full-screen, full-duplex 3270 emulation, all  of
  4395. which  use  various combinations of parity and other settings.  The VAX is con-
  4396. nected directly to the CBX, whereas the SUNs are connected to the  CBX  through
  4397. Cisco  Ethernet  terminal servers.  Figure 1-6 shows the MSKERMIT.INI file used
  4398. at Columbia for automatic login to these systems.  It illustrates the  creative
  4399. use  of macros and scripts. Numerous site- and system-dependent key definitions
  4400. have been omitted.
  4401.  
  4402. A bit of explanation might clarify some of this.  The IBM/Rolm  CBX  prompt  is
  4403. "CALL,  DISPLAY  OR MODIFY?" and we respond with a CALL command for the desired
  4404. system or front end, like CALL SIMB (IBM mainframe in full screen mode  through
  4405. a  7171  protocol converter), CALL CUVMB (IBM mainframe in linemode through the
  4406. COMTEN), CALL CUNIXC (a VAX), or CALL CUNIXA (a SUN, through an  Ethernet  ter-
  4407. minal server).  When the initial call through the CBX is completed, the message
  4408. "CALL COMPLETE" appears, and then begins the interaction with the desired host,
  4409. front  end,  or  terminal  server, each of which has its own set of prompts and
  4410. responses.
  4411.  
  4412. To connect to a given system, one types "do simb",  "do  cunixc"  to  invoke  a
  4413. "connecting"  macro.  Each of these, in turn, invokes the CBX macro to navigate
  4414. through the CBX to the desired system.  If the CALL COMPLETE message is encoun-
  4415. tered,  then  further  macros  (3695,  7171,  etc) are used to get past any as-
  4416. sociated front end (e.g. to tell the COMTEN which IBM mainframe is  wanted,  or
  4417.  
  4418. -------------------------------------------------------------------------------
  4419.  
  4420. File SEND.BAT, DOS batch program:
  4421.  
  4422.     echo off
  4423.     Rem Kermit, one-line file mailer, by Joe Doupnik.
  4424.     Rem Logon to VAX, run Kermit, Send user's file,
  4425.     Rem  post via MAIL, logout from VAX.
  4426.     if ".%2" == "." goto usage
  4427.     if exist %1 goto proceed
  4428.     echo No file to send!
  4429.     :usage
  4430.     echo Usage is SEND filename username
  4431.     goto done
  4432.     :proceed
  4433.     echo Logging onto the Vax ...
  4434.     kermit set disp q,take kx,send %1,pau,rem host mail %1 %2,pau 2,bye,
  4435.     if errorlevel 3 goto badrem
  4436.     if errorlevel 2 goto badrcv
  4437.     if errorlevel 1 goto badsnd
  4438.     echo File(s) "%1" has been mailed to %2.
  4439.     goto done
  4440.     :badrem
  4441.     echo Mail did not cooperate!
  4442.     :badrcv
  4443.     echo Receive failed!
  4444.     goto done
  4445.     :badsnd
  4446.     echo Send failed!
  4447.     goto done
  4448.     :done
  4449.     echo on
  4450.  
  4451.         Figure 1-4:  MS-DOS Batch File Invoking Kermit to Send VAX Mail
  4452.  
  4453. -------------------------------------------------------------------------------
  4454.  
  4455. -------------------------------------------------------------------------------
  4456.  
  4457. File KX, Kermit script:
  4458.  
  4459.     Comment Login script for VAXA via Micom data PBX Switch.
  4460.     set input timeout quit
  4461.     set input echo off
  4462.     set display quiet
  4463.     output \13
  4464.     comment - "slowly." and "CLASS" are part of the switch's prompt.
  4465.     input 10 slowly.
  4466.     input 10 CLASS
  4467.     pause
  4468.     comment - Slowly tell switch "vaxa", wait for beep.
  4469.     output v
  4470.     output a
  4471.     output x
  4472.     output a
  4473.     output \13
  4474.     pause
  4475.     input 5 \7
  4476.     comment - Done with Switch, wake up the VAX and log in.
  4477.     pause
  4478.     output \13
  4479.     pause
  4480.     input 5 Username:
  4481.     set input timeout proceed
  4482.     output MYNAME\13
  4483.     input 2 Password:
  4484.     comment - Prompt ourselves, then get password from console.
  4485.     echo Enter password:
  4486.     output @con
  4487.     comment - Send a carriage return at the end of the password.
  4488.     output \13
  4489.     comment - Expect ESC Z from the VAX's Set Term/Inquire...
  4490.     comment - Respond ESC [ <query symbol> 6 c   (say we are VT102).
  4491.     comment - Note syntax for including question mark!
  4492.     input 15 \27Z
  4493.     output \27[\{63}6c
  4494.     comment Look for VMS dollar sign prompt
  4495.     input 15 $
  4496.     comment Start VMS Kermit and place it in server mode
  4497.     output kermit server\13
  4498.     comment - allow server's message to finish, "machine." appears twice.
  4499.     input 10 machine.
  4500.     input 10 machine.
  4501.     pause
  4502.  
  4503.       Figure 1-5:  MS-Kermit Script for Logging into VAX and Sending Mail
  4504.  
  4505. -------------------------------------------------------------------------------
  4506.  
  4507. -------------------------------------------------------------------------------
  4508.  
  4509.  
  4510. ; MS-Kermit 2.31, 2.32 Initialization File for the IBM PC, XT, AT, PS2, etc.
  4511. ; Christine Gianone, Vace Kundakci, Columbia University, December 1988
  4512. echo Columbia University IBM PC Kermit Initialization file...
  4513.  
  4514. ; User IDs on various systems.  Substitute your own IDs.
  4515. def \%c XYZCU          ; User ID for IBM mainframe
  4516. def \%u xyz            ; UNIX ID for UNIX
  4517.  
  4518. ; General settings
  4519. set warning on         ; Change this to "off" to allow overwriting of files.
  4520. set speed 9600         ; Use 9600 bits per second by default
  4521. set term vt102         ; Emulate a DEC VT-102 terminal
  4522. set term wrap on       ; Have Kermit wrap lines at column 80
  4523.  
  4524. ; Behavior of INPUT command in script programs
  4525. set input timeout quit ; Exit from script if input pattern not found
  4526. set input echo on      ; Echo characters that arrive during INPUT
  4527. set input case observe ; Match according to alphabetic case
  4528.  
  4529. ; Macros for connecting to different systems thru the IBM/Rolm CBX
  4530. def cuvmb  do cbx,o c cuvm\13,  i 10 PLETE,      do 3695, o vmb\13, do 4381
  4531. def simb   do cbx,o c simb\13,  i 10 PLETE, pau, do 7171, do 3270
  4532. def cunix  do cbx,o c cunix\13, i 10 PLETE, pau, do cuts, do unix
  4533. def cunixa def \%s cunixa,do cunix
  4534. def cunixb def \%s cunixb,do cunix
  4535. def cunixc do cbx,o c cunixc\13,i 10 PLETE, pau, out \13, do unix
  4536.  
  4537. ; Macros for navigating thru front end and login prompts
  4538. def cbx  do def,o \13,i 10 MODIFY?                          ; IBM/Rolm CBX
  4539. def 3695 i 5 ING CHARACTERS:\32\32                          ; COMTEN
  4540. def 7171 pau,cle,o \13,i 5 TERMINAL TYPE:\32,o vt-100\13    ; 7171 front end
  4541. def 4381 do vml,i 5 BREAK KEY,o \b,i 5 .\17,o LOG \%c\13,c  ; VM/CMS linemode
  4542. def 3270 pau,cle,o \13,o L \%c\13,do vmf,c                  ; VM/CMS fullsc.
  4543.  
  4544. ; CU Terminal Servers (cutsa, cutsb, etc)
  4545. def cuts set inp tim p,out \13,pau,set co 8,:loop,out \13,i 3 >,-
  4546. if suc goto ok,if cou goto loop,ech Failed,stop,:ok,out \%s\13,set inp tim q
  4547.  
  4548. ; UNIX login with speed matching
  4549. def unix set inp timeout proc,set count 8,-
  4550. :loop,i 5 login:\32,if suc goto ok,out \13,if count goto loop,-
  4551. echo Failed,stop,:ok,out \%u\13,do dec,set inp tim q,connect
  4552.  
  4553. ; Macros for interacting with different systems:
  4554. def vml do tty,set par m,set k \270 \8,  set k \3 \Kbreak    ; VM linemode
  4555. def vmf do def,set par e,set k \270 \8,  set k \3 \3,do simk ; VM fullscreen
  4556. def dec do def,set par n,set k \270 \127,set k \3 \3         ; DEC, SUN, etc
  4557. def def set tim of,set loc of,set hand non,set flow xon,do nosimk ; Default
  4558. def tty set tim on,set loc on,set hand xon,set flow non,do nosimk ; IBM TTY
  4559.  
  4560.             Figure 1-6:  An Advanced MS-Kermit Initialization File
  4561.  
  4562. -------------------------------------------------------------------------------
  4563.  
  4564. to  tell the protocol converter what terminal to emulate), and then to login on
  4565. the desired system, prompting on the screen for user ID and password.  Finally,
  4566. a  macro like "vml" (VM linemode), "xed" (XEDIT, i.e. VM full screen), or "dec"
  4567. (VAX or SUN) is executed to set the communication  parameters  for  the  system
  4568. just logged in to.  The key definitions that are shown in the "vml", "xed", and
  4569. "dec" macros assign the host's character deletion code (backspace or rubout) to
  4570. the AT's backarrow key.
  4571.  
  4572.  
  4573. 1.10. International Character Sets
  4574.  
  4575. MS-Kermit  may  be  used on the IBM family and compatibles for interacting with
  4576. host computers in different languages.  MS Kermit  CONNECT  mode  has  separate
  4577. translation  mechanisms  for  screen  and  keyboard.  Keyboard translations are
  4578. managed through the SET KEY facility which maintains a table  of  defined  keys
  4579. and their output values (single characters, strings, or Kermit keyboard verbs).
  4580. The keyboard is normally read via the system Bios, but it may also be read  via
  4581. DOS  (with  a  loss of some key combinations) by saying SET KEY OFF (i.e., turn
  4582. off Bios reading). The keyboard can be modified rapidly by a group of  SET  KEY
  4583. commands  placed  in  a  macro.  The host has no direct control of the keyboard
  4584. translations; the host thinks Kermit is a real Digital VT102/VT52 or  Tektronix
  4585. 4010 terminal and those devices do not have redefinable keys.
  4586.  
  4587. Screen  translation  is  accomplished  in two places, the SET TRANSLATION INPUT
  4588. table and the built-in character sets.  SET TRANSLATION INPUT  is  a  table  of
  4589. received  versus reported character codes, and it is enabled by SET TRANSLATION
  4590. INPUT ON.  The table is initially an identity which allows  individual  entries
  4591. to be modified as desired by the command
  4592.  
  4593.     SET TRANSLATION INPUT <received-code> <displayed-code>
  4594.  
  4595. Only  characters  destined  for  the  screen as text or cursor control (control
  4596. codes) are translated; escape sequences  and  transparent  printing  characters
  4597. bypass the SET TRANSLATION table.  The table is bypassed for printing to permit
  4598. binary graphics streams to be sent to the printer.  A  character  about  to  be
  4599. shown  on  the  screen can be modified by selection of a character set, such as
  4600. US-ASCII, UK-ASCII, ALTERNATE-ROM, or line drawing.
  4601.  
  4602. The SET TRANSLATION INPUT mechanism operates at the Kermit command level and is
  4603. available  to  macros,  TAKE  files,  and  hand typed control.  Host control is
  4604. available only indirectly via the special macros TERMINALR and TERMINALS,  dis-
  4605. cussed below, which may contain the SET TRANSLATION INPUT and other commands.
  4606.  
  4607. Character  sets  can  be  selected  either  by  the Kermit command SET TERMINAL
  4608. CHARACTER-SET (expressed by hand, in macros, or in Take files), or by host con-
  4609. trol of the terminal emulator via the escape sequences ESC ( char or ESC ) char
  4610. and the Control-O and Control-N  codes.    Thus,  rapid  changes  of  displayed
  4611. characters  is  available to the host and to the user through all three dynamic
  4612. pathways: macros, Take files, hand typing or received codes.
  4613.  
  4614. Version 2.32 of MS-Kermit also includes a new ability to operate  right-to-left
  4615. during  CONNECT  mode,  in order to interact with Hebrew or Arabic language ap-
  4616. plications on the host computer.   The  pertinent  commands  are  SET  TERMINAL
  4617. DIRECTION  {LEFT-TO-RIGHT  |  RIGHT-TO-LEFT},  and  SET  TERMINAL CHARACTER-SET
  4618. ALTERNATE-ROM.  The latter command makes these high bit characters available by
  4619. active  user  selection,  or  by reception of the escape sequences below to as-
  4620. sociate them with one of the two VT102 character set pointers called  G0  (nor-
  4621. mal) and G1 (alternate).  Arrival of Control-O selects the G0 set (default) and
  4622. Control-N the G1 set.
  4623.  
  4624. In addition, two special macro names TERMINALR  and  TERMINALS  have  been  set
  4625. aside,  which  can  be  invoked within the VT102 emulator by reception from the
  4626. host of the special escape sequences:
  4627.   ESC [ ? 34 h    (invokes macro TERMINALS)
  4628.   ESC [ ? 34 l    (lower case L, invokes macro TERMINALR)
  4629. and/or by using new keyboard "verbs" (not preassigned to keys):
  4630.   \Kterminals     (invokes macro TERMINALS)
  4631.   \Kterminalr     (invokes macro TERMINALR)
  4632.  
  4633. When these macros are invoked within the terminal  emulator  and  if  they  are
  4634. defined  then  CONNECT  mode  is exited and the macro is executed.  There is no
  4635. automatic return to Connect mode at the completion of the macro.  If the  macro
  4636. is  not defined then CONNECT is not exited and nothing happens.  Initially nei-
  4637. ther macro is defined.  If a return to Connect mode  is  desired  then  include
  4638. CONNECT in the macro.  Any legal action is permitted in these macros, including
  4639. invoking other macros and Take files.
  4640.  
  4641. The purpose of these two names and macros is to allow a host or the local  user
  4642. to  interactively  select  two  local  operations  while  within  the  terminal
  4643. emulator, such as changing language specific setups or other desirable  things,
  4644. which  are  much  more  involved  than  an existing keyboard verb.  There is no
  4645. restriction on what the macros may do since Kermit is  then  operating  not  in
  4646. Connect mode but at the Kermit command prompt level, as it is for other macros.
  4647.  
  4648. The  escape  sequences above are a Kermit specific extensions of Digital Equip-
  4649. ment Corporation's private escape sequences to set and reset modes;  hence  the
  4650. letters S and R in the macro names.
  4651.  
  4652. One  suggestion  for  employing SET TERM DIRECTION, SET TERM CHARACTER, and the
  4653. macros TERMINALR and TERMINALS to facilitate  mixed  Hebrew  and  English  com-
  4654. munications is the simple Take file below:
  4655.  
  4656.     ; Define macros hebrew and english to do all the work
  4657.  
  4658.     def hebrew  set term dir right, set term char alt, hkey, comkey
  4659.     def english set term dir left, set term char us, set key clear, comkey
  4660.  
  4661.     ; Define host-reachable macros for on the fly changes while
  4662.     ; staying in the emulator
  4663.  
  4664.     def terminalr english, connect
  4665.     def terminals hebrew, connect
  4666.  
  4667.     ; Define IBM-PC F1 key as switch to English, F2 as switch to Hebrew.
  4668.     ; Done here to be remembered despite SET KEY CLEAR in macro English.
  4669.     ; F1 and F2 thus are user-level commands during emulation.
  4670.  
  4671.     def comkey set k \315 \Kterminalr,set k \316 \Kterminals
  4672.  
  4673.     ; Define SET KEYs for Hebrew keyboard layout via macro hkey
  4674.  
  4675.     def hkey set k \x27 \x2c,set k \x2c \x9a,set k . \x95,set k / \x2e,-
  4676.      set k \x3b \x93,set k \x60 \x3b,set k a \x99,set k b \x90, hkey1
  4677.     def hkey1 set k c \x81,set k d \x82,set k e \x97,set k f \x8b,-
  4678.      set k g \x92,set k h \x89,set k i \x8f,set k k \x87,hkey2
  4679.     def hkey2 set k l \x8c,set k m \x8a,set k m \x96,set k n \x8e,-
  4680.      set k o \x8d,set k p \x94,set k q /,set k r \x98,set k s \x83,hkey3
  4681.     def hkey3 set k t \x80,set k u \x85,set k v \x84,set k x \x91,-
  4682.      set k y \x88,set k z \x86
  4683.  
  4684. After executing this file, one may switch Connect mode language support between
  4685. Hebrew (right to left, national display characters,  similarly  translate  out-
  4686. going  keyboard characters) and English by stating a single keyword at the Ker-
  4687. mit prompt, "Hebrew" or "English", or while within Connect mode by pushing  the
  4688. F1  or F2 keys (in this example), or by reception of ESC [ ? 34 h or l from the
  4689. host.  All the work is done from memory material  and  is  essentially  instan-
  4690. taneous.  Clearly, other languages can also utilize these tools.
  4691.  
  4692. IBM  PCs or compatibles will normally have national characters installed in the
  4693. upper portion of the character set ROM, in  positions  80H-9AH.    EGA  systems
  4694. generally  come  with  a program to load the appropriate national character set
  4695. into this portion of memory, such as HEBEGA for  Hebrew.    Version  3.30  (and
  4696. later)  of  DOS  supports  the notion of "Code Page" for PS/2 systems, or other
  4697. systems with EGA or LCD adapters, described in Appendices B and C  of  the  DOS
  4698. 3.30 reference manual.
  4699.  
  4700.  
  4701. 1.11. MS-Kermit Features for Different Systems
  4702.  
  4703. As  noted early on, MS-Kermit was designed primarily for the IBM PC family, and
  4704. later adapted to various non-IBM-compatible MS-DOS (and even  non-MS-DOS)  sys-
  4705. tems.    Some  of these adaptations provide all the features of the IBM PC ver-
  4706. sion, others provide only a subset, and still others may include  features  not
  4707. available  on  the  IBM family.  These features are all of the system-dependent
  4708. variety; the Kermit file transfer protocol should be implemented identically on
  4709. all  versions  of  MS-Kermit.  The most obvious differences are in the terminal
  4710. emulation options and the keyboards.  Table 1-7 shows  the  terminal  emulation
  4711. options  for the systems presently supported by Kermit-MS, and Table 1-8, shows
  4712. which keys are used for screen rollback on the  various  systems  supported  by
  4713. MS-Kermit.
  4714.  
  4715. -------------------------------------------------------------------------------
  4716.  
  4717.  
  4718.   System         EscChar   Capabilities Terminal Service
  4719.   ACT Apricot      ^]            K      VT52 ???
  4720.   DEC Rainbow      ^]      R   P K D    VT102 firmware
  4721.   DECmate/DOS      ^]            K      VT100
  4722.   Generic DOS      ^]            K      Depends on system
  4723.   Grid Compass     ^]            K      ???
  4724.   HP-110           ^]            K      Dumb terminal
  4725.   HP-150           ^]      R     K      HP-2623 firmware
  4726.   IBM PC family    ^]      R M P K D    H19,VT52,VT102,Tek emulation
  4727.   Intel 3xx        ^]            K      Uses real terminal
  4728.   NEC 9801         ^]        M P K D    VT102, Tektronix emulation
  4729.   NEC APC3         ^]      R M P K D    H19,VT52,VT102 emulation
  4730.   NEC APC          ^]      R   P K      VT100, ADM3A firmware
  4731.   Olivetti M24     ^]      R M P K D    Same as IBM PC
  4732.   Sanyo MBC55x     ^]      R M P K D    H19,VT52,VT102 emulation
  4733.   Wang PC          ^A            K      Wang firmware
  4734.   TI Pro           ^]        M P K      VT100/Tektronix
  4735.   Victor 9000      Alt-]     M P K D    H19,VT52,VT102 and/or Tek4010
  4736.   Zenith Z100      ^]            K      Heath-19 emulation
  4737.  
  4738.  R=Rollback, M=Modeline, P=Printer control, K=Key redefinition, D=screen Dump
  4739.  
  4740.                Table 1-7:  Kermit-MS Terminal Emulation Options
  4741.  
  4742. -------------------------------------------------------------------------------
  4743.  
  4744. -------------------------------------------------------------------------------
  4745.  
  4746. System    Screen Down   Line Down       Screen Up   Line Up
  4747. IBM PC    PgUp          Ctrl-PgUp       PgDn        Ctrl-PgDn
  4748. Rainbow   PrevScreen    Ctrl-PrevScreen NextScreen  Ctrl-NextScreen
  4749. HP-150    Prev          Shift-UpArrow   Next        Shift-DownArrow
  4750. NEC APC   Uparrow       Ctrl-UpArrow    DownArrow   Ctrl-DownArrow
  4751. NEC APC3  PgUp          Ctrl-PgUp       PgDn        Ctrl-PgDn
  4752. Sanyo 55x PgUp          Ctrl-RtArrow    PgDn        Ctrl-PgDn
  4753. The  IBM  PC  also  allows use of the Home key to get to the top of its display
  4754. memory and End key to get to the bottom, and the keypad minus (-) key to toggle
  4755. the  mode  line  on  and off.  The Rainbow uses Shift-Next-Screen to get to the
  4756. bottom of its display memory, but provides no key for moving  directly  to  the
  4757. top.
  4758.  
  4759.                    Table 1-8:  Kermit-MS Screen Scroll Keys
  4760.  
  4761. -------------------------------------------------------------------------------
  4762.  
  4763. Another  difference is the default communication port, the number of communica-
  4764. tion ports supported, and the names given to them.  For instance,  the  IBM  PC
  4765. family supports COM1 and COM2, and uses COM1 by default.  MS-Kermit may be per-
  4766. suaded to support higher-numbered IBM ports using the method outlined  in  sec-
  4767. tion  1.18.3.    For remote operation, IBM's name for the console is CON, so if
  4768. you CTTY COM1, you do CTTY CON to put the PC back to normal.
  4769.  
  4770.  
  4771. The DEC Rainbow
  4772.  
  4773. The DEC Rainbow version of MS-Kermit uses the built-in VT102 terminal  firmware
  4774. and  setup  modes,  and  can operate at speeds up to 9600 baud.  It has no 25th
  4775. screen line, and therefore no Kermit mode line during  CONNECT.    It  supports
  4776. only  the Rainbow's single communication port, and not the printer port, so SET
  4777. PORT for the Rainbow is not implemented (but of course the printer may be  used
  4778. for printing.)  The Rainbow may be put in remote mode by CTTY AUX, and returned
  4779. to normal with CTTY SCRN.  The Rainbow supports several SET TERMINAL  commands:
  4780. VT102, VT52, and ROLL.
  4781.  
  4782. The keypad and cursor keys all work properly in VT102 and VT52 modes and in ap-
  4783. plication as well as native states  (they  never  had  in  previous  versions).
  4784. Newline  mode is activated for received characters (LF ==> CR/LF).  Screen roll
  4785. back is almost 11 screenfuls.  Table 1-9 shows the verb names and  default  key
  4786. assignments for the Rainbow.  On the main typewriter keyboard the shifted comma
  4787. and period are converted to special keys available for Set Key assignment with-
  4788. out  impacting  the normal unshifted ASCII actions; Shift Lock has no effect on
  4789. these keys.
  4790.  
  4791.  
  4792. The DECmate II
  4793.  
  4794. MS-Kermit for the DECmate II with the XPU option is somewhat similar to Rainbow
  4795. Kermit.    It  uses  built-in  terminal VT100 firmware and setup modes and baud
  4796. rates up to 9600 on the single communication port.  The  printer  port  is  not
  4797. available for communications in this version.  There is no mode line, but other
  4798. connect-mode escapes are supported, including sending BREAK.  Disks A through I
  4799. are  supported, and the floppy disk format is compatible with the Rainbow.  DEC
  4800. utilities are available for file conversion between DOS and WPS-8 files.
  4801.  
  4802.  
  4803. The NEC APC3
  4804.  
  4805. The NEC APC3 version of MS-Kermit assumes that the ANSI.SYS driver has been in-
  4806. stalled  and  that  a color monitor is being used; the color graphics option is
  4807. not used by Kermit.  Although the display should be entirely  sensible  with  a
  4808. monochrome system, it has not been tested.  Differences from the IBM PC version
  4809. include:
  4810.  
  4811. SET BAUD: The useful baud rates supported range from 300 to 9600.
  4812.  
  4813. SET PORT: The available ports are 1, 2, 3,  or  their  equivalents  AUX,  AUX2,
  4814. AUX3.
  4815.  
  4816. SET  TERMINAL  COLOR:  Instead  of specifying colors by number, the words BLUE,
  4817.  
  4818. -------------------------------------------------------------------------------
  4819.  
  4820.  
  4821.     Rainbow Key           Verb Name      Operation
  4822.  
  4823.     PF1                   \Kpf1,\Kgold   Keypad function key
  4824.     PF2..PF4              \Kpf2..\Kpf4   Keypad function keys
  4825.     keypad 0..9           \Kkp0..\Kkp9   Keypad digit keys
  4826.     keypad -              \Kkpminus      Keypad minus key
  4827.     keypad ,              \Kkpcoma       Keypad commma
  4828.     keypad .              \Kkpdot        Keypad dot (period) key
  4829.     keypad Enter          \Kkpenter      Keypad Enter key
  4830.  
  4831.     up arrow              \Kuparr        Cursor keys
  4832.     down arrow            \Kdnarr
  4833.     left arrow            \Klfarr
  4834.     right arrow           \Krtarr
  4835.     Shift Prev Screen     \Khome         Rewind to start of screen buffer
  4836.     Shift Next Screen     \Kend          Unwind to end of screen buffer
  4837.     Ctrl Prev screen      \Kupone        Backup one screen line
  4838.     Ctrl Next screen      \Kdnone        Advance one screen line
  4839.     Prev screen           \Kupscn        Backup one screen
  4840.     Next screen           \Kdnscn        Advance one screen
  4841.     Print Screen          \Kprtscr       Copy screen to printer
  4842.     Ctrl Print Screen     \Ktoggle_prn   Toggle echoing screen to printer
  4843.                                           (printer failure resets toggle)
  4844.     Do                    \Kdump         Copy screen to file (KERMIT.SCN)
  4845.     Break                 \Kbreak        Send a BREAK
  4846.     Shift Break           \Klbreak       Send a Long BREAK
  4847.     Main Screen           \KDOS          Push to DOS
  4848.     Help                  \Khelp         Show Connect mode help menu
  4849.     Exit                  \Kexit         Exit Connect mode
  4850.     *                     \Knull         send a null out the serial port
  4851.     *                     \Khangup       hangup phone by dropping DTR, RTS
  4852.     *                     \Klogon        resume logging, if active
  4853.     *                     \Klogof        suspend logging
  4854.     *                     \Kstatus       display status table
  4855.  
  4856.     * (verbs not pre-assigned to keys)
  4857.  
  4858.  
  4859.                 Table 1-9:  Kermit-MS Verbs for the DEC Rainbow
  4860.  
  4861. -------------------------------------------------------------------------------
  4862.  
  4863. RED, MAGENTA, GREEN, CYAN, YELLOW, or WHITE are appropriate.  This is the color
  4864. of  the  text in connect mode; background colors are not available.  Monochrome
  4865. monitors will respond with display changing from most dim to most bright if the
  4866. colors are specified in the order given.
  4867.  
  4868. SET TERMINAL KEYCLICK: Not implemented in Kermit; use the NEC provided command.
  4869.  
  4870. SET TERMINAL SCREEN-BACKGROUND: Not implemented.
  4871.  
  4872. During  terminal emulation, screen scroll is handled by the PgUp and PgDn keys.
  4873. If used in combination with the Ctrl key, the display moves but one line.    If
  4874. used  in  combination  with  the Fnc key, the display scrolls to the end of the
  4875. buffer.  The Fnc-INS combination toggles the mode line  on/off.    The  Fnc-DEL
  4876. combination  toggles  the  terminal  emulation type.  The Fnc-Break combination
  4877. resets the emulator.  The Help key pulls down the connect mode menu.  The  ANSI
  4878. escape sequence for disable/enable cursor is implemented.
  4879.  
  4880.  
  4881. 1.12. Compatibility with Older Versions of MS-DOS Kermit
  4882.  
  4883. The  last  monolithic  (single  source file) release of MS-DOS Kermit was 1.20.
  4884. Meanwhile, implementations based on versions of that vintage will have at least
  4885. the following incompatibilies from the version described here:
  4886.  
  4887.    - "RECEIVE  filespec"  is  used instead of "GET filespec".  There is no
  4888.      GET command in older versions, and no way to specify a new  name  for
  4889.      an incoming file.
  4890.    - No LOCAL or REMOTE commands.
  4891.    - No 8th-bit prefixing, repeat counts, CRCs or 2-character checksums.
  4892.    - No TAKE or initialization files.
  4893.    - No command macros or command line arguments.
  4894.    - No terminal session logging.
  4895.  
  4896. and others, depending on the specific version.
  4897.  
  4898. Incompatibilities between 2.29 and later releases include:
  4899.  
  4900.    - LOCAL command has been removed from 2.30 and later.
  4901.    - CLEAR  command now means clear serial port buffer rather than key and
  4902.      macro definitions.  Key and macro definition string space is now gar-
  4903.      bage collected, so a CLEAR command for them is no longer necessary.
  4904.    - CLRINP command is gone (replaced by CLEAR).
  4905.    - Numbers of the form \nnn default to decimal rather than octal.
  4906.    - Status of Default Disk is now shown as default disk and path.
  4907.    - LOG  filespec  replaced  by  LOG  SESSION  filespec  and  LOG  PACKET
  4908.      filespec.
  4909.    - SET KEY and SHOW KEY commands use different key  identifications  and
  4910.      syntax:
  4911.  
  4912. MS-Kermit  no  longer understands keycap names such as F1 and BACKSPACE because
  4913. the codes are now highly dependent on individual keyboards, software, and  com-
  4914. puters.    Also,  not  every  key  press combination is supported by the system
  4915. software and key codes do depend on the keyboard in use.  Thus,  the  SHOW  KEY
  4916. command  is  normally  used  to  obtain codes for keys on your system.  In most
  4917. cases, defining one key also redefines all other keys sending the same  charac-
  4918. ter.    This  is  a  side  effect  of not knowing the physical details of every
  4919. keyboard.  However, efforts have been made to  recognize  many  such  "aliased"
  4920. keys and to generate unique identifications for each. Special keys, such as F1,
  4921. F2 and others which do not send an ASCII code are usually unique and are  iden-
  4922. tified by scan codes.
  4923.  
  4924. Previous  versions  of  MS Kermit used a different key coding algorithm and not
  4925. all old codes map to the expected keys.  However, Kermit does  attempt  to  use
  4926. the  older  SET  KEY syntax properly as much as possible.  The older syntax re-
  4927. quired the keyword SCAN followed by a number WITHOUT the BACKSLASH.   The  cur-
  4928. rent  MS  Kermit  uses decimal as the default number base and previous versions
  4929. used octal in certain commands.  So, when Kermit senses an old  style  SET  KEY
  4930. command  it  converts  the  number, displays the new format and gives a warning
  4931. message.  It is best to make a new style SET KEY file.
  4932.  
  4933.  
  4934. 1.13. What's Missing
  4935.  
  4936. Kermit-MS has plenty of room for improvement.  Missing features (which  may  be
  4937. added in future releases) include:
  4938.  
  4939.    - Sliding window transport protocol.
  4940.    - Default filetype for TAKE command files.
  4941.    - Passing paramaters in TAKE command, like in DO command.
  4942.    - A way to send files with their full path names.
  4943.    - A way to play back session logs directly from disk to screen.
  4944.    - Trapping of carrier loss during CONNECT or file transfer.
  4945.    - A better built-in help facility.
  4946.    - A way to dump or print Tektronix graphics screens.
  4947.  
  4948.  
  4949. 1.14. Installation of Kermit-MS
  4950.  
  4951. If you already have Kermit on your PC, you can use it to obtain new versions of
  4952. Kermit-MS when they appear on the central system at your site.  If you  do  not
  4953. have Kermit or any other reliable file capture facility on your PC, you can or-
  4954. der a Kermit diskette from Columbia (write  to  Kermit  Distribution,  Columbia
  4955. University Center for Computing Activities, 612 West 115th Street, New York, NY
  4956. 10025, USA, for information), or from any of a number of user  groups  or  dis-
  4957. kette  services.   If you don't have Kermit already, and absolutely can't get a
  4958. Kermit diskette, but have access to another computer that has  a  copy  of  the
  4959. MS-DOS  Kermit  program  (usually in ".BOO" format, explained below), there are
  4960. two recommended methods for getting it onto your PC:
  4961.  
  4962.    1. Use another file capture facility to get it.
  4963.  
  4964.    2. Type in and run the "baby Kermit" program (72 lines) from chapter  7
  4965.       of the Kermit book.
  4966.  
  4967. The first method involves either "raw capture" (no error checking), or else use
  4968. of another protocol, such as Xmodem, which, like Kermit, requires a program  to
  4969. execute the same protocol on both ends of the connection.
  4970.  
  4971. Raw  capture  generally  involves "typing" the file on the other computer, with
  4972. your PC taking the place of the terminal, and rather than displaying  the  file
  4973. on  the screen as it's being typed, your PC is storing it on the disk.  This is
  4974. a tricky process, however, because data can easily be lost or corrupted.    For
  4975. instance,  you could write a very short BASIC program to capture a file in this
  4976. way, but it could probably not keep up -- even at low baud rates  --  with  the
  4977. transmission  speed  unless you included the tricky serial port BASIC commands.
  4978. The DOS command COPY COM1 filename command has the same speed problem,  and  it
  4979. stops only when it receives a Control-Z character from the other computer.
  4980.  
  4981. If  the other computer has Kermit on it -- which is likely, since this is prob-
  4982. ably the reason you want to get Kermit onto your PC -- you should type  in  the
  4983. receive-only  BASIC Kermit program listed on pp.186-188 of the Kermit book, and
  4984. then use it in conjunction with the other computer's  Kermit  to  transfer  the
  4985. file.  Make sure to set a long enough delay on the other computer to give your-
  4986. self time to escape back to the PC and start up the "baby Kermit" before  pack-
  4987. ets start to arrive, otherwise you'll probably get fatal DOS i/o errors.
  4988.  
  4989. Note  that  Kermit  programs are often distributed under names other than "Ker-
  4990. mit".   The  Columbia  Kermit  program  library  contains  hundreds  of  Kermit
  4991. programs,  which must be given unique names.  MS-DOS Kermit for the IBM PC, for
  4992. instance, is called MSVIBM.  Once you have this program in .EXE format on  your
  4993. disk,  you  probably  should  rename it to KERMIT.EXE, because the distribution
  4994. name is harder to remember (and type).
  4995.  
  4996. You will probably also want to create an  MS-Kermit  initialization  file.    A
  4997. sample is distributed with MS-Kermit as MSVIBM.INI.  This should be tailored to
  4998. your requirements, and then renamed to MSKERMIT.INI, and  stored  where  Kermit
  4999. can find it (in the current directory or any directory in your DOS PATH).
  5000.  
  5001.  
  5002. ".BOO Files"
  5003.  
  5004. MS-Kermit  (and  many other Kermit programs) are often distributed using a spe-
  5005. cial encoding called "boo" (short for "bootstrap") format, developed especially
  5006. for distribution of MS-Kermit over networks and communication lines.  MS-Kermit
  5007. has grown to have so many features that the  binary  program  image  (the  .EXE
  5008. file)  has  become  quite large.  But binary files are generally not compatible
  5009. with the common labeled tape formats (e.g. ANSI D),  electronic  mail,  or  raw
  5010. downloading -- the methods most commonly used for Kermit distribution.
  5011.  
  5012. A  common  practice  is  to  encode  .EXE and other binary files into printable
  5013. characters, such as hexadecimal digits, for transportability.  A  simple  "hex"
  5014. encoding  results  in  two  characters  per 8-bit binary byte, plus CRLFs added
  5015. every  80  (or  less)  hex  characters  to  allow  the  file  to  pass  through
  5016. card-oriented  links.   A hex file is therefore more than twice as large as the
  5017. original binary file.
  5018.  
  5019. A .BOO file is a more compact, but somewhat more complicated, encoding.   Every
  5020. three  binary bytes (24 bits) are split up into four 6-bit bytes with 48 (ASCII
  5021. character "0") added to each, resulting in four ASCII characters  ranging  from
  5022. "0"  (ASCII  48)  to  "o" (ASCII 111), with CRLFs added at or near "column 76".
  5023. The resulting file size would therefore be about 4/3 the .EXE file size.   This
  5024. is  still  quite  large,  so  .BOO  files also compress consecutive null (zero)
  5025. bytes.  Up to 78 consecutive nulls are compressed into two characters.    Tilde
  5026. ("~")  is  the  null-compression lead-in, and the following character indicates
  5027. how many nulls are represented (subtract 48 from this character's ASCII value).
  5028. For  instance "~A" means 17 consecutive nulls; "~~" means 78 of them.  Repeated
  5029. nulls are very common in .EXE files.
  5030.  
  5031. 4-for-3 encoding combined with null compression reduces the size of the encoded
  5032. file  to  approximately  the same size as the original .EXE file, and sometimes
  5033. even smaller.  The first line of a .BOO file is the name (in plain text) of the
  5034. original  file.    Here's  what the first few lines of a typical .BOO file look
  5035. like:
  5036.  
  5037.   MSVIBM.EXE
  5038.   CEYP0Id05@0P~3oomo2Y01FWeP8@007P000040HB4001`W~28bL005\W~2JBP00722V0ZHPYP:
  5039.   \8:H2]R2V0[`PYP:68>H2S23V0YHPiP:Xg800;Qd~2UWD006Yg~2Ogl009]o~2L8000;20~~~~
  5040.   ~~~~~~~:R2H008TV?P761T410<H6@P40j4l6RRH0083l17@PP?`1M@?YSP20o0Ee0nUD0h3l
  5041.   1WD3jO@3]0VjW03=8L?X4`N0o01h1\H6~20l>0i7n0o1]e7[@2\PO=8LH60@00Raj>04^97Xh0
  5042.  
  5043.  
  5044. Programs for Handling .BOO Files
  5045.  
  5046. Kermit Distribution includes several useful .BOO-file programs:
  5047.  
  5048. MSBPCT.BAS      This Microsoft BASIC program can be used on  any  PC  that  has
  5049.                 BASIC  to  decode a .BOO file into an .EXE file.  It's about 50
  5050.                 lines line, so it can be typed in.
  5051.  
  5052. MSBPCT.BOO      BASIC programs run rather slowly, so  .BOO-file  decoders  have
  5053.                 also   been   written  in  high-level  languages  like  C.  The
  5054.                 MSBPCT.EXE file that was produced by compiling MSBPCT.C is  en-
  5055.                 coded   into   MSBPCT.BOO,  which  can  be  decoded  back  into
  5056.                 MSBPCT.EXE using MSBPCT.BAS.  Once you've done that, you  don't
  5057.                 need  to run the slow BASIC version any more, which is a bless-
  5058.                 ing, because the MS-Kermit .BOO file takes up to half  an  hour
  5059.                 to  decode  using  the BASIC version (depending on the system),
  5060.                 but only seconds using MSBPCT.EXE.
  5061.  
  5062. MSBPCT.*        There are .BOO-file decoders written in  other  languages  too,
  5063.                 like  assembler,  Turbo  Pascal, Fortran, etc.  Take your pick.
  5064.                 They all do the same thing.
  5065.  
  5066. MSBMKB.*        This is the program for encoding an .EXE file into a .BOO file.
  5067.                 It  is  written in C, compiled, and translated (by itself) into
  5068.                 .BOO format, suitable for decoding back into .EXE form  by  any
  5069.                 of  the  MSBPCT  programs.   Also in other languages, including
  5070.                 Fortran and Turbo Pascal.
  5071.  
  5072. MSBHEX.* are C programs for producing and decoding straight hex files.
  5073.  
  5074.  
  5075. 1.15. Program Organization
  5076.  
  5077. Kermit-MS version 2 is composed of separate assembler source  files,  assembled
  5078. separately, and linked together.  The modules are:
  5079.  
  5080. System/Device Independent:
  5081.  
  5082. MSSKER.ASM      Main program
  5083. MSSSEN.ASM      File sender
  5084. MSSRCV.ASM      File receiver
  5085. MSSSER.ASM      Server operation
  5086. MSSFIL.ASM      File i/o
  5087. MSSCMD.ASM      Command parser
  5088. MSSTER.ASM      CONNECT command
  5089. MSSCOM.ASM      Packet reader and sender
  5090. MSSSET.ASM      SET, SHOW, and STATUS commands
  5091. MSSSCP.ASM      Script CLEAR, ECHO, INPUT, OUTPUT, PAUSE, TRANSMIT commands
  5092. MSSFIN.ASM      Dummy  module  for  the end of the data segment; must be linked
  5093.                 LAST.
  5094. MSSDEF.H        Data structure definitions and equates
  5095.  
  5096. System/Device Dependent:
  5097.  
  5098. MSGxxx.ASM      System-dependent graphics terminal for system xxx
  5099. MSUxxx.ASM      System-dependent keyboard translator for system xxx
  5100. MSXxxx.ASM      System-dependent code for system xxx
  5101. MSYxxx.ASM      Terminal emulation for system xxx
  5102. MSZxxx.ASM      More terminal emulation for system xxx
  5103.  
  5104. The xxx is replaced by a 3-letter code for the particular system, e.g. IBM  for
  5105. the IBM PC family, RB1 for the Rainbow-100, etc.
  5106.  
  5107. The  modular  organization  allows  easier modification of the program, quicker
  5108. transfer of modified portions from system-to-system.  The modules are  designed
  5109. to  be  well-defined and self-contained, such that they can be easily replaced.
  5110. For instance, someone who prefers windows and mice to typing commands should be
  5111. able  to  replace  the command parsing module without having to worry about the
  5112. effect on the other modules.
  5113.  
  5114. To assemble any of the Kermit modules, file MSSDEF.H must  be  on  the  default
  5115. disk.
  5116.  
  5117. All  the  Kermit  implementations  require  the modules MSSCMD, MSSCOM, MSSFIL,
  5118. MSSKER, MSSRCV, MSSSCP, MSSSEN, MSSSER, MSSSET, MSSTER, MSSFIN.  MSSFIN must be
  5119. linked last.
  5120.  
  5121. Each  particular  implementation requires at least an MSXxxx module, usually an
  5122. MSUxxx module, and, if it is doing terminal  emulation  in  software,  also  an
  5123. MSYxxx and possible also an MSZxxx module, and for graphics terminal emulation,
  5124. also an MSGxxx module.  See the batch or make files from the  source  distribu-
  5125. tion  for  details  of  exactly which modules are required for a particular im-
  5126. plementation.
  5127.  
  5128. Once all the required object modules exist, they  may  be  linked  together  to
  5129. produce a Kermit program.  For example, on the IBM PC:
  5130.  
  5131.   A>link
  5132.  
  5133.      Microsoft Object Linker V2.00
  5134.   (C) Copyright 1982 by Microsoft Inc.
  5135.  
  5136.   Object Modules [.OBJ]: msscmd+msscom+mssfil+mssker+mssrcv+mssscp+msssen+
  5137.   mssser+mssset+msster+msgibm+msuibm+msxibm+msyibm+mszibm+mssfin
  5138.   Run File [MSSCMD.EXE]: kermit
  5139.   List File [NUL.MAP]:;
  5140.  
  5141.       A>
  5142.  
  5143. Warning:  old versions of MASM may not be able to assemble several of the large
  5144. files now present in Kermit-MS.  The solution is to acquire Microsoft MASM  4.0
  5145. or later.
  5146.  
  5147.  
  5148. 1.16. Bringing Kermit to New Systems
  5149.  
  5150. You  can bring Kermit-MS to MS-DOS systems that are not explicitly supported in
  5151. one of two ways -- attempt to run the "generic" MS-DOS Kermit on it, or add ex-
  5152. plicit code to support your system.
  5153.  
  5154. To  get  started with Kermit on a new system, try running "generic" MS-DOS Ker-
  5155. mit; in many cases, it will run as is.  The generic  version  accomplishes  all
  5156. its port and console i/o through DOS calls, and during terminal connection does
  5157. not attempt to emulate any particular kind of terminal.   In  some  cases,  the
  5158. generic version may still require some fiddling to run on a new system; for in-
  5159. stance, different systems refer to their communication ports in different  ways
  5160. --  COM1,  J1,  AUX,  etc.  The SET PORT command allows you to specify the port
  5161. using any of these device names, or using DOS file handles -- keep trying until
  5162. you find the one that works.  Generic MS-DOS Kermit will probably run no faster
  5163. than 1200 baud, and it only works with DOS 2.0 or later.
  5164.  
  5165. If you want to write code to explicitly support a new  system,  first  call  or
  5166. write Kermit Distribution at Columbia to make sure no one else is already doing
  5167. the same work.  If you're the first, then begin by reading the file MSXAAA.DOC,
  5168. provided  with the MS-DOS Kermit sources in the Kermit distribution, which is a
  5169. guide to the system dependent modules of Kermit-MS.  Then create new MSUxxx.ASM
  5170. and  MSXxxx.ASM  modules, and, if your version is also doing terminal emulation
  5171. in software, also an MSY and possibly an MSZ module patterned after those  that
  5172. have been written for other systems.
  5173. 1.17. Kermit-MS VT102 Terminal Emulator Technical Summary
  5174.  
  5175.  
  5176. 1.17.1. Treatment of Inbound Characters During Terminal Emulation
  5177.  
  5178. The  following  sections  summarize the Kermit-MS keyboard and screen operation
  5179. during emulation of H19, VT52, and VT102 terminals, prinicipally for the IBM PC
  5180. but also used by the NEC APC3, Victor 9000, and Sanyo 55x systems.
  5181.  
  5182. Many  things  can  happen to a character that arrives at the communication port
  5183. before you see it.  The sequence of events for version 2.32  is  summarized  in
  5184. the following picture.  2.31 is similar except for no national characters.
  5185.  
  5186. -------------------------------------------------------------------------------
  5187.                 character from serial port or network
  5188.                                 |
  5189.                                 v
  5190.                         NUL: discard unless DEBUG is ON
  5191.                         DEL: discard unless DEBUG is ON or doing Tektronix
  5192.                                 |
  5193.                         character available to rest of Kermit
  5194.                                 |
  5195.                                 v
  5196.         TERMINAL NONE   <-------*-------*---> to packet reader
  5197.         DISPLAY 8-BIT?          |       |
  5198.         Yes     No              v       v
  5199.         |       |               |       |
  5200.         |       remove 8-th bit |       Script routines.
  5201.         |       |               |       remove parity bit, if parity used.
  5202.         ---------               |       apply SET TRANSLATION INPUT table,
  5203.         |                       |        if active.
  5204.         apply SET TRANSLATION   |       |
  5205.         INPUT, if active        |       LOG SESSION active?
  5206.         |                       |       No      Yes
  5207.         copy char to printer?   |       |       |
  5208.         No      Yes             |       |       DEBUG ON or DISPLAY 8-BIT?
  5209.         |       |               |       |       Yes     No
  5210.         |       print char      |       |       |       |
  5211.         |       via DOS         |       |       |       remove 8-th bit
  5212.         |       |               |       |       |       |
  5213.         ---------               |       |       ---------
  5214.         |                       |       |           |
  5215.         log char if             |       |           |
  5216.         LOG SESSION active.     |       |           |--> log character
  5217.         |                       |       v           v
  5218.         v                       |       -------------
  5219.     DEBUG ON?                   |               |
  5220.     No    Yes                   |       DISPLAY 8-BIT?
  5221.     |     |                     |       Yes     No
  5222.     |   show chars, with                |       |       |
  5223.     |   tilde/caret modifiers   |       |       remove 8-th bit
  5224.     |     |                     |       |       |
  5225.     |   Exit                    |       v       v
  5226.     |                           |       -------------> character to scripts
  5227.     display char via DOS        |
  5228.     Exit                        |
  5229.                                 v
  5230.                         VT102 terminal emulator
  5231.                                 |
  5232.                            SET DEBUG ON?
  5233.                                 No      Yes --> display characters:
  5234.                                 |               show leading tilde if bit 8
  5235.                                 |               set; for lower 7 bits show
  5236.                                 |               caret-char if Control code.
  5237.                                 |               |
  5238.                                 |               Exit.
  5239.                                 v
  5240.                 Printing Transparently? (ESC [ 4/5 i)
  5241.                 No              Yes
  5242.                 |               |
  5243.                 |               log character if LOG SESSION is active,
  5244.                 |               send char to printer but not to screen.
  5245.                 |               |
  5246.                 |               Exit.
  5247.                 v
  5248.         SET DISPLAY 8-BIT?
  5249.         Yes             No
  5250.         |               |
  5251.         |       remove 8-th bit of character
  5252.         |               |
  5253.         v               v
  5254.         -----------------
  5255.                 |
  5256.                 v
  5257.         Control character?
  5258.         Yes             No
  5259.         |               |
  5260.         |               Doing escape sequence?
  5261.         |               No              Yes
  5262.         |               |               |
  5263.         v               v               |
  5264.         -----------------               |
  5265.                 |                       |
  5266.                 v                       |
  5267.         do SET TRANSLATION INPUT,       |
  5268.         if active.                      |
  5269.         |                               v
  5270.         ---------------------------------
  5271.                         |
  5272.                         v
  5273.                  NUL or DEL character?
  5274.                         No      Yes --> Exit (discard)
  5275.                         |
  5276.                         |
  5277.                 log character if LOG SESSION is active.
  5278.                         |
  5279.                 Control character?
  5280.                 Yes             No
  5281.                 |               |
  5282.           do control ops        map character according to
  5283.                 |               active character-set pointer. (See below)
  5284.                 Exit            |
  5285.                                 display character on screen
  5286.                                 (with double width/height, if req'd).
  5287.                                 |
  5288.                                 print character via DOS if
  5289.                                 Controller Print is active (ESC [ ? 4/5 i)
  5290.                                 or if Kermit copy screen to printer active.
  5291.                                 |
  5292.                                 v
  5293.                                 Exit
  5294. -------------------------------------------------------------------------------
  5295.  
  5296. Updating  of the cursor position is automatic and can be influenced by the Ker-
  5297. mit command SET TERMINAL DIRECTION {RIGHT-TO-LEFT | LEFT-TO-RIGHT}.  As a  con-
  5298. venience,  the  keyboard  left  and  right arrow keys are interchanged when the
  5299. writing direction is reversed; thus, the right arrow always requests  the  host
  5300. to move the cursor to the visual right.
  5301.  
  5302. The active character-set pointer is determined by two conditions:
  5303.  
  5304.    1. The  VT102  maintains two character set pointers (selectors), G0 and
  5305.       G1.  G0 is the default pointer. Reception of Control-O  selects  the
  5306.       G0 pointer, Control-N selects the G1 pointer.
  5307.  
  5308.    2. Which   character   set:   US-ASCII,   UK-ASCII,  ALTERNATE-ROM,  or
  5309.       line-drawing, has been assigned to G0 and G1 pointers.  The  command
  5310.       SET  CHARACTER-SET  {US-ASCII, UK-ASCII, ALTERNATE-ROM} assigns that
  5311.       set to the G0 AND G1 pointers. Similarly, the host can assign any of
  5312.       the four sets to either G0 OR G1 via the escape sequences ESC ( char
  5313.       or ESC ) char, respectively, as summarized below:
  5314.  
  5315.     ESC ( A     G0 points to UK symbols (ASCII with Pound Sterling sign)
  5316.     ESC ) A     G1 points to UK symbols
  5317.     ESC ( B     G0 points to ASCII symbols (ASCII with US pound sign #)
  5318.     ESC ) B     G1 points to ASCII symbols
  5319.     ESC ( 0     G0 points to special (line drawing) graphics
  5320.     ESC ) 0     G1 points to special (line drawing) graphics
  5321.     ESC ( 1     G0 points to ALTERNATE-ROM national characters
  5322.     ESC ) 1     G1 points to ALTERNATE-ROM national characters
  5323.     ESC ( 2     G0 points to special (line drawing) graphics
  5324.     ESC ) 2     G1 points to special (line drawing) graphics
  5325.  
  5326. All character sets produce
  5327.  
  5328.     !"  pound-sign  $%&'()*+,-./0123456789:;<=>?
  5329.     @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
  5330.  
  5331. The lower case field, `ab..yz{|}~ changes to line drawing or  national  charac-
  5332. ters, depending on the character set. National characters replace the character
  5333. codes 60h to 7Ah (accent grave, lower case a-z) with codes 80h  to  9Ah;  lower
  5334. case a becomes umlated u, etc in standard IBM display adapters.
  5335.  
  5336. DOS Code Page support
  5337.  
  5338. Code  Pages are sets of translation tables maintained within DOS to support na-
  5339. tional languages. They affect the characters reported by the keyboard and those
  5340. displayed  on  the  screen  and  printer. Code Page support is loaded as device
  5341. driver information in CONFIG.SYS and activated by DOS programs  NLSFUNC,  CHCP,
  5342. KEYB,  and  MODE,  at  least under PC DOS 3.30.  An EGA adapter is required for
  5343. screen support; similarly, only IBM printers are discussed.  Making Code  Pages
  5344. operate  is not exactly easy, and there have been rumors that MS-DOS Code Pages
  5345. from various vendors are not bug free.  However, the  goal  is  an  ability  to
  5346. change translations for screen, keyboard, and printer by DOS commands.
  5347.  
  5348. Since  Code  Pages  are  the province of DOS it is clear that operations at the
  5349. Bios or hardware levels will not experience Code Pages.  Kermit uniformly  uses
  5350. DOS  for printer output.  Kermit CONNECT mode keyboard reading is normally done
  5351. via the Bios, unless SET KEY OFF has been stated.  Kermit CONNECT  mode  Screen
  5352. reading  and  writing  is  done  via  both  the  Bios  and the hardware for the
  5353. VT102/VT52/Tek4010 emulators, but the terminal type  of  NONE  uses  only  DOS.
  5354. Thus, full Code Page support is available in Kermit by stating SET KEY OFF (use
  5355. DOS) and SET TERMINAL NONE (use DOS).   Outside  of  CONNECT  mode  all  Kermit
  5356. screen and keyboard input and output is done through DOS.
  5357. 1.17.2. Keyboard Layout and Characters Sent
  5358.  
  5359. Here  is  how  the  keypad  functions are assigned to the IBM keyboard function
  5360. keys.  You may change them by using the SET KEY command to define a desired key
  5361. as  the appropriate Kermit action verb; use SET KEY without a definition to un-
  5362. define a key.  Names of appropriate verbs are also shown for use in the Set Key
  5363. command, such as
  5364.  
  5365.     Set Key \2352 \Kbreak           (IBM Alt-B assigned to verb BREAK)
  5366.  
  5367. Verb  names  are  system  dependent, use ? in the Set Key definition part for a
  5368. list of local verbs.  IBM PC verbs are listed in Table 1-6; IBM key values  are
  5369. either  straight  ASCII or the IBM Bios scan code, plus 256, plus 512 for Shift
  5370. key held down, plus 1024 for Control key held down, plus 2048 for Alt key  held
  5371. down; non-ASCII keys are always 256 decimal or greater.  Keys particular to the
  5372. Enhanced Keyboard have 4096 added to the result.
  5373.  
  5374. ---------------------------------------------------------------------------
  5375.  
  5376.     Heath-19 and VT52 Keypads                 VT102 keypad
  5377.        IBM Keys                                 IBM keys
  5378. +------+------+-------+----------+   +------+------+------+------+
  5379. | Blue |  Red |  Grey | up arrow |   |  PF1 |  PF2 |  PF3 |  PF4 |
  5380. |  F1  |  F2  |  F3   | up arrow |   |  F1  |  F2  |  F3  |  F4  |
  5381. +------+------+-------+----------+   +------+------+------+------+
  5382. |  7   |  8   |  9    |down arrow|   |  7   |  8   |  9   |  -   |
  5383. |  F5  |  F6  |  F7   |down arrow|   |  F5  |  F6  |  F7  |  F8  |
  5384. +------+------+-------+----------+   +------+------+------+------+
  5385. |  4   |  5   |  6    | rgt arrow|   |  4   |  5   |  6   |  ,   |
  5386. |  F9  |  F10 |  SF1  | rgt arrow|   |  F9  |  F10 |  SF1 |  SF2 |
  5387. +------+------+-------+----------+   +------+------+------+------+
  5388. |  1   |  2   |  3    |left arrow|   |  1   |  2   |  3   |  E   |
  5389. |  SF3 |  SF4 |  SF5  |left arrow|   |  SF3 |  SF4 |  SF5 |  n  S|
  5390. +------+------+-------+----------+   +------+------+------+  t  F|
  5391. |  0------0   |  .    |  Enter   |   |  0------0   |  .   |  e  6|
  5392. |  SF7        |  SF8  |  SF6     |   |   SF7       |  SF8 |  r   |
  5393. +-------------+-------+----------+   +-------------+------+------+
  5394.  
  5395. SF1 means push Shift and F1 keys simultaneously
  5396. ---------------------------------------------------------------------------
  5397.  
  5398.  CURSOR KEYS:
  5399.                                        H-19 & VT52           VT102
  5400.  VT52/H19 key   IBM Verb  IBM key       All Modes      Numeric   Application
  5401.  
  5402.  up arrow       UPARR    up arrow       ESC A          ESC [ A   ESC O A
  5403.  down arrow     DNARR    down arrow     ESC B          ESC [ B   ESC O B
  5404.  right arrow    RTARR    right arrow    ESC C          ESC [ C   ESC O C
  5405.  left arrow     LFARR    left arrow     ESC D          ESC [ D   ESC O D
  5406.  
  5407.  AUXILIARY KEYPAD:
  5408.                                       Heath-19 & VT52         VT102
  5409.  VT52/H19 key   IBM Verb  IBM key     Numeric Applic.   Numeric   Applic.
  5410.  
  5411.  PF1/HF7/Blue   GOLD,PF1   F1         ESC P   ESC P     ESC O P   ESC O P
  5412.  PF2/HF8/Red    PF2        F2         ESC Q   ESC Q     ESC O Q   ESC O Q
  5413.  PF3/HF9/Grey   PF3        F3         ESC R   ESC R     ESC O R   ESC O R
  5414.  PF4/HF1        PF4        F4         ESC S   ESC S     ESC O S   ESC O S
  5415.  0              KP0        SF7        0       ESC ? p   0         ESC O p
  5416.  1              KP1        SF3        1       ESC ? q   1         ESC O q
  5417.  2              KP2        SF4        2       ESC ? r   2         ESC O r
  5418.  3              KP3        SF5        3       ESC ? s   3         ESC O s
  5419.  4              KP4        F9         4       ESC ? t   4         ESC O t
  5420.  5              KP5        F10        5       ESC ? u   5         ESC O u
  5421.  6              KP6        SF1        6       ESC ? v   6         ESC O v
  5422.  7              KP7        F5         7       ESC ? w   7         ESC O w
  5423.  8              KP8        F6         8       ESC ? x   8         ESC O x
  5424.  9              KP9        F7         9       ESC ? y   9         ESC O y
  5425.  comma  (,)     KPCOMA     SF2        ,       ESC ? l   ,         ESC O l
  5426.  minus  (-)     KPMINUS    F8         -       ESC ? m   -         ESC O m
  5427.  period (.)     KPDOT      SF8        .       ESC ? n   .         ESC O n
  5428.  Enter          KPENTER    SF6        ^M(cr)  ESC ? M   ^M        ESC O M
  5429.  
  5430.  (SFn means hold down Shift key while pressing Function key n.)
  5431.  
  5432. An often confusing item is knowing the mode of the auxillary keypad: numeric or
  5433. application.    Digital  Equipment  Corporation designed the terminal to change
  5434. modes only under command from the remote computer  and  not  at  all  from  the
  5435. keyboard.  So the startup state is numeric/cursor mode, and reception of escape
  5436. sequences "ESC [ ? 1 h" or "l" changes the mode.  Kermit verbs for  the  keypad
  5437. and  cursor  keys generate the correct escape sequences appropriate to the cur-
  5438. rent mode and terminal type.
  5439.  
  5440. A best attempt is made to safely test for the 101/102 key Enhanced keyboard and
  5441. use it if present.  If it is present then the keyboard translator separates the
  5442. individual arrow keys from those on the numeric keypad and also  separates  the
  5443. asterisk  and  forward  slash  keys  on  the  keypad  from those on the regular
  5444. typewriter keyboard.  These special Enhanced keyboard keys are reported as scan
  5445. codes with 4096 added to the base scan code.
  5446.  OTHER IBM KEYS OPERATIONAL IN CONNECT MODE:
  5447.  
  5448.  IBM key         IBM Verb      Action
  5449.  
  5450.  Keypad Del                    Send ASCII Del code (rubout) \127
  5451.  Backspace (<-)                Send ASCII Del code (rubout) \127  (BS is \8)
  5452.  Keypad -        MODELINE      Toggle mode line on/off (only if Mode Line is
  5453.                                enabled and not used by the host).
  5454.  Alt -           TERMTYPE      Toggle among H-19, VT52, and VT100 emulations.
  5455.  Alt =           RESET         Clear screen and reset terminal emulator to
  5456.                                starting (setup) state.
  5457.  Alt B           BREAK         Send a BREAK signal
  5458.  Alt H           HELP          Show drop down help menu (detailed below)
  5459.  Alt S           STATUS        Show settings
  5460.  Alt X           EXIT          Exit Connect mode, back to Kermit prompt
  5461.  
  5462.  Home            HOMSCN        Roll screen up (text down) to beginning of
  5463.                                 storage.
  5464.  End             ENDSCN        Roll screen down (text up) to end of storage.
  5465.  PgUp            UPSCN         Roll screen up (back, earlier) one screen.
  5466.  PgDn            DNSCN         Roll screen down (forward, later) one screen.
  5467.  Ctrl-PgUp       UPONE         Roll screen up one line.
  5468.  Ctrl-PdDn       DNONE         Roll screen down one line.
  5469.  
  5470.  Control PrtSc   PRTSCN        Toggle  on/off copying of received text to
  5471.                                printer, "PRN" shows on far right of mode
  5472.                                line when activated.
  5473.  
  5474.  Control-End     DUMP          Dump image of screen to a disk file or device.
  5475.                                Default filename is KERMIT.SCN in the current
  5476.                                directory. Use command SET DUMP to change the
  5477.                                filename.  Screen images are appended to the
  5478.                                file, separated by formfeeds.
  5479.  
  5480.  Shift-PrtSc     Standard DOS Print-screen, dump screen image to printer.
  5481.  
  5482.  unassigned      HOLDSCRN      DEC style Holdscreen, same as typing Control-S.
  5483.  
  5484. "Alt  -"  means  hold  down  Alt  and  type  minus on the upper key rank.  This
  5485. switches among the various kinds of emulation but does not change most  operat-
  5486. ing parameters of the emulator.
  5487.  
  5488. CONNECT ESCAPE COMMANDS:
  5489.  
  5490. Type the Kermit escape character (normally "^]"), then one of the keys below:
  5491.                                                          (equivalent IBM Verb)
  5492.      ?   display this short list.                                HELP
  5493.      0   send a null character.                                  NULL
  5494.      B   send a BREAK signal.                                    BREAK
  5495.      C   close connect session & return to Kermit prompt.        EXIT
  5496.      F   dump screen to filespec, default is KERMIT.SCN.         DUMP
  5497.      H   hangup the phone or network connection                  HANGUP
  5498.      L   send a Long BREAK signal                                LBREAK
  5499.      M   toggle mode line on/off.                                MODELINE
  5500.      P   push to DOS.                                            DOS
  5501.      Q   quit (suspend) logging.                                 LOGOFF
  5502.      R   resume logging.                                         LOGON
  5503.      S   show status.                                            STATUS
  5504.      Kermit escape character itself: send it to the host.
  5505.  
  5506.  
  5507. 1.17.3. Responses To Characters Received By the Terminal Emulator
  5508.  
  5509. Spaces shown between characters of escape sequences are there for ease of read-
  5510. ing.  The actual sequences contain no spaces.  Unknown escape sequences of  the
  5511. form "ESC char" are absorbed by the emulator without further effect; longer un-
  5512. known escape sequences echo the extra characters.
  5513.  
  5514. DEC VT102 functions while in ANSI (VT102) mode, unsupported features marked  by
  5515. an asterisk (*):
  5516.  Escape Seq     Mnemonic       Description of Action
  5517.  
  5518.  ESC D          IND            Index, moves cursor down one line, can scroll
  5519.  ESC E          NEL            Move cursor to start of line below, can scroll
  5520.  ESC H          HTS            Set one horizontal tab at current position
  5521.  ESC M          RI             Reverse Index, cursor up one line, can scroll
  5522.  ESC Z          DECID          Identify terminal (response is ESC [ ? 6 c)
  5523.  ESC c          RIS            Reset terminal to initial state
  5524.  ESC =          DECKPAM        Enter keypad application mode
  5525.  ESC >          DECKNPNM       Enter keypad numeric mode
  5526.  ESC 7          DECSC          Save cursor position and attributes
  5527.  ESC 8          DECRC          Restore cursor from previously saved position
  5528.  ESC # 3        DECDHL         Double height and width line, top half
  5529.  ESC # 4        DECDHL         Double height and width line, bottom half
  5530.  ESC # 5        DECSWL         Single height and width line
  5531.  ESC # 6        DECDWL         Double width single height line
  5532.  ESC # 8        DECALN         Test screen alignment, fill screen with E's
  5533.  ESC [ Pn @     ICH            ANSI insert Pn spaces at and after cursor
  5534.  ESC [ Pn A     CUU            Cursor up Pn lines, does not scroll
  5535.  ESC [ Pn B     CUD            Cursor down Pn lines, does not scroll
  5536.  ESC [ Pn C     CUF            Cursor forward, stays on same line
  5537.  ESC [ Pn D     CUB            Cursor backward, stays on same line
  5538.  ESC [ Pn; Pn H CUP            Set cursor to row, column (same as HVP)
  5539.  ESC [ Ps J     ED             Erase in display:
  5540.                                 0 = cursor to end of screen, inclusive
  5541.                                 1 = start of screen to cursor, inclusive
  5542.                                 2 = entire screen, reset lines to single
  5543.                                     width, cursor does not move.
  5544.  ESC [ Ps K     EL             Erase in line:
  5545.                                 0 = cursor to end of line, inclusive
  5546.                                 1 = start of line to cursor, inclusive
  5547.                                 2 = entire line, cursor does not move
  5548.  ESC [ Pn L     IL             Insert Pn lines preceding current line.
  5549.  ESC [ Pn M     DL             Delete Pn lines from current downward, incl.
  5550.  ESC [ Pn P     DCH            Delete Pn chars from cursor to left, incl.
  5551.  ESC [ Pn; Pn R CPR            Cursor report (row, column), sent by terminal
  5552.                                Example: home position yields ESC [ 1; 1 R
  5553.  ESC [ Pn c     DA             Device attributes (reports ESC [ ? 6 c)
  5554.  ESC [ Pn; Pn f HVP            Set cursor to row, column (same as CUP)
  5555.  ESC [ Ps g     TBC            Tabs clear, 0 = at this position, 3 = all
  5556.  ESC [ 4 h      IRM            Insert mode on
  5557.  ESC [ 20 h     LNM            Set newline mode (cr => cr/lf)
  5558.  ESC [ 4 l      IRM            Replacement mode on
  5559.  ESC [ 20 l     LNM            Reset newline mode (cr => cr)
  5560.  ESC [ ? Ps;...;Ps h  SM       Set mode, see table below
  5561.  ESC [ ? Ps;...;Ps l  RM       Reset mode, see table below
  5562.          Ps     Mnemonic       Mode           Set (h)        Reset (l)
  5563.          0                     error (ignored)
  5564.          1      DECCKM         cursor keys    application    cursor/numeric
  5565.          2      DECANM         ANSI/VT52      ANSI/VT102     VT52
  5566.          3      DECCOLM        Columns        +132 col       80 col
  5567.          4      DECSCLM       *Scrolling      smooth         jump
  5568.          5      DECSCNM        Screen         reverse video  normal
  5569.          6      DECOM          Origin         relative       absolute
  5570.          7      DECAWM         Autowrap       on             off
  5571.          8      DECARM        *Autorepeat     on             off
  5572.          9      DECINLM       *Interlace      on             off
  5573.          18     DECPFF         Printer termination character, use FF if set
  5574.          19     DECPEX         Printer extent,set=screen,off=scrolling region
  5575.          34     n/a            Invoke macro:  TERMINALS      TERMINALR
  5576.          38     n/a            Graphics (Tek) ++graphics     text
  5577.                              + See comments on EGA boards.
  5578.                             ++ Ignored if DISABLE TEK has been given.
  5579.  ESC [ Pn i     MC             Printer controls (Media Copy)
  5580.          0                      Print whole Screen
  5581.          4                      Exit printer controller (transparent print)
  5582.          5                      Enter printer controller (transparent print)
  5583.  ESC [ ? Pn i   MC             Printer controls (Media Copy)
  5584.          1                      Print line containing cursor
  5585.          4                      Exit auto print (stop echoing to printer)
  5586.          5                      Enter autoprint (echo screen chars to printer)
  5587.  ESC [ Ps;...;Ps m  SGR        Select graphic rendition
  5588.                                 0 = all attributes off (#'s 1, 4, 5, 7)
  5589.                                 1 = bold, intensify foreground
  5590.                                 4 = underscore (reverse video on IBM CGA)
  5591.                                 5 = blink
  5592.                                 7 = reverse video
  5593.                 non-DEC extensions: 30-37 = foreground color = 30 + colors
  5594.                                     40-47 = background color = 40 + colors
  5595.                                     colors: 1 = red, 2 = green, 4 = blue
  5596.  ESC [ Ps n     DSR            Device Status Report.
  5597.                                Response from VT100: 0=ready, 3=malfunction.
  5598.                                Command to VT100: 5=report status with DSR,
  5599.                                6=report cursor position using CPR sequence.
  5600.  ESC [ Ps;...;Ps q  DECLL      Load LEDs, Ps = 0 means clear LED #1-4
  5601.                                Ps = 1,2,3,4 sets LED # 1,2,3,4 on status line.
  5602.  ESC [ Pn; Pn r DECSTBM        Set top and bottom scrolling margins, resp.
  5603.                                ESC [ r resets margin to full screen.
  5604.  ESC [ sol x    DECREQTPARM    Request terminal parameters, see table below
  5605.  ESC [ sol; par; nbits; xspeed; rspeed; clkmul; flags x
  5606.                 DECREPTPARM    Reports terminal parameters
  5607.                                sol = 0  request; terminal can send unsolicited
  5608.                                  reports - supported as sol = 1 below.
  5609.                                sol = 1, request; term reports only on request
  5610.                                sol = 2, this is a report (DECREPTPARM)
  5611.                                sol = 3, terminal reporting only on request
  5612.                                par = 1 none, 2 space, 3 mark, 4 odd, 5 even
  5613.                                nbits = 1 (8 bits/char), 2 (7 bits/char)
  5614.                                xspeed,rspeed = transmit & receive speed index
  5615.   0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,128 correspond to speeds of
  5616.   50,75,110,134.5,150,200,300,600,1200,1800,2000,2400,3600,4800,9600,19200,
  5617.   and 38400 baud.              clkmul = 1 (clock rate multiplier is 16)
  5618.                                flags = 0-15 (Setup Block #5), always 0 here
  5619.  ESC [ 2; Ps y  DECST          *Confidence tests - not supported
  5620.                 SCS            Select character sets.
  5621.  ESC ( A        SCS            G0 points to UK symbols
  5622.  ESC ) A        SCS            G1 points to UK symbols
  5623.  ESC ( B        SCS            G0 points to ASCII symbols
  5624.  ESC ) B        SCS            G1 points to ASCII symbols
  5625.  ESC ( 0        SCS            G0 points to special (line drawing) graphics
  5626.  ESC ) 0        SCS            G1 points to special (line drawing) graphics
  5627.  ESC ( 1        SCS            G0 points to alt char ROM - national symbols
  5628.  ESC ) 1        SCS            G1 points to alt char ROM - national symbols
  5629.  ESC ( 2        SCS            G0 points to alt graphics ROM - as ESC ( 0
  5630.  ESC ) 2        SCS            G1 points to alt graphics ROM - as ESC ) 0
  5631.                                 (Separate graphics used for DEC and Heath)
  5632.  ^E             ENQ           *Answerback message (not supported)
  5633.  ^G             BELL           Sound VT102 style beep
  5634.  ^H             BS             Backspace, move cursor left one character
  5635.  ^I             HT             Horizontal tab, move cursor to next tabstop
  5636.  ^J             LF             Linefeed, move cursor down one line
  5637.  ^K             VT             Vertical Tab, treated as a line feed
  5638.  ^L             FF             Formfeed, treated as a line feed
  5639.  ^M             CR             Carriage return, move cursor to col 1
  5640.  ^N             SO             Select usage of G1 character set
  5641.  ^O             SI             Select usage of G0 character set
  5642.  ^X             CAN            Cancel escape sequence in progress
  5643.  ^Z             SUB            Treated as a CAN
  5644.  
  5645.  Other extensions:
  5646.  ESC [ 25; Pc f                VT52/VT100 move cursor to 25th line.
  5647.  ESC [ 25; Pc H                VT52/VT100 move cursor to 25th line.
  5648.                                (These will disable Kermit's own status line.)
  5649.  ESC * char                    VT200 series graphics command, ignored.
  5650.  ESC ^L                        Enter Tektronix sub-mode, clear Tek screen.
  5651.                                (This is ignored if DISABLE TEK has been given)
  5652.  
  5653.  
  5654. 1.17.4. DEC VT102 Functions While in VT52 Mode
  5655.  
  5656.  Escape sequence               Description of action
  5657.  
  5658.  ESC A                         Cursor up
  5659.  ESC B                         Cursor down
  5660.  ESC C                         Cursor right
  5661.  ESC D                         Cursor left
  5662.  ESC F                         Enter graphics mode
  5663.  ESC G                         Exit graphics mode
  5664.  ESC H                         Cursor home
  5665.  ESC I                         Reverse line feed
  5666.  ESC J                         Erase to end of screen
  5667.  ESC K                         Erase to end of line
  5668.  ESC V                         Print cursor line
  5669.  ESC X                         Exit Printer Controller mode, transparent print
  5670.  ESC Y row column              Direct cursor address, offset from space
  5671.  ESC W                         Enter Printer Controller mode,transparent print
  5672.  ESC Z                         Identify (response is ESC / Z)
  5673.  ESC ^ (caret)                 Enter autoprint mode (printer echoes screen)
  5674.  ESC _ (underscore)            Exit autoprint mode
  5675.  ESC ]                         Print Screen
  5676.  ESC =                         Enter alternate keypad mode
  5677.  ESC >                         Exit alternate keypad mode
  5678.  ESC <                         Enter ANSI mode (changes to VT102)
  5679.  
  5680.  
  5681. 1.17.5. Heath-19 Functions While in Non-ANSI Mode
  5682.  
  5683.  Escape seq     Mnemonic       Description of action
  5684.  
  5685.  ESC A          HCUU           Cursor Up
  5686.  ESC B          HCUD           Cursor Down
  5687.  ESC C          HCUF           Cursor Forward, stays on same line
  5688.  ESC D          HCUB           Cursor Backward, stays on same line
  5689.  ESC E          HCD            Clear display
  5690.  ESC F          HEGM           Enter Graphics mode
  5691.  ESC G          HXGM           Exit Graphic mode
  5692.  ESC H          HCUH           Cursor Home
  5693.  ESC I          HRI            Reverse Index
  5694.  ESC J          HEOP           Erase to end of page
  5695.  ESC K          HEOL           Erase to end of line
  5696.  ESC L          HIL            Insert line
  5697.  ESC M          HDL            Delete line
  5698.  ESC N          HDCH           Delete character
  5699.  ESC O          HERM           Exit Insert Char mode
  5700.  ESC Y row col  HDCA           Direct cursor addressing, offset from space
  5701.  ESC Z          HID            Identify (response is ESC / K  which is a VT52)
  5702.  ESC b          HBD            Erase Beginning of display
  5703.  ESC j          HSCP           Save cursor position
  5704.  ESC k          HRCP           Set cursor to saved position
  5705.  ESC l          HEL            Erase entire line
  5706.  ESC n          HCPR           Cursor Position Report request
  5707.  ESC o          HEBL           Erase beginning of line
  5708.  ESC p          HERV           Enter Reverse Video mode
  5709.  ESC q          HXRV           Exit Reverse Video mode
  5710.  ESC r Bn       HMBR           *Modify baud rate - not supported
  5711.  ESC t          HEKS           *Enter Keypad shifted mode, not supported
  5712.  ESC u          HXKS           *Exit Keypad shifted mode, not supported
  5713.  ESC v          HEWA           Wrap around at end of line
  5714.  ESC w          HXWA           Discard at end of line
  5715.  ESC x Ps       HSM            Set Mode. See table below
  5716.  ESC y Ps       HRM            Reset Mode. See table below
  5717.  
  5718.          Ps     Mnemonic       Mode            Set (x)        Reset (y)
  5719.          1      HSM/HRM        25th line       enabled       +disabled
  5720.          2                    *keyclick        off            on
  5721.          3                    *holdscreen      enabled        disabled
  5722.          4                     cursor type     block          underline
  5723.          5                     cursor on/off   on             off
  5724.          6                    *keypad-shifted  shifted        unshifted
  5725.          7                     alt app keypad  enabled        disabled
  5726.          8                    *linefeed        lf=>cr/lf      lf=>lf
  5727.          9                     newline mode    cr=>cr/lf      cr=>cr
  5728.                               + disabling the 25th line also clears it
  5729.  
  5730.  ESC z          HRAM           Reset to power-up configuration
  5731.  ESC =          HAKM           Enter Alternate Keypad mode
  5732.  ESC >          HXAM           Exit Alternate Keypad mode
  5733.  ESC <          HEAM           Enter ANSI mode (ESC [ stuff)
  5734.  ESC @          HEIM           Enter Insert Char mode
  5735.  ESC [          HEHS          *Enter Hold Screen mode, not supported
  5736.  ESC \          HXHS          *Exit Hold Screen mode, not supported
  5737.  ESC { and }    HEK, HDK      *Keyboard enable/disable, not supported
  5738.  ESC ]          HX25          *Transmit 25th line, not supported
  5739.  ESC #          HXMP          *Transmit page, not supported
  5740.  
  5741.  
  5742. 1.17.6. Heath-19 Functions While in ANSI Mode
  5743.  
  5744.  Escape Seq     Mnenonic       Description of Action
  5745.  
  5746.  ESC [ s        PSCP           Save cursor position & attributes
  5747.  ESC [ u        PRCP           Restore cursor position & attributes
  5748.  ESC [ z        PRAM           Reset to power-up configuration
  5749.  ESC [ 2 J      ED             Erase entire screen but do not move cursor;
  5750.                                regular Heath-19 moves cursor to Home.
  5751.  ESC [ ? 2 h    PEHM           Revert to normal Heath-19 non-ANSI mode
  5752.  ESC [ > Ps h   SM             Same as ESC x Ps
  5753.  ESC [ > Ps l   RM             Same as ESC y Ps
  5754. Plus most of the ANSI escape sequences listed for the VT102.
  5755. 1.17.7. Tektronix 4010/4014 Graphics Terminal Functions
  5756.  
  5757. MS-Kermit's  Tektronix 4010 emulator responds to ordinary text, several special
  5758. control codes (for drawing lines and dots), and several  escape  sequences,  as
  5759. shown  in Table 1-10.  The commands SET DEBUG and SET TRANSLATION INPUT are ef-
  5760. fective in Tek mode.
  5761.  
  5762. -------------------------------------------------------------------------------
  5763.  
  5764. Control Code                  Action
  5765. FS,  Control-\  Backslash     draw dots
  5766. GS,  Control-]  Right square bracket  draw lines
  5767. RS,  Control-^  Caret         Draw dots incrementally
  5768. US,  Control-_  Underscore    Display text
  5769. BEL, Control-G                Beep, make a noise
  5770. BS,  Control-H                Backspace, non-destructive
  5771. HT,  Control-I                Tab, convert to single space
  5772. LF,  Control-J                Line feed, go down one line
  5773. VT,  Control-K                Move up one text line
  5774. FF,  Control-L                Clears the screen
  5775. CR,  Control-M                Carriage return, start of line
  5776. CAN, Control-X                Exit Tek sub-mode, or ignore
  5777. DEL, RUBOUT                   Delete code, same as BS
  5778.  
  5779. Escape Sequence               Action
  5780. ESC Control-E                 Send a status report, turn on Bypass mode
  5781. ESC Control-L                 Clear the screen (enter sub-mode from VT102)
  5782. ESC Control-X                 Turn on Bypass mode
  5783. ESC Control-Z                 Activate crosshairs (GIN mode) and Bypass mode
  5784. ESC Z                         Send terminal identification
  5785. ESC ` (accent grave)                  Use solid lines in drawing
  5786. ESC a through ESC e                   Use dashed line patterns:
  5787.                                a=fine dots, b=short dashes
  5788.                                c=dash dot,  d=long dash dot
  5789.                                e=dash dot dot.
  5790. ESC [ Pn ; Pn m               Set ANSI colors. Same as for VT102.
  5791. ESC [ ? 3 8 l                 Exit Tek mode (become text terminal, VT102 etc)
  5792. ESC [ ? 3 8 h                 Enter Tek mode (from VT102 mode)
  5793.  
  5794.  Table 1-10:  Response of MS-Kermit Tektronix Emulator to Received Characters
  5795.  
  5796. -------------------------------------------------------------------------------
  5797.  
  5798. In the table, US is the name for the  ASCII  character  Control-Underscore,  31
  5799. decimal.    Text  is written starting with the last drawn point being the lower
  5800. left corner of the first 8 by 8 character cell.  The drawing  position  is  up-
  5801. dated  by  8  dots to the right for each character, and lines wrap at column 80
  5802. (column 90 for Hercules boards).  If text extends "below the screen"  the  sign
  5803. "More  >" is shown at the bottom right corner and the user needs to press a key
  5804. to continue.  Then the screen will be cleared and the new text  will  start  at
  5805. the top of the screen (no scrolling is done in graphics mode).  A real Tek 4010
  5806. begins new text at column 40 and will overwrite dots from older material.   The
  5807. high  resolution EGA screen and the Hercules screen will hold 43 lines, the CGA
  5808. and Monochome screens hold 25 lines, and the AT&T screen holds 50 lines.   Her-
  5809. cules  screens  are  90  characters  wide  and  others  are 80 characters wide.
  5810. Monochrome systems lack graphics so the text is the normal  hardware  character
  5811. font  placed  at  the  nearest  normal  80x25 location (similarly, "drawing" on
  5812. Monochrome systems is achieved by using a text plus  ("+")  sign  where  a  dot
  5813. would  appear).    Text  mode  is interrupted by the drawing commands discussed
  5814. below.
  5815.  
  5816.  
  5817. Bypass Mode:
  5818.  
  5819. Certain Tektronix commands turn on or off "Bypass" mode whereby  incoming  text
  5820. is  not  displayed  on  the screen. Removal of echos of the GIN mode, discussed
  5821. below, is the major use of Bypass. Bypass mode is turned on by receipt  of  ESC
  5822. Control-E,  ESC  Control-X, and ESC Control-Z and it is turned off upon receipt
  5823. of BEL, LF, CR, US, other escape sequences, and resetting the terminal.
  5824.  
  5825.  
  5826. Drawing commands GS, FS, RS:
  5827.  
  5828. 1. Draw a line or move to a point: GS <xy xy ... xy>
  5829.  
  5830. GS is the name for ASCII character Control-] (right  square  bracket),  decimal
  5831. 29.  <xy> stands for an encoded x,y coordinate as explained below.  One or more
  5832. x,y coordinates may follow GS and line segments are drawn from point to  point.
  5833. The first point is reached without drawing so that GS and the initial <xy> is a
  5834. simple "move-to" command rather than a "draw-to" command.  Lines  may  be  con-
  5835. structed  from six dash patterns described in Table 1-10.  <xy> coordinates are
  5836. encoded by separating the 10 bit value of x and of y into 5 bit components  and
  5837. then  adding  two  high  bits  to  each  to  identify  which component is being
  5838. represented: high-y, low-y, high-x, or low-x. They are transmitted in that  or-
  5839. der,  with  the  low-x byte always sent last.  In fact, bytes may be omitted if
  5840. they do not change from point to point, provided that  low-x  is  always  sent.
  5841. These  bytes  range  from  ASCII space (32 decimal) to ASCII DEL (127 decimal).
  5842. Details are given below, and summarized in Table 1-12.    This  mode  completes
  5843. when  a new command or a CR LF (carriage return, line feed) arrives; escape se-
  5844. quences are processed transparently but other control codes are ignored.    The
  5845. interrupting character is accepted and processed next.
  5846.  
  5847. 2. Draw dots at given locations: FS <xy xy ... xy>
  5848.  
  5849. FS is the name for the ASCII character Control-\ (backslash), decimal 28.  <xy>
  5850. is in the same form as above.  A dot is drawn at each x,y  point.    This  mode
  5851. completes  when a new command or a CRLF character arrives; escape sequences are
  5852. processed transparently but other control codes are ignored.  The  interrupting
  5853. character is accepted and processed next.
  5854.  
  5855. 3.  Draw  dots  from the current location: RS <pen> <direction> <direction> ...
  5856. <direction>
  5857.  
  5858. RS is the name for the ASCII character Control-^ (caret), decimal 30.   pen  is
  5859. the  character  Space (32 decimal) to move without drawing or P (80 decimal) to
  5860. draw while moving.  <direction> is one of the letters A, E, D, F, B, J, H, I as
  5861. shown in Table 1-11.
  5862.  
  5863. -------------------------------------------------------------------------------
  5864.  
  5865. direction    Move One Tek Dot This Way
  5866.      A       East (right)
  5867.      E       East and North         F   D   E
  5868.      D       North (up)
  5869.      F       North and West         B   *   A     (* is current location)
  5870.      B       West
  5871.      J       South and West         J   H   I
  5872.      H       South
  5873.      I       South and East
  5874.  
  5875.                   Table 1-11:  Tektronix Dot-Drawing Commands
  5876.  
  5877. -------------------------------------------------------------------------------
  5878.  
  5879. Example:  RS  P  J J J (no spaces here, naturally) means draw three dots in the
  5880. southwest direction, stepping to each in turn.  This mode completes when a  new
  5881. command  or  a non-<pen> or non-<direction> character arrives; the interrupting
  5882. character is accepted and processed next.
  5883.  
  5884.  
  5885. Graphics INput (GIN) mode:
  5886.  
  5887. Graphics input mode is entered when ESC Control-Z is received.  A crosshair  is
  5888. drawn  on  the screen and may be moved by the numeric keypad arrows (fine scale
  5889. motion) or the Shift key and these arrows (coarse scale motion).   Pressing  an
  5890. ASCII-producing key sends the position of the crosshairs to the host as the se-
  5891. quence of: pressed key, X  coordinate,  Y  coordinate,  carriage  return,  then
  5892. removes the crosshairs, and then returns to text mode.  The coordinates are en-
  5893. coded by splitting them into five bit fields, adding an ascii  space  (20H)  to
  5894. each, and are sent as high-y, low-y, high-x and low-x bytes. Bypass mode is ac-
  5895. tive while the report is sent to supress echos of the report.  One  may  prema-
  5896. turely  exit  GIN  mode by typing Control-C or Control-Break.  Shift-PrtSc (DOS
  5897. screen dump) remains active, however.
  5898.  
  5899.  
  5900. Status or Position Report:
  5901.  
  5902. ESCAPE Control-E requests a status report from the  emulator.    Tek  terminals
  5903. have  many sub-fields.  Kermit-MS sends a byte of 24 hex for being in text mode
  5904. or 20 hex otherwise, followed by the encoded X then Y coordinates  and  a  car-
  5905. riage  return.    Coordinates  are  encoded 5 bits at a time similar to the GIN
  5906. report.
  5907.  
  5908.  
  5909. Identification Report:
  5910.  
  5911. ESCAPE Z requests terminal identification, as for VT52 and  VT102.    Currently
  5912. this report is the 10 character sequence IBM_TEK ESCAPE / Z (no spaces).
  5913.  
  5914.  
  5915. Screen Capturing:
  5916.  
  5917. Kermit  does  not implement a graphics screen capture facility.  There are many
  5918. such Terminate-and-Stay-Resident  (TSR)  programs  in  circulation,  as  either
  5919. public  domain  offerings  or  parts of commercial packages (Paint programs and
  5920. even GRAPHICS.COM from DOS).  High resolution EGA screens require more than the
  5921. GRAPHICS.COM  program.   MS Windows tells the program (Kermit-MS) the system is
  5922. using a pure text-only monochrome adapter so dots are shown as plus signs.
  5923.  
  5924. Although Kermit cannot  save  graphics  screens  directly  (e.g.  via  the  ^]F
  5925. connect-mode  command),  the  received  Tektronix escape sequences can still be
  5926. logged to a PC file using the LOG SESSION command.  The resulting log cannot be
  5927. "played back" directly on the PC, but it can be transferred to the host and run
  5928. through Kermit's Tek emulator again, just like a character-mode Kermit  session
  5929. log.
  5930.  
  5931.  
  5932. VGA Modes:
  5933.  
  5934. Considerable  effort  went  into  ensuring  the  graphics  display  would  work
  5935. automatically and not damage monitors.  Thus, Kermit-MS safely tests the active
  5936. display  adapter  for  its kind and capabilities before starting graphics mode.
  5937. Recent VGA and EGA+ display boards are capable of  the  640  by  480  scan-line
  5938. 16-color  "VGA"  mode  which  is  now available on IBM PS/2 computers.  The Tek
  5939. emulator will happily run with 480 scan lines, but: the normal 256KB  of  video
  5940. memory  is sufficient to save only the top 407 lines of the graphics image.  So
  5941. activating this higher resolution mode is accomplished by the command SET  TER-
  5942. MINAL GRAPHICS VGA and is not done automatically (the VGA is used in EGA mode).
  5943. The 320 by 200 line by 256 color MCGA mode has  too  coarse  a  resolution  for
  5944. graphics line drawing and is not supported by Kermit.
  5945.  
  5946.  
  5947. Coordinate Encoding:
  5948.  
  5949. Coordinate 0,0 is the lower left corner and the X axis is horizontal. Tektronix
  5950. positions are mapped into the typically 640 dots wide by 200 or 350  dots  high
  5951. PC screen and thus adjacent Tek positions may yield the same PC screen dot.
  5952.  
  5953. 4010-like  devices use positions from 0 to 1023 for both X and Y, although only
  5954. 0 to 779 are visible for Y due to screen geometry.  The Tek screen is 10.24  by
  5955. 7.80 inches and coordinates are sent as 1-4 characters.
  5956.  
  5957. 4014-like devices use positions 0 to 4095, but each movement is a multiple of 4
  5958. positions unless the high-resolution LSBXY are sent.  This makes it  compatible
  5959. with the 4010 in that a full sized plot fills the screen.  The emulator accepts
  5960. the LSBXY components but does not use them.
  5961.  
  5962. The various modes are summarized in Table 1-12, in which the following notation
  5963. is used:
  5964.  
  5965.     HIX, HIY = High order 5 bits of a 10 or 12 bit position.
  5966.     LOX, LOY = Middle order 5 bits of position (low order of Tek 4010).
  5967.     LSBXY = Low order 2 bits of X + low order 2 bits of Y (4014 mode),
  5968.        recognized by the Tek emulator but not used to calculate position.
  5969.  
  5970. -------------------------------------------------------------------------------
  5971.  
  5972. Hi Y    Lo Y   Hi X    LSBXY  Characters Sent (Lo-X Always Sent)
  5973. Same    Same   Same    Same                          Lo-X
  5974. Same    Same   Same    Diff         LSB, Lo-Y,       Lo-X   4014
  5975. Same    Same   Diff    Same              Lo-Y, Hi-X, Lo-X
  5976. Same    Same   Diff    Diff         LSB, Lo-Y, Hi-X, Lo-X   4014
  5977. Same    Diff   Same    Same              Lo-Y,       Lo-X
  5978. Same    Diff   Same    Diff         LSB, Lo-Y,       Lo-X   4014
  5979. Same    Diff   Diff    Same              Lo-Y, Hi-X, Lo-X
  5980. Same    Diff   Diff    Diff         LSB, Lo-Y, Hi-X, Lo-X   4014
  5981. Diff    Same   Same    Same   Hi-Y,                  Lo-X
  5982. Diff    Same   Same    Diff   Hi-Y, LSB, Lo-Y,       Lo-X   4014
  5983. Diff    Same   Diff    Same   Hi-Y,      Lo-Y, Hi-X, Lo-X
  5984. Diff    Same   Diff    Diff   Hi-Y, LSB, Lo-Y, Hi-X, Lo-X   4014
  5985. Diff    Diff   Same    Same   Hi-Y,      Lo-Y,       Lo-X
  5986. Diff    Diff   Same    Diff   Hi-Y, LSB, Lo-Y,       Lo-X   4014
  5987. Diff    Diff   Diff    Same   Hi-y,      Lo-Y, Hi-X, Lo-X
  5988. Diff    Diff   Diff    Diff   Hi-y, LSB, Lo-Y, Hi-X, Lo-X   4014
  5989. Kind code for byte:           20h   60h  60h   20h   40h
  5990.                               (transmitted left to right)
  5991.  
  5992.           Table 1-12:  MS-Kermit Tektronix Coordinate Interpretation
  5993.  
  5994. -------------------------------------------------------------------------------
  5995.  
  5996. Note that LO-Y must be sent if HI-X has changed so that the Tektronix knows the
  5997. HI-X byte (in the range of 20h-3Fh) is HI-X and not HI-Y.  LO-Y  must  also  be
  5998. sent  if LSBXY has changed, so that the 4010 will ignore LSBXY and accept LO-Y.
  5999. The LSBXY byte is
  6000.  
  6001.     60h + (MARGIN * 10h) + (LSBY * 4) + LSBX
  6002.  
  6003. MARGIN is 0 here and refers to splitting the screen left  and  right  for  text
  6004. rollover, which the Kermit Tek emulator does not do.
  6005.  
  6006.  
  6007. Tek 4010 Example:
  6008.  
  6009. Suppose  <xy>  is  point y = 300, x = 500 in Tektronix coordinates.  Split each
  6010. 10-bit coordinate into 5-bit groups, add add the Kind code to each. Send the  X
  6011. part last.
  6012.  
  6013.                     HI-Y     LO-Y                   HI-X     LO-X
  6014.     Y=300d=012Ch=  01001    01100   X=500d=01F4h=  01111    10100
  6015.       +Kind code +100000 +1100000     +kind code +100000 +1000000
  6016.     Binary        101001 01101100                 101111  1000100
  6017.     ASCII            )       l                       /       D
  6018.  
  6019. So  <xy> = (500,300) is sent or received in a GS command as ")l/D".  An example
  6020. in C (program fragments):
  6021.  
  6022. #define ESC  27
  6023. #define GS   29
  6024. #define US   31
  6025. FILE *fp;                      /* File descriptor for terminal */
  6026.  . . .
  6027.  
  6028.     fputc( GS, fp); coord( 75, 65);       /* Move to 75,65      */
  6029.     fputc( ESC, fp); fputs("[31m", fp);   /* Set foreground to red */
  6030.     fputc( US, fp); fputs("A House", fp); /* Annotate at 75,65  */
  6031.     fputc( ESC, fp); fputs("[33m", fp);   /* Set foreground to yellow */
  6032.     fputc( GS, fp);                       /* Now draw lines...  */
  6033.     coord( 50, 50); coord(300, 50);       /* Bottom side        */
  6034.     coord(300,200); coord( 50,200);       /* Right wall, top    */
  6035.     coord(175,250); coord(300,200);       /* Roof               */
  6036.     fputc( GS, fp);                       /* Start a new line   */
  6037.     coord( 50, 50); coord( 50,200);       /* Left wall at 50,50 */
  6038.     fputc( ESC, fp); fputs("[37m", fp);   /* Set foreground to white */
  6039.     . . .
  6040.  
  6041. coord(x, y) int x, y; {        /* Send x,y coordinates to Tek 4010 */
  6042.     fputc((y / 32) + 32, fp);             /* High y */
  6043.     fputc((y % 32) + 96, fp);             /* Low  y */
  6044.     fputc((x / 32) + 32, fp);             /* High x */
  6045.     fputc((x % 32) + 64, fp);             /* Low  x */
  6046. }
  6047.  
  6048.  
  6049. 1.18. IBM PC Kermit Technical Summaries
  6050.  
  6051. Under  normal  circumstances,  MS-Kermit  takes  advantage  of  the  computer's
  6052. hardware,  and often bypasses DOS (sometimes even BIOS) to achieve high perfor-
  6053. mance, to exercise special machine features, or to produce an attractive screen
  6054. display.  Thus, it is not in all respects a "well behaved" DOS program.
  6055.  
  6056. MS-Kermit redirects interrupts 0BH (COM2/4) or 0CH (COM1/3), 14H (serial port),
  6057. 23H (Control-Break), 24H (DOS Critical Error) and returns them  when  done.  It
  6058. uses  the  BIOS for keyboard, video display, and system information interrupts.
  6059. It examines segment 40H for EGA operating modes and it does direct screen reads
  6060. and  writes.    Memory for the screen roll backbuffer is negotiated with DOS to
  6061. leave room for a second copy of COMMAND.COM to run tasks within  Kermit;  about
  6062. 100KB  to  148KB is needed for the entire program.  Video page zero is normally
  6063. used, but page one is employed to save screens  with  non-standard  dimensions.
  6064. Hercules  and other graphics mode displays are supported only in Tektronix ter-
  6065. minal mode.  Kermit's timing delays are  dynamically  adjusted  each  time  the
  6066. serial  port is started to accomodate machines of different speeds; duration of
  6067. the normal software timing loop is measured with the hardware  timer  chip  and
  6068. looping is adjusted to produce uniform delays on 8088 through 80386 machines.
  6069.  
  6070.  
  6071. 1.18.1. Kermit-MS/IBM on Local Area Networks
  6072.  
  6073. The IBM version of Kermit-MS has support for the IBM Local Area Network NetBIOS
  6074. (and emulators) interface, Interrupt 5CH, with additional support for  selected
  6075. vendor  specific  features  (presently just AT&T STARLAN), activated by the SET
  6076. PORT NET command, described above, direct support for the  Ungermann  Bass  Net
  6077. One  proprietary  Interrupt  14h  interface, and via SET PORT BIOSn support for
  6078. many other networks which intercept the Bios serial port interrupt 14h.    Com-
  6079. munications  across  a  LAN occurring through the NetBIOS interface use virtual
  6080. circuits (Sessions), named nodes, and conventional NetBIOS packets.   Kermit-MS
  6081. does  not  use  LAN  terminal  interface packages nor the Redirector or similar
  6082. functions.
  6083.  
  6084. Kermit LAN operations are harmonious with  normal  network  activity  and  many
  6085. pairs  of Kermits can communicate simultaneously.  Kermit does not use LAN File
  6086. Server functions, since these are proprietary and vendor-specific.  Kermit can,
  6087. however, send and receive files to/from a LAN file server.
  6088.  
  6089. Since  Kermit uses the standard NetBIOS interrupt 5CH interface, it will run on
  6090. most LANS including IBM PC Net, IBM Token Ring, AT&T STARLAN, and many  others,
  6091. and  will  run  with  Novell  NetWare  software.   Presently, Kermit knows some
  6092. details of STARLAN and is able to send a BREAK across the net and can  use  ISN
  6093. node  names  with  long path parts.  If STARLAN is not operating these features
  6094. are not available.  As more detailed information becomes available special fea-
  6095. tures of other networks can be built-in.
  6096.  
  6097. The  sequence  of operations is similar for a client or server Kermit.  The SET
  6098. PORT NET command is issued by both. This command causes Kermit to validate  the
  6099. presence  of the Interrupt 5CH interface, test for vendor additions, test for a
  6100. session already underway, establish and display a unique Kermit node name,  but
  6101. not make a network session.  The node name of the remote server machine follows
  6102. the word NET; this is not to be confused  with  our  own  node  name  discussed
  6103. below.
  6104.  
  6105. If  an  earlier  LAN  session is still active then the current remote node name
  6106. field of the command is examined for presence of a name. If  a  name  is  given
  6107. then  Kermit  asks  the  user whether to RESUME the session or start a NEW one.
  6108. Starting a new one results in Kermit hanging up the old session (HANGUP) before
  6109. proceeding; resuming an old one requires no further work at this point.
  6110.  
  6111. When  Kermit  attaches  to  the network for the first time it needs to select a
  6112. unique local node name so that two systems can form a Session  by  using  these
  6113. names  as  addresses.  Kermit  uses a simple algorithm to make the name. Kermit
  6114. probes the network adapter board/software for the name of the local system.  If
  6115. the  name is present Kermit makes its own name by appending a dot K (.K) to the
  6116. local name. If the local name is absent then Kermit first tries a standard name
  6117. of "mskermit.K"; should the network report that the name is not unique (another
  6118. node is using the name) then the user is asked to choose a name.  This  process
  6119. continues  until  a  unique  name is obtained or the user decides to quit.  The
  6120. final Kermit node name is reported on the screen; client Kermits will  need  to
  6121. know the name of the server Kermit.
  6122.  
  6123. Communication  across the LAN begins differently for client and server Kermits.
  6124. The server must be started first, by simply placing a Kermit  in  server  mode.
  6125. This  results in a network Listen request being posted so that arriving packets
  6126. with the correct node name can be delivered  to  the  server  Kermit.  Next,  a
  6127. client Kermit tries to connect to the server by issuing a Kermit server command
  6128. to the proper node name (as given in the client's SET PORT NET  node  command);
  6129. REMOTE  WHO is a satisfactory choice. The client machine actually issues a net-
  6130. work Call to the server's node name to make a connection and  then  follows  it
  6131. with  data  packets  holding the Kermit server request. The initial exchange of
  6132. packets establishes a particular virtual circuit between the two nodes. If  the
  6133. connection  cannot  be  started then the client Kermit reports this fact to the
  6134. user. The most common causes of a failure at this point are:
  6135.  
  6136.    1. The client Kermit did not specify the  correct  server  Kermit  node
  6137.       name (spelling errors, wrong case for letters, missing dot K),
  6138.  
  6139.    2. One  or both machines are using a network adapter board which is not
  6140.       the first in the machine; Kermit uses only the first board,
  6141.  
  6142.    3. The LAN NetBIOS emulator does not fully support IBM standard virtual
  6143.       circuits,
  6144.  
  6145.    4. The server machine was not started on the network before the client.
  6146.  
  6147. A  virtual circuit will be broken if a sender or receiver gets no response to a
  6148. request within  a  short  time  interval  set  by  the  LAN  hardware/software.
  6149. However, the LAN procedures within Kermit automatically reestablish the circuit
  6150. transparently to the user when new information is communicated; the  last  used
  6151. remote  node  name  is remembered internally for this purpose.  This also means
  6152. the server Kermit will respond to a connection from a new client Kermit if  the
  6153. first client is idle for say a minute or so. A session can be terminated by the
  6154. user by issuing the HANGUP command or by exiting Kermit. A session will not  be
  6155. broken  this  way  if the user on the client Kermit changes to a regular serial
  6156. port.
  6157.  
  6158. Finally, when Kermit returns control to DOS, but not via the PUSH command,  its
  6159. unique Kermit node name is removed from the network adapter board.
  6160.  
  6161. During  network communications Kermit uses network packets holding 256 bytes of
  6162. data.  If both Kermits are given the command
  6163.  
  6164.     SET RECEIVE PACKET 1000
  6165.  
  6166. then the network and Kermit will be used to best efficiency.    Experience  has
  6167. shown  that  the client Kermit should have its TIMER OFF because the server may
  6168. be asked to do an operation via DOS which does not complete before  the  client
  6169. side  would  timeout.  An  observation of some token passing networks indicates
  6170. that Kermit packets slightly longer than 256, 512, etc bytes result  in  marked
  6171. slowing  down  because  the remaining small piece is not sent until a net timer
  6172. expires.  Carrier sense (Ethernet, STARLAN) boards seem to  be  more  agressive
  6173. and export small packets immediately.
  6174.  
  6175. Support  for the Ungermann-Bass Net/One network, with its NET Command Interface
  6176. (NETCI), was contributed by Renne Rehmann and Henrik Levkowetz.  In addition to
  6177. the  SET  PORT  NET  [nodename]  command, which may be used to connect to other
  6178. nodes on the net with the standard NetBIOS calls, NETCI provides the  means  to
  6179. connect  directly  to serial ports on the Ungermann-Bass network.  Use SET PORT
  6180. UB-Net1 and enter Connect mode. The NETCI prompt, >>, should appear and all the
  6181. usual  NETCI  commands (connect, get, list, resume, abandon, examine, identify,
  6182. set, logout, quit) may be selected.  This line is disconnected when Kermit  ex-
  6183. its. However, the line may be put on hold, exit Kermit, then later restart Ker-
  6184. mit and give the SET PORT UB-Net1 and CONNECT commands, and Resume the line.
  6185.  
  6186. Some LANs intercept the normal serial port Bios interrupt 14H and masquerade as
  6187. a  modem.  This service can be engaged within Kermit by the SET PORT BIOSn com-
  6188. mand, where n is 1, 2, 3, or 4, as appropriate for the LAN  software.  To  work
  6189. properly  the  LAN  must  support the same use of registers as the system Bios.
  6190. Several X.25 and TCP/IP packages have been operated successfully with  the  SET
  6191. PORT  BIOSn  command. Since this channel appears to Kermit as a simple software
  6192. level serial port, Kermit provides neither interrupt driven i/o nor LAN session
  6193. support.
  6194.  
  6195. Kermit can access files on the LAN file server via DOS even while using the LAN
  6196. as a communications medium.  Network administrators should note this point  be-
  6197. cause  a  user operating Kermit in Server mode can allow his or her file server
  6198. directories to be available to other network users also running Kermit, without
  6199. additional security checking of the other users.  The network drives visible to
  6200. the Server Kermit can become devices available for Kermit-to-Kermit file trans-
  6201. fers,  etc, unless the DISABLE command is used to confine access to the current
  6202. disk and directory. A corollary is when files are accessible  to  DOS  commands
  6203. they can become public.
  6204.  
  6205.  
  6206. 1.18.2. Use of Kermit-MS with External Device Drivers
  6207.  
  6208. It  is often desirable to supplement or modify the behavior of a DOS program by
  6209. loading it with special external device drivers.  These drivers may operate  at
  6210. either  the  DOS  or  BIOS  level.   When Kermit-MS accesses the BIOS directly,
  6211. DOS-level drivers are ineffective.  When Kermit accesses the hardware directly,
  6212. both  the  DOS  and  the  BIOS  level drivers are bypassed.  Kermit-MS provides
  6213. several mechanisms to allow these external drivers to operate as intended.
  6214.  
  6215. Here are a few examples:
  6216.  
  6217.    - IBM's ANSI.SYS console driver operates at the DOS level.   It  allows
  6218.      the  major  IBM PC keys to be redefined, and also interprets selected
  6219.      ANSI-format escape sequences for screen control.  It  works  fine  at
  6220.      Kermit-MS  command  level, except SHOW KEY does not recognize strings
  6221.      assigned to keys via ANSI.SYS, and fine at CONNECT  level.    To  use
  6222.      ANSI.SYS  at  CONNECT level, issue the Kermit-MS commands SET KEY OFF
  6223.      (to read keys via DOS) and SET TERMINAL NONE (to  display  characters
  6224.      through DOS).
  6225.  
  6226.    - Blind  people  often  have  speaking  or Braille machines attached to
  6227.      their PCs.  DOS-level device drivers are generally used  to  redirect
  6228.      screen  output  to  these devices, which works OK at DOS or MS-Kermit
  6229.      command level.  SET TERMINAL NONE will allow this redirection to take
  6230.      place  during  CONNECT.    But  these  devices  also need to have the
  6231.      computer's output appear as a  coherent  stream  of  text,  so  users
  6232.      should  also take care to inform the remote host to format its output
  6233.      for a "dumb" or hardcopy terminal.  In  addition,  Kermit-MS'  normal
  6234.      file transfer display does not mesh well with these devices, but that
  6235.      can be remedied using SET DISPLAY SERIAL.
  6236.  
  6237.    - People with motor impairments may be using special keyboard  replace-
  6238.      ments  supported  by  DOS-level  device  drivers.   As with ANSI.SYS,
  6239.      Kermit-MS may be directed to use such keyboard drivers with the  com-
  6240.      mand SET KEY OFF.
  6241.  
  6242.    - Other  keyboard  drivers  are available that work, like Kermit-MS, at
  6243.      BIOS level.  Examples include ProKey and SuperKey.  These may be used
  6244.      at DOS or Kermit-MS command level as well as during CONNECT.
  6245.  
  6246.    - Conceivably,  drivers  exist that allow DOS communication programs to
  6247.      emulate terminals other than ANSI.  You should be able to  use  them,
  6248.      if they exist, in conjunction with Kermit-MS by telling Kermit to SET
  6249.      TERMINAL NONE, but the speed may not be high because of the interven-
  6250.      ing DOS calls.
  6251.  
  6252.  
  6253. 1.18.3. Kermit-MS/IBM Serial Port Information
  6254.  
  6255. Kermit-MS for IBM PC's and compatibles does testing of serial ports before use.
  6256. This section describes those tests so users may understand what Kermit does.
  6257.  
  6258. When a serial port is selected by the SET PORT COMx command Kermit looks at low
  6259. memory  addresses in segment 40H assigned to hold the base address of each COMx
  6260. port; COM1 is in word 40:0H, COM2 is in word 40:2H, and so on. If the value  in
  6261. the  appropriate  word  is  binary zero then Kermit declares the port to be un-
  6262. available.  Otherwise, Kermit runs read-only (i.e., safe) tests at the base ad-
  6263. dress  to  validate  the  presence of an official 8250 UART chip.  If the tests
  6264. fail Kermit indicates it will do i/o through the slow  Bios  pathway;  some  PC
  6265. clones  need  to  work this way even though the Bios has speed problems even at
  6266. 1200 baud.  Otherwise, interrupt driven i/o will be done through the 8250  UART
  6267. (that is, very fast).
  6268.  
  6269. There  is  a special case when a communications board is present, set for COM2,
  6270. but a normal COM1 serial port is not.  Kermit detects this situation.
  6271.  
  6272. Many machines now have more than two serial ports, but until recently there has
  6273. been  no  standard about addresses for COM3 and COM4.  PC DOS 3.30 does not as-
  6274. sign them either because it is really a problem of the  system  ROM  Bios  boot
  6275. code  run  when  the  power is turned on.  However, Kermit will use COM3 and/or
  6276. COM4 if the base address of a port is placed in low memory words  40:4H  (COM3)
  6277. or  40:6H (COM4); the tests described above are then carried out.  One restric-
  6278. tion is that the Interrupt ReQuest number (IRQ in the serial port board manual)
  6279. must  be  either IRQ4 or IRQ3.  Kermit attempts to locate which line is correct
  6280. with a short test.  If the test is not successful it uses  the  IRQ4  for  COM3
  6281. (and  for  COM1) and IRQ3 for COM4 (and for COM2) on the PC/AT, and on the PS/2
  6282. it uses IRQ3 for COM2, COM3, and COM4.  Check the board and its  manual.    DOS
  6283. utility  DEBUG  can be used to create a short program to insert the board's ad-
  6284. dresses into the segment 40H memory locations; a sample program is given below.
  6285.  
  6286. -------------------------------------------------------------------------------
  6287.  
  6288.  
  6289.   Serial Port    Address     IRQ Line         Conventions
  6290.   COM1           03F8H       4                IBM standard
  6291.   COM2           02F8H       3                IBM standard
  6292.   COM3           ?           4 (3 for PS/2)   Board
  6293.   COM4           ?           3                Board
  6294.  
  6295.                  Table 1-13:  IBM PC/XT/AT Serial Port Numbers
  6296.  
  6297. -------------------------------------------------------------------------------
  6298.  
  6299. The addresses shown as query marks are to be found  in  the  board's  reference
  6300. manual;  values  such  as  2E8H and 2E0H would be common.  However, there is no
  6301. standard for anything to do with COM3 and COM4 on non-PS/2's.
  6302.  
  6303. Assuming that you have selected an address in harmony with the rest of the sys-
  6304. tem  (good  luck  on  that  part), set the board's switches or jumpers, and use
  6305. DEBUG to insert the address(es) in segment  40H  memory.    The  example  below
  6306. creates  a small program named SETCOM3.COM to put address 02E8H into the memory
  6307. word 40:04H for COM3 and writes the program to drive  A.  (Disregard  the  xxxx
  6308. items below):
  6309.  
  6310.     A> DEBUG                        don't type these comments
  6311.     -n a:setcom3.com                sets name of output file
  6312.     -a                              assemble command
  6313.     xxxx:100 mov ax,40              value 40h
  6314.     xxxx:103 mov es,ax              put it into register es
  6315.     xxxx:105 mov ah,02              the 02 part of 02E8H
  6316.     xxxx:107 mov al,e8              the E8 part of same
  6317.     xxxx:109 es:
  6318.     xxxx:10A mov [4],ax             store in 40:4 for com3 ([6] for com4)
  6319.     xxxx:10D int 20                 return to DOS
  6320.     xxxx:10F                        blank line to end assemble mode
  6321.     -r cx                           show contents of register cx
  6322.     CX 0000
  6323.     : 0f                            set register cx to write 0fh bytes
  6324.     -w                              write material to the disk file
  6325.     -q                              quit debug
  6326.     A> DEBUG setcom3.com
  6327.     -u                              unassemble to see if all is well
  6328.     -q                              quit debug
  6329.  
  6330. Note,  for  COM4,  use  [6]  above  rather  than [4], and of course employ your
  6331. board's port address in place of 02E8H (check the manual).  Finally, try it:
  6332.  
  6333.     A> setcom3                      run the program
  6334.     A> DEBUG                        now see what's down there
  6335.     -d 40:00                        display bytes in seg 40H
  6336.  
  6337.            ( Shows many bytes.  See yours?  Good. )
  6338.  
  6339.     -q
  6340.     A>
  6341.  
  6342. A small side effect noted in practice is the first time the extra port is  used
  6343. there  may be garbage from it.  Just return to the Kermit prompt and try again,
  6344. if necessary SET PORT to the other COM lines momentarily, all  should  be  well
  6345. the second time.
  6346.  
  6347. More technical comments, for those with an interest.  When Kermit finishes with
  6348. a port it disables interrupts for that serial port and returns the  IRQ  signal
  6349. line  to  its  state found when Kermit started since many devices can share the
  6350. same Interrupt ReQuest line but only one device at a time can be active on  it.
  6351. If  you find that transmissions are good but there is no reception then another
  6352. device has stolen the IRQ; disable it or find a guru.  Kermit  will  work  with
  6353. non-standard  addresses for COM1 and COM2 but the IRQ's must be as in the table
  6354. above.  Accessing a non-existent port produces a message and all communications
  6355. are discarded safely in the bit bucket.
  6356.  
  6357.  
  6358. 1.18.4. CTTY COMx for IBM Machines
  6359.  
  6360. The  DOS  command  CTTY  COMx  redirects the standard input and output from the
  6361. keyboard and screen, respectively, to the indicated communications channel.  If
  6362. a  Kermit  Server  is operated this way, "through the back port", then both DOS
  6363. and Kermit can access the port hardware simultaneously; a deadlock develops  on
  6364. IBM machines.  The items below refer to only the IBM version of Kermit-MS.
  6365.  
  6366. Kermit-MS/IBM  version successfully resolves the deadlock in the following man-
  6367. ner.  When Kermit requires the serial port it also attaches itself to Interrupt
  6368. 16H,  the  Bios RS232 serial port routine.  Code within Kermit receives the DOS
  6369. serial port requests via Interrupt 14H and either passes  the  request  to  the
  6370. Bios  if  the COM line is not that used by Kermit or it handles the request in-
  6371. ternally for conflicting situations.  When the same port is used  by  both  DOS
  6372. and  Kermit, Kermit discards DOS output material (typically a prompt, but could
  6373. be the dreaded Abort, Retry, Ignore message) and returns a success code to DOS,
  6374. it  returns an ascii Backspace code to DOS read requests (this is a key item to
  6375. keep DOS complacent while  Kermit  communicates),  and  it  returns  reasonable
  6376. status  for  modem  status.    The interception ceases when Kermit releases the
  6377. port, such as when the Kermit prompt is displayed, and this lets  DOS  converse
  6378. out the serial port.
  6379.  
  6380. It  is  worth  restating  that a large number of programs bypass DOS to achieve
  6381. higher performance.  When such programs are started through the back door  they
  6382. may  still  require input from the real keyboard and will hang, waiting for it.
  6383. There is nothing to do about this situation except a) don't let it  happen,  b)
  6384. contact the local operator to push some keys.
  6385.  
  6386.  
  6387. 1.18.5. Screen Sizes and the EGA Board, IBM Versions
  6388.  
  6389. Support  has  been  included  for Enhanced Graphics Adapter (EGA) video display
  6390. boards which can be configured for other than the standard  80  columns  by  25
  6391. lines,  say  132  columns or 43 lines or other.  Several boards, the Tseng Labs
  6392. EVA (also Orchid Designer) board with the 132 column kit installed, the ATI EGA
  6393. Wonder,  the  Video  7  Deluxe  and VGA, and the Everex EV-659 (ega) and EV-673
  6394. (vga), can be controlled directly by Kermit for 80/132 column changes.    Other
  6395. boards  need to be placed in the desired display mode by the user.  Kermit then
  6396. adapts to the settings if the board obeys standard rules for using the Bios EGA
  6397. memory areas in segment 40H.  The Video-7 boards have been used successfully in
  6398. all screen sizes, including 132 columns by 43  lines,  with  an  NEC  Multisync
  6399. monitor.
  6400.  
  6401. The  IBM EGA board has several noteworthy bugs which are now standards.  One is
  6402. the cursor dots are not always on the correct scan lines  when  the  number  of
  6403. screen  lines  is other than 25.  Kermit-MS attempts to compensate for this at-
  6404. tribute.  Screen roll back space is fixed in size so there are fewer pages  for
  6405. more  dense  screens;  standard  screens  use  an internal buffer, non-standard
  6406. screens use a buffer plus video page 1. ANSI.SYS is hard coded for 25 line dis-
  6407. plays  so all DOS i/o will eventually overwrite itself on line 25; the emulator
  6408. does not use DOS i/o.  Commercial replacements for ANSI.SYS should be  able  to
  6409. use all screen lines.
  6410.  
  6411. Screen  dumps work correctly if done with Kermit commands.  DOS PrintScreen may
  6412. or may not, depending on your EGA board. Graphics dumps are not managed by Ker-
  6413. mit.
  6414.  
  6415. When  the  VT102  receives escape sequences to change between 80 and 132 column
  6416. modes the screen is reset and the ATI EGA Wonder, or  Everex  EV-659  (EGA)  or
  6417. EV-673 (vga), Tseng Labs Multipak (and Orchid Designer), or Video 7 Vega or VGA
  6418. board is asked to change modes (but only if that board is present); other  dis-
  6419. play  adapters are left in their current state.  Users of Tseng boards must run
  6420. the Tseng BIGSCR /R:25 program before starting Kermit.  The right margin is en-
  6421. forced  strongly so a board in 132 column mode will not display material to the
  6422. right of column 80 if the emulator is in 80 column mode.   Similarly,  material
  6423. to  the  right  of  column  80  is not preserved in the emulator if the display
  6424. adapter is operating in  80  column  mode;  real  VT102s  keep  that  invisible
  6425. material in hardware memory whereas the emulator does not.
  6426.  
  6427. Reference  is made to line 25 in the emulator; this is normally the status/mode
  6428. line in Kermit.  Real VT102's have only 24  line  displays.    If  the  display
  6429. adapter is set for a different number of lines per screen then the 25th line is
  6430. interpreted to mean the bottom display adapter line, such as line 43.    Should
  6431. the  host  access the status/mode line then the line is declared to be disabled
  6432. (same as SET MODE OFF) so that Kermit's own status information does  not  over-
  6433. write  the  host's  when the screen is restored.  Toggling a disabled mode line
  6434. has no effect; only SET MODE ON will enable it again.   The  Heath-19  terminal
  6435. has the unusual feature that disabling the mode line (ESC y 1) also clears it.
  6436.  
  6437.  
  6438. 1.18.6. Kermit-MS/IBM Printer Control
  6439.  
  6440. The  IBM  PC  MS-Kermit  VT102 terminal emulator also supports full transparent
  6441. printing of 8-bit binary bytes.  The escape sequence  "ESC  [  5  i"  turns  on
  6442. transparent  printing,  in which all further 8-bit characters are sent directly
  6443. to the printer, bypassing the SET TRANSLATION INPUT filter, and are  not  shown
  6444. on  the screen.  Escape sequence "ESC [ 4 i" turns off transparent printing and
  6445. the escape sequence is not sent to the printer.   Non-transparent  printing  is
  6446. controlled  by  the  "ESC  [ ? 5 i" and "ESC [ ? 4 i" sequences.  Such printing
  6447. simply duplicates text intended for the  screen,  excluding  escape  sequences.
  6448. The text also appears on the screen.
  6449.  
  6450. Kermit-MS  accesses  the system printer through DOS calls several ways; neither
  6451. the Bios nor the hardware are used.  Files directed to the printer by  the  SET
  6452. DESTINATION  PRINTER  command  are  written by opening a file with the name PRN
  6453. (DOS's name for the system printer) and writing to it the same  as  to  a  disk
  6454. file;  DOS  provides  limited  buffering.  LOGging to device PRN works the same
  6455. way, as can be noticed by the last line or so not being printed until  the  log
  6456. file  is CLOSED.  DOS is used again while emulating a terminal in CONNECT mode.
  6457. If the VT102 emulator found in the IBM PC is used for transparent or Controller
  6458. printing,  single characters are written to DOS file handle 4, the DOS standard
  6459. print device.  If the screen is echoed to the printer via the  typical  Control
  6460. PrtSc  key combination, or equivalent, single characters are written by the DOS
  6461. function 05H Printer Output call.  In both  cases  of  terminal  emulation  the
  6462. printer's  ready  status  is found by the DOS IOCTL 44H call.  Only the Control
  6463. PrtSc case results in the PRN message  being  displayed  on  the  status  line.
  6464. Finally,  the  classical IBM PC Shift PrtSc command to copy the whole screen to
  6465. the printer is unknown to Kermit because the system Bios traps the key combina-
  6466. tion  and  does not tell Kermit about it.  If the Control P command is given to
  6467. DOS before Kermit starts then again characters are echoed by  the  system  Bios
  6468. without Kermit's knowledge; this situation can result in lost characters.
  6469.  
  6470. Print spoolers generally operate by being told an existing filename and then in
  6471. the background they steal cpu cycles  to  read  from  disk  and  write  to  the
  6472. printer.    The  DOS  PRINT command invokes such a spooler.  Although an active
  6473. Kermit does not feed these software programs directly the  spooler  and  Kermit
  6474. can  compete  for cpu cycles and characters can be lost.  If a non-DOS resident
  6475. program intercepts characters destined for the printer device and  spools  them
  6476. Kermit does not know about it and similar competion can occur.
  6477.  
  6478. During  file  transfers  printing is carefully sequenced to occur only when the
  6479. local Kermit is in control of the communications line so  that  a  small  pause
  6480. will  not  result in missing characters arriving at the serial port.  When ter-
  6481. minal emulation is active then printing competes for cpu time with  the  serial
  6482. port  routines.    Generally, the serial port wins such contests if the port is
  6483. interrupt driven (Generic Kermit is not interrupt driven, so beware).  However,
  6484. the printing itself can use enough cpu cycles to delay processing of characters
  6485. to the screen and eventually the receive buffer of the serial port fills to the
  6486. high  water  mark  and  an  XOFF  flow control character is sent to the host to
  6487. suspend further transmissions until we send an XON.  If FLOW is NONE  then  ex-
  6488. pect  lost  characters  at  the serial port.  Experience with ordinary IBM PC's
  6489. through 80386 machines at very high baud rates indicates no characters are lost
  6490. when  FLOW  is  XON/XOFF.    However,  it  is possible on some machines for the
  6491. printer to have priority over the serial port, and hence to have  lost  charac-
  6492. ters,  especially  if  a  Terminate Stay Resident program intercepts characters
  6493. destined for the printer and keeps interrupts turned off too long.
  6494.  
  6495.                                Table of Contents
  6496.  
  6497. 1. MS-DOS KERMIT    
  6498.  
  6499.    1.1. System Requirements    
  6500.    1.2. History    
  6501.    1.3. Using MS-Kermit    
  6502.    1.4. The MS-DOS File System    
  6503.    1.4.1. File Specifications
  6504.        1.4.2. File Formats    
  6505.    1.5. Program Setup and Invocation
  6506.    1.6. Kermit-MS Commands
  6507.        1.6.1. Program Management Commands
  6508.        1.6.2. Local File Management Commands
  6509.        1.6.3. COMMANDS FOR TERMINAL CONNECTION
  6510.        1.6.4. COMMANDS FOR FILE TRANSFER
  6511.        1.6.5. Hints for Transferring Large Files
  6512.        1.6.6. Commands for Raw Uploading and Downloading
  6513.        1.6.7. Kermit Server Commands
  6514.        1.6.8. Commands for Controlling Remote Kermit Servers
  6515.        1.6.9. The LOG and CLOSE Commands
  6516.        1.6.10. The SET Command
  6517.        1.6.11. The STATUS and SHOW Commands
  6518.    1.7. Macros
  6519.    1.8. SCRIPTS
  6520.    1.9. Initialization Files Revisited
  6521.    1.10. International Character Sets
  6522.    1.11. MS-Kermit Features for Different Systems
  6523.    1.12. Compatibility with Older Versions of MS-DOS Kermit
  6524.    1.13. What's Missing
  6525.    1.14. Installation of Kermit-MS
  6526.    1.15. Program Organization
  6527.    1.16. Bringing Kermit to New Systems
  6528.    1.17. Kermit-MS VT102 Terminal Emulator Technical Summary
  6529.        1.17.1. Treatment of Inbound Characters During Terminal Emulation
  6530.        1.17.2. Keyboard Layout and Characters Sent
  6531.        1.17.3. Responses To Characters Received By the Terminal Emulator
  6532.        1.17.4. DEC VT102 Functions While in VT52 Mode
  6533.        1.17.5. Heath-19 Functions While in Non-ANSI Mode
  6534.        1.17.6. Heath-19 Functions While in ANSI Mode
  6535.        1.17.7. Tektronix 4010/4014 Graphics Terminal Functions
  6536.    1.18. IBM PC Kermit Technical Summaries
  6537.        1.18.1. Kermit-MS/IBM on Local Area Networks
  6538.        1.18.2. Use of Kermit-MS with External Device Drivers
  6539.        1.18.3. Kermit-MS/IBM Serial Port Information
  6540.        1.18.4. CTTY COMx for IBM Machines
  6541.        1.18.5. Screen Sizes and the EGA Board, IBM Versions
  6542.        1.18.6.
  6543.                                 List of Figures
  6544.  
  6545.    Figure 1-1:   MS-Kermit File Transfer Display Screen
  6546.    Figure 1-2:   MS-Kermit Script for Logging In
  6547.    Figure 1-3:   MS-Kermit Script for More Control of a Hayes 2400 bps
  6548.  
  6549.    Figure 1-4:   MS-DOS Batch File Invoking Kermit to Send VAX Mail
  6550.    Figure 1-5:   MS-Kermit Script for Logging into VAX and Sending Mail
  6551.    Figure 1-6:   An Advanced MS-Kermit Initialization File
  6552.  
  6553.                                 List of Tables
  6554.  
  6555.    Table 1-1:   MS-DOS Kermit Backslash Codes
  6556.    Table 1-2:   The US ASCII Character Set (ANSI X3.4-1977)
  6557.    Table 1-3:   RS-232-C Modem Signals
  6558.    Table 1-4:   Kermit-MS Single-Character CONNECT Escape Commands
  6559.    Table 1-5:   Adapters Supported by IBM PC MS-Kermit for Tektronix
  6560.                 Emulation
  6561.    Table 1-6:   Kermit-MS Verbs for the IBM PC Family
  6562.    Table 1-7:   Kermit-MS Terminal Emulation Options
  6563.    Table 1-8:   Kermit-MS Screen Scroll Keys
  6564.    Table 1-9:   Kermit-MS Verbs for the DEC Rainbow
  6565.    Table 1-10:   Response of MS-Kermit Tektronix Emulator to Received
  6566.                  Characters
  6567.    Table 1-11:   Tektronix Dot-Drawing Commands
  6568.    Table 1-12:   MS-Kermit Tektronix Coordinate Interpretation
  6569.    Table 1-13:   IBM PC/XT/AT Serial Port Numbers
  6570.