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