home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / protocol / kuser.txt < prev    next >
Text File  |  2020-01-01  |  1MB  |  22,844 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.                                KERMIT USER GUIDE
  20.  
  21.                                 Seventh Edition
  22.  
  23.  
  24.  
  25.                            Christine Gianone, Editor
  26.  
  27.               Columbia University Center for Computing Activities
  28.                            New York, New York 10027
  29.  
  30.  
  31.                                  May 26, 1988
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.                             Copyright (C) 1981,1988
  44.             Trustees of Columbia University in the City of New York
  45.  
  46.      Permission is granted to any individual or institution to use, copy,
  47.     or redistribute this document so long as it is not sold for profit, and
  48.                   provided this copyright notice is retained.
  49. . PREFACE                                                                Page 1
  50.  
  51. -------------------------------------------------------------------------------
  52.                                     PREFACE
  53.  
  54. Kermit  is  the  name of a protocol for transferring files from one computer to
  55. another over ordinary asynchronous terminal connections.  Kermit programs  have
  56. been  written  for  many  different computers, and in general any two computers
  57. that have Kermit programs can exchange  sequential  files  correctly  and  com-
  58. pletely.   This manual gives a brief and general overview of what Kermit is and
  59. how to use it, but consists mostly of detailed instructions for use and instal-
  60. lation of specific Kermit programs.
  61.  
  62. For  a  more  detailed  introduction  to  Kermit,  complete with illustrations,
  63. diagrams, and tutorials, consult the book Kermit, A File Transfer Protocol,  by
  64. Frank  da Cruz, Digital Press, Bedford MA (1987), ISBN 0-932376-88-6, DEC order
  65. number EY-6705E-DP (phone 1-800-343-8321).  The Kermit book describes Kermit in
  66. detail, from the points of view of the beginner, the user, the computer profes-
  67. sional who must install Kermit programs or support their use, and the  program-
  68. mer  who wishes to write new Kermit implementations.  Also included are general
  69. introductions to computers, data communications, and file organization, plus  a
  70. detailed troubleshooting guide, bootstrapping hints, and various appendices and
  71. tables.  The latter half of the book is taken up by a complete  description  of
  72. the Kermit file transfer protocol, with programming examples in the C language,
  73. plus some analysis and comparisons of Kermit with other popular protocols  such
  74. as Xmodem.
  75.  
  76.  
  77.                          WHY IS THIS MANUAL SO THICK?
  78.  
  79. Don't  panic, Kermit isn't that complicated!  The Kermit User Guide begins with
  80. a relatively short introduction to Kermit in general -- what it's for,  how  to
  81. use  it,  what  the  commands are, etc -- in Chapters 1 through 4.  Each of the
  82. remaining chapters describes a specific Kermit programs in detail:    one  each
  83. for  MS-DOS, UNIX, IBM mainframes, VAX/VMS, DEC-20, DEC PDP-11, Apple II, Apple
  84. Macintosh, and CP/M.  You only need to use the chapters that apply to the  sys-
  85. tems you're actually using.
  86.  
  87. In  general,  the  longer  the chapter, the more powerful the version of Kermit
  88. it's describing: MS-DOS, PDP-11, etc.  But remember, a major goal of Kermit  is
  89. that  it  should  be  easy  for you to get started, so the bulk of the verbiage
  90. covers the "odd cases" that many people won't ever encounter, and the  advanced
  91. features that are available for those who want to learn about them.
  92.  
  93. The  increase  in  size from the sixth to the seventh edition of this manual is
  94. mostly because of the growth of the MS-DOS, IBM mainframe,  and  several  other
  95. chapters, plus the addition of the PDP-11 chapter.
  96.  
  97.  
  98.                          HISTORY AND ACKNOWLEDGEMENTS
  99.  
  100. The  Kermit file transfer protocol was designed at the Columbia University Cen-
  101. ter for Computing Activities (CUCCA) in 1981-82 by  Bill  Catchings  and  Frank
  102. da Cruz.    Bill wrote the first two programs, one for the DECSYSTEM-20 and one
  103. for a CP/M-80 microcomputer.
  104.  
  105. The initial objective was to allow users of our DEC-20 and IBM 370  timesharing
  106. systems  to archive their files on microcomputer floppy disks.  The design owes
  107. much to the ANSI and ISO/OSI models, and some ideas were borrowed from  similar
  108. . PREFACE                                                                Page 2
  109.  
  110. -------------------------------------------------------------------------------
  111. projects  at  Stanford University and the University of Utah.  The protocol was
  112. designed to accommodate the "sensitive" communications front end of  the  full-
  113. duplex  DEC-20 system as well as the peculiarities of half-duplex IBM mainframe
  114. linemode communications.  The protocol was soon implemented successfully on our
  115. IBM mainframe systems under VM/CMS by Daphne Tzoar of CUCCA.
  116.  
  117. Meanwhile  it  was  becoming apparent that Kermit was useful for more than just
  118. file archiving; IBM PCs were beginning to appear in  the  offices  and  depart-
  119. ments,  and there arose a general need for file transfer among all our systems,
  120. as well as a need to use the IBM PCs as terminals.   Before  long,  Daphne  had
  121. prepared an IBM PC implementation.
  122.  
  123. After  our  initial success with Kermit, we presented it at conferences of user
  124. groups like DECUS and SHARE, and began to get requests for it from other sites.
  125. Since we had written down a description of the protocol, some sites wrote their
  126. own implementations for new computers, or adapted one of our implementations to
  127. run  on  additional  systems, and sent back these new versions to us so that we
  128. could share them with others.  In this way, Kermit has grown  to  support  over
  129. 300 different machines and operating systems; it has been sent on magnetic tape
  130. or diskette from Columbia University to about ten thousand sites all  over  the
  131. world, and has reached many thousands more through user groups and networks.
  132.  
  133. Thanks  to the hundreds of individuals and institutions who have contributed to
  134. the Kermit storehouse over the years.
  135.  
  136. The Kermit protocol was named after Kermit the Frog,  star  of  the  television
  137. series  THE  MUPPET  SHOW;  the name Kermit is used by permission of Henson As-
  138. sociates, Inc., New York.
  139.  
  140.  
  141.                                   DISCLAIMER
  142.  
  143. Neither Columbia University, nor the editor, nor the authors of the  individual
  144. chapters,  nor  any  individual  or institution contributing Kermit programs or
  145. documentation to the Columbia University Kermit Distribution,  acknowledge  any
  146. liability  for  any claims arising from use or misuse of Kermit programs or for
  147. inaccuracies in the documentation or bugs in the programs.  Kermit programs are
  148. produced on a voluntary basis and contributed freely for public use in the hope
  149. that they will be useful, but without any kind of warranty or guarantee, or any
  150. commitment  to  address  or  fix  problems.    In practice, Kermit programs and
  151. documentation are contributed in good faith, and will be supported on  a  best-
  152. effort basis, time and other commitments permitting.
  153.  
  154.  
  155.                             CUSTOMIZING THIS MANUAL
  156.  
  157. Although  the  Kermit  User  Guide was produced at Columbia University, all at-
  158. tempts have been made to keep it free of site-specific information.    However,
  159. due  to  the  large  number of Kermit implementations, descriptions of each one
  160. would make the manual prohibitively thick.  Therefore, the manual is sent  from
  161. Columbia  with  specific  documentation  about a selection of systems.  Some of
  162. these descriptions may not be of interest at your site, while others  that  are
  163. may be lacking.
  164.  
  165. Each  site,  upon  receiving a Kermit tape, may decide which versions of Kermit
  166. are important to it, and include the appropriate documentation in this  manual.
  167. . PREFACE                                                                Page 3
  168.  
  169. -------------------------------------------------------------------------------
  170. This is most conveniently done if your site has the Scribe text formatting sys-
  171. tem (from UNILOGIC Ltd in Pittsburgh PA,  USA),  with  which  this  manual  was
  172. produced.    Scribe  runs  on a wide variety of systems.  There are also Scribe
  173. subsets, such as Perfect Writer and Final Word, that run on  various  microcom-
  174. puters.   Many have asked why Scribe is used for Kermit manuals instead of TeX.
  175. The answer is simply that TeX can only  produce  output  for  typesetters,  not
  176. plain-text ASCII files, which are necessary for online documentation.
  177.  
  178. The system-specific parts of the Kermit User Guide are included with "@INCLUDE"
  179. statements at the end of the Scribe source file for this manual, whose filename
  180. is  KUSER.MSS.    You may add or delete @INCLUDE statements to suit your needs,
  181. and run the result through the text formatter to produce a  customized  manual.
  182. If  you  do  this,  you should include an indication on the title page that the
  183. manual has been customized for your site.
  184.  
  185. Not all system-specific documentation is provided in .MSS (Scribe  input)  for-
  186. mat, since some Kermit contributors do not have Scribe at their sites.  In that
  187. case, you will either have to add Scribe formatting commands, or  else  enclose
  188. the  whole  subfile  in @BEGIN(VERBATIM)...@END(VERBATIM) brackets (and replace
  189. all atsigns (@) in the text with double atsigns (@@)).
  190.  
  191. If you do not have SCRIBE, you may still use an editor to delete  or  add  sec-
  192. tions  to  the  finished  documentation file, though the results will not be as
  193. satisfactory -- the table of contents, index, cross references, and  page  num-
  194. bers will not be automatically adjusted.
  195.  
  196. If you are running a version of Kermit for which adequate documentation has not
  197. been provided (after all, this is a  distributed,  volunteer  effort!),  please
  198. feel free to write some, preferably in Scribe input format, and send it back to
  199. Columbia so that others may benefit from it.  Likewise if you produce a new im-
  200. plementation  of  Kermit.  If you don't know Scribe, you can use one of the ex-
  201. isting chapters as a model.
  202. . How To Get Kermit                                                      Page 4
  203.  
  204. -------------------------------------------------------------------------------
  205. How To Get Kermit
  206.  
  207. The Kermit software is free and available to all, source code and documentation
  208. included,  from  a variety of sources.  For example, most universities are con-
  209. nected to academic computer networks from which the Kermit  files  at  Columbia
  210. University  can be reached.  The Kermit files are also available from many user
  211. groups, dialup information or bulletin board  services,  diskette  reproduction
  212. services, and private volunteers.
  213.  
  214. Kermit  software is not in the public domain.  The Kermit manuals and most Ker-
  215. mit programs bear copyright notices to  protect  Columbia  University  and  the
  216. various  contributors  from  having  their  work  taken by others and sold as a
  217. product, for profit.  This is not to say that the Kermit file transfer protocol
  218. can  never be included as a feature of a commercial product; the conditions un-
  219. der which this may be done are spelled out in a flyer POLICY ON COMMERCIAL  USE
  220. AND DISTRIBUTION OF KERMIT.
  221.  
  222. Columbia  University  distributes Kermit programs by mail order on various mag-
  223. netic  media  (primarily  9-track  reel-to-reel  tape  and  certain  kinds   of
  224. diskettes),  charging  a  distribution fee to defray costs for media, printing,
  225. postage, materials, labor, and computing resources.  This  is  not  a  software
  226. license  fee;  no license is required.  To receive a current list of Kermit im-
  227. plementations, the statement on commercial policy, and  a  Kermit  order  form,
  228. write to:
  229.  
  230.     Kermit Distribution
  231.     Columbia University Center for Computing Activities
  232.     612 West 115th Street
  233.     New York, NY  10025
  234.  
  235. Everyone  is  free  to copy and redistribute Kermit programs and documentation,
  236. and is encouraged to do so, with the following  stipulations:  Kermit  programs
  237. should not be sold for commercial gain; credit should be given where it is due;
  238. and new material should be sent back to  Columbia  University  at  the  address
  239. above  so that we can maintain a definitive and comprehensive set of Kermit im-
  240. plementations for further distribution.
  241.  
  242. Since new Kermit programs are added -- and old ones improved -- so  frequently,
  243. sites  that  use  Kermit heavily are encouraged to contact Columbia for updates
  244. two or three times a year for news.
  245.  
  246.  
  247.  
  248.  
  249.  
  250.          -- PLEASE USE KERMIT ONLY FOR PEACEFUL AND HUMANE PURPOSES --
  251. . Organization of This Manual                                            Page 5
  252.  
  253. -------------------------------------------------------------------------------
  254. Organization of This Manual
  255.  
  256. Chapter 2, How to Use Kermit, describes the basics of text file  transfer,  and
  257. shows  some specific examples.  If you follow the examples but you can't make a
  258. terminal connection or you can't transfer files successfully,  consult  Chapter
  259. 3, When Things Go Wrong.
  260.  
  261. If  you  expect to be a heavy user of Kermit, you should read Section 4, Kermit
  262. Commands, which describes most of Kermit's features and commands.  You may find
  263. that  familiarity with the material in this section will help you get past dif-
  264. ficulties that can crop up when you are making  new  kinds  of  connections  or
  265. transferring  unusual  kinds of files.  You will also find descriptions of some
  266. advanced file management features that have been omitted from the earlier  sec-
  267. tions.
  268.  
  269. The  subsequent  chapters  describe selected popular Kermit programs in detail.
  270. You should read the appropriate section for each system you expect to use; each
  271. section  describes  the  file naming conventions and other system features that
  272. are important to Kermit users, and lists the Kermit commands  for  that  system
  273. mainly  in terms of their differences from the "ideal" Kermit described in sec-
  274. tion 4.
  275. 1. Introduction                                                          Page 6
  276.  
  277. -------------------------------------------------------------------------------
  278. 1. Introduction
  279.  
  280. There is an ever-increasing need to  move  information  from  one  computer  to
  281. another.    Information can be exchanged using magnetic media -- tapes or disks
  282. -- or over networks.  Networks are expensive, and when  your  computer  is  not
  283. connected  to  one (or to the right one), you must find other means to transfer
  284. information.  In the early days of computing, magnetic media formats were rela-
  285. tively  standardized,  but  with  the  arrival  of  microcomputers  things have
  286. changed: most microcomputer users have no access to tapes, and disk formats are
  287. incompatible  between most microcomputer makes and models.  Even when disk for-
  288. mats agree, the disk must be physically moved from one system to the  other  in
  289. order  for  information  to  be  exchanged  -- the effort and delay can be sig-
  290. nificant if the systems are widely separated.
  291.  
  292. The telecommunication line provides a cheap and widely available alternative to
  293. networks and magnetic media.  Asynchronous telecommunication is the method used
  294. by most terminals to connect to most computers.    When  dedicated  "hardwired"
  295. connections,  such  as those found between a timesharing computer and its local
  296. terminals, are not available, computer users can create their own  dialup  con-
  297. nections with a telephone and a modem.
  298.  
  299. Most  computers  come equipped with asynchronous telecommunications interfaces,
  300. or "serial ports", which allow them to act as, or communicate with,  terminals.
  301. The  question is how to use the serial port to exchange data.  Fortunately, the
  302. standards for connecting terminals to computers  are  almost  universally  fol-
  303. lowed:  connector  configuration  (DB-25  or  DB-9),  transmission signals (EIA
  304. RS-232), a commonly accepted set of transmission speeds  (baud  rates),  and  a
  305. convention  for encoding characters in storage and during transmission (ASCII).
  306. These standards provide the physical medium and the data format,  but  they  do
  307. not specify a process for exchanging data.
  308.  
  309.  
  310. 1.1. Why Kermit?
  311.  
  312. When  data  is transmitted from one computer to another; the receiving computer
  313. has to be instructed to take in the data and put  it  somewhere,  and  it  also
  314. needs  a  way  of  ensuring  that the data has been received correctly and com-
  315. pletely in spite of several factors that  will  tend  to  interfere  with  this
  316. process:
  317.  
  318.    1. Noise --  It is rarely safe to assume that there will be no electri-
  319.       cal interference on a line; any long or switched data  communication
  320.       line  will  have  occasional interference, or noise, which typically
  321.       results in garbled or extra characters.  Noise corrupts  data,  per-
  322.       haps in subtle ways that might not be noticed until it's too late.
  323.  
  324.    2. Synchronization  --  Data must not come in faster than the receiving
  325.       machine can handle it.  Although line speeds at the two ends of  the
  326.       connection  must  match  before  communication  can  take place, the
  327.       receiving machine might not be able to process a  steady  stream  of
  328.       input  at  that speed.  Its central processor may be too slow or too
  329.       heavily loaded, its buffers too full or too small, or its  disk  too
  330.       slow.    The  typical symptom of a timing problem is lost data; most
  331.       operating systems will simply discard incoming  data  they  are  not
  332.       prepared to receive.
  333. 1.1. Why Kermit?                                                         Page 7
  334.  
  335. -------------------------------------------------------------------------------
  336. To  prevent  corruption  of  data and to synchronize communication, cooperating
  337. computers can send special messages to one another along with the data.  Inter-
  338. mingling  of control information with data together requires a set of rules for
  339. distinguishing messages from data, and specifying what the messages are and the
  340. actions  associated  with  each  message.    Such  a  set  of rules is called a
  341. protocol.
  342.  
  343. Kermit is a file transfer protocol.  It is specifically designed  for  transfer
  344. of  sequential  files  over  ordinary  telecommunication  lines.  Kermit is not
  345. necessarily better than other terminal-oriented file transfer protocols but  it
  346. is  free,  it  is  well documented, and it has been implemented compatibly on a
  347. wide variety of microcomputers, PCs, workstations,  minicomputers,  mainframes,
  348. and supercomputers.
  349.  
  350.  
  351. 1.2. How Kermit Works
  352.  
  353. Kermit  transfers  data by encapsulating it in  packets of control information.
  354. This information includes a synchronization marker, a packet sequence number to
  355. allow detection of lost packets, a length indicator, and a "block check" to al-
  356. low verification of the data, as shown in Figure 1-1.
  357.  
  358. -------------------------------------------------------------------------------
  359.  
  360.     +------+------+------+------+--------- - - - -+-------+
  361.     | MARK | LEN  | SEQ  | TYPE | DATA            | CHECK |
  362.     +------+------+------+------+--------- - - - -+-------+
  363.  
  364.                          Figure 1-1:   A Kermit Packet
  365.  
  366. -------------------------------------------------------------------------------
  367.  
  368. The MARK (usually an ASCII Control-A character) appears at the beginning of the
  369. packet.    The  next character is a length field (LEN), specifying how long the
  370. rest of the packet is.  The sequence number (SEQ) is used  to  detect  lost  or
  371. duplicated  packets; retransmission is requested for lost packets and duplicate
  372. packets are discarded.  The TYPE field specifies whether  the  packet  contains
  373. data  or  control information.  The CHECK field contains a quantity obtained by
  374. combining all the other characters in the packet together  in  one  of  several
  375. ways;  the  sender  computes this value and sends it.  The packet receiver also
  376. computes the value and checks it against the value sent;  if  they  agree,  the
  377. packet  is  accepted;  if they disagree, then the packet has been corrupted and
  378. retransmission is requested.  The DATA field contains up to  90  characters  of
  379. data.  All fields except the mark are encoded as printable ASCII characters, to
  380. prevent host or network interference.  Figure 1-2  shows  how  a  typical  file
  381. transfer  proceeds.   Figure 1-2 does not show how Kermit recovers from errors.
  382. Very briefly, here's how it works:
  383.  
  384.    - If a packet is corrupted in transit by noise or loss  of  characters,
  385.      the block check will be wrong.  A file receiver will NAK ("negatively
  386.      acknowledge")  a  corrupted  packet,  which  causes  the  sender   to
  387.      retransmit  the  same packet (or, alternatively, it will ACK the last
  388.      correctly received packet again).  A file sender only  receives  ACKs
  389.      and  NAKs  from  the  receiver;  a  corrupted ACK, or a NAK, from the
  390.      receiver causes the sender to retransmit its most recent packet.
  391. 1.2. How Kermit Works                                                    Page 8
  392.  
  393. -------------------------------------------------------------------------------
  394. -------------------------------------------------------------------------------
  395.  
  396.   Sender                 Receiver
  397.  
  398.   Send-Init ------------->         Sender and Receiver exchange greetings
  399.        <-------------------- ACK
  400.  
  401.   File-Header ----------->         Sender sends first file name to Receiver
  402.        <-------------------- ACK   Receiver acknowledges
  403.  
  404.   File-Data ------------->         Sender sends first file data packet
  405.        <-------------------- ACK
  406.  
  407.   File-Data ------------->         Sender sends second file data packet
  408.        <-------------------- ACK
  409.  
  410.   File-Data --xx~~~p'''-->         Third data packet is corrupted by noise
  411.        <-------------------- NAK    and Receiver negatively acknowledges it
  412.  
  413.   File-Data ------------->         Sender retransmits third packet
  414.        <-------------------- ACK
  415.  
  416.   File-Data packets are sent and acknowledged until the whole file is sent
  417.  
  418.   End-Of-File ----------->         Sender indicates first file is complete
  419.        <-------------------- ACK
  420.  
  421.   File-Header ----------->         Name second of file 
  422.        <-------------------- ACK
  423.  
  424.   File-Data ------------->         First data packet for second file
  425.        <-------------------- ACK
  426.  
  427.   File-Data packets are sent and ack'd until the whole file is sent
  428.  
  429.   End-Of-File ----------->         Sender indicates second file is complete
  430.        <-------------------- ACK
  431.  
  432.   End-Of-Transaction ---->         Sender indicates no more files to come
  433.        <-------------------  ACK
  434.  
  435.                       Figure 1-2:   Kermit File Transfer
  436.  
  437. -------------------------------------------------------------------------------
  438.  
  439.    - If the file sender does not receive  an  ACK  within  the  prescribed
  440.      timeout  interval,  it  retransmits  the  same  packet.   If the file
  441.      receiver does not receive an expected packet within the  timeout  in-
  442.      terval,  it  sends  a NAK for the expected packet (or another ACK for
  443.      the most recently correct packet).
  444.  
  445. Many encoding, compression, block check, timeout, and packet length options are
  446. provided.    These  options  are  automatically  negotiated  by  the two Kermit
  447. programs when they initially make contact, and the greatest common set of  fea-
  448. tures is used.  For this reason, any two Kermit programs should be able to com-
  449. municate successfully, from the oldest, most bare-bones version, to the newest,
  450. 1.2. How Kermit Works                                                    Page 9
  451.  
  452. -------------------------------------------------------------------------------
  453. most  feature-laden version.  The protocol is described in detail in the Kermit
  454. book.
  455. 2. How to Use Kermit                                                    Page 10
  456.  
  457. -------------------------------------------------------------------------------
  458. 2. How to Use Kermit
  459.  
  460. Kermit embodies a set of rules for transferring files reliably between two com-
  461. puters.    In  general,  one computer is a large system (a host, for instance a
  462. timesharing system with many terminals), and the other is a  personal  computer
  463. (PC).  The host believes that the PC is an ordinary terminal.  In order for the
  464. Kermit protocol to occur, a Kermit program must be running on each end  of  the
  465. communication line -- one on the host, one on the PC.
  466.  
  467. Your  task  is  just  to get the two Kermits started.  You have to use a single
  468. keyboard and screen to talk to two different computers, two different programs.
  469. Let's  talk  about  a common case: you are sitting at a personal computer (PC),
  470. which has a serial communication port.  The serial port is connected to a  host
  471. computer using, say, a dialup modem.
  472.  
  473. Normally, when you use your PC, you are "talking" directly to it; your commands
  474. are interpreted directly by the PC's  operating  system  (CP/M,  MS-DOS,  UNIX,
  475. etc),  or  by  some  program  that runs on the PC (an editor, a text formatter,
  476. space invaders...).  The version of Kermit on your PC is  a  program  like  any
  477. other, but it has a special ability to either interpret your commands directly,
  478. like other programs, or to pass everything  you  type  through  to  the  other,
  479. remote computer.  When you tell Kermit to CONNECT, it sends every character you
  480. type out the serial port, and it puts every character that comes in the  serial
  481. port onto the screen.  This is called "terminal emulation" -- one computer acts
  482. as if it were a terminal to the other.  You are now  "talking"  to  the  remote
  483. computer, and the PC is (mostly) ignoring you.
  484.  
  485. Kermit,  like  most interactive programs, has a prompt.  The prompt is a string
  486. of characters it types on the left margin to indicate that it is ready for  you
  487. to  type  a  command.   Kermit's prompt is normally "Kermit-xx>".  The xx iden-
  488. tifies the implementation of Kermit; the Kermit that runs on MS-DOS systems  is
  489. called  "Kermit-MS" and its prompt is "Kermit-MS>"; the Kermit that runs on Z80
  490. and  8080-based  microcomputers  is  called  "Kermit-80"  and  its  prompt   is
  491. "Kermit-80>",  and so forth.  If you become confused about which Kermit you are
  492. talking to, the prompt should provide a clue.  In addition, most Kermits  print
  493. an informative message like 
  494.  
  495.   [Connecting to remote host, type CTRL-]C to return]
  496.  
  497. when you CONNECT, and type another message like 
  498.  
  499.   [Connection closed, back at PC]
  500.  
  501. when you return.
  502.  
  503. Having  "connected"  to  the host, there must be a way for you to "get back" to
  504. the PC.  This is accomplished by an escape sequence.   As  Kermit  passes  your
  505. characters  through  to  the  host, it checks each one to see if it's a special
  506. predefined escape character.  When the PC sees this character, it stops  ignor-
  507. ing you -- you are once again "talking" to the PC, not to the host.  The escape
  508. character is normally chosen to be one that you will not  need  to  type  while
  509. talking to the host, and one that is hard to type by accident -- it's usually a
  510. control character, such as Control-], which is entered by holding down the  key
  511. marked  CTRL  or  CONTROL  and  typing the indicated character (in this case, a
  512. right bracket "]").  The CTRL key works just like a SHIFT key.  Control charac-
  513. ters  are  written either as Ctrl-A or ^A, where A is the character to be typed
  514. 2. How to Use Kermit                                                    Page 11
  515.  
  516. -------------------------------------------------------------------------------
  517. while holding down the Ctrl key.
  518.  
  519.  
  520. 2.1. Transferring a File
  521.  
  522. From system command level on your PC, first run the Kermit program.  Then  tell
  523. Kermit to CONNECT you to the host.  Now you're talking to the remote host -- at
  524. this point you must log in, and then run Kermit on the host.
  525.  
  526. Now you have a Kermit program on each end of the connection.  The next step  is
  527. to  tell  each Kermit what to do.  Suppose you want to transfer a file from the
  528. host to the PC; you would first tell the host Kermit to  SEND  the  file,  then
  529. "escape"  back  to the PC Kermit and tell it to RECEIVE the file.  The transfer
  530. begins -- you can sit back and watch, or go make yourself a sandwich.   The  PC
  531. Kermit  will produce a running display on your screen as the transfer proceeds,
  532. and will notify you when it is complete.
  533.  
  534. The desired file should now be on your PC's disk.  The Kermit protocol has  en-
  535. sured  that  the  file arrived correctly and completely.  Now you must clean up
  536. after yourself: CONNECT back to the host, exit from Kermit on the host, log out
  537. from  the  host,  "escape"  back to PC Kermit and exit from it.  Now you can do
  538. whatever you had planned for your file -- edit it, print it on your PC printer,
  539. etc.    Transferring a file in the other direction works the same way, but with
  540. the SEND and RECEIVE commands exchanged.
  541.  
  542. The Kermit protocol, and most Kermit programs, allow you  to  send  text  files
  543. reliably  from  the host to the PC, from the PC to the host, from host to host,
  544. or PC to PC, usually without any special regard for  the  nature  of  the  par-
  545. ticular machines involved.  Most implementations also allow files to be sent in
  546. groups, with a single command, such as "send *.*"  The  scenario  for  each  of
  547. these  is  the same as above -- only the details of how to establish the actual
  548. connection differ.
  549.  
  550. Kermit works best with "printable" files -- files  composed  only  of  letters,
  551. digits,  punctuation marks, carriage returns, tabs, and so forth -- since these
  552. can be represented on almost any kind of computer.   Kermit  is  also  able  to
  553. transfer "binary" files -- files such as executable programs -- composed of ar-
  554. bitrary bit patterns, but binary files normally are meaningful only to the kind
  555. of computer on which they are generated.  Nevertheless, Kermit can usually move
  556. such files from system A to system B (where they are not much use) and back  to
  557. system  A  in their original condition, although in most cases special measures
  558. must be taken to accomplish this.
  559.  
  560. Let's look at some more concrete examples.  First you need  to  know  what  the
  561. basic Kermit commands are.
  562.  
  563.  
  564. 2.2. Basic Kermit Commands
  565.  
  566. These  are  generic  descriptions  of the most basic Kermit commands.  Detailed
  567. descriptions will come later.  In these descriptions, local refers to the  sys-
  568. tem  that  you are using directly, remote refers to the system to which you are
  569. CONNECTed via Kermit.  Commands may take one or more operands on the same line,
  570. and are terminated by a carriage return.
  571.  
  572. SEND filespec
  573. 2.2. Basic Kermit Commands                                              Page 12
  574.  
  575. -------------------------------------------------------------------------------
  576.     Send the file or file group specified by filespec from this Kermit  to  the
  577.     other.    The  name of each file is passed to the other Kermit in a special
  578.     control packet, so it can be stored there with the same name.  A file group
  579.     is  usually  specified  by  including "wildcard" characters like "*" in the
  580.     file specification.  Examples:
  581.  
  582.       send foo.txt
  583.       send *.for
  584.  
  585.     Some implementations of Kermit may not support  transfer  of  file  groups;
  586.     these  versions  would  require a separate SEND command for each file to be
  587.     transferred.
  588.  
  589. RECEIVE
  590.     Receive  a  file  or file group from the other Kermit.  If an incoming file
  591.     name is not legal, then attempt to transform it to a  similar  legal  name.
  592.     Options are be provided for handling filename collisions.
  593.  
  594. CONNECT
  595.     Make a terminal connection to the remote system.  To "escape" from the ter-
  596.     minal  connection,  type  Kermit's  escape character (e.g. CTRL-], control-
  597.     rightbracket), followed by the letter "C" for "Close Connection".
  598.  
  599. SET Establish various nonstandard settings, such as CONNECT  escape  character,
  600.     file characteristics, communication line number, speed (baud rate), parity,
  601.     or flow control.  All of these are explained later.
  602.  
  603. SHOW
  604.     (or STATUS) Display the values of SET options.
  605.  
  606. HELP
  607.     Type a summary of Kermit commands and what they do.
  608.  
  609. EXIT
  610.     Exit from Kermit back to the host operating system.
  611.  
  612. ?   Typed almost anywhere within a Kermit command:  List the commands, options,
  613.     or operands that are possible at this point.  This command may or  may  not
  614.     require a carriage return, depending on the host operating system.
  615.  
  616.  
  617. 2.3. Real Examples
  618.  
  619. Kermit  can  be  used  in several ways: from a PC that is connected to a larger
  620. host computer; from a host computer which is connected to  another  host;  from
  621. one PC to another.
  622.  
  623.  
  624. 2.3.1. PC to Host
  625.  
  626. In this example, the user is sitting at an IBM Personal Computer (PC), which is
  627. connected through its serial port to a DEC VAX/VMS host computer.  The  IBM  PC
  628. is  local, the VAX is remote.  This example will also apply almost literally to
  629. any other microcomputer implementation of Kermit.
  630.  
  631. You have started up your PC and have the Kermit program on your disk.  Begin by
  632. 2.3.1. PC to Host                                                       Page 13
  633.  
  634. -------------------------------------------------------------------------------
  635. running Kermit on the PC.  Use Kermit's CONNECT command to become a terminal to
  636. the VAX.  In fact, the PC emulates the popular DEC VT-102 (VT-100), so so it is
  637. desirable  to  tell  the host that your terminal is of this type.  Login on the
  638. VAX and run Kermit there.  Here is an example of this procedure  with  commands
  639. you type underlined; the material lined up on the right is commentary, not sys-
  640. tem typeout or part of a command:
  641.  
  642.   A>Kermit                 Run Kermit on the PC.
  643.   Kermit-MS V2.30
  644.   IBM-PC Kermit-MS: V2.30  8 Jan 88
  645.   Type ? for help
  646.  
  647.   Kermit-MS>               This is the Kermit prompt for the PC.
  648.   Kermit-MS>connect        Connect to the VAX.
  649.   [Connecting to host, type Control-] to return to PC]
  650.  
  651.                            You are now connected to the VAX.
  652.  
  653.   Welcome to CUMIN, MicroVMS V4.6    i(The system prints its herald.)
  654.  
  655.   Username: my-id          Type your user ID.
  656.   Password: my-password    Type your password.
  657.  
  658.   (Various greeting or notice messages are displayed.)
  659.  
  660.   $                        This is the VMS system prompt.
  661.   $ Kermit                 Run Kermit on the VAX.
  662.  
  663.   VMS Kermit-32 version 3.3.111
  664.   Default terminal for transfers is: _TXA0:
  665.   Kermit-32>               This is VMS Kermit's prompt.
  666.  
  667. You are now ready to transfer files between the two machines.
  668.  
  669. The following example illustrates how to send files from the  VAX  to  the  PC.
  670. Note the use of the "*" wildcard character to denote a file group.
  671.  
  672.   Kermit-32>send *.for     Send all my FORTRAN files.
  673.   ^]c                      Now return back to the PC by
  674.                            typing the escape sequence, in this case
  675.                            ^]C (Control-] followed by "C")
  676.   [Back at PC.]
  677.   Kermit-MS>receive        Tell the PC that files are coming.
  678.  
  679. If  you  take  more than about 5 seconds to get back to Kermit-MS and issue the
  680. RECEIVE command, the first packets from Kermit-32 may  arrive  prematurely  and
  681. appear  on  your  screen,  but  no harm will be done because the packet will be
  682. retransmitted by the VAX until the PC acknowledges it.
  683.  
  684. Once the connection is established, the PC will show you what is  happening  --
  685. it  first  clears the screen and waits for incoming packets; as packets arrive,
  686. the current file name and packet number will be continuously displayed  on  the
  687. screen.   When the PC's "Kermit-MS>" prompt returns to your screen (with an ac-
  688. companying beep to catch your attention) the transfer  is  done.    Notice  the
  689. screen display; the status should be indicated as "complete".  If not, an error
  690. has occurred and an appropriate message should be displayed to tell you why.
  691. 2.3.1. PC to Host                                                       Page 14
  692.  
  693. -------------------------------------------------------------------------------
  694. After you're finished transferring files, you must  CONNECT  back  to  the  VAX
  695. host,  EXIT  from  Kermit there, logout, and "escape back" to the PC as you did
  696. previously:
  697.  
  698.   Kermit-MS>connect        Get back to the VAX.
  699.   [Connecting to host. Type CTRL-]C to return to PC.]
  700.   Kermit-32>               Here we are.
  701.   Kermit-32>exit           Get out of VMS Kermit.
  702.   $ logout                 Logout from the VAX.
  703.  
  704.   MY-ID   logged out at 25-JAN-1988 15:12:27.85
  705.  
  706.   ^]c                      Now "escape" back to the PC,
  707.   [Back at PC.]
  708.   Kermit-MS>exit           and exit from the PC's Kermit.
  709.   A>                       Now you see the DOS prompt again.
  710.  
  711. The files you transferred should now be on your PC disk.
  712.  
  713. To send files from the PC to the VAX, follow a similar procedure.  First follow
  714. the  instructions  in the previous section to log in to the VAX through the PC.
  715. Then in response to the host Kermit's "Kermit-32>" prompt  you  type    RECEIVE
  716. rather  than SEND.  Now escape back to the PC and use the  SEND command to send
  717. the local PC files to VAX.  The PC will show you the progress of the  transmis-
  718. sion on its screen.
  719.  
  720. When  the  "Kermit-MS>"  prompt indicates that the transmission is complete you
  721. should follow the procedure shown above to logout from  the  VAX  host,  except
  722. that you may first wish to confirm that the files have been stored correctly in
  723. your directory on the VAX.
  724.  
  725.  
  726. 2.3.2. Host to Host
  727.  
  728. A "host" is considered to be a large or multi-user system, whose distinguishing
  729. characteristic  is  that it has multiple terminals.  Use of Kermit for host-to-
  730. host file transfers differs from the PC-to-host case in that the line your ter-
  731. minal  is connected to is not the same as the line over which the data is being
  732. transferred, and that some special SET commands may have to be issued to  allow
  733. one Kermit to conform to unusual requirements of the other host.
  734.  
  735. In  this  example,  you  are already logged in to a Unix system, and you use an
  736. autodialer to connect to an IBM 370-series system running VM/CMS  through  Unix
  737. device /dev/tty12.
  738.  
  739.   % kermit
  740.   C-Kermit, 4E(070) 24 Jan 88, 4.2 BSD
  741.   Type ? for help
  742.   C-Kermit>set modem hayes
  743.   C-Kermit>set line /dev/tty12
  744.   C-Kermit>set speed 1200
  745.   C-Kermit>dial 7654321
  746.   Connected!
  747.  
  748. Other methods exist for connecting two hosts with a serial line.  For instance,
  749. dedicated hookups can be made by running an RS-232 "null modem"  cable  between
  750. 2.3.2. Host to Host                                                     Page 15
  751.  
  752. -------------------------------------------------------------------------------
  753. TTY  ports  on  the two systems (null modem cables, RS-232 signals, modems, and
  754. other data communication apparati are described in detail in the Kermit  book).
  755. The  following  procedure  would  be the same in any case, once a connection is
  756. made.  The four "set" commands below  are  necessary  when  connecting  to  IBM
  757. mainframes in "linemode" (as opposed to full-screen 3270 mode; if you don't use
  758. IBM mainframes, you can ignore them for now).
  759.  
  760.   C-Kermit>set duplex half The IBM mainframe is half duplex.
  761.   C-Kermit>set flow none   No full duplex XON/XOFF.
  762.   C-Kermit>set handshake xon                        Turn on line turnaround
  763.   C-Kermit>set parity mark The IBM mainframe uses mark parity.
  764.   C-Kermit>connect         Connect to the mainframe.
  765.   Connecting thru /dev/tty31, speed 1200.
  766.   The escape character is CTRL-\ (28).
  767.   Type the escape character followed by C to get back,
  768.   or followed by ? to see other options.
  769.                            (Type carriage return here.)
  770.   VM/370 ONLINE            The IBM system prints its herald.
  771.  
  772.   .login myuserid mypassword                        Login to IBM system.
  773.  
  774.   LOGON AT 15:33:02 EST MONDAY 02/08/88
  775.   CUVMA CMS 3.1 8409 01/25/85
  776.   .
  777.   .Kermit
  778.   Kermit-CMS Version 4.0 (87/12/17)
  779.   Enter ? for a list of valid commands
  780.  
  781.   Kermit-CMS>.send profile exec
  782.   ^\c                      C-Kermit's escape sequence typed here.
  783.   [Back at Local System]
  784.   C-Kermit>receive         Tell Unix Kermit to RECEIVE.
  785.  
  786. The transfer takes place now; Unix Kermit will  print  the  names  of  incoming
  787. files,  followed  by dots or percents to indicate the packet traffic (a dot for
  788. every 4 packets successfully  transferred,  a  percent  for  every  timeout  or
  789. retransmission).   The transfer is complete when when you see "[OK]", a beep is
  790. sounded, and the C-Kermit prompt next appears.  At that point we  connect  back
  791. to the remote IBM system, exit from the remote Kermit and log out.
  792.  
  793.   .
  794.   profile.exec ..%%.[OK]
  795.   C-Kermit>connect         Get back to mainframe and clean up.
  796.  
  797.   Kermit-CMS>.
  798.   Kermit-CMS>.exit
  799.   R;
  800.   .
  801.   SP/CMS
  802.   .logout
  803.  
  804.   CONNECT= 00:03:01 VIRTCPU= 000:00.12 TOTCPU= 000:00.60
  805.   LOGOFF AT 15:40:13 EST MONDAY 02/08/88
  806.  
  807.   ^\c                      Type C-Kermit's escape sequence
  808.   [Back at Local System]
  809. 2.3.2. Host to Host                                                     Page 16
  810.  
  811. -------------------------------------------------------------------------------
  812.   C-Kermit>exit            All done with Kermit.
  813.  
  814. That's  the  whole  procedure.   The file is in your Unix directory, completely
  815. readable, as profile.exec -- note  that  Kermit-CMS  translated  from  the  IBM
  816. EBCDIC  character encoding into standard ASCII, and converted the space between
  817. the file name and file type to a dot.
  818.  
  819. To send a file from the local host to the remote host,  we  would  merely  have
  820. reversed the SEND and RECEIVE commands in the example above.
  821.  
  822.  
  823. 2.3.3. Micro to Micro
  824.  
  825. Kermit  also  works  between personal computers (microcomputers, workstations).
  826. The difference here is that commands are typed on two keyboards, rather than  a
  827. single one.  This is because a personal computer normally only accepts commands
  828. from its own keyboard.  If one PC Kermit CONNECTs to another, there  will  nor-
  829. mally be no program on the other side to listen.
  830.  
  831. You  can make the physical connection between two micros in two ways: direct or
  832. dialup.  If the two units are in close proximity (say, 50 feet  or  less),  you
  833. can connect their serial ports with a null modem cable.
  834.  
  835. Connections  at longer distances can be made via dialup, providing the required
  836. modems are available (one side needs autoanswer capability), or using any  kind
  837. of  dedicated or switched circuit that may be available -- CBX, port contention
  838. unit, almost anything you can plug an EIA connector into.
  839.  
  840. In this example, a DEC VT180 "Robin" CP/M-80 microcomputer is  connected  to  a
  841. Intertec  "SuperBrain"  CP/M-80  micro, using a female-to-male null modem cable
  842. (these systems have nostalgia value, being among the  first  for  which  Kermit
  843. programs were written).  The connection can be tested by running Kermit and is-
  844. suing the CONNECT command on both ends: typein from each micro should appear on
  845. the screen of the other.
  846.  
  847. Suppose  you  want  to  send  a  file FOO.HEX from the Robin to the SuperBrain.
  848. Proceed as follows:
  849.  
  850.    1. Run Kermit on the SuperBrain, and give the RECEIVE command:
  851.  
  852.         A>Kermit
  853.         Intertec SuperBrain Kermit-80 - V4.09
  854.         Kermit-80>receive
  855.  
  856.    2. Run Kermit on the Robin, and give the SEND command for FOO.HEX.
  857.  
  858.         A>Kermit
  859.         DEC VT18X Kermit-80 - V4.09
  860.         Kermit-80>send foo.hex
  861.  
  862.       Watch the packets fly.  When you get the next Kermit-80> prompt, the
  863.       transfer is done, and you can EXIT from both Kermits.
  864.  
  865. The key point is to start the receiving end first -- some microcomputer Kermits
  866. do not include a timeout facility, and if the receiver is not ready to  receive
  867. when the sender first sends, there will be a protocol deadlock.
  868. 2.4. Another Way -- The Kermit Server                                   Page 17
  869.  
  870. -------------------------------------------------------------------------------
  871. 2.4. Another Way -- The Kermit Server
  872.  
  873. So  far, we have been describing the bare-bones version of the Kermit protocol.
  874. An optional extension to the protocol includes the concept of a Kermit  server.
  875. A  Kermit  server  is a Kermit program that does not interact directly with the
  876. user, but only with another Kermit program.  You do not type commands to a Ker-
  877. mit server, you merely start it at one end of the connection, and then type all
  878. further commands at the other end.
  879.  
  880. Not all implementations of Kermit can be servers, and not all know how to  talk
  881. to  servers -- but most of the major ones can and do.  The server is run on the
  882. remote computer, which would normally be a timesharing system, such as  an  IBM
  883. mainframe,  a  Unix system, or VAX/VMS, but may be a minicomputer or even a PC.
  884. It depends on whether the particular Kermit program  has  a  "server"  command.
  885. You  must  still connect to the remote host to log in and start the server, but
  886. you no longer have to tell one side to SEND and the other to RECEIVE, nor  must
  887. you  connect  back to the remote side to clean up and log out when you're done.
  888. Using the server, you can do as many send and receive operations  as  you  like
  889. without  ever  having  to  connect  back to the remote host.  Some servers also
  890. provide additional services, such as directory listings, file deletion, or disk
  891. usage inquiries.
  892.  
  893. A  Kermit  server  is  just a Kermit program running in a special way.  It acts
  894. much like ordinary Kermit does after you give it a RECEIVE command -- it  waits
  895. for  a message from the other Kermit, but in this case the message is a command
  896. saying what to do, normally to send or to receive a file  or  group  of  files.
  897. After escaping back to the local system, you can give as many SEND and GET com-
  898. mands as you like, and when you're finished transferring files,  you  can  give
  899. the  BYE  command, which sends a message to the remote Kermit server to log it-
  900. self out.  You don't have to connect back to the  remote  host  and  clean  up.
  901. However,  if  you want to connect back to the host, you can use the FINISH com-
  902. mand instead of BYE, to shut down the Kermit server on the remote host  without
  903. logging it off, allowing you to CONNECT back to your job there.
  904.  
  905. Here's an example of the use of a Kermit server.  The user is sitting at an IBM
  906. PC and a DECSYSTEM-20 is the remote host.
  907.  
  908.   A>Kermit                 Run Kermit on the micro.
  909.   Kermit-MS V2.30
  910.   IBM-PC Kermit-MS: V2.30  8 Jan 88
  911.   Type ? for help
  912.  
  913.   Kermit-MS>               This is the Kermit prompt for the PC.
  914.   Kermit-MS>connect        Connect to the VAX.
  915.  
  916.   CU20B                    The DEC-20 prints its herald.
  917.   @login my-id password    Log in normally.
  918.  
  919. (The DEC-20 prints various login messages here.)
  920.  
  921.   @Kermit                  Run Kermit-20 normally
  922.   Kermit-20>server         Tell it to be a server.
  923.  
  924.   Kermit Server running on DEC-20 host.  Please type your escape
  925.   sequence to return to your local machine.  Shut down the server by
  926.   typing the Kermit BYE command on your local machine.
  927. 2.4. Another Way -- The Kermit Server                                   Page 18
  928.  
  929. -------------------------------------------------------------------------------
  930.   ^]c                      Now escape back to the PC.
  931.  
  932.   Kermit-MS>get *.pas      Get all my DEC-20 Pascal programs.
  933.   Kermit-MS>send foo.*     Send all the "foo" files from my PC.
  934.   Kermit-MS>exit           Exit from Kermit back to DOS.
  935.   A>
  936.  
  937. (Here you can do some work on the micro, edit files, whatever you like.)
  938.  
  939.   A>Kermit                 Run Kermit-80 some more.
  940.   Kermit-MS>send file.pas  Send another file.
  941.   Kermit-MS>bye            That's all.  Shut down the Kermit server.
  942.   A>                       Back at DOS automatically.
  943.  
  944. This is much simpler.  Note that once you've started the Kermit Server  on  the
  945. remote end, you can run Kermit as often as you like on the micro without having
  946. to go back and forth any more; just make sure to  shut  the  server  down  when
  947. you're done by typing the BYE command.
  948.  
  949. If  it's  so  much  simpler,  why  not  do  it this way all the time?  You can,
  950. provided your remote Kermit has a "server" command.  But server operation, plus
  951. the  special  commands  the  local  Kermit needs to communicate with the server
  952. (GET, REMOTE, BYE,  FINISH)  are  optional  Kermit  features,  so  some  Kermit
  953. programs might not have them.  All Kermit programs, however, should provide the
  954. basic SEND/RECEIVE mode of operation.
  955.  
  956. Here are the basic commands available for talking to servers:
  957.  
  958. SEND filespec   Sends a file or file group from the local host  to  the  remote
  959.                 host in the normal way.
  960.  
  961. GET filespec    Ask the remote host to send a file or file group.  Example:  
  962.  
  963.                   get *.c
  964.  
  965.                 This  command is exactly equivalent to typing "send *.c" at the
  966.                 remote host followed by "receive" on the local host.  Note that
  967.                 the local Kermit does not attempt to validate the filespec.  If
  968.                 the server cannot access the specified file(s),  it  will  send
  969.                 back  an  appropriate  error message.  Please note that GET and
  970.                 RECEIVE are not the same!  RECEIVE tells  Kermit  to  passively
  971.                 wait  for  a  file.    GET actively sends a request to a Kermit
  972.                 server to send the named file.
  973.  
  974. REMOTE command [argument]
  975.                 Ask  the  server to perform the specified command, and send the
  976.                 results to your screen.  Not all servers are  capable  of  per-
  977.                 forming  REMOTE  commands; those that can most commonly provide
  978.                 REMOTE DIRECTORY, REMOTE DELETE, REMOTE SPACE, and similar file
  979.                 management services.
  980.  
  981. BYE             Shut  down  the  remote server and exit from Kermit.  This will
  982.                 cause the job at the remote end to log itself out.    You  need
  983.                 not  connect  back and clean up unless you get an error message
  984.                 in response to this command.
  985. 2.4. Another Way -- The Kermit Server                                   Page 19
  986.  
  987. -------------------------------------------------------------------------------
  988. FINISH          Shut down the server without having  it  log  itself  out,  and
  989.                 don't  exit from Kermit.  A subsequent CONNECT command will put
  990.                 you back at your job on the  remote  host,  at  system  command
  991.                 level.
  992.  
  993. Server  operation is not limited to mainframes.  Some PC Kermit implementations
  994. can also act as servers, notably MS-DOS and Unix.  For instance, an IBM  PC  at
  995. the  office  with  an autoanswer modem can be left in server mode at the end of
  996. the day, and then dialed up from home in the evening for file transfer.
  997. 3. When Things Go Wrong                                                 Page 20
  998.  
  999. -------------------------------------------------------------------------------
  1000. 3. When Things Go Wrong
  1001.  
  1002. Connecting two computers can be a tricky  business,  and  many  things  can  go
  1003. wrong.  Before you can transfer files at all, you must first establish terminal
  1004. communication.  But successful terminal connection does  not  necessarily  mean
  1005. that  file  transfer  will  also work.  And even when file transfer seems to be
  1006. working, things can happen to ruin it.  The  following  sections  treat  a  few
  1007. basic problems.  See the troubleshooting section of the Kermit book for greater
  1008. detail.
  1009.  
  1010.  
  1011. 3.1. Basic Connection Problems
  1012.  
  1013. If you have a version of Kermit on your microcomputer, but the CONNECT  command
  1014. doesn't seem to work at all, please:
  1015.  
  1016.    - Make  sure  all  the required physical connections have been made and
  1017.      have not wiggled loose.  If you are using a modem, make sure the car-
  1018.      rier light is on.
  1019.  
  1020.    - If  you have more than one connector on your micro, make sure you are
  1021.      using the right one.
  1022.  
  1023.    - Make sure that the port is set to the right communication  speed,  or
  1024.      baud  rate.   Some versions of Kermit have a built-in SET BAUD or SET
  1025.      SPEED command, others require that you set the baud rate using a sys-
  1026.      tem  command or setup mode before you start the Kermit program.  Some
  1027.      versions of Kermit have SHOW or STATUS commands that  will  tell  you
  1028.      what the current baud rate is.
  1029.  
  1030.    - Make  sure that the other communication line parameters, like parity,
  1031.      bits per character, handshake, and flow control are set correctly.
  1032.  
  1033. You may have to consult the appropriate manuals for the systems  and  equipment
  1034. in question.
  1035.  
  1036. If  all  settings and connections appear to be correct, and communication still
  1037. does not take place, the fault may be in your modem.    Internal  modems  (i.e.
  1038. those  that  plug in to a slot inside the microcomputer chassis) are not recom-
  1039. mended for use with Kermit unless they totally mimic  the  asynchronous  serial
  1040. port  hardware  they purport to replace, or unless the Kermit program claims to
  1041. support the particular internal modem.  Many microcomputer Kermit programs  are
  1042. written  to  control the communication hardware explicitly; internal modems can
  1043. interfere with that control.
  1044.  
  1045. Even external modems can cause trouble -- the  "smarter"  they  are,  the  more
  1046. potential  danger of disagreement between the modem and the microcomputer about
  1047. settings of baud rate, character framing, echo, and so forth.  Make  sure  your
  1048. modem is set up correctly (consult your modem manual).
  1049. 3.2. Terminal Connection Works But The Transfer Won't Start             Page 21
  1050.  
  1051. -------------------------------------------------------------------------------
  1052. 3.2. Terminal Connection Works But The Transfer Won't Start
  1053.  
  1054. Once you've made a terminal connection to the remote system, you will generally
  1055. also be able to transfer files.  But not always.  If Kermit's  terminal  emula-
  1056. tion  seems  to work correctly, but a file transfer will not start at all, then
  1057. something in the communication path is probably  interfering  with  the  packet
  1058. data:
  1059.  
  1060. PARITY:
  1061.     A device can impose parity upon the communication line.   This  means  that
  1062.     the 8th bit of each character is used by the equipment to check for correct
  1063.     transmission.  Use of parity will:
  1064.  
  1065.        - Cause packet checksums to appear incorrect to  the  receiver  and
  1066.          foil  any  attempt at file transfer.  In most cases, not even the
  1067.          first packet will get through.
  1068.  
  1069.        - Prevent the use of the 8th bit for binary file data.
  1070.  
  1071.     If terminal connection works but file transfer does not, parity is the most
  1072.     likely  culprit.    To  overcome  this impediment, you should find out what
  1073.     parity is being used, and inform the Kermits one side or  both  (using  the
  1074.     SET PARITY command) so that they can:
  1075.  
  1076.        - Compose and interpret the checksums correctly.
  1077.  
  1078.        - Employ a special encoding to allow 8-bit data to pass through the
  1079.          7-bit communication channel.
  1080.  
  1081.     Many packet-switched networks, such as GTE TELENET, require  parity  to  be
  1082.     set, as do IBM mainframes and their front end processors.
  1083.  
  1084. ECHOING:
  1085.     Some communication processors, typically  front  ends,  echo  their  input.
  1086.     When this happens, every Kermit packet that is sent to it will bounce right
  1087.     back, causing no end of confusion.  Some Kermit programs have been designed
  1088.     to  ignore  echoed  packets,  but  others  have not.  If you encounter this
  1089.     problem, there are several possible solutions:
  1090.  
  1091.        - Disable the front end echoing by typing some special command,  if
  1092.          such a command is provided by the system.
  1093.  
  1094.        - Some front ends respond to certain escape or control sequences as
  1095.          commands to turn off echoing, either from that point  onward,  or
  1096.          else  on a per-line basis.  In this case, the appropriate control
  1097.          sequence can be inserted between packets by Kermit  programs  in-
  1098.          structed to do so, for instance using the SET PAD command.
  1099.  
  1100.        - If  the  echoing cannot be disabled, then the two Kermit programs
  1101.          should be instructed to use differing packet start markers, using
  1102.          the  SET START-OF-PACKET command -- for instance, one Kermit uses
  1103.          Control-A as usual, and the other uses Control-B.  This can  only
  1104.          be done if both Kermits have this SET command.
  1105. 3.3. Special Characters                                                 Page 22
  1106.  
  1107. -------------------------------------------------------------------------------
  1108. 3.3. Special Characters
  1109.  
  1110. There  is one problem that can prevent a file transfer from starting at all, or
  1111. may crop up after the file transfer is underway.  For instance, during  a  file
  1112. transfer  operation  you  might  find your smart modem suddenly hanging up your
  1113. current connection and placing a call to Tasmania.   Or  you  might  find  that
  1114. packets  containing a certain character like "@" cannot be transmitted success-
  1115. fully.
  1116.  
  1117. This is the problem of "special characters".  Some device in the  communication
  1118. path  -- a front end, a port switcher, a multiplexer, a "smart" modem -- inter-
  1119. prets certain characters in the data stream as commands rather than as data  to
  1120. be passed them along to the other side.  Usually such equipment interferes only
  1121. with the transmission of ASCII control characters; so  long  as  Control-A  and
  1122. Carriage  Return  -- Kermit's normal packet start and end delimiters -- are not
  1123. molested, then Kermit can operate.  However, equipment may exist which swallows
  1124. even  printable  characters.    Since  Kermit  assumes that ALL printable ASCII
  1125. characters (ASCII 40 through 176, octal)  can  be  transmitted  without  inter-
  1126. ference  or  modification, such equipment will prevent Kermit file transfer un-
  1127. less its printable-character-swallowing features can be disabled.
  1128.  
  1129.  
  1130. 3.4. The Transfer Starts But Then Gets Stuck
  1131.  
  1132. Once a Kermit file transfer has begun, there are certain conditions under which
  1133. it can become stuck.  Since many hosts are capable of generating timeout inter-
  1134. rupts when input doesn't appear within a reasonable interval, they  can  resend
  1135. unacknowledged  packets  or request that missing packets be retransmitted.  But
  1136. since not all Kermit programs are capable of timing out, a means for manual in-
  1137. tervention is provided in the local Kermit -- you can type a carriage return on
  1138. the keyboard of most micros to wake up and continue the transfer.
  1139.  
  1140. The following sections discuss various reasons why a transfer in progress could
  1141. become  stuck.   Before examining these, first make sure that you really have a
  1142. Kermit on the other end of the line, and you have issued the  appropriate  com-
  1143. mand:  SEND,  RECEIVE, or SERVER.  If the remote side is not a server, remember
  1144. that you must connect back between each  transfer  and  issue  a  new  SEND  or
  1145. RECEIVE command.
  1146.  
  1147.  
  1148. 3.4.1. The Connection is Broken
  1149.  
  1150. Check  the  connection.   Make sure no connectors have wiggled loose from their
  1151. sockets.  If you're using a modem, make sure you still have a  carrier  signal.
  1152. Reestablish your connection if you have to.
  1153.  
  1154. If  upon  reconnection you get no response, maybe the remote host or the remote
  1155. Kermit program  crashed.  Get back to command level on  the  local  Kermit  (on
  1156. microcomputer  implementations, you may be able to do this by typing about five
  1157. RETURNs, or one or more Control-C's).  Issue the CONNECT command  so  that  you
  1158. can  see what happened.  If the remote system has crashed then you will have to
  1159. wait for it to come back, and restart whatever file that was being  transferred
  1160. at the time.
  1161. 3.4.2. The Disk is Full                                                 Page 23
  1162.  
  1163. -------------------------------------------------------------------------------
  1164. 3.4.2. The Disk is Full
  1165.  
  1166. If  your  local  floppy  disk  or  remote directory fills up, the Kermit on the
  1167. machine where this occurs will inform you and then terminate the transfer.  You
  1168. can  continue the transfer by repeating the whole procedure either with a fresh
  1169. floppy or after cleaning up your directory.  Some Kermits also have  a  feature
  1170. that  allows  you  to keep incompletely received files; this would allow you go
  1171. back to the sending system, extract the unsent portion of the  file,  and  send
  1172. it, and then append the two received portions together using an editor or other
  1173. system utility.  Kermit does not provide the ability to switch disks  during  a
  1174. file transfer.
  1175.  
  1176.  
  1177. 3.4.3. Transmission Delays
  1178.  
  1179. Packet  transmission  can  be  delayed by various agents: congested timesharing
  1180. systems or networks, earth satellites, etc.  When  transmission  delay  exceeds
  1181. the  per-packet timeout interval for a significant length of time, the transfer
  1182. could fail.  Most Kermit programs provide commands that allow you to adjust the
  1183. timeout interval or the packet transmission retry threshhold in order to accom-
  1184. modate to severe transmission delays.
  1185.  
  1186.  
  1187. 3.4.4. Noise Corruption
  1188.  
  1189. If your connection is extremely noisy, packets will become corrupted -- and re-
  1190. quire   retransmission   --  more  often.    The  probability  that  successive
  1191. retransmissions will fail because of corruption rises with the noise level  un-
  1192. til  it  exceeds  the retry threshhold, at which point the file transfer fails.
  1193. There are several recourses.  First, try to establish a  new  connection.    If
  1194. that  is  impractical,  then  use  SET  commands (when available) to reduce the
  1195. packet length and increase the retry threshhold.  Shorter  packets  reduce  the
  1196. probability  that  a particular packet will be corrupted and the retransmission
  1197. overhead when corruption  does  occur,  but  they  also  increase  the  overall
  1198. protocol  overhead.    In a noisy environment, you should also request a higher
  1199. level of error checking (SET BLOCK 2 or 3).
  1200.  
  1201.  
  1202. 3.4.5. Host Errors
  1203.  
  1204. Various error conditions can occur on the remote host that  could  effect  file
  1205. transmission.    Whenever any such error occurs, the remote Kermit normally at-
  1206. tempts to send an informative error message to the local one, and  then  breaks
  1207. transmission, putting you back at Kermit command level on the local system.
  1208.  
  1209.  
  1210. 3.5. File is Garbage
  1211.  
  1212. There  are  certain  conditions under which Kermit can believe it transferred a
  1213. file correctly when in fact, it did not.  The most likely cause has to do  with
  1214. the tricky business of file attributes, such as text vs binary, 7-bit vs 8-bit,
  1215. blocked vs stream, and so forth.  Each system has its  own  peculiarities,  and
  1216. each  Kermit  has special commands to allow you to specify how a file should be
  1217. sent or stored.  However, these difficulties usually crop up only when  sending
  1218. binary files.  Textual files should normally present no problem between any two
  1219. Kermit programs.
  1220. 4. Kermit Commands                                                      Page 24
  1221.  
  1222. -------------------------------------------------------------------------------
  1223. 4. Kermit Commands
  1224.  
  1225. An "ideal" Kermit program will be described here, which has most  of  the  fea-
  1226. tures  specified  in  the Kermit book.  Few Kermit programs will have all these
  1227. commands or support all these options.  The exact form of some of the  commands
  1228. may  differ  from version to version.  Some Kermit programs may support system-
  1229. dependent options not described here.  The intention of this description is  to
  1230. provide a base from which specific Kermit programs can be described in terms of
  1231. their differences from the "ideal."
  1232.  
  1233.  
  1234. 4.1. Remote and Local Operation
  1235.  
  1236. In any connection between two Kermit programs, one Kermit  is  remote  and  the
  1237. other is local.  The remote Kermit is usually running on a mainframe, which you
  1238. have CONNECTed to through a PC or other computer.  When Kermit  runs  remotely,
  1239. all  file transfer is done over the job's controlling terminal line -- the same
  1240. line over which you logged in, and to which you  would  type  interactive  com-
  1241. mands.    What  the  system thinks is your terminal is really another computer,
  1242. usually a microcomputer, running its own copy of Kermit.
  1243.  
  1244. When Kermit is in "local mode", file transfer is done over an external  device,
  1245. such  as  a  microcomputer's serial communication port, or an assigned terminal
  1246. line on a mainframe.  The local Kermit is connected in some way (like a dialout
  1247. mechanism)  to another computer, again running its own copy of Kermit.  A local
  1248. Kermit is in control of the screen, a remote Kermit has no direct access to it.
  1249. Microcomputer  Kermits  are  run  in  local  mode  unless instructed otherwise;
  1250. mainframe Kermits run remotely unless some special command places them in local
  1251. mode.  Some commands make sense only for remote Kermits, others only for local,
  1252. still others can be used with either.  Local and remote operation of Kermit  is
  1253. shown  schematically here:  The Kermit program on the PC is a local Kermit.  It
  1254. can control the screen, the keyboard, and the port separately, thus it can  up-
  1255. date  the  screen with status information, watch for interrupt signals from the
  1256. keyboard, and transfer packets on the communications  port,  all  at  the  same
  1257. time.
  1258.  
  1259. The  Kermit program running on the mainframe is a remote Kermit.  The user logs
  1260. in to the mainframe through a terminal port.  The  host  computer  cannot  tell
  1261. that  the  user  is  really  coming  in through a microcomputer.  The keyboard,
  1262. screen, and port functions are all combined in user's mainframe terminal  line.
  1263. Therefore  a remote Kermit is cut off from your screen and keyboard during file
  1264. transfer.
  1265.  
  1266.  
  1267. 4.2. The Command Dialog
  1268.  
  1269. Most Kermit programs communicate with  you  through  interactive  keyword-style
  1270. command  dialog (a prominent exception is Macintosh Kermit, which uses pulldown
  1271. menus that overlay the terminal  emulation  screen).    The  program  issues  a
  1272. prompt, indicating that it is waiting for you to type a command.  The prompt is
  1273. usually of the form 
  1274.  
  1275.   Kermit-xx>
  1276.  
  1277. where xx indicates the version of  Kermit  --  Kermit-MS>  for  MS-DOS  Kermit,
  1278. Kermit-86> for CP/M-86 Kermit, etc.
  1279. 4.2. The Command Dialog                                                 Page 25
  1280.  
  1281. -------------------------------------------------------------------------------
  1282. -------------------------------------------------------------------------------
  1283.  
  1284. PC is Local, Mainframe is Remote:
  1285.  
  1286.              Communication
  1287.              Line                    (Packets)
  1288.              +---------------/  /-----------------+  Other terminals
  1289.              |                                    |  |  |  |
  1290.              |                                    |  |  |  |
  1291.    PC        |     LOCAL              Mainframe   |  |  |  |  REMOTE
  1292.   +----------+----------+            +------------+--+--+--+--------+
  1293.   |   Serial Port       |            |            |                 |
  1294.   |                     |            |            |                 |
  1295.   |                     |            |            |                 |
  1296.   |  +---------------+  |            |            Your job's        |
  1297.   |  | Packets: 724  |  |            |            terminal line     |
  1298.   |  | Retries:   7  |  |            |                              |
  1299.   |  | File: FOO.BAR |  |            |                              |
  1300.   |  +---------------+  |            |                              |
  1301.   |   Screen            |            |                              |
  1302.   |                     |            |                              |
  1303.   +---------------+-----+            +------------------------------+
  1304.                   |
  1305.                   | (Commands)
  1306.                   |
  1307.      +------------+---------+
  1308.       \       Keyboard       \
  1309.        +----------------------+
  1310.                   You
  1311.  
  1312.                     Figure 4-1:   Local and Remote Kermits
  1313.  
  1314. -------------------------------------------------------------------------------
  1315.  
  1316. In  response  to  the  program's  prompt  you may type a keyword, such as SEND,
  1317. RECEIVE, or EXIT, possibly followed by additional keywords or operands, each of
  1318. which  is  called a field.  You can abbreviate keywords (but not file names) to
  1319. any length that makes them distinguishable from any  other  keyword  valid  for
  1320. that  field.  You can type a question mark at any time to get information about
  1321. what's expected or valid at that point.  The ESC and "?"  features work best on
  1322. full  duplex  systems,  where the program can "wake up" immediately and perform
  1323. the required function.  On half duplex or record-oriented systems, the ESC fea-
  1324. ture is not available, and the "?" requires a carriage return to follow.
  1325.  
  1326. In this example, the user types "set" and then a question mark to find out what
  1327. the SET options are.  The user then continues the command at  the  point  where
  1328. the question mark was typed, adding a "d" and another question mark to see what
  1329. set options start with "d".  The user then adds a "u" to select  "duplex"  (the
  1330. only SET option that starts with "du") followed by an ESC (shown here by a dol-
  1331. lar sign) to complete the current field, then another question mark to see what
  1332. the possibilities are for the next field, and so forth.  The command is finally
  1333. terminated by a carriage return.  Before carriage return is typed, however, the
  1334. command  can  be  edited  or erased using RUBOUT or other command editing keys.
  1335. Finally, the same command is entered again with a minimum of  keystrokes,  with
  1336. each  field  abbreviated  to  its  shortest unique length.  In the example, the
  1337. parts the user types are underlined; all the rest is system typeout:
  1338. 4.2. The Command Dialog                                                 Page 26
  1339.  
  1340. -------------------------------------------------------------------------------
  1341.   Kermit-20>set ? one of the following:
  1342.    debugging        delay             duplex            escape
  1343.    file             handshake         IBM               line
  1344.    parity           receive           send
  1345.   Kermit-20>set d? one of the following:
  1346.    debugging   delay        duplex
  1347.   Kermit-20>set du$plex (to) ? one of the following:
  1348.    full   half
  1349.   Kermit-20>set duplex (to) h$alf
  1350.   Kermit-20>set du h
  1351.  
  1352.  
  1353. 4.3. Notation
  1354.  
  1355. In the command descriptions, the following notation is used:
  1356.  
  1357. italics     A parameter - the symbol in italics is replaced by an  argument  of
  1358.             the specified type (number, filename, etc).
  1359.  
  1360. [anything]  A  field  enclosed in square brackets is optional.  If omitted, the
  1361.             field defaults to an appropriate value.  You don't type the  brack-
  1362.             ets.
  1363.  
  1364. {x,y,z}     A list of alternatives is enclosed in curly braces; you type one of
  1365.             the alternatives.
  1366.  
  1367. number      A whole number, entered in prevailing notation of the system.
  1368.  
  1369. character   A single character, entered literally, or as a number (perhaps  oc-
  1370.             tal or hexadecimal) representing the ASCII value of the character.
  1371.  
  1372. floating-point-number
  1373.             A "real" number, possibly containing a decimal point  and  a  frac-
  1374.             tional part.
  1375.  
  1376. filespec    A file specification, i.e. the name of a file, possibly including a
  1377.             search path, device or directory name, or other  qualifying  infor-
  1378.             mation,  and  possibly  containing  "wildcard"  or pattern-matching
  1379.             characters to denote a group of files.
  1380.  
  1381. ^X          A control character may be written using "uparrow" or "caret" nota-
  1382.             tion, since many systems display control characters this way.  Con-
  1383.             trol characters are produced by holding down the key marked CTRL or
  1384.             Control  and  typing  the  appropriate  character,  e.g. X. Control
  1385.             characters may also be written Ctrl-X, CTRL-X, CTRL/X, etc.
  1386.  
  1387. Commands are shown in upper case, but can be entered in any combination of  up-
  1388. per and lower case.
  1389. 4.3. Notation                                                           Page 27
  1390.  
  1391. -------------------------------------------------------------------------------
  1392. 4.4. Summary of Kermit Commands
  1393.  
  1394. Here  is a brief list of Kermit commands as they are to be found in most Kermit
  1395. programs.  The following sections will describe these commands in detail.
  1396.  
  1397. For exchanging files:
  1398.     SEND, RECEIVE, GET
  1399.  
  1400. For connecting to a remote host:
  1401.     CONNECT, SET LINE, SET PARITY,  SET  DUPLEX,  SET  HANDSHAKE,  SET  ESCAPE,
  1402.     SET FLOW-CONTROL, SET SPEED (or BAUD)
  1403.  
  1404. For acting as a server:
  1405.     SERVER
  1406.  
  1407. For talking to a server:
  1408.     BYE, FINISH, GET, SEND, REMOTE
  1409.  
  1410. Setting nonstandard transmission and file parameters:
  1411.     SET BLOCK-CHECK, SET DEBUG,  SET  DELAY,  SET  FILE,  SET  INCOMPLETE,  SET
  1412.     PARITY, SET RETRY;
  1413.     SET  SEND  (or RECEIVE) END-OF-LINE, START-OF-PACKET, PACKET-LENGTH, PAUSE,
  1414.     TIMEOUT, PADDING
  1415.  
  1416. For defining and executing "macros" of commands:
  1417.     DEFINE, DO
  1418.  
  1419. For interrupting transmission:
  1420.     Control-X, Control-Z, Control-C, Control-E
  1421.  
  1422. Getting information:
  1423.     HELP, STATISTICS, SHOW
  1424.  
  1425. Executing command files:
  1426.     TAKE
  1427.  
  1428. For recording the history of a file transfer operation:
  1429.     LOG TRANSACTIONS
  1430.  
  1431. For non-protocol file capture or transmission:
  1432.     LOG SESSION, TRANSMIT, INPUT, OUTPUT, PAUSE, CLEAR, SCRIPT
  1433.  
  1434. For closing log files:
  1435.     CLOSE
  1436.  
  1437. Leaving the program:
  1438.     EXIT, QUIT
  1439.  
  1440. If you have a file called KERMIT.INI in your default or home disk, Kermit  will
  1441. execute  an  automatic TAKE command on it upon initial startup.  KERMIT.INI may
  1442. contain any Kermit commands, for instance SET commands, or DEFINEs  for  macros
  1443. to  configure  Kermit  to various systems or communications media.  Note:  Your
  1444. particular implementation of Kermit may use a different  name  for  this  file,
  1445. like MSKERMIT.INI for MS-DOS Kermit, or VMSKERMIT.INI for VAX/VMS Kermit.
  1446. 4.4. Summary of Kermit Commands                                         Page 28
  1447.  
  1448. -------------------------------------------------------------------------------
  1449. 4.5. The SEND Command
  1450.  
  1451. Syntax:
  1452.  
  1453. Sending a single file:  
  1454.  
  1455.     SEND filespec1 [filespec2]
  1456.  
  1457. Sending multiple files:  
  1458.  
  1459.     SEND wild-filespec1
  1460.  
  1461. The  SEND  command  causes a file or file group to be sent to the other system.
  1462. There are two forms of the command, depending  on  whether  filespec1  contains
  1463. "wildcard" characters.  Use of wildcard characters is the most common method of
  1464. indicating a group of files in a single file specification.   For  instance  if
  1465. FOO.FOR  is  a  single file, a FORTRAN program named FOO, then *.FOR might be a
  1466. group of FORTRAN programs.
  1467.  
  1468.  
  1469.     Sending a File Group --
  1470.  
  1471. If filespec1 contains wildcard characters then all matching files will be sent,
  1472. in directory-listing order by name.  If a file can't be opened for read access,
  1473. it will be skipped.
  1474.  
  1475.  
  1476.     Sending a Single File --
  1477.  
  1478. If filespec1 does not contain any wildcard characters,  then  the  single  file
  1479. specified  by  filespec1  will  be  sent.  Optionally, filespec2 may be used to
  1480. specify the name under which  the  file  will  arrive  at  the  target  system;
  1481. filespec2  is  not parsed or validated locally in any way.  If filespec2 is not
  1482. specified, the file will be sent with its own name.
  1483.  
  1484.  
  1485.     SEND Command General Operation --
  1486.  
  1487. Files will be sent with their filename and filetype (for instance  FOO.BAR,  no
  1488. device  or directory field, no generation number or attributes).  If communica-
  1489. tion line parity is being used (see SET PARITY), the sending  Kermit  will  re-
  1490. quest that the other Kermit accept a special kind of prefix notation for binary
  1491. files.  This is an advanced feature, and not all Kermits have it; if the  other
  1492. Kermit  does  not  agree  to use this feature, binary files cannot be sent cor-
  1493. rectly.
  1494.  
  1495. The sending Kermit will also ask the other Kermit whether it can handle a  spe-
  1496. cial  prefix encoding for repeated characters.  If it can, then files with long
  1497. strings of repeated characters will be transmitted very efficiently.   Columnar
  1498. data,  highly  indented  text,  and binary files are the major beneficiaries of
  1499. this technique.
  1500. 4.5. The SEND Command                                                   Page 29
  1501.  
  1502. -------------------------------------------------------------------------------
  1503.     SEND Remote Operation --
  1504.  
  1505. If you are running Kermit remotely (for instance, from  a  microcomputer),  you
  1506. should  "escape  back"  to your local Kermit within a reasonable amount of time
  1507. and give the RECEIVE command.  Don't take more than a minute or two to complete
  1508. the  switch, or Kermit may "time out" and give up (in that case, you'll have to
  1509. CONNECT back to the remote system and reissue the SEND command).
  1510.  
  1511.  
  1512.     SEND Local Operation --
  1513.  
  1514. If you're running Kermit locally, for instance on a microcomputer,  you  should
  1515. have  already  run Kermit on the remote system and issued either a RECEIVE or a
  1516. SERVER command.
  1517.  
  1518. Once you give Kermit the SEND command, the name of each file will be printed on
  1519. your  screen  as  the transfer begins, and information will be displayed to in-
  1520. dicate the packet traffic.  When  the  specified  operation  is  complete,  the
  1521. program will sound a beep, and the status of the operation will be indicated by
  1522. a message like OK, Complete, Interrupted, or Failed.
  1523.  
  1524. If you see many packet retry indications, you are  probably  suffering  from  a
  1525. noisy  connection.  You may be able to cut down on the retransmissions by using
  1526. SET SEND PACKET-LENGTH to decrease the packet  length;  this  will  reduce  the
  1527. probability that a given packet will be corrupted by noise, and reduce the time
  1528. required to retransmit a corrupted packet.
  1529.  
  1530. If you notice a file being sent which you do not really want to send,  you  may
  1531. cancel  the  operation immediately by typing either Control-X or Control-Z.  If
  1532. your are sending a file group, Control-X will cause  the  current  file  to  be
  1533. skipped,  and Kermit will go on to the next file, whereas Control-Z will cancel
  1534. sending the entire group and return you to Kermit-20 command level.
  1535.  
  1536.  
  1537. 4.6. The RECEIVE Command
  1538.  
  1539. Syntax:  RECEIVE [filespec]
  1540.  
  1541. The RECEIVE command tells Kermit to wait for the arrival a file or  file  group
  1542. sent  by  a  SEND  command  from  the  other system.  If only one file is being
  1543. received, you may include the optional filespec as the name to store the incom-
  1544. ing file under; otherwise, the name is taken from the incoming file header.  If
  1545. the name in the header is not a legal file name on  the  local  system,  Kermit
  1546. will attempt to transform it to a legal name.
  1547.  
  1548. If  an  incoming file has the same name as an existing file, Kermit will either
  1549. overwrite the old file or else try to create a new unique  name,  depending  on
  1550. the setting of FILE WARNING.
  1551.  
  1552. If you have SET PARITY, then 8th-bit prefixing will be requested.  If the other
  1553. side cannot do this, binary files cannot be transferred correctly.  The sending
  1554. Kermit may also request that repeated characters be compressed.
  1555.  
  1556. If  an incoming file does not arrive in its entirety, Kermit will normally dis-
  1557. card it; it will not appear in your directory.  You may change this behavior by
  1558. using  the command SET INCOMPLETE KEEP, which will cause as much of the file as
  1559. 4.6. The RECEIVE Command                                                Page 30
  1560.  
  1561. -------------------------------------------------------------------------------
  1562. arrived to be saved in your directory.
  1563.  
  1564.  
  1565.     RECEIVE Remote Operation --
  1566.  
  1567. If your are running Kermit remotely, you should escape back to your local  Ker-
  1568. mit and give the SEND command.  You should do this within about two minutes, or
  1569. the protocol may time out and give up; if this happens, you can CONNECT back to
  1570. the remote system and reissue the RECEIVE command.
  1571.  
  1572.  
  1573.     RECEIVE Local Operation --
  1574.  
  1575. If  you  are running Kermit locally, you should already have issued a SEND com-
  1576. mand to the remote Kermit, and then escaped back to DEC-20 Kermit (you can  not
  1577. issue  a  RECEIVE  command to a Kermit server, you must use the GET command for
  1578. that).
  1579.  
  1580. As files arrive, their names will be shown on your screen, along  with  a  con-
  1581. tinuous display the packet traffic.
  1582.  
  1583. If a file begins to arrives that you don't really want, you can attempt to can-
  1584. cel it by typing Control-X; this sends a cancellation  request  to  the  remote
  1585. Kermit.  If the remote Kermit understands this request (not all implementations
  1586. of Kermit support this feature), it will comply; otherwise it will continue  to
  1587. send.   If a file group is being sent, you can request the entire group be can-
  1588. celled by typing Control-Z.
  1589.  
  1590.  
  1591. 4.7. The GET Command
  1592.  
  1593. Syntax: GET [remote-filespec]
  1594.  
  1595. The GET command requests a Kermit  server  to  send  the  file  or  file  group
  1596. specified by remote-filespec.  Note the distinction between the RECEIVE and GET
  1597. commands: RECEIVE instructs the program to wait passively, whereas GET actively
  1598. sends a request to a server.
  1599.  
  1600. The  remote  filespec  is  any  character  sequence  that  can  be a legal file
  1601. specification for the remote system; it is not parsed or validated locally.  As
  1602. files  arrive,  their names will be displayed on your screen, along with a con-
  1603. tinuous indication of the packet traffic.  As in the RECEIVE command,  you  may
  1604. type  Control-X  to  request  that  the  current  incoming  file  be cancelled,
  1605. Control-Z to request that the entire incoming batch be cancelled.
  1606.  
  1607. Optional Syntax: If you are requesting a single file, you may type the GET com-
  1608. mand  without a filespec.  In that case, Kermit programs that implement the op-
  1609. tional GET syntax will prompt you for the remote  filespec  on  the  subsequent
  1610. line, and the name to store it under when it arrives on the line after that:
  1611.  
  1612.   Kermit-MS>get
  1613.    Remote Source File: aux.txt
  1614.    Local Destination File: auxfile.txt
  1615. 4.8. The SERVER Command                                                 Page 31
  1616.  
  1617. -------------------------------------------------------------------------------
  1618. 4.8. The SERVER Command
  1619.  
  1620. Syntax: SERVER
  1621.  
  1622. The  SERVER command instructs Kermit to cease taking commands from the keyboard
  1623. and to receive all further instructions in the  form  of  Kermit  packets  from
  1624. another  system.    The  other Kermit must have commands for communicating with
  1625. remote servers; these include GET, SEND, FINISH, and BYE.
  1626.  
  1627. After issuing this command, return to the "client" system and issue SEND,  GET,
  1628. BYE,  FINISH, or other server-directed commands from there.  If your local Ker-
  1629. mit does not have a BYE command, then it does not have the full ability to com-
  1630. municate  with  a  Kermit  server and you should not put the remote Kermit into
  1631. SERVER mode.  If your local Kermit does have a BYE command, use it to shut down
  1632. and log out the Kermit server when you are done with it.
  1633.  
  1634. Any  nonstandard parameters should be selected with SET commands before putting
  1635. Kermit in server mode.
  1636.  
  1637.  
  1638. 4.9. The BYE Command
  1639.  
  1640. Syntax: BYE
  1641.  
  1642. When running talking to a Kermit server, use the BYE command to shut  down  the
  1643. server  and,  if  the  server is on a timesharing system, also log out the job.
  1644. This will also close any open log files and exit from the local Kermit.
  1645.  
  1646.  
  1647. 4.10. The FINISH Command
  1648.  
  1649. Syntax: FINISH
  1650.  
  1651. When running as a local Kermit talking to a remote Kermit server use the FINISH
  1652. command to shut down the server without logging out the remote job, so that you
  1653. can CONNECT back to it.
  1654.  
  1655.  
  1656. 4.11. The REMOTE Command
  1657.  
  1658. Syntax: REMOTE command
  1659.  
  1660. When talking to a remote Kermit server, use the REMOTE command to request  spe-
  1661. cial  functions  of  the  remote server.  If the server does not understand the
  1662. command or offer the requested service (all of these commands and services  are
  1663. optional  features  of  the Kermit protocol), it will reply with a message like
  1664. "Unknown Kermit server command".  If it  does  understand,  it  will  send  the
  1665. results  back,  and  they will be displayed on the screen.  The REMOTE commands
  1666. include:
  1667.  
  1668. REMOTE CWD [directory]
  1669.     Change  Working  Directory.    If no directory name is provided, the server
  1670.     will change to the default directory.  Otherwise, you will be prompted  for
  1671.     a  password,  and the server will attempt to change to the specified direc-
  1672.     tory.  If access is not granted, the server will provide a message to  that
  1673.     effect.    If  the  remote  system does not require a password for changing
  1674. 4.11. The REMOTE Command                                                Page 32
  1675.  
  1676. -------------------------------------------------------------------------------
  1677.     directories (UNIX is an example), then  you  can  simply  type  a  carriage
  1678.     return in response to the password prompt.
  1679.  
  1680. REMOTE DELETE filespec
  1681.     Delete the specified file or files.   The  names  of  the  files  that  are
  1682.     deleted should be displayed on your screen.
  1683.  
  1684. REMOTE DIRECTORY [filespec]
  1685.     The names of the files that match the given file specification will be dis-
  1686.     played  on  your  screen,  possibly along with additional information about
  1687.     file sizes and dates.  If no file specification is given,  all  files  from
  1688.     the current directory will be listed.
  1689.  
  1690. REMOTE SPACE [directory]
  1691.     Information about disk usage in the current remote directory -- quota, cur-
  1692.     rent  storage,  or  amount  of remaining free space -- is displayed on your
  1693.     screen.
  1694.  
  1695. REMOTE HELP
  1696.     A list of available server functions is displayed.
  1697.  
  1698. REMOTE HOST [command]
  1699.     The given command is passed to the server's host command processor, and the
  1700.     resulting output is displayed on your screen.
  1701.  
  1702. REMOTE KERMIT [command]
  1703.     The  given  command,  which  is  expressed  in  the  server  Kermit's   own
  1704.     interactive-mode  command  syntax,  is  passed to the server for execution.
  1705.     This is useful for changing settings, logging, and other functions.
  1706.  
  1707. REMOTE TYPE filespec
  1708.     The contents of the specified file is displayed on your screen.
  1709.  
  1710. REMOTE WHO [username]
  1711.     List users, or a specified user, logged in on the server's system.
  1712.  
  1713.  
  1714. 4.12. Local Commands
  1715.  
  1716. Syntax: [LOCAL] command
  1717.  
  1718. Execute the specified command on the local system -- on the system where Kermit
  1719. to  which your are typing this command is running.  These commands provide some
  1720. local file management capability without having to leave  the  Kermit  program,
  1721. which  is  particularly  useful  on microcomputers.  On most systems, the LOCAL
  1722. prefix for these commands can be omitted.
  1723.  
  1724. CWD [directory]
  1725.     "Change Working Directory" to the specified directory.
  1726.  
  1727. DELETE filespec
  1728.     Delete the specified file or files.
  1729.  
  1730. DIRECTORY [filespec]
  1731.     Provide a directory listing of the specified files.
  1732. 4.12. Local Commands                                                    Page 33
  1733.  
  1734. -------------------------------------------------------------------------------
  1735. SPACE
  1736.     Display local disk usage and/or free space.
  1737.  
  1738. RUN filespec [operands]
  1739.     Run the indicated program with the supplied command-line operands.
  1740.  
  1741. PUSH  Invoke  the  local  system  command interpreter in such a way that it can
  1742.     return (or "pop" or "exit") back to Kermit.
  1743.  
  1744. Some Kermit programs may provide commands for these or other functions  in  the
  1745. syntax  of their own system, when this would cause no confusion.  For instance,
  1746. CP/M Kermit may use ERA in place of LOCAL DELETE.
  1747.  
  1748.  
  1749. 4.13. The CONNECT Command
  1750.  
  1751. LOCAL ONLY -- Syntax: CONNECT [terminal-designator]
  1752.  
  1753. Establish a terminal connection to the system at the  other  end  of  the  com-
  1754. munication  line.   On a microcomputer, this is normally the serial port.  On a
  1755. mainframe, you will have to specify a terminal line number or other identifier,
  1756. either  in  the  CONNECT command itself, or in a SET LINE command.  Get back to
  1757. the local Kermit by typing the escape character followed by a single  character
  1758. "command".  Several single-character commands are possible:
  1759.  
  1760.   C   Close the connection and return to the local Kermit.
  1761.   S   Show status of the connection.
  1762.   B   Send a BREAK signal.
  1763.   0   (zero) Send a NUL (0) character.
  1764.   F   Copy the current screen into a disk file.
  1765.   D   Drop the line, hangup the modem.
  1766.   P   Push  to  the local system command processor without breaking the connec-
  1767.       tion.
  1768.   Q   Quit logging session transcript.
  1769.   R   Resume logging session transcript.
  1770.   ?   List all the possible single-character arguments.
  1771.   ^] (or whatever you have set the escape character to be)
  1772.       Typing  the  escape character twice sends one copy of it to the connected
  1773.       host.
  1774.  
  1775. You can use the SET ESCAPE command to define a different escape character,  and
  1776. SET  PARITY, SET DUPLEX, SET FLOW-CONTROL, SET HANDSHAKE to establish or change
  1777. those parameters.
  1778.  
  1779.  
  1780. 4.14. HELP
  1781.  
  1782. Syntax: The HELP Command
  1783.  
  1784. Typing HELP alone prints a brief summary of Kermit and its commands,  and  pos-
  1785. sibly instructions for obtaining more detailed help on particular topics.  Most
  1786. Kermit implementations also allow the use of "?" within a command to produce  a
  1787. short help message.
  1788. 4.15. The TAKE Command                                                  Page 34
  1789.  
  1790. -------------------------------------------------------------------------------
  1791. 4.15. The TAKE Command
  1792.  
  1793. Syntax: TAKE filespec
  1794.  
  1795. Execute  Kermit commands from the specified file.  The file may contain contain
  1796. any valid Kermit commands, including other TAKE commands.
  1797.  
  1798.  
  1799. 4.16. The EXIT and QUIT Commands
  1800.  
  1801. Exit from Kermit.  QUIT is a synonym for EXIT.
  1802.  
  1803.  
  1804. 4.17. The SET Command
  1805.  
  1806. Syntax: SET parameter [option] [value]
  1807.  
  1808. Establish or modify various parameters for file transfer  or  terminal  connec-
  1809. tion.
  1810.  
  1811. When  a  file transfer operation begins, the two Kermits automatically exchange
  1812. special initialization messages, in which each program provides the other  with
  1813. certain information about itself.  This information includes the maximum packet
  1814. size it wants to receive, the timeout interval it wants  the  other  Kermit  to
  1815. use,  the  number  and  type  of  padding  characters it needs, the end-of-line
  1816. character it needs to terminate each packet (if any), the block check type, the
  1817. desired  prefixes  for  control characters, characters with the "high bit" set,
  1818. and repeated characters.  Each Kermit program  has  its  own  preset  "default"
  1819. values  for  these  parameters, and you normally need not concern yourself with
  1820. them.  You can examine their values with the SHOW command; the SET  command  is
  1821. provided to allow you to change them in order to adapt to unusual conditions.
  1822.  
  1823. The following parameters may be SET:
  1824.  
  1825.          BAUD  Set the speed of the current communications port
  1826.   BLOCK-CHECK  Packet transmission error detection method
  1827.         DEBUG  Mode or log file
  1828.         DELAY  How long to wait before starting to send
  1829.        DUPLEX  For terminal connection, full (remote echo) or half (local echo)
  1830.           END  Packet termination character (normally CR)
  1831.        ESCAPE  Character for terminal connection
  1832.          FILE  For setting file parameters like name conversion and byte size
  1833.  FLOW-CONTROL  Selecting flow control method, like XON/XOFF
  1834.     HANDSHAKE  For turning around half duplex communication line
  1835.           IBM  Set parameters for IBM mainframe linemode connection
  1836.    INCOMPLETE  What to do with an incomplete file
  1837.           KEY  Establish a key redefinition or keyboard macro
  1838.    LOCAL-ECHO  Specify who echoes during terminal connection
  1839.          LINE  Terminal line to use for terminal connection or file transfer
  1840.         MODEM  Modem type or characteristics
  1841.        PARITY  Character parity to use
  1842.          PORT  For switching communication ports
  1843.        PROMPT  For changing the program's command prompt
  1844.       RECEIVE  Various parameters for receiving files
  1845.         RETRY  How many times to retry a packet before giving up
  1846.          SEND  Various parameters for sending files
  1847. 4.17. The SET Command                                                   Page 35
  1848.  
  1849. -------------------------------------------------------------------------------
  1850.         SPEED  Synomym for BAUD.
  1851.      TERMINAL  Parameters for terminal emulation
  1852.         TIMER  Enable/disable timeouts
  1853.       WARNING  Filename collision protection
  1854.  
  1855. The  DEFINE  command  may be used to compose "macros" by combining SET and pos-
  1856. sibly other commands.  The SET commands are now described in detail.
  1857.  
  1858.  
  1859. SET BAUD
  1860.  
  1861. Set or change the baud rate (approximate  translation:  transmission  speed  in
  1862. bits per second) on the currently selected communications device.  Ten bits per
  1863. second is usually equivalent to one character per second; 300 baud  =  30  cps.
  1864. The  way  of  specifying  the  baud  rate varies from system to system; in most
  1865. cases, the actual number (such as 1200 or 9600) is typed.  Systems that do  not
  1866. provide  this  command  generally expect that the speed of the line has already
  1867. been set appropriately outside of Kermit.  Common values are 300,  1200,  2400,
  1868. 4800, 9600, 19200.
  1869.  
  1870.  
  1871. SET BLOCK-CHECK {1, 2, 3}
  1872.  
  1873. Kermit  normally uses a 1-character block check, or "checksum", on each packet.
  1874. The sender of the packet computes the block check based on the other characters
  1875. in  the  packet,  and  the receiver recomputes it the same way.  If these quan-
  1876. tities agree, the packet is accepted and transmission proceeds.  If  they  dis-
  1877. agree, the packet is rejected and retransmission is requsted.
  1878.  
  1879. However,  the  block  check  is not a foolproof method of error detection.  The
  1880. normal single-character Kermit block check is only a 6-bit  quantity  (the  low
  1881. order  8 bits of the arithmetic sum folded upon itself).  With only six bits of
  1882.                                   6
  1883. accuracy, the chances are one in 2  -- that is, 1/64 -- that an error can occur
  1884. which  will  not  be  detected  in  the  checksum, assuming that all errors are
  1885. equally likely (they aren't).
  1886.  
  1887. You can decrease the probability that an error can slip through, at the expense
  1888. of transmission efficiency, by using the SET BLOCK-CHECK command to select more
  1889. rigorous block check methods.  Note that all  three  methods  will  detect  any
  1890. single-bit error, or any error in an odd number of bits.  The options are:
  1891.  
  1892. 1-CHARACTER-CHECKSUM:
  1893.     The normal single-character 6-bit checksum.
  1894.  
  1895. 2-CHARACTER-CHECKSUM:
  1896.     A  2-character, 12-bit checksum.  Reduces the probability of an error going
  1897.     undetected to 1/4096, but adds an extra character to each packet.
  1898.  
  1899. 3-CHARACTER-CRC:
  1900.     A  3-character,  16-bit Cyclic Redundancy Check, CCITT format.  In addition
  1901.     to errors in any odd number of bits, this method detects double bit errors,
  1902.     all error bursts of length 16 or less, and more than 99.99% of all possible
  1903.     longer bursts.  Adds two extra characters to each packet.
  1904.  
  1905. The single character checksum has proven to be quite adequate in practice, much
  1906. 4.17. The SET Command                                                   Page 36
  1907.  
  1908. -------------------------------------------------------------------------------
  1909. more  effective  than straightforward analysis would indicate, since all errors
  1910. are not equally likely, and a simple checksum is well suited  to  catching  the
  1911. kinds of errors that are typical of telecommunication lines.  The other methods
  1912. should be requested only when the connection is very noisy and/or when  sending
  1913. binary files, or when using "long packets" (see SET RECEIVE PACKET-LENGTH).
  1914.  
  1915. Note that the 2- and 3-character block checks are not available in all versions
  1916. of Kermit; if the other Kermit is not capable of performing  the  higher-preci-
  1917. sion  block  checks,  the  transfer will automatically use the standard single-
  1918. character method.
  1919.  
  1920.  
  1921. SET DEBUG {ON, OFF}
  1922.  
  1923. Syntax: SET DEBUG options
  1924.  
  1925. Record debugging information, either on your terminal or in a  file.    Options
  1926. are:
  1927.  
  1928.   ON  Turn on debugging.
  1929.  
  1930.   OFF Don't  display debugging information (this is the default).  If debugging
  1931.       was in effect, turn it off and close any log file.
  1932.  
  1933. or possibly others, like STATES, PACKETS, SESSION, etc., to select  logging  of
  1934. different  phenomena.  Some Kermit programs may control debugging by use of the
  1935. LOG DEBUG command.
  1936.  
  1937.  
  1938. SET DELAY
  1939.  
  1940. Syntax: SET DELAY number
  1941.  
  1942. Specify how many seconds to wait before sending the first packet after  a  SEND
  1943. command.    Use  when remote and SENDing files back to your local Kermit.  This
  1944. gives you time to "escape" back and issue a RECEIVE command.  The normal  delay
  1945. is 5 seconds.  In local mode or server mode, Kermit does not delay before send-
  1946. ing the first packet.
  1947.  
  1948.  
  1949. SET DUPLEX
  1950.  
  1951. Syntax: SET DUPLEX {FULL, HALF}
  1952.  
  1953. For use when CONNECTed to a remote system.  The keyword choices  are  FULL  and
  1954. HALF.   FULL means the remote system echoes the characters you type, HALF means
  1955. the local system echoes them.  FULL is the default, and is used by most  hosts.
  1956. HALF  is  necessary  when  connecting  to  IBM mainframes.  Half duplex is also
  1957. called "local echo"; in some Kermits, use SET  LOCAL-ECHO  ON  instead  of  SET
  1958. DUPLEX HALF.
  1959. 4.17. The SET Command                                                   Page 37
  1960.  
  1961. -------------------------------------------------------------------------------
  1962. SET ESCAPE
  1963.  
  1964. Syntax: SET ESCAPE character
  1965.  
  1966. Specify or change the character you want to use to "escape" from remote connec-
  1967. tions back to Kermit.  This would normally be a character you don't  expect  to
  1968. be  using on the remote system, perhaps a control character like ^\, ^], ^^, or
  1969. ^_.  Most versions of Kermit use one of these by default.  After you  type  the
  1970. escape  character, you must follow it by a single-character "argument", such as
  1971. "C" for Close Connection.  The arguments are listed above, under  the  descrip-
  1972. tion of the CONNECT command.
  1973.  
  1974.  
  1975. SET FILE
  1976.  
  1977. Syntax: SET FILE parameter value
  1978.  
  1979. Establish  file-related  parameters.    Depending on the characteristics of the
  1980. system, it may be necessary to tell Kermit how to fetch an outbound  file  from
  1981. the  disk,  or  how  to  store an incoming file.  The actual parameters you can
  1982. specify in this command will vary from system to system, and you should consult
  1983. the  documentation  for your particular version of Kermit.  Some examples would
  1984. be file type (text or binary), byte size (PDP-10 architecture),  record  length
  1985. or  block  size  (record  oriented  systems),  end-of-file detection method (on
  1986. microcomputers), file naming conversion option.
  1987.  
  1988. This can be a very important command if you intend to  transfer  binary  files,
  1989. but is normally unecessary for transmitting textual files.
  1990.  
  1991.  
  1992. SET FLOW-CONTROL
  1993.  
  1994. Syntax: SET FLOW-CONTROL {XON/XOFF,NONE}
  1995.  
  1996. For  communicating  with full duplex systems.  System-level flow control is not
  1997. necessary to the Kermit protocol, but it can help to use it if the same  method
  1998. is  available  on  both  systems.  The most common type of flow control on full
  1999. duplex systems is XON/XOFF.  When a system's input buffer comes close to  being
  2000. full, it will send an XOFF character (Control-S) to request the other system to
  2001. stop sending.  When it has emptied sufficient characters from its input buffer,
  2002. it  signals the other system to resume sending by transmitting an XON character
  2003. (Control-Q).  This process operates in both directions simultaneously.  The op-
  2004. tions  for  the  Kermit SET FLOW command are usually restricted to XON/XOFF and
  2005. NONE, which is used to disable this feature.
  2006.  
  2007.  
  2008. SET HANDSHAKE
  2009.  
  2010. Syntax: SET HANDSHAKE option
  2011.  
  2012. For communicating with half duplex systems.  This lets  you  specify  the  line
  2013. turnaround  character sent by the half duplex host to indicate it has ended its
  2014. transmission and is granting you permission to transmit.  When a  handshake  is
  2015. set,  Kermit  will  not  send  a packet until the half duplex host has sent the
  2016. specified character (or a timeout has occurred).  The options may include:
  2017. 4.17. The SET Command                                                   Page 38
  2018.  
  2019. -------------------------------------------------------------------------------
  2020.     NONE    No handshake; undo the effect of any previous SET HANDSHAKE.
  2021.     XOFF    Control-S.
  2022.     XON     Control-Q.
  2023.     BELL    Control-G.
  2024.     CR      Carriage Return, Control-M.
  2025.     LF      Linefeed, Control-J.
  2026.     ESC     Escape, Control-[.
  2027.  
  2028. Some Kermit programs may require the option  to  be  specified  by  typing  the
  2029. character  literally or entering its numeric ASCII value.  If you use this com-
  2030. mand to enable handshaking, you should also SET FLOW OFF.
  2031.  
  2032.  
  2033. SET INCOMPLETE
  2034.  
  2035. Syntax: SET INCOMPLETE {KEEP, DISCARD}
  2036.  
  2037. Specify what to do when a file transfer fails before it is completed.  The  op-
  2038. tions are DISCARD (the default) and KEEP.  If you choose KEEP, then if a trans-
  2039. fer fails to complete successfully, you will be able  to  keep  the  incomplete
  2040. part that was received.
  2041.  
  2042.  
  2043. SET LINE
  2044.  
  2045. Syntax: SET LINE [terminal-designator]
  2046.  
  2047. Specify the terminal line to use for file transfer or CONNECT.  This command is
  2048. found on mainframe Kermits, which normally run in "remote mode" using their own
  2049. controlling  terminal  for  file transfer.  Specifying a separate line puts the
  2050. program in "local mode."  If no line is specified, revert  to  the  job's  con-
  2051. trolling terminal, i.e. go back to "remote mode."
  2052.  
  2053.  
  2054. SET PORT
  2055.  
  2056. Syntax: SET PORT terminal-designator
  2057.  
  2058. Specify  the communications port for file transfer or CONNECT.  This command is
  2059. found on microcomputer Kermits that run in "local" mode.   SET  PORT  does  not
  2060. change  the  remote/local  status but simply selects a different port for local
  2061. operation.
  2062.  
  2063.  
  2064. SET PARITY
  2065.  
  2066. Syntax: SET PARITY {EVEN, ODD, MARK, SPACE, NONE}
  2067.  
  2068. Parity is a technique used by communications equipment for detecting errors  on
  2069. a  per-character basis; the "8th bit" of each character acts as a check bit for
  2070. the other seven bits.  Kermit uses block checks to  detect  errors  on  a  per-
  2071. packet basis, and it does not use character parity.  However, some systems that
  2072. Kermit runs on, or equipment through which these systems  communicate,  may  be
  2073. using character parity.  If Kermit does not know about this, arriving data will
  2074. have been modified and the block check will appear to  be  wrong,  and  packets
  2075. will be rejected.
  2076. 4.17. The SET Command                                                   Page 39
  2077.  
  2078. -------------------------------------------------------------------------------
  2079. If  parity  is  being used on the communication line, you must inform both Ker-
  2080. mits, so the desired parity can be added to outgoing characters,  and  stripped
  2081. from  incoming  ones.    SET PARITY should be used for communicating with hosts
  2082. that require character parity (IBM mainframes are typical examples) or  through
  2083. devices  or networks (like GTE TELENET) that add parity to characters that pass
  2084. through them.  Both Kermits should be set to the same parity.    The  specified
  2085. parity  is used both for terminal connection (CONNECT) and file transfer (SEND,
  2086. RECEIVE, GET).
  2087.  
  2088. The choices for SET PARITY are:
  2089.  
  2090.   NONE  (the default) eight data bits and no parity bit.
  2091.   MARK  seven data bits with the parity bit set to one.
  2092.   SPACE seven data bits with the parity bit set to zero.
  2093.   EVEN  seven data bits with the parity bit set  to  make  the  overall  parity
  2094.         even.
  2095.   ODD   seven data bits with the parity bit set to make the overall parity odd.
  2096.  
  2097. NONE  means no parity processing is done, and the 8th bit of each character can
  2098. be used for data when transmitting binary files.
  2099.  
  2100. If you have set parity to ODD, EVEN, MARK, or SPACE, then most versions of Ker-
  2101. mit  will request that binary files be transferred using 8th-bit-prefixing.  If
  2102. the Kermit on the other side knows how to do 8th-bit-prefixing (this is an  op-
  2103. tional  feature  of  the Kermit protocol, and not all implementations of Kermit
  2104. have it), then binary files can  be  transmitted  successfully.    If  NONE  is
  2105. specified, 8th-bit-prefixing will not be requested.
  2106.  
  2107.  
  2108. SET PROMPT
  2109.  
  2110. Syntax: SET PROMPT string
  2111.  
  2112. This allows you to change the program's prompt.  This is particularly useful if
  2113. you are using Kermit to transfer files between two systems of the same kind, in
  2114. which  case  you  can change the prompts of the Kermit programs involved to in-
  2115. clude appropriate distinguishing information.
  2116.  
  2117.  
  2118. SET SEND
  2119.  
  2120. SET SEND parameter value
  2121.  
  2122. Establish parameters for outgoing packets.  This command is generally  used  to
  2123. override negotiated values, or to establish before negotiation takes place.
  2124.  
  2125. END-OF-LINE character
  2126.         The ASCII character to be used as a line terminator for outbound  pack-
  2127.         ets,  if  one  is  required  by  the  other  system, carriage return by
  2128.         default.  You will only have to use this command for systems  that  re-
  2129.         quire a line terminator other than carriage return.
  2130.  
  2131. PACKET-LENGTH number
  2132.         Maximum packet length to send between 10 and 94 (decimal).   Shortening
  2133.         the packets might allow more of them to get through through without er-
  2134.         ror on noisy communication lines.  Lengthening  the  packets  increases
  2135. 4.17. The SET Command                                                   Page 40
  2136.  
  2137. -------------------------------------------------------------------------------
  2138.         the  throughput  on clean lines.  This command can be used to specify a
  2139.         shorter length than the one requested by the other Kermit,  but  not  a
  2140.         longer one.
  2141.  
  2142. TIMEOUT number
  2143.         How many seconds to wait for a packet before trying again.  A value  of
  2144.         zero means don't time out -- wait forever.
  2145.  
  2146. PAUSE floating-point-number
  2147.         How many seconds to pause before sending each  data  packet.    Setting
  2148.         this  to  a  nonzero  value may allow a slow system enough time to con-
  2149.         solidate  itself  before  the  next  packet  arrives.    Normally,   no
  2150.         per-packet pausing is done.
  2151.  
  2152. PADDING number, PADCHAR character
  2153.         How much padding to send before a packet, if the other side needs  pad-
  2154.         ding,  and what character to use for padding.  Defaults are no padding,
  2155.         and NUL (0) for the padding character.  This command is also handy  for
  2156.         inserting  special  characters  that  may be required by communications
  2157.         equipment.
  2158.  
  2159. QUOTE character
  2160.         What  printable character to use for quoting of control characters, "#"
  2161.         (43) by default.  There should be no reason to change this.
  2162.  
  2163. START-OF-PACKET character
  2164.         The start-of-packet character is the only control character used "bare"
  2165.         by the Kermit protocol.  It  is  Control-A  by  default.    If  a  bare
  2166.         Control-A  causes problems for your communication hardware or software,
  2167.         you can use this command to select a  different  control  character  to
  2168.         mark the start of a packet.  You must also issue the reciprocal command
  2169.         (SET RECEIVE  START-OF-PACKET)  to  the  Kermit  on  the  other  system
  2170.         (providing it has such a command).
  2171.  
  2172.  
  2173. SET RECEIVE
  2174.  
  2175. Syntax: SET RECEIVE parameter value
  2176.  
  2177. Parameters to request or expect for incoming packets, as follows:
  2178.  
  2179. END-OF-LINE character
  2180.         Carriage return (15) by default.
  2181.  
  2182. PACKET-LENGTH number
  2183.         Maximum  length  packet for the other side to send, decimal number, be-
  2184.         tween 10 and 94, decimal.  Some Kermit programs also  support  a  "long
  2185.         packet"  protocol  extension for improved file transfer efficiency.  If
  2186.         you specify a value greater than 94 (and normally  less  than  1000  or
  2187.         2000),  then  the two Kermits will attempt to negotiate the use of long
  2188.         packets in the receiver's direction.  If the negotiation is  unsuccess-
  2189.         ful  (e.g.  because  the sending Kermit does not support long packets),
  2190.         then ordinary packets will be used automatically.
  2191.  
  2192. TIMEOUT number
  2193.         How  many  seconds the other Kermit should wait for a packet before as-
  2194. 4.17. The SET Command                                                   Page 41
  2195.  
  2196. -------------------------------------------------------------------------------
  2197.         king for retransmission.
  2198.  
  2199. PAUSE floating-point-number
  2200.         How  many seconds to pause before acknowledging a packet.  Setting this
  2201.         to a nonzero value will slow down the rate at which  data  packets  ar-
  2202.         rive,  which  may  be necessary for systems that have "sensitive" front
  2203.         ends and cannot accept input at a high rate.
  2204.  
  2205. PADDING number, PADCHAR character
  2206.         How many padding characters to request before each incoming packet, and
  2207.         what the padding character should be.  No Kermits  are  known  to  need
  2208.         padding,  and  if  one  did, it would request it without your having to
  2209.         tell it to do so.  This command would only be necessary, therefore, un-
  2210.         der very unusual circumstances.
  2211.  
  2212. QUOTE character
  2213.         What printable character to use for quoting of control characters,  "#"
  2214.         (43) by default.  There should be no reason to change this.
  2215.  
  2216. START-OF-PACKET character
  2217.         The control character to mark the beginning of incoming packets.   Nor-
  2218.         mally SOH (Control-A, ASCII 1) (see SET SEND START-OF-PACKET, above).
  2219.  
  2220.  
  2221. SET RETRY
  2222.  
  2223. SET RETRY option number
  2224.  
  2225. Set the maximum number of retries allowed for:
  2226.  
  2227. INITIAL-CONNECTION
  2228.         How many times to try establishing the initial protocol connection  be-
  2229.         fore giving up, normally something like 15.
  2230.  
  2231. PACKETS How  many  times  to  try sending a particular packet before giving up,
  2232.         normally 5.  If a line is very noisy, you might want to  increase  this
  2233.         number.
  2234.  
  2235.  
  2236. SET WARNING
  2237.  
  2238. SET WARNING {ON, OFF}
  2239.  
  2240. Tell  Kermit whether to let incoming files overwrite existing files of the same
  2241. name.  If WARNING is ON, then Kermit will warn you of filename  collisions  and
  2242. will  attempt to construct a new, unique name for the arriving file, and inform
  2243. you what the new name is.  When OFF, Kermit silently overwrites existing  files
  2244. when  there's a name collision.  This command may also be called SET FILE WARN-
  2245. ING.
  2246. 4.18. The DEFINE Command                                                Page 42
  2247.  
  2248. -------------------------------------------------------------------------------
  2249. 4.18. The DEFINE Command
  2250.  
  2251. DEFINE macroname [command [, command [, ...] ] ]
  2252.  
  2253. Define a "macro" to allow convenient association of one or more Kermit commands
  2254. with  a  mnemonic  keyword of your choice.  The definition consists of a list a
  2255. list of one or more Kermit commands, separated by commas.  If you use Kermit to
  2256. communicate with several different kinds of systems, you may set up a macro for
  2257. each, for instance:
  2258.  
  2259.  DEFINE IBM SET PARITY MARK, SET DUPLEX HALF, SET HANDSHAKE XON
  2260.  DEFINE UNIX SET PARITY NONE, SET DUPLEX FULL, SET HANDSHAKE NONE
  2261.  DEFINE TELENET SET PARITY MARK, SET RECEIVE TIMEOUT 20
  2262.  
  2263. You may then type DO IBM, DO  UNIX,  and  so  forth  to  set  all  the  desired
  2264. parameters  with  a  single command.  It is convenient to include these defini-
  2265. tions in your Kermit initialization file.
  2266.  
  2267. Another other handy use for macros would be for rapid adaptation  to  different
  2268. conditions of line noise:
  2269.  
  2270.  DEFINE CLEAN SET BLOCK-CHECK 1, SET REC PACKET-LEN 94, SET RETRY 5
  2271.  DEFINE NOISY SET BLOCK 2, SET SEND PACKET 60, SET RETRY 10
  2272.  DEFINE VERY-NOISY SET BLOCK 3, SET SEND PACKET 40, SET RETRY 20
  2273.  
  2274. You  may  redefine an existing macro in the same manner as you defined it.  You
  2275. can undefine an existing macro by typing an empty DEFINE command  for  it,  for
  2276. instance:
  2277.  
  2278.  DEFINE IBM
  2279.  
  2280. You  can  list  all your macros and their definitions with the SHOW MACROS com-
  2281. mand.  Syntax of SET and DO commands may vary among Kermit programs.
  2282.  
  2283.  
  2284. 4.19. The SHOW Command
  2285.  
  2286. Syntax: SHOW [option]
  2287.  
  2288. The SHOW command displays the values of the parameters settable by the SET com-
  2289. mand.    If  a  particular  option is not requested, a complete display will be
  2290. provided.  Type "show ?" for a list of what can be shown.
  2291.  
  2292.  
  2293. 4.20. The STATISTICS Command
  2294.  
  2295. Give statistics about the most recent file transfer, such as the  total  number
  2296. of characters transmitted, the effective baud rate, and so forth.  On some sys-
  2297. tems, this is SHOW STATISTICS.
  2298. 4.21. The LOG Command                                                   Page 43
  2299.  
  2300. -------------------------------------------------------------------------------
  2301. 4.21. The LOG Command
  2302.  
  2303. Syntax: LOG [option] [filespec]
  2304.  
  2305. Log the specified entity to the specified log file.
  2306.  
  2307. TRANSACTIONS    Direct Kermit to log transactions, such as  files  successfully
  2308.                 sent  or  received or files that could not be successfully sent
  2309.                 or received.  A transaction is useful recording the progress of
  2310.                 a long, unattended multifile transfer.
  2311.  
  2312. SESSION         Create  a transcript of a CONNECT session, when running a local
  2313.                 Kermit connected to a remote system,  in  the  specified  file.
  2314.                 The log is closed when connection is closed.  In some implemen-
  2315.                 tations, logging can be "toggled" by typing the connect  escape
  2316.                 character followed by Q (Quit logging) or R (Resume logging) or
  2317.                 similar single-character commands.  Session-logging  is  useful
  2318.                 for  recording  dialog  with  an  interactive  system,  and for
  2319.                 "capturing"  from systems that don't have Kermit.  No guarantee
  2320.                 can  be made that the file will arrive correctly or completely,
  2321.                 since no error checking takes place.
  2322.  
  2323. DEBUGGING       Record debugging information in the specified file.  There  may
  2324.                 be  several options to select the desired information -- entire
  2325.                 packets, state transitions,  internal  program  trace,  etc  --
  2326.                 available via the SET DEBUGGING command.
  2327.  
  2328. PACKETS         Record packets, and all communication line traffice during file
  2329.                 transfer, in the specified file.
  2330.  
  2331.  
  2332. 4.22. The TRANSMIT Command
  2333.  
  2334. Syntax: TRANSMIT filespec
  2335.  
  2336. Send the contents of the specified file to the  other  system  "bare",  without
  2337. protocol,  packets,  error checking, or retransmission.  This command is useful
  2338. for sending files to systems that don't have Kermit.  No guarantee can be  made
  2339. that  the  target  system will receive the file correctly and completely.  When
  2340. receiving a file, the target system would normally be running a text editor  in
  2341. text collection mode.
  2342.  
  2343. The  current  communication  settings,  such as parity, flow control, and hand-
  2344. shake, are obeyed by most Kermit versions that have a TRANSMIT  command.    The
  2345. action  is  normally line-at-a-time.  Each line of the file is sent, terminated
  2346. by a carriage return (no linefeed), just as you would type it.    Kermit  waits
  2347. for  the  remote  system  to echo a linefeed (as it does when you type carriage
  2348. return) before it sends the next line.
  2349.  
  2350. Thus  TRANSMIT  provides  a  "raw  upload"  capability.    The  opposite,  "raw
  2351. download", may be accomplished by using the LOG SESSION command.
  2352. 4.23. Login Scripts: The INPUT, OUTPUT, CLEAR, and PAUSE Commands       Page 44
  2353.  
  2354. -------------------------------------------------------------------------------
  2355. 4.23. Login Scripts: The INPUT, OUTPUT, CLEAR, and PAUSE Commands
  2356.  
  2357. When  running  Kermit  in local mode, you may use the INPUT, OUTPUT, CLEAR, and
  2358. PAUSE commands to carry on a dialog with the remote system.  When combined into
  2359. a "script" in a Kermit TAKE command file, these commands provide the ability to
  2360. initially connect and log in to a remote system, and to  set  it  up  for  file
  2361. transfer.    While you may do this yourself manually using the CONNECT command,
  2362. the login script facility allows this often tedious task to be  automated,  and
  2363. more  important,  allows  it  to take place unattended -- perhaps late at night
  2364. when the phone rates are low and the system is faster.
  2365.  
  2366.  
  2367.                                THE CLEAR COMMAND
  2368.  
  2369. Syntax: CLEAR
  2370.  
  2371. Clear the input and output buffers of the currently selected line, and  attempt
  2372. to clear any XOFF deadlock.
  2373.  
  2374.  
  2375.                                THE PAUSE COMMAND
  2376.  
  2377. Syntax: PAUSE [interval]
  2378.  
  2379. Pause  the  specified number of seconds before executing the next command.  The
  2380. default interval is one second.
  2381.  
  2382.  
  2383.                                THE INPUT COMMAND
  2384.  
  2385. Syntax: INPUT [interval] [string]
  2386.  
  2387. On the currently selected communication line, look for the given string for the
  2388. specified  interval  of time, which is specified in seconds.  If no interval is
  2389. specified, then wait for the default interval, which may be  specified  by  SET
  2390. INPUT  DEFAULT-TIMEOUT, and is normally 5 seconds.  Specifying an interval of 0
  2391. (or less) means no timeout -- wait forever for the specified string.  An  INPUT
  2392. command  can  normally  be interrupted by typing one or more Control-C's, which
  2393. will return you to Kermit prompt level.
  2394.  
  2395. Characters coming in from the line will be scanned for the search  string,  and
  2396. when  a  match is found, the command will terminate successfully; if the string
  2397. is not found within the given interval, the command will  terminate  unsuccess-
  2398. fully.
  2399.  
  2400. The  search string may contain any printable characters.  Control or other spe-
  2401. cial characters that you could not normally type as part of a  command  may  be
  2402. included  by preceding their ASCII values with a backslash, for instance foo\13
  2403. is "foo" followed by a carriage return  (ASCII  13,  decimal).    (Some  Kermit
  2404. programs expect or allow other number bases, such as octal or hexadecimal.)
  2405.  
  2406. While  scanning, alphabetic case is ignored ("a" = "A") unless you have SET IN-
  2407. PUT CASE OBSERVE.  If no search string is given, then the  INPUT  command  will
  2408. simply  display all incoming characters on your screen until it times out or is
  2409. interrupted.
  2410. 4.23. Login Scripts: The INPUT, OUTPUT, CLEAR, and PAUSE Commands       Page 45
  2411.  
  2412. -------------------------------------------------------------------------------
  2413. If the INPUT command finds the specified string within the  alloted  amount  of
  2414. time, it terminates immediately, without an error message, and the next command
  2415. will be executed.  If the INPUT command fails to find the requested string,  it
  2416. will  "fail"; failure is only significant if the command was issued from a TAKE
  2417. command, and INPUT TIMEOUT-ACTION is SET to QUIT.  When a timeout occurs  under
  2418. these  conditions,  the  command  file is immediately terminated and control is
  2419. returned to the invoking level, either Kermit prompt level or a  superior  com-
  2420. mand  file.    If INPUT TIMEOUT-ACTION is SET to PROCEED, then the next command
  2421. (if any) will be executed from the current command file.
  2422.  
  2423. In addition to otherwise untypable control characters (like Control-C), certain
  2424. printable  characters  in  the  search string may need to be "quoted" using the
  2425. backslash mechanism, including at-sign, question mark, or other characters that
  2426. are significat to Kermit's command processor.
  2427.  
  2428.  
  2429.                               THE OUTPUT COMMAND
  2430.  
  2431. Syntax: OUTPUT string
  2432.  
  2433. The  given  string  is sent out the currently selected communication line.  The
  2434. string is in the same form as the INPUT string; control or  special  characters
  2435. may  be  included  by prefacing their octal ASCII value with a backslash.  Note
  2436. that any terminating  carriage  return  must  be  included  explicitly  as  \13
  2437. (decimal).
  2438.  
  2439.  
  2440.                            HOW TO USE LOGIN SCRIPTS
  2441.  
  2442. Login  scripts  are  useful  on  computers  that  have autodialers or TTY ports
  2443. hardwired or otherwise connected to terminal ports on other systems.    Scripts
  2444. can  be  used to automate the task of connecting and logging in.  For instance,
  2445. suppose your PC is connected to a VAX Unix system through a hardwired  line  on
  2446. communication  port  2.  To send a file to the VAX, you must connect to the VAX
  2447. through the port, log in, run Unix Kermit, escape back to the PC, and issue the
  2448. appropriate  file  transfer  commands, then connect back to the VAX and logout.
  2449. This may all be automated by means of the following "script"  stored  in  a  PC
  2450. file invoked by the Kermit TAKE command:
  2451.  
  2452.   set port 2
  2453.   output \13
  2454.   input login:
  2455.   out myuserid\13
  2456.   in 10 Password:
  2457.   out mypassword\13
  2458.   in 20 %
  2459.   out kermit -r\13
  2460.   send foo.bar
  2461.   out \4
  2462.   input
  2463.  
  2464. The  first line points Kermit at the communication line.  The next line sends a
  2465. carriage return, which makes Unix issue a "login:" prompt; the following  INPUT
  2466. command  waits  for  this  prompt  to  appear.    When  it does, Kermit outputs
  2467. "myuserid" followed by a carriage return.  Unix then prompts  for  a  password;
  2468. after  the prompt appears, Kermit supplies the password.  Then, Kermit waits up
  2469. 4.23. Login Scripts: The INPUT, OUTPUT, CLEAR, and PAUSE Commands       Page 46
  2470.  
  2471. -------------------------------------------------------------------------------
  2472. to 20 seconds for the Unix shell's "%" prompt; this  allows  time  for  various
  2473. system  messages  to be displayed.  When the shell prompt appears, Kermit sends
  2474. the command "kermit -r", which tells Unix Kermit to receive a file; then a SEND
  2475. command  is  given  to the local Kermit.  After the file is successfully trans-
  2476. ferred, Kermit sends a logout command (Control-D, "\4") to Unix.  The final IN-
  2477. PUT  command  causes  Kermit  to  display  any  typeout  (in this case the Unix
  2478. system's logout message) that occurs up to the default timeout interval.
  2479.  
  2480. The INPUT command is very important, because it ensures synchronization.    One
  2481. might expect to be able to simply send all the characters out the communication
  2482. line at once, and let the remote host's typeahead and buffering facilities take
  2483. care  of the synchronization.  In rare or simple cases, this might work, but it
  2484. assumes that (a) the remote  host  allows  typeahead,  (b)  the  remote  host's
  2485. typeahead  buffers  are  big  enough to accommodate all the characters, and (c)
  2486. that the remote host never clears pending typeahead.  These  conditions  rarely
  2487. hold.  For instance, Unix clears its input buffer after issuing the "Password:"
  2488. prompt; any typeahead will be lost.  Interactive users as well as login  script
  2489. facilities  must wait for the prompt before entering the password.  This is the
  2490. function of the INPUT command.  On half duplex systems, this function is criti-
  2491. cal  --  these systems cannot accept any input in advance of a prompt; there is
  2492. no typeahead.
  2493.  
  2494. The Kermit script facility is not a programming  language;  there  is  no  con-
  2495. ditional execution of commands, no branching, no labels.  Nevertheless, the SET
  2496. INPUT command provides a degree of control.  If the Unix system  were  down  in
  2497. the  sample script above, Kermit would still proceed merrily through the entire
  2498. script, sending its output into the void and waiting the entire timeout  inter-
  2499. val  on  each  INPUT  command,  then attempting to send a file to a Kermit that
  2500. wasn't there.  It could take several minutes of timing  out  to  terminate  the
  2501. script.  This could be avoided by including the command 
  2502.  
  2503.   SET INPUT TIMEOUT-ACTION QUIT
  2504.  
  2505. at the top of the script.  When the "login:" prompt failed to appear within the
  2506. timeout interval, the rest of the script would be cancelled.
  2507.  
  2508. See the chapters on MS-DOS and DEC-20 Kermit  for  further  examples  of  login
  2509. scripts.
  2510. 5. MS-DOS KERMIT                                                        Page 47
  2511.  
  2512. -------------------------------------------------------------------------------
  2513. 5. MS-DOS KERMIT
  2514.  
  2515. Program:        Joe  R.  Doupnik (Utah State University), with contributions by
  2516.                 James  Harvey  (Indiana/Purdue  University),  James  Sturdevant
  2517.                 (A.C. Nielson Company), and many others (see History).
  2518.  
  2519. Language:       Microsoft Macro Assembler (MASM)
  2520.  
  2521. Version:        2.30
  2522.  
  2523. Released:       January 8, 1988
  2524.  
  2525. Documentation:  Christine Gianone, Frank da Cruz (Columbia University),
  2526.                 Joe R. Doupnik (Utah State University)
  2527.  
  2528. Dedicated To:   Peppi
  2529.  
  2530.  
  2531. Kermit-MS Capabilities At A Glance:
  2532.  
  2533.    Local operation:                Yes
  2534.    Remote operation:               Yes
  2535.    Transfers text files:           Yes
  2536.    Transfers binary files:         Yes
  2537.    Wildcard send:                  Yes
  2538.    File transfer interruption:     Yes
  2539.    Filename collision avoidance:   Yes
  2540.    Can time out:                   Yes
  2541.    8th-bit prefixing:              Yes
  2542.    Repeat count compression:       Yes
  2543.    Alternate block check types:    Yes
  2544.    Terminal emulation:             VT102, H19, VT52, Tektronix 4010
  2545.    Communication settings:         Speed, Parity, Flow Control, Handshake, Echo
  2546.    Transmit BREAK:                 Yes (and Long BREAK)
  2547.    IBM mainframe communication:    Yes
  2548.    Transaction logging:            No
  2549.    Session logging (raw download): Yes
  2550.    Raw upload:                     Yes
  2551.    Act as server:                  Yes
  2552.    Talk to server:                 Yes
  2553.    Advanced server functions:      Yes
  2554.    Advanced commands for servers:  Yes
  2555.    Local file management:          Yes
  2556.    Command/init files:             Yes
  2557.    Command macros:                 Yes
  2558.    Extended-length packets:        Yes
  2559.    Local area networks:            Yes (NetBIOS support)
  2560.    MS-Windows compatibility:       Yes
  2561.    Attribute packets:              No
  2562.    Sliding windows:                No
  2563.  
  2564. MS-DOS  Kermit, or "Kermit-MS" (or MS-Kermit), is a program that implements the
  2565. Kermit file transfer protocol for the entire IBM PC family, including the  PS/2
  2566. series,  IBM  compatibles,  and  several other machines based on the Intel 8086
  2567. processor series (8088, 80286, 80386, etc) and the DOS operating system  family
  2568. (PC-DOS  or  MS-DOS,  henceforth  referred  to collectively as MS-DOS or simply
  2569. 5. MS-DOS KERMIT                                                        Page 48
  2570.  
  2571. -------------------------------------------------------------------------------
  2572. DOS).
  2573.  
  2574. It is assumed you are acquainted with your PC and with DOS, and  that  you  are
  2575. familiar with the general ideas of data communication and Kermit file transfer.
  2576. A very brief overview is given here, but for details consult the early chapters
  2577. of  the  Kermit  User  Guide (of which this document is a chapter), or the book
  2578. Kermit, A File Transfer Protocol, by Frank da Cruz, Digital Press (1987), order
  2579. number  EY-6705E-DP  (phone  1-800-343-8321),  which  also  includes background
  2580. tutorials on computers, file systems, and data communication (including modems,
  2581. cabling,  etc).    For further information about Kermit documentation, updates,
  2582. lists of current available versions, and ordering information, write to:
  2583.  
  2584.   Kermit Distribution
  2585.   Columbia University Center for Computing Activities
  2586.   612 West 115th Street
  2587.   New York, NY  10025  (USA)
  2588.  
  2589.  
  2590. 5.1. System Requirements
  2591.  
  2592. Kermit-MS version  2.30  runs  in  as  little  as  70K  of  memory  (about  55K
  2593. contiguous),  but  will occupy up to 120K, if it can be found, for extra screen
  2594. rollback memory.  Versions not using screen rollback memory  will  not  require
  2595. the  additional  space.   It will also try to leave 24 Kbytes free for a second
  2596. copy of COMMAND.COM which is needed for execution of certain commands.
  2597.  
  2598. On the IBM PC family, Kermit-MS 2.30 performs almost complete emulation of  the
  2599. DEC  VT-102  and  Heath/Zenith-19  terminals  at  speeds  up  to 19,200 baud or
  2600. greater, lacking only the VT102's smooth scrolling and (on some display boards)
  2601. 132 column features.  And as of version 2.30, Kermit-MS also performs Tektronix
  2602. 4010 graphics terminal emulation on IBM PC family systems  equipped  with  CGA,
  2603. EGA, and Hercules graphics adapters, with either color or monochrome monitors.
  2604.  
  2605. Much  of  Kermit's speed is accomplished by direct writes to screen memory, but
  2606. this is done in a "TopView-aware" manner to allow successful operation in  win-
  2607. dowing  environments  like  MS-Windows, DesqView, and TopView itself.  Speed is
  2608. also due to direct access of the serial port 8250  UART (Universal Asynchronous
  2609. Receiver/Transmitter)  chip, with buffered, interrupt-driven receipt of charac-
  2610. ters and selectable XON/XOFF  flow control.  Full speed 9600 baud operation  is
  2611. possible  on 4.77Mhz systems without flow control, but flow control is required
  2612. on these systems for 19,200 baud or higher rates.  The IBM  PC  version  should
  2613. also  run  on near-clones like the DG/1 that differ from true PCs only in their
  2614. choice  of  UART;  non-8250  UARTs  are  detected  automatically,  and   slower
  2615. non-interrupt  driven Bios serial port i/o is used, in which case the top speed
  2616. is in the 1200 baud range.  On the IBM PC family, COM1 and COM2 are  supported,
  2617. and "hooks" are available for (inevitably nonstandard) COM3 and COM4 options.
  2618.  
  2619. Kermit-MS 2.30 runs on the entire IBM PC family (the PC, XT, AT, PCjr, Portable
  2620. PC, PC Convertible, PS/2) and compatibles (Compaq,  VAXmate,  Z150,  etc),  and
  2621. there are also specially tailored versions for non-IBM-compatibles like the DEC
  2622. Rainbow, NEC APC, Sanyo MBC, Victor 9000, HP-110, HP-150, HP Portable Plus, and
  2623. others, plus a "generic DOS" version that should run (slowly) on any 8086-based
  2624. MS-DOS machine.  This document concentrates on the IBM  version;  some  of  the
  2625. system-dependent capabilities described here may be lacking in the non-IBM ver-
  2626. sions.  See section 5.9 for features of different systems.
  2627. 5.1. System Requirements                                                Page 49
  2628.  
  2629. -------------------------------------------------------------------------------
  2630. KERMIT.EXE for the IBM PC family occupies about 86K of disk storage (the figure
  2631. will  vary for other versions).  This can be reduced by about 15K if you run it
  2632. through EXEPACK.  MS-Kermit is not distributed in packed form, because problems
  2633. have  been  reported on certain systems when this is done.  So if you decide to
  2634. pack it, make sure to keep an unpacked version available to  fall  back  to  in
  2635. case of problems.
  2636.  
  2637.  
  2638. 5.2. History
  2639.  
  2640. Over  the  years,  MS-Kermit has grown from a Kermit file transfer program that
  2641. embodied a simple terminal emulator into a complex and  powerful  communication
  2642. program that includes the Kermit file transfer protocol.  As a result, the bulk
  2643. of this manual is devoted to the communication  features,  rather  than  Kermit
  2644. protocol operation.  Skip ahead to the next section if you're not interested in
  2645. the history of MS-Kermit.
  2646.  
  2647. MS-DOS Kermit (like the Kermit file transfer protocol itself) is a  product  of
  2648. the  Systems  Group of the Columbia University Center for Computing Activities,
  2649. and it was one of the four original Kermit programs (with the CP/M, DEC-20, and
  2650. IBM  mainframe versions).  It was initially written for the IBM PC with DOS 1.1
  2651. by Daphne Tzoar in 1981-1982, based largely on Bill Catchings's  original  CP/M
  2652. 8080  assembler version.  PC-Kermit (as it was called then) provided basic Ker-
  2653. mit file transfer and VT52 emulation.  Joellen Windsor  of  the  University  of
  2654. Arizona  added  conditional  assembly  support for the Heath/Zenith-100 shortly
  2655. thereafter, and soon after that Dave King of Carnegie-Mellon  University  added
  2656. Heath-19  terminal emulation, and some patches to let the program run under the
  2657. new DOS version, 2.0.  During this era, the program version numbers  went  from
  2658. 1.0 to 1.20.
  2659.  
  2660. With  the  appearance  in the marketplace of many new MS-DOS machines that were
  2661. not compatible with the IBM PC, it became apparent that conditionally assembled
  2662. code  supporting  each of these machines within a single monolithic source file
  2663. was not the best way to organize the program.   Therefore  Daphne,  along  with
  2664. Jeff  Damens of Columbia, undertook to reorganize the program in a modular way,
  2665. isolating system dependencies into separate files.    The  result  was  version
  2666. 2.26,  released  in  July  1984.   It included support for the DEC Rainbow, the
  2667. HP-150, the Wang PC, and generic MS-DOS, as well as for the IBM PC  family  and
  2668. the  H/Z-100.  It also included many new features, like 8th-bit prefixing (code
  2669. contributed by The Source  Telecomputing),  alternate  block  check  selection,
  2670. byte-count  compression,  server/client operation, access to local file and DOS
  2671. operations, command macros, initialization and command files, screen  rollback,
  2672. key  redefinition,  and  more.    For  the  2.26 release, the executable Kermit
  2673. programs were encoded printably as ".BOO" files, designed by Bill Catchings  as
  2674. part of this effort.
  2675.  
  2676. Release 2.27 was produced by Daphne and Jeff in December 1984.  Unlike 2.26, it
  2677. ran correctly on the new PC/AT under DOS 3.0, and included support for the  NEC
  2678. APC  from  Ron  Blanford  of  Seattle, WA, and Ian Gibbons of the University of
  2679. Hawaii, and for the TI Professional from Joe Smith of the  Colorado  School  of
  2680. Mines,  plus  some bug fixes and reorganization.  2.27 is the last version that
  2681. runs under pre-2.0 versions of DOS.
  2682.  
  2683. Version 2.28 (Daphne, Jeff, June  1985)  added  dynamic  memory  allocation  to
  2684. reduce  disk  storage for the .EXE file, and to allow the program to adjust it-
  2685. self to the PC's memory size, plus the inevitable bug fixes (many of them  con-
  2686. 5.2. History                                                            Page 50
  2687.  
  2688. -------------------------------------------------------------------------------
  2689. tributed  by  Edgar  Butt  of the University of Maryland and Gregg Small of the
  2690. University of California at Berkeley).  During this  period,  support  for  ad-
  2691. ditional MS-DOS systems was added by various people.
  2692.  
  2693. In  December 1985, a tape showed up at Columbia sent by Prof. Joe R. Doupnik of
  2694. the Center for Atmospheric and Space Studies and EE Department  at  Utah  State
  2695. University.  This tape contained version 2.28 modified to fully support the DOS
  2696. 2.0 file system, and to which many new features had  been  added,  notably  the
  2697. ability  of  the  MS-DOS Kermit server to process various REMOTE commands (DIR,
  2698. CWD, SPACE, etc).  And at about the same time, a tape arrived from James Harvey
  2699. of  Indiana/Purdue University, who had changed Kermit's CONNECT command to emu-
  2700. late the popular DEC VT100 terminal.  This material was sent to Joe,  who  then
  2701. laboriously  fitted  James's  work  into his own code, keeping the VT52 and H19
  2702. emulation alive as options, and upgrading the VT100 emulation to VT102  by  ad-
  2703. ding  features  such  as line and character insertion and deletion.  The result
  2704. was version 2.29, released in May 1986.
  2705.  
  2706. Soon after the release of 2.29, some disks were sent in by James Sturdevant  of
  2707. the A.C. Nielson Company, containing a full implementation of the Kermit script
  2708. facility, as described in the Kermit book.  This material was sent to Joe,  who
  2709. had by now become keeper of MS-DOS Kermit and had already begun work on version
  2710. 2.30 by adding support for extended-length packets.  Joe had been  carrying  on
  2711. voluminous  network  correspondence  (Thanks,  BITNET!)  with Columbia and with
  2712. MS-DOS Kermit users and testers all over the world, giving birth  to  many  new
  2713. features,  including  Tektronix graphics terminal emulation, support for opera-
  2714. tion over local area networks, support for 8-bit ASCII terminal connections and
  2715. international  character  sets,  ANSI  printer  control, and a redesigned, more
  2716. powerful, more portable key redefinition mechanism.  Version 2.30 was  formally
  2717. released on January 1, 1988, after many "alpha" and "beta" tests.
  2718.  
  2719. Among the many contributors to this version are: Brian Holley and Joe Smith for
  2720. the Tektronix emulation, Robert Goeke for the NEC AP3 support,  Brian  Peterson
  2721. and  Andreas  Stumpf  for  the  Victor  9000, Bob Babcock and Joe White for the
  2722. Sanyos, Christopher Lent for the Wang PC, Jack Bryans for an  Intel  iRMX  ver-
  2723. sion,  Jim Noble for the Grid Compass, Geoff Mulligan and others for the Zenith
  2724. 100, and David Knoell for the special Rainbow edition.  And thanks  to  Gisbert
  2725. Selke,  Jack  Bryans,  and  others for proofreading drafts of this manual.  And
  2726. apologies to anyone we neglected to mention.
  2727.  
  2728. Finally, please note that the program version number is not a whole number  and
  2729. a fraction; 2.30 is pronounced "two point thirty", and is not equal to 2.3.
  2730.  
  2731.  
  2732. 5.3. Using MS-Kermit
  2733.  
  2734. MS-DOS  Kermit performs two major functions, terminal emulation and file trans-
  2735. fer.  File transfer can be done using either the Kermit file transfer protocol,
  2736. or  else  (without  error checking), ASCII or XON/XOFF capture and transmission
  2737. methods.  To use Kermit for "raw" uploading or downloading of  files,  see  the
  2738. descriptions of the LOG SESSION and TRANSMIT commands.
  2739.  
  2740. Before  you  can  transfer files with another system using Kermit protocol, you
  2741. must first connect to it as a terminal, login if necessary, and start up a Ker-
  2742. mit  program  there.   The following example shows this process; the other com-
  2743. puter is a Unix system, but the method is the same with most others.  The parts
  2744. you  type  are  underlined  (if this document was printed on a printer that can
  2745. 5.3. Using MS-Kermit                                                    Page 51
  2746.  
  2747. -------------------------------------------------------------------------------
  2748. underline), and when you type a command,  you  terminate  it  with  a  carriage
  2749. return,  which  you  can't  see  in  the  example.    The  mysterious  "^]c" is
  2750. MS-Kermit's "escape sequence", which you enter  by  holding  down  the  Control
  2751. (Ctrl)  key and pressing "]" (right square bracket), and then typing the letter
  2752. C. The example assumes the MS-Kermit program is stored on disk as KERMIT.EXE.
  2753.  
  2754.   Program Dialog:             Explanation:
  2755.  
  2756.   A>kermit
  2757.   IBM PC Kermit-MS V2.30 8 Jan 88                                          
  2758.   Type ? for help
  2759.  
  2760.   Kermit-MS>set speed 1200    Set the right baud rate.
  2761.   Kermit-MS>connect           Connect as a terminal.
  2762.   (Connecting to host, type ^]C to return to PC.)
  2763.   ATDT7654321                 Dial the modem if necessary.
  2764.   CONNECT 1200                The modem tells you you're connected.
  2765.  
  2766.     Now you're talking to the Unix system.
  2767.     Type a carriage return to get its attention.
  2768.  
  2769.   Login: christin             Login to the host.
  2770.   password:                   (Passwords normally don't echo.)
  2771.   % kermit                    Run Kermit on the host.
  2772.   C-Kermit>receive            Tell it to receive a file.
  2773.   ^]c                         Escape back to the PC.
  2774.   Kermit-MS>send autoexec.bat Send a file.
  2775.  
  2776.     (The file is transferred...)
  2777.  
  2778.   Kermit-MS>                  Transfer complete, prompt reappears.
  2779.  
  2780. In this example, the user types "kermit", and sees the program's herald and its
  2781. prompt, "Kermit-MS>".  Then she sets the appropriate communication speed ("baud
  2782. rate"), connects as a terminal, issues a dialing command to a Hayes-like  modem
  2783. (you would skip this step if you had a direct connection), logs in to her ID on
  2784. the Unix system which she has dialed, starts "C-Kermit"  on  the  Unix  system,
  2785. tells it to receive a file, escapes back to the PC, and tells MS-Kermit to send
  2786. a file.  After the file is transferred, the user would normally connect back to
  2787. the Unix system, exit from the Kermit program there, and log out:
  2788.  
  2789.   Kermit-MS>connect        Connect again.
  2790.   (Connecting to host, type ^]C to return.)
  2791.   C-Kermit>exit
  2792.   % ^D                     Logout from Unix by typing Ctrl-D.
  2793.   ^]c                      Escape back to the PC.
  2794.   Kermit-MS>exit           Return to DOS.
  2795.  
  2796. To  transfer  a  file  in  the  other direction, simply exchange the "send" and
  2797. "receive" commands above.  That's the easiest and quickest way to  use  Kermit.
  2798. If  this simple scenario does not work for you, issue the MS-Kermit STATUS com-
  2799. mand and look for any obvious incorrect settings (speed, parity), fix them with
  2800. SET  commands  (described  in  Section  5.6.9),  and try again.  (IBM mainframe
  2801. linemode connections have so many "different" settings, there's a special  com-
  2802. mand  to  do  them  all  at  once,  "do ibm", which you would type as the first
  2803. Kermit-MS command above.)  If that doesn't help, read on.   Many  problems  can
  2804. 5.3. Using MS-Kermit                                                    Page 52
  2805.  
  2806. -------------------------------------------------------------------------------
  2807. crop  up when you attempt to connect two unlike systems over a possibly hostile
  2808. communication medium.  And if you intend to be a frequent user of Kermit, there
  2809. are many options you can take advantage of to adapt MS-Kermit to different sys-
  2810. tems, improve its performance, and automate common tasks.
  2811.  
  2812.  
  2813. 5.4. The MS-DOS File System
  2814.  
  2815. The features of the MS-DOS file system of greatest interest to Kermit users are
  2816. the form of the file specifications, and the formats of the files themselves.
  2817.  
  2818.  
  2819. 5.4.1. File Specifications
  2820.  
  2821. MS-DOS file specifications (in version 2.0 or later of DOS) are of the form 
  2822.  
  2823.   DEVICE:\PATHNAME\NAME.TYPE
  2824.  
  2825. where  the  DEVICE  is  a  single character identifier (for instance, A for the
  2826. first floppy disk, C for the first fixed disk, D for a RAM disk emulator)  fol-
  2827. lowed by a colon (":"), PATHNAME is up to 63 characters of identifier(s) (up to
  2828. 8 characters each) surrounded by backslashes ("\"), NAME is an identifier of up
  2829. to  8  characters,  and  TYPE is an identifier of up to 3 characters in length.
  2830. Device and pathname may be omitted.  The first backslash in the pathname may be
  2831. omitted  if  the  specified  path is relative to the current directory.  In the
  2832. path field, "." means the current directory, ".." means the  parent  directory.
  2833. Some  DOS implementations (like Wang) may use slash ("/") rather than backslash
  2834. as a directory separator.
  2835.  
  2836. Pathname is normally omitted, but can be specified in  all  Kermit-MS  commands
  2837. (as of version 2.29).  Device and directory pathnames, when omitted, default to
  2838. either the user's current disk and  directory,  or  to  the  current  directory
  2839. search path as specified in the DOS PATH environment variable, depending on the
  2840. context in which the file name appears.
  2841.  
  2842.     When this document says that a file is searched  for  "in  the  current
  2843.     path,"  it means that Kermit-MS looks on the current disk and directory
  2844.     first, and if the file is not found, then the directories listed in the
  2845.     PATH  environment variable are searched.  If the PATH environment vari-
  2846.     able is empty, Kermit looks only at the current disk and directory.
  2847.  
  2848. NAME.TYPE is sufficient to specify a file on the current  disk  and  directory,
  2849. and only this information is sent along by Kermit-MS with an outgoing file.
  2850.  
  2851. The  device, path, name, and type fields may contain uppercase letters, digits,
  2852. and the special characters "-" (dash), "_" (underscore), "$" (dollar sign), "&"
  2853. (ampersand),  "#"  (number  sign),  "@" (at sign), "!"  (exclamation mark), "'"
  2854. (single  quote),  "()"  (parentheses),  "{}"  (curly  braces),  "^"  (caret  or
  2855. circumflex), "~" (tilde), and "`" (accent grave).  Normally, you should confine
  2856. your filenames to letters and digits for maximum  transportability  to  non-DOS
  2857. systems.    When  you  type  lowercase letters in filenames, they are converted
  2858. automatically to uppercase.  There are no imbedded or trailing spaces.    Other
  2859. characters  may  not be included; there is no mechanism for "quoting" otherwise
  2860. illegal characters in filenames.  The fields of the file specification are  set
  2861. off from one another by the punctuation indicated above.
  2862. 5.4.1. File Specifications                                              Page 53
  2863.  
  2864. -------------------------------------------------------------------------------
  2865. The  name  field is the primary identifier for the file.  The type, also called
  2866. the extension or suffix, is an indicator which, by convention, tells what  kind
  2867. of  file  we have.  For instance FOO.BAS is the source of a BASIC program named
  2868. FOO; FOO.OBJ might be the  relocatable  object  module  produced  by  compiling
  2869. FOO.BAS;  FOO.EXE  could  be an executable program produced by loading FOO.OBJ,
  2870. and so forth.  .EXE and .COM are the normal suffixes for executable programs.
  2871.  
  2872. MS-DOS allows a group of files to be specified in a single  file  specification
  2873. by including the special "wildcard" characters, "*" and "?".  A "*" matches any
  2874. string of characters from the current position to the end of the field, includ-
  2875. ing  no  characters  at all; a "?" matches any single character.  Here are some
  2876. examples:
  2877.  
  2878.   *.BAS   All files of type BAS (BASIC source files) in the current directory.
  2879.  
  2880.   FOO.*   Files of all types with name FOO.
  2881.  
  2882.   F*.*    All files whose names start with F.
  2883.  
  2884.   *.?     All files whose types are exactly one character long, or have no type
  2885.           at all.
  2886.  
  2887. Wildcard  notation  is used on many computer systems in similar ways, and it is
  2888. the mechanism most commonly used to instruct Kermit to send a group of files.
  2889.  
  2890. Users of Kermit-MS should bear in mind that other (non-MS-DOS) systems may  use
  2891. different wildcard characters.  For instance VMS and the DEC-20 use "%" instead
  2892. of "?" as the single character wildcard; when  using  Kermit-MS  to  request  a
  2893. wildcard  file  group  from a Kermit-20 server, the DOS "?" must be replaced by
  2894. the DEC-20 "%".
  2895.  
  2896.  
  2897. 5.4.2. File Formats
  2898.  
  2899. MS-DOS systems store files as streams of 8-bit bytes, with no  particular  dis-
  2900. tinction  among text, program code, and binary files.  ASCII text files consist
  2901. of lines separated by carriage-return-linefeed sequences (CRLFs), and this con-
  2902. forms  exactly  to the way Kermit represents text files during transmission, so
  2903. Kermit-MS has no need for a SET FILE TYPE BINARY command.   But  since  a  non-
  2904. MS-DOS  receiving  system  might need to make distinctions as to file type, you
  2905. will probably have to issue SET FILE TYPE commands there if you are sending  it
  2906. non-text  files.   In transmitting files between Kermit-MS programs, regardless
  2907. of file contents, the receiving MS-DOS system is equally capable of  processing
  2908. text, code, and data, and in fact requires no knowledge of how the bytes in the
  2909. file are to be used.
  2910.  
  2911. MS-DOS (unlike CP/M) knows the exact end of a file  because  it  keeps  a  byte
  2912. count  in  the  directory,  so one would expect no particular confusion in this
  2913. regard.  However, certain MS-DOS programs continue to use the  CP/M  convention
  2914. of  terminating  a text file with a Control-Z character, and won't operate cor-
  2915. rectly unless this terminating byte is present.  Therefore, you should be aware
  2916. of  a  special  SET  EOF option for both incoming and outbound files, described
  2917. later.
  2918.  
  2919. Non-MS-DOS  systems  may  be  confused  by  nonstandard  ASCII  files  sent  by
  2920. Kermit-MS:
  2921. 5.4.2. File Formats                                                     Page 54
  2922.  
  2923. -------------------------------------------------------------------------------
  2924.    - Files  containing  any  of  the 8-bit "extended ASCII" characters may
  2925.      need conversion (or translation) to 7-bit ASCII.
  2926.  
  2927.    - Files produced by word processing programs like Word Perfect or  Word
  2928.      Star may contain special binary formatting codes, and could need con-
  2929.      version to conventional 7-bit ASCII  format  prior  to  transmission,
  2930.      using commonly available "exporter" programs.
  2931.  
  2932.    - Files  created  by  word processors that store formatting data at the
  2933.      end of the file, after the Control-Z and before physical end, may re-
  2934.      quire  special  processing  via SET EOF to strip the formatting data,
  2935.      lest they confuse non-MS-DOS recipients.
  2936.  
  2937.    - Spreadsheet or database files usually need special formatting  to  be
  2938.      meaningful  to  non-MS-DOS recipients (though they can be transmitted
  2939.      between MS-DOS systems with Kermit-MS).
  2940.  
  2941.    - BASIC programs are normally saved in a binary "tokenized" form.   Use
  2942.      BASIC's ",a" SAVE option to save them as regular ASCII text, as in 
  2943.  
  2944.        save"foofa",a
  2945.  
  2946. In  general,  when  attempting  to transfer non-text files between MS-DOS and a
  2947. different kind of system, consult the Kermit manual for that system.
  2948.  
  2949.  
  2950. 5.5. Program Setup and Invocation
  2951.  
  2952. The MS-DOS Kermit program can be run from any disk without any special  instal-
  2953. lation  procedure.  On hard disk systems, it is convenient to store the program
  2954. in one of the directories listed in your DOS PATH, and it is often desirable to
  2955. customize  Kermit's  operation to your communications and computing environment
  2956. by creating an initialization file.
  2957.  
  2958. Kermit-MS can be run interactively, from a batch file, or as an "external"  DOS
  2959. command.   Commands consist of one or more fields, separated by "whitespace" --
  2960. one or more spaces or tabs.
  2961.  
  2962. Upon initial startup, the program executes  any  commands  found  in  the  file
  2963. MSKERMIT.INI in the current path.  This initialization file may contain command
  2964. macro definitions, communications settings for one or more ports, or any  other
  2965. Kermit-MS  commands,  and  you  may  create it using any text editor capable of
  2966. saving files in plain ASCII text format.  Here is a sample:
  2967.  
  2968. comment -- MSKERMIT.INI, MS-DOS Kermit initialization file
  2969.  
  2970. comment -- Don't overwrite my files!
  2971.  set warning on
  2972.  
  2973. comment -- Define macros for the systems I use...
  2974.  define unix set local-echo off,set par non,set flow xon,set timer off
  2975.  def ibm set par odd,set loc on,set hands xon,set flo none,set tim on
  2976.  def modem set port 2, set baud 1200
  2977.  
  2978. comment -- Define a macro for quickly adapting to noisy connections...
  2979.  def noisy set block-check 3, set send packet-length 40, set retry 20
  2980. 5.5. Program Setup and Invocation                                       Page 55
  2981.  
  2982. -------------------------------------------------------------------------------
  2983. comment -- I always start out by connecting to my UNIX system...
  2984.  set port 1
  2985.  set baud 4800
  2986.  do unix
  2987.  connect
  2988.  
  2989. A different file may be substituted for MSKERMIT.INI by using "-f filename"  on
  2990. the DOS command line, e.g.  
  2991.  
  2992.   kermit -f monday.ini
  2993.  
  2994. The  meanings  of these commands will emerge below.  For now, just note how you
  2995. can use command files (and "macro definitions") to easily  adapt  MS-Kermit  to
  2996. widely  differing  communication  environments.  A more advanced initialization
  2997. file is shown below in section 5.8.
  2998.  
  2999.  
  3000. Interactive Operation:
  3001.  
  3002. To run Kermit-MS interactively, invoke the program from DOS  command  level  by
  3003. typing  its name, normally "kermit" (this means the program should be stored in
  3004. your path with the name KERMIT.EXE).  When you see the program's prompt, 
  3005.  
  3006.   Kermit-MS>
  3007.  
  3008. you may type Kermit commands  repeatedly  until  you  are  ready  to  exit  the
  3009. program,  as  in  the following example (which assumes there's already a Kermit
  3010. "server" set up on the other end):
  3011.  
  3012.   A>
  3013.   A>kermit
  3014.  
  3015.   IBM PC Kermit-MS V2.30  8 Jan 88
  3016.   Type ? for help
  3017.  
  3018.   Kermit-MS>set speed 19200
  3019.   Kermit-MS>send foo.*
  3020.  
  3021.     The files are sent.
  3022.  
  3023.   Kermit-MS>get fot.*
  3024.  
  3025.     The requested files are received.
  3026.  
  3027.   Kermit-MS>exit
  3028.   A>
  3029.  
  3030. Interactive commands are described in Section 5.6.
  3031.  
  3032.  
  3033. Command Line Invocation:
  3034.  
  3035. Kermit-MS may be invoked with command line arguments from  DOS  command  level,
  3036. for instance:
  3037.  
  3038.   A>kermit send peter.amy
  3039. 5.5. Program Setup and Invocation                                       Page 56
  3040.  
  3041. -------------------------------------------------------------------------------
  3042. or
  3043.  
  3044.   A>kermit set port 1, set baud 9600, connect
  3045.  
  3046. In  this case, help and completion  are not available (because the program that
  3047. provides them won't start running until  after  you  type  the  entire  command
  3048. line),  and Kermit-MS will exit back to DOS after completing the specified com-
  3049. mand or commands.    Therefore,  when  invoked  with  command  line  arguments,
  3050. Kermit-MS  will  behave as if it were an external DOS command, like MODE.  Note
  3051. that several commands may be given on the command line,  separated  by  commas.
  3052. This can't be done interactively or from TAKE command files.
  3053.  
  3054. As  of  version  2.30,  two new Kermit commands can be given on the DOS command
  3055. line.  First is the keyword STAY which prevents Kermit from  exiting  naturally
  3056. when  the last command has completed (unless, of course, EXIT or QUIT was among
  3057. the commands).  The second command is 
  3058.  
  3059.   -F filename
  3060.  
  3061. This means use the indicated filename as the initialization  file  rather  than
  3062. MSKERMIT.INI.   The path will be searched for this file, if necessary.  A space
  3063. or tab must separate -F from the filename, and the F may be in upper  or  lower
  3064. case.  Example:  
  3065.  
  3066.   kermit -f tuesday.ini, set port 2, do ibm, stay
  3067.  
  3068. You can run Kermit with no initialization file at all by using the command 
  3069.  
  3070.   kermit -f nul
  3071.  
  3072. If -F is the only command line option, STAY is implied.
  3073.  
  3074.  
  3075. Batch Operation:
  3076.  
  3077. Like  other MS-DOS programs, Kermit-MS may be operated under batch with command
  3078. line arguments.  If you invoke it without command line arguments, it  will  run
  3079. interactively, reading commands from the keyboard and not the batch file.  When
  3080. it exits, batch processing will continue to the end of the batch file.
  3081.  
  3082. Kermit-MS returns the "errorlevel"  parameter  used  as  program  exit  status.
  3083. Present  values  are  in  the range 0 to 7 with three areas yielding success or
  3084. failure reports for the entire Kermit session. The errorlevel values are:
  3085.  
  3086.    errorlevel   Kermit session status
  3087.         0       entirely successful operation
  3088.         1       a Send command completed unsuccessfully
  3089.         2       a Receive or GET command completed unsuccessfully
  3090.         4       a REMOTE command completed unsuccessfully
  3091.      3,5,6,7    combinations (addition) of the above conditions
  3092.  
  3093. Note that failures are remembered for the whole session and are not canceled by
  3094. a  following successful operation of the same type. Thus, sending several files
  3095. individually yields an errorlevel of 0 only if all the files were sent success-
  3096. fully.  The "errorlevel" parameter also applies to script commands where OUTPUT
  3097. corresponds to SEND and INPUT to RECEIVE.  An example of  Batch  invocation  of
  3098. 5.5. Program Setup and Invocation                                       Page 57
  3099.  
  3100. -------------------------------------------------------------------------------
  3101. Kermit is shown in Figure 5-3.
  3102.  
  3103.  
  3104. Remote Operation:
  3105.  
  3106. The MS-DOS CTTY command allows an MS-DOS system to be used from a terminal con-
  3107. nected to its communication port.  Such sessions must be conducted  with  great
  3108. care, since many programs assume that they are running on the real console, and
  3109. explicitly reference screen memory or keyboard scan codes.  Kermit can be  used
  3110. in this manner too, but before you give it any file transfer commands, you must
  3111. inform it that it is running in "remote mode" rather  than  its  normal  "local
  3112. mode."    Use  the  SET REMOTE ON command for this purpose, to prevent the file
  3113. transfer display from being sent out the port.
  3114.  
  3115.  
  3116. RAM Disk Operation:
  3117.  
  3118. If you invoke Kermit frequently, and you have sufficient memory on your PC, you
  3119. may find it convenient to copy Kermit and its initialization file to a RAM disk
  3120. when you start your system.  This allows Kermit to be started and used  quickly
  3121. and silently, with no disk operations.
  3122.  
  3123. For  instance, if you're using IBM's VDISK facility to create the RAM disk, you
  3124. might put statements like this in your CONFIG.SYS file:
  3125.  
  3126.   DEVICE=VDISK.SYS 512 512 32 /e
  3127.  
  3128. This assumes you have 512K of extended (/e) memory installed and  VDISK.SYS  is
  3129. in  the  root directory of the boot disk.  It creates a 512K RAM disk with 512K
  3130. sector size and space for 32 directories in the extended memory,  assigning  it
  3131. the  disk letter of your first unused disk.  And then in your AUTOEXEC.BAT file
  3132. (assuming the RAM disk is disk D:)...
  3133.  
  3134.   COPY KERMIT.EXE   D: >NUL
  3135.   COPY MSKERMIT.INI D: >NUL
  3136.   COPY COMMAND.COM  D: >NUL
  3137.   SET COMSPEC=D:\COMMAND.COM
  3138.   PATH D:\; ...
  3139.   APPEND D:\; ...
  3140.  
  3141. The PATH and APPEND commands allow DOS to find KERMIT.EXE, and Kermit  to  find
  3142. MSKERMIT.INI  and  COMMAND.COM, on the RAM disk.  If you use Kermit to transfer
  3143. files to your RAM disk, remember to copy those files to a real disk before  you
  3144. turn off the system.
  3145.  
  3146.  
  3147. Use of MS-Kermit in Windowing Environments:
  3148.  
  3149. Kermit-MS  can  operate  within  windowing  environments  like such as TopView,
  3150. DESqview, and MS-Windows.  It runs in an active window  under  MS-Windows,  ac-
  3151. cepts  cut and paste material, talks with mice, and shrinks to an icon (a boxed
  3152. "KER").  An MS-Windows .PIF file  can  be  constructed  for  Kermit  using  the
  3153. PIFEDIT  program,  supplied with Windows.  Memory requirements should be listed
  3154. as 90 to 128KB.  It should be noted that Kermit does  not  modify  the  screen,
  3155. keyboard,  memory,  COM1,  or  COM2 (!).  Program switch and exchange should be
  3156. marked as Text, and Close Window on Exit should be checked.  This configuration
  3157. 5.5. Program Setup and Invocation                                       Page 58
  3158.  
  3159. -------------------------------------------------------------------------------
  3160. will let you run Kermit with all the Windows features, but very slowly.  To run
  3161. at full speed under Windows, tell PIFEDIT  that  Kermit  modifies  the  screen.
  3162. Then  you lose the Windows features (cutting, pasting, running the clock at the
  3163. same time, etc), but you still get back to the Windows interface when you  EXIT
  3164. Kermit.
  3165.  
  3166.  
  3167. Local Area Network Operation:
  3168.  
  3169. MS-Kermit  2.30 is capable of using a serial port on another local area network
  3170. (LAN) node, so long as that node is running an asynchronous communication serv-
  3171. er  and  you  have  installed a device driver on your own PC that makes COM1 or
  3172. COM2 i/o use the network  server.    This  type  of  connection  works  because
  3173. MS-Kermit  2.30 (but not earlier releases) on IBM PCs checks the selected port,
  3174. COM1 or COM2, to see if it's a real 8250 UART chip, and  if  it  isn't,  Kermit
  3175. uses  only  Bios  calls for port i/o, and the network routes these through your
  3176. network device driver.  It may be necessary to turn off a  real  COM1  or  COM2
  3177. device  (with  a  switch  or jumper on the board) to convince Kermit to use the
  3178. Bios.  This style of operation should be transparent to Kermit, except that not
  3179. all asynchronous communications servers utilize this technique.
  3180.  
  3181. As  of version 2.30, the IBM PC version of Kermit can also communicate directly
  3182. with another PC on a local area network through the IBM NetBIOS  emulator  dis-
  3183. tributed  with  the  LAN.  In essence, the LAN substitutes for the serial port,
  3184. modem, and other wiring.  Kermit running on one user machine can transfer files
  3185. with  another  Kermit  also  on  the  network much as if they were connected by
  3186. modems, and Kermit can talk with some larger machines the same way.  The impor-
  3187. tant, and only, network command is
  3188.  
  3189.   SET PORT NET nodename
  3190.  
  3191. which is described in the section on SET commands.  Also see the SERVER command
  3192. description, and (if you're interested) section 5.16.1 for a technical descrip-
  3193. tion.
  3194.  
  3195. Kermit  can  even  communicate with some other computers, such as Unix systems,
  3196. which accept logins via this remote pathway.  The initial startup is  the  same
  3197. as  calling a mainframe and logging in except the command SET PORT NET nodename
  3198. is used instead of SET PORT COM1.  A connection is established with  the  first
  3199. use  of the communications circuit, such as CONNECT, REMOTE DIR, SEND, or other
  3200. file transfer command, and terminated with the HANGUP command.
  3201. 5.5. Program Setup and Invocation                                       Page 59
  3202.  
  3203. -------------------------------------------------------------------------------
  3204. 5.6. Kermit-MS Commands
  3205.  
  3206. MS-DOS Kermit supplies most of the commands and  features  of  "ideal"  Kermit.
  3207. Here's a summary:
  3208.  
  3209.  
  3210.            -F  specify alternate init file name on DOS command line.
  3211.           BYE  to remote server, exit from MS-Kermit.
  3212.         CLEAR  serial port buffer.
  3213.         CLOSE  log files and stop logging remote session.
  3214.       COMMENT  For including comments in command files.
  3215.       CONNECT  as terminal to remote system.
  3216.           CWD  change local working directory.
  3217.        DEFINE  a macro of Kermit-MS commands.
  3218.        DELETE  local files.
  3219.     DIRECTORY  listing of local files.
  3220.       DISABLE  server recognition of selected commands.
  3221.            DO  a command macro.
  3222.          ECHO  a line of text on the screen.
  3223.        ENABLE  server recognition of selected commands.
  3224.          EXIT  from Kermit-MS.
  3225.        FINISH  Shut down remote server.
  3226.           GET  remote files from server.
  3227.        HANGUP  the phone or network connection.
  3228.          HELP  about Kermit-MS.
  3229.         INPUT  specified string from serial port, for scripts.
  3230.           LOG  remote terminal session and/or packets.
  3231.        LOGOUT  remote server, don't exit from Kermit-MS.
  3232.        OUTPUT  string out serial port, for scripts.
  3233.         PAUSE  between commands.
  3234.          PUSH  to MS-DOS command level.
  3235.          QUIT  from Kermit-MS (same as EXIT).
  3236.       RECEIVE  files from remote Kermit.
  3237.        REMOTE  Prefix for remote file management commands.
  3238.           RUN  an MS-DOS program or command.
  3239.          SEND  files to remote Kermit.
  3240.        SERVER  mode of remote operation.
  3241.           SET  various parameters.
  3242.          SHOW  various parameters.
  3243.         SPACE  inquiry (about disk space).
  3244.        STATUS  inquiry (about settings).
  3245.          STAY  stay within Kermit after DOS command line invocation.
  3246.          TAKE  commands from a file.
  3247.      TRANSMIT  a file "raw" (no error checking).
  3248.          TYPE  a local file on the screen.
  3249.       VERSION  display Kermit-MS program version number.
  3250.  
  3251. Not  all of these commands are necessarily available on all MS-DOS systems, and
  3252. some of the commands may work somewhat differently between DOS versions.
  3253.  
  3254. A command keyword, such as SEND, RECEIVE, HELP, etc,  may  be  abbreviated,  so
  3255. long  as  you  have  typed enough letters to distinguish it from other keywords
  3256. that are valid in that position.  For instance, you can type CLE for CLEAR  and
  3257. CLO  for CLOSE.  Several common commands also have special non-unique abbrevia-
  3258. tions, like C for CONNECT, S for SEND, and R for RECEIVE.
  3259. 5.6. Kermit-MS Commands                                                 Page 60
  3260.  
  3261. -------------------------------------------------------------------------------
  3262. During interactive operation, you may edit the command you're currently  typing
  3263. using  BACKSPACE  to  erase the character most recently typed, Ctrl-W to delete
  3264. the most recent field, or Ctrl-U to delete the entire  command.    The  editing
  3265. characters  may be used in any combination until the command is finally entered
  3266. by typing RETURN (Carriage Return, Enter) or Ctrl-L.
  3267.  
  3268. You may use the help ("?") and keyword completion  (ESC) features freely  while
  3269. typing Kermit-MS commands.  A question mark typed at almost any point in a com-
  3270. mand produces a brief description, or "menu", of what is expected  or  possible
  3271. at  that point.  ESC typed at any point, except in a local filename, will cause
  3272. the current field to be filled out if what you have typed so far is  sufficient
  3273. to  identify  it,  and will leave you in position to type the next field (or to
  3274. type a "?" to find out what the next field is);  otherwise,  the  program  will
  3275. beep at you and wait for you to type more characters.
  3276.  
  3277. Kermit-MS  recognizes  only 7-bit ASCII characters when examining a Kermit com-
  3278. mand line. The SET KEY and SHOW KEY commands can prompt for keyboard input  and
  3279. understand 8-bit characters but only at their interactive prompt.  The SET KEY,
  3280. INPUT, and OUTPUT commands accept "backslash number format"  on the main Kermit
  3281. command  line.  Thus, national characters which are full 8-bit codes can be ex-
  3282. pressed on command lines in backslash number form (\ddd), provided  the  Kermit
  3283. command  itself  can  understand the form.  Presently, INPUT, OUTPUT, ECHO, SET
  3284. KEY, SET PROMPT, and DEFINE  commands  understand  this  notation.    To  enter
  3285. characters  in  backslash  number  format, type a backslash ("\") followed by a
  3286. number corresponding to the ASCII code for the character:
  3287.  
  3288.     \123    a decimal number (decimal is the default number base)
  3289.  
  3290.     \d249   a decimal number (also \D)
  3291.  
  3292.     \o177   an octal (base 8) number (also \O)
  3293.  
  3294.     \x0d    a hexadecimal (base 16) number (also \X)
  3295.  
  3296. Table 5-1 shows all of the 7-bit ASCII codes in decimal.  Most Kermit  commands
  3297. understand  backslash-ASCII  codes, both imbedded within character strings, and
  3298. alone, as when a single character or number is to be specified.
  3299.  
  3300. Some Kermit-MS commands like GET, SHOW KEY, and SET KEY,  may  prompt  for  ad-
  3301. ditional  information  on  subsequent  lines.  If you have reached one of these
  3302. prompts and then wish to cancel the command, you may type Control-C to get back
  3303. to the main Kermit-MS> prompt.
  3304.  
  3305.  
  3306. Summary of Kermit-MS command editing characters:
  3307.  
  3308.     SPACE   Separates fields within the command.
  3309.  
  3310.     TAB     Same  as  Space,  and echoes as Space.  You may also use Ctrl-I for
  3311.             Tab.
  3312.  
  3313.     BACKSPACE
  3314.             Deletes the character most recently typed.  May be typed repeatedly
  3315.             to delete all the way back to the prompt.  You may also use DELETE,
  3316.             RUBOUT, Ctrl-H, or equivalent keys.
  3317. 5.6. Kermit-MS Commands                                                 Page 61
  3318.  
  3319. -------------------------------------------------------------------------------
  3320. -------------------------------------------------------------------------------
  3321.  
  3322.  
  3323.  
  3324.   Dec Name Ctrl            Dec Char      Dec Char     Dec Char
  3325.  
  3326.    0   NUL  ^@           |  32  SP    |   64   @   |   96  `
  3327.    1   SOH  ^A           |  33   !    |   65   A   |   97  a
  3328.    2   STX  ^B           |  34   "    |   66   B   |   98  b
  3329.    3   ETX  ^C           |  35   #    |   67   C   |   99  c
  3330.    4   EOT  ^D           |  36   $    |   68   D   |  100  d
  3331.    5   ENQ  ^E           |  37   %    |   69   E   |  101  e
  3332.    6   ACK  ^F           |  38   &    |   70   F   |  102  f
  3333.    7   BEL  ^G beep      |  39   '    |   71   G   |  103  g
  3334.    8   BS   ^H backspace |  40   (    |   72   H   |  104  h
  3335.    9   HT   ^I tab       |  41   )    |   73   I   |  105  i
  3336.   10   LF   ^J linefeed  |  42   *    |   74   J   |  106  j
  3337.   11   VT   ^K           |  43   +    |   75   K   |  107  k
  3338.   12   FF   ^L formfeed  |  44   ,    |   76   L   |  108  l
  3339.   13   CR   ^M return    |  45   -    |   77   M   |  109  m
  3340.   14   SO   ^N shift out |  46   .    |   78   N   |  110  n
  3341.   15   SI   ^O shift in  |  47   /    |   79   O   |  111  o
  3342.   16   DLE  ^P           |  48   0    |   80   P   |  112  p
  3343.   17   DC1  ^Q XON       |  49   1    |   81   Q   |  113  q
  3344.   18   DC2  ^R           |  50   2    |   82   R   |  114  r
  3345.   19   DC3  ^S XOFF      |  51   3    |   83   S   |  115  s
  3346.   20   DC4  ^T           |  52   4    |   84   T   |  116  t
  3347.   21   NAK  ^U           |  53   5    |   85   U   |  117  u
  3348.   23   ETB  ^W           |  54   6    |   86   V   |  118  v
  3349.   22   SYN  ^V           |  55   7    |   87   W   |  119  w
  3350.   24   CAN  ^X           |  56   8    |   88   X   |  120  x
  3351.   25   EM   ^Y           |  57   9    |   89   Y   |  121  y
  3352.   26   SUB  ^Z           |  58   :    |   90   Z   |  122  z
  3353.   27   ESC  ^[ escape    |  59   ;    |   91   [   |  123  {
  3354.   28   FS   ^\           |  60   <    |   92   \   |  124  |
  3355.   29   GS   ^]           |  61   =    |   93   ]   |  125  }
  3356.   30   RS   ^^           |  62   >    |   94   ^   |  126  ~
  3357.   31   US   ^_           |  63   ?    |   95   _   |  127  RUBOUT,DELETE
  3358.  
  3359.            Table 5-1:   The US ASCII Character Set (ANSI X3.4-1977)
  3360.  
  3361. -------------------------------------------------------------------------------
  3362.  
  3363.     Ctrl-W  Deletes the most recent "word", or field, on the command line.  May
  3364.             be typed repeatedly.
  3365.  
  3366.     Ctrl-U  Deletes the entire command line, back to the prompt.
  3367.  
  3368.     Ctrl-C  Cancels the current command and returns to the "Kermit-MS>" prompt.
  3369.             Also, terminates execution of a TAKE command file.
  3370.  
  3371.     ESC     If  enough  characters have been supplied in the current keyword to
  3372.             identify it uniquely the remainder of the field is supplied and the
  3373.             cursor  is positioned to the next field of the command.  Otherwise,
  3374.             a beep is sounded.  ESC does not  provide  filename  completion  in
  3375.             version 2.30.
  3376. 5.6. Kermit-MS Commands                                                 Page 62
  3377.  
  3378. -------------------------------------------------------------------------------
  3379.     ?       Displays  a  brief message describing what may be typed in the cur-
  3380.             rent command field.  Also,  wildcard  character  for  matching  any
  3381.             single character in all but the first position of a filename.
  3382.  
  3383.     #       Wildcard  character  for  matching  single characters in filenames.
  3384.             Equivalent to MS-DOS "?", but used  in  the  first  position  of  a
  3385.             filename only, so that "?" may be used to get help at the beginning
  3386.             of a filename field.
  3387.  
  3388.     RETURN  Enters the command.  On most keyboards, you may also use  ENTER  or
  3389.             Ctrl-M.
  3390.  
  3391.     Ctrl-L  Clears the screen and enters the command.
  3392.  
  3393. Liberal  use  of "?" allows you to feel your way through the commands and their
  3394. fields.  This feature is sometimes called "menu on  demand"  or  "context  sen-
  3395. sitive help" -- unlike systems that force you to negotiate menus at every turn,
  3396. menu-on-demand provides help only when it is needed.
  3397.  
  3398. Command parsing is done through DOS calls.  Kermit key  redefinition  does  not
  3399. apply  at  MS-Kermit  command  level.    But ANSI.SYS or other external console
  3400. drivers can be used for this purpose, for instance to assign ESC  to  the  PC's
  3401. backquote key (ANSI.SYS is the IBM-supplied extended screen and keyboard device
  3402. driver, described in the IBM DOS Technical Reference Manual).    Other  console
  3403. drivers available include ProKey, SuperKey, NANSI.SYS (a public-domain replace-
  3404. ment for ANSI.SYS), and FANSICONSOLE.
  3405.  
  3406. The notation used in command descriptions is as follows: Optional fields are in
  3407. [square  brackets],  lists  of alternatives are in {curly braces}, separated by
  3408. commas.  Parameters, such  as  numbers  or  filenames,  are  shown  in  italics
  3409. (providing  the printer is capable of printing italics), and in dialog examples
  3410. user typein is underlined (on printers that can show it) to distinguish it from
  3411. computer typeout.
  3412.  
  3413. The following sections describe MS-Kermit's commands.  Command descriptions may
  3414. contain references to other commands that haven't  been  explained  yet.    You
  3415. might find that this manual makes more sense on a second reading.
  3416.  
  3417.  
  3418. 5.6.1. Program Management Commands
  3419.  
  3420. "Program  management" is a rubric for Kermit-MS commands like TAKE, EXIT, HELP,
  3421. COMMENT, ECHO, and VERSION, that don't fall into any other category.
  3422.  
  3423. HELP simply displays a short help message (the same  one,  in  fact,  that  you
  3424. would see if you typed a question mark in the same place).
  3425.  
  3426. VERSION displays the MS-Kermit program version number, which you should know in
  3427. case you are reporting bugs or seeking technical assistance.
  3428.  
  3429. Other program management commands require a bit more explanation.
  3430. 5.6.1. Program Management Commands                                      Page 63
  3431.  
  3432. -------------------------------------------------------------------------------
  3433. The EXIT Command
  3434.  
  3435. Syntax: EXIT  or  QUIT
  3436.  
  3437. EXIT and QUIT are synonyms for each other.  They cause MS-Kermit to return con-
  3438. trol  to DOS or whatever program invoked MS-Kermit.  The specific actions taken
  3439. are:
  3440.  
  3441.    - Close any open log or other files.
  3442.    - Close any open network connection.
  3443.    - Release all memory claimed by the program.
  3444.    - Disable interrupts for the currently selected communication device.
  3445.    - Terminate execution.
  3446.  
  3447. The serial port RS-232 signals are left alone upon EXIT, so that modem  connec-
  3448. tions  are  not broken.  Kermit-MS may be restarted with the connection intact.
  3449. Use HANGUP to explicitly break a modem connection.
  3450.  
  3451.  
  3452. The STAY Command
  3453.  
  3454. Syntax: STAY
  3455.  
  3456. The STAY command, if included among command line arguments, instructs MS-Kermit
  3457. not  to  exit upon completion but rather to enter interactive mode, unless EXIT
  3458. or QUIT was among the command arguments.  STAY has no effect when  entered  in-
  3459. teractively or from a TAKE file.
  3460.  
  3461.  
  3462. The PUSH Command
  3463.  
  3464. Syntax: PUSH
  3465.  
  3466. PUSH  is  similar  to  EXIT,  except  it leaves MS-Kermit intact by invoking an
  3467. MS-DOS command processor "under"  Kermit-MS,  either  COMMAND.COM  or  whatever
  3468. shell  you  have  specified with COMSPEC (or SHELL, depending on the system) in
  3469. your CONFIG.SYS file.  You can return to Kermit-MS by typing  the  MS-DOS  EXIT
  3470. command,  and you will find Kermit-MS as you left it, with all settings intact.
  3471. The same function is invoked by the CONNECT escape-level command P. Example:
  3472.  
  3473.   Kermit-MS>push           Push to DOS.
  3474.   Command v3.10            COMMAND.COM program herald.
  3475.  
  3476.   C>diskcopy a: b:         Run a DOS program.
  3477.  
  3478.     DISKCOPY dialog here...
  3479.  
  3480.   C>dir b:                 More DOS commands...
  3481.  
  3482.     DOS session continues...
  3483.  
  3484.   C>exit                   When done, type DOS EXIT command.
  3485.   Kermit-MS>               Back at Kermit.
  3486. 5.6.1. Program Management Commands                                      Page 64
  3487.  
  3488. -------------------------------------------------------------------------------
  3489. The TAKE Command
  3490.  
  3491. Syntax: TAKE filespec
  3492.  
  3493. The TAKE command gives you way a to collect MS-Kermit commands  into  a  single
  3494. file,  so that you can execute many commands by typing a single (TAKE) command.
  3495. TAKE instructs MS-Kermit to execute commands from the file  that  you  specify.
  3496. The  current directory is searched for the file first, and then any directories
  3497. listed in the PATH environment variable.  The  command  file  may  include  any
  3498. valid  Kermit-MS  commands, including TAKE, but it cannot include characters to
  3499. be sent to a remote host  after  a  CONNECT  command  (use  scripts  for  that,
  3500. described  below).    Execution  of  a  TAKE  file  may  be cancelled by typing
  3501. Control-C at the keyboard.
  3502.  
  3503. An implicit TAKE command is executed upon the initialization file, MSKERMIT.INI
  3504. (or  another  file  specified  in the "-f" command-line argument), whenever you
  3505. start MS-Kermit.  The MSKERMIT.INI file contains any commands you  want  to  be
  3506. executed  each  time  you  run Kermit.  A sample is shown above, and a more am-
  3507. bitious example is shown in section 5.8.
  3508.  
  3509. Commands within TAKE files, unlike interactive commands, may  include  trailing
  3510. comments,  preceded  by semicolons (if a real semicolon is needed in a command,
  3511. express it as "\;" and it will not be mistaken for the start of a comment).
  3512.  
  3513.   set port 2      ; Select the modem port.
  3514.   set speed 1200  ; Set the baud rate for the modem.
  3515.   connect         ; Conduct a terminal session.
  3516.   hangup          ; Hang up the phone after escaping back.
  3517.  
  3518. Note the HANGUP command after CONNECT.  The HANGUP command is not executed  un-
  3519. til  after you escape back from your CONNECT session.  If this file were called
  3520. MODEM.CMD, the following TAKE command would execute it:  
  3521.  
  3522.   Kermit-MS>take modem.cmd
  3523.  
  3524. This directs MS-Kermit to find the MODEM.CMD file, open it,  execute  the  com-
  3525. mands  in  it,  close  it, and return to the MS-Kermit> prompt when done.  This
  3526. process can take a while on floppy-disk based systems.
  3527.  
  3528. Commands from the TAKE file will normally  not  be  displayed  on  your  screen
  3529. during  execution.   If you want to see them as they are executing, you can SET
  3530. TAKE-ECHO ON (for instance, at the beginning or end of your MSKERMIT.INI file).
  3531. With  the  echoing ON, comments are also displayed for reference, but the semi-
  3532. colon is not shown.
  3533.  
  3534. TAKE files may be nested to any reasonable level.  A command file that was  in-
  3535. voked by another command file returns to its invoking command file, rather than
  3536. to the MS-Kermit> prompt.
  3537.  
  3538. There is currently no parameter substitution mechanism for TAKE files.
  3539.  
  3540. Warnings:
  3541.  
  3542.    - An explicit query mark ("?") in a TAKE file will cause a help message
  3543.      to be displayed and the rest of the line will be read as another com-
  3544.      mand.
  3545. 5.6.1. Program Management Commands                                      Page 65
  3546.  
  3547. -------------------------------------------------------------------------------
  3548.    - Since TAKE file processing discards all characters from a line begin-
  3549.      ning with the first semicolon, it is normally not possible to include
  3550.      semicolons as part of the commands themselves, e.g.
  3551.  
  3552.        get dska:foo.bar;6
  3553.  
  3554.      To get around this restriction, you may precede such semicolons  with
  3555.      a backslash:
  3556.  
  3557.        get dska:foo.bar\;6
  3558.  
  3559.  
  3560. The -F Command
  3561.  
  3562. Syntax: -F filespec
  3563.  
  3564. The  "-f"  command  is  effective  only  on the DOS command line.  It instructs
  3565. MS-Kermit to use the specified file as its  initialization  file,  rather  than
  3566. MSKERMIT.INI.    Unlike other command-line arguments, "-f" does not, of itself,
  3567. cause MS-Kermit to exit upon completion.  Example:
  3568.  
  3569.   C>kermit -f sunday.ini
  3570.   Kermit-MS>
  3571.  
  3572. The -F command line option allows different MS-Kermit initialization  files  to
  3573. coexist.  You can create batch commands to invoke Kermit in different ways, for
  3574. instance MONDAY.BAT might contain "kermit -f monday.ini",  TUESDAY.BAT  "kermit
  3575. -f tuesday.ini", etc.
  3576.  
  3577.  
  3578. The ECHO Command
  3579.  
  3580. Syntax: ECHO [string]
  3581.  
  3582. The  ECHO  command  writes  the string to the screen, without adding a carriage
  3583. return or line feed.  ECHO may be used to report progress during execution of a
  3584. TAKE command file, or to issue prompts during the execution of a script.  
  3585.  
  3586.   ECHO Part one completed...\13\10
  3587.  
  3588. The  numbers  at the end are "backslash codes" for ASCII control characters, in
  3589. this case carriage return (\13) and linefeed (\10).  Since the ECHO command in-
  3590. terprets   backslash  codes,  ANSI.SYS  and  similar  console  drivers  can  be
  3591. programmed through this command by embedding ANSI escape sequences (see section
  3592. 5.15.3) in the echo string.
  3593.  
  3594.  
  3595. The COMMENT Command
  3596.  
  3597. Syntax: COMMENT text
  3598.  
  3599. The  COMMENT  command  lets  you add comments to a TAKE command file.  The word
  3600. COMMENT (or any unique prefix thereof) must appear as the  first  word  on  the
  3601. line.  The COMMENT command may also be entered interactively.  It has no effect
  3602. at all.  Comments may also be entered in TAKE files,  but  not  on  interactive
  3603. command lines, by using the semicolon (";") character.  Unlike the COMMENT com-
  3604. 5.6.1. Program Management Commands                                      Page 66
  3605.  
  3606. -------------------------------------------------------------------------------
  3607. mand, semicolon comments may appear on the same line as a Kermit command.   Ex-
  3608. ample:
  3609.  
  3610.   COMMENT - MS-Kermit command file to connect port 2 to an IBM mainframe
  3611.   set port 2
  3612.   set speed 4800   ; Baud rate is 4800
  3613.   do ibm           ; Set parameters for IBM linemode
  3614.   connect          ; Be a terminal
  3615.  
  3616. Question marks should not be included in comments, as they will invoke the help
  3617. function.
  3618.  
  3619.  
  3620. The DEFINE Command
  3621.  
  3622. Syntax: DEFINE macro-name [command [, command [, ...]]]
  3623.  
  3624. Command macros provide another way of collecting many commands  into  a  single
  3625. command.    The difference between a macro and a TAKE file is that Kermit keeps
  3626. all its macro definitions in memory, and can execute them as many times as  you
  3627. like,  without  having  to look them up on disk, whereas every time you issue a
  3628. TAKE command, Kermit has to access a disk.  But... you can have  as  many  TAKE
  3629. command  files  as  you  like,  and  they  can  be as long as you want, whereas
  3630. MS-Kermit's memory for storing macro definitions is limited.  You can put macro
  3631. definitions and DO commands for them in TAKE files (or for that matter, you can
  3632. put TAKE commands in macro definitions).
  3633.  
  3634. Kermit-MS command  macros  are  constructed  with  the  DEFINE  command.    Any
  3635. Kermit-MS commands may be included.  Example:
  3636.  
  3637.   define telenet set parity mark, set baud 1200, connect
  3638.  
  3639. A macro can be undefined by typing an empty DEFINE command for it, like 
  3640.  
  3641.   define telenet
  3642.  
  3643. A  macro  definition  may be no longer than 128 characters.  Longer definitions
  3644. can be accomplished by "chaining."  Example:
  3645.  
  3646.   define setup set port 1, set speed 19200, set par even, do setup2
  3647.   define setup2 set flo no, set handsh xon, set local on, do setup3
  3648.   define setup3 set timer on, set terminal color 1 31 45, do setup4
  3649.   define setup4 set warning on, set incomplete keep, connect
  3650.  
  3651. DO SETUP will invoke all of these commands.  The commas  above  stand  for  the
  3652. carriage  returns  needed  by  individual  commands.    Commas  must be used to
  3653. separate commands in macro definitions; carriage returns (\13) cannot be  used.
  3654. When  control or other special characters are needed in a macro they may be ex-
  3655. pressed in backslash number form, \nnn.
  3656.  
  3657. The SHOW MACROS command displays the value of all currently defined macros, and
  3658. tells how much space is left for further definitions.
  3659. 5.6.1. Program Management Commands                                      Page 67
  3660.  
  3661. -------------------------------------------------------------------------------
  3662. The DO Command
  3663.  
  3664. Syntax: DO macro-name
  3665.  
  3666. A  Kermit-MS  command  macro  is  invoked  using the DO command.  For instance,
  3667. Kermit-MS comes with a predefined macro  to  allow  convenient  setup  for  IBM
  3668. mainframe  line-mode  communications; to invoke it, you would type DO IBM.  The
  3669. IBM macro is defined as "set timer on, set  local-echo  on,  set  parity  mark,
  3670. handshake xon, set flow none".  You can use the DEFINE command to redefine this
  3671. macro or remove the definition altogether.
  3672.  
  3673. There is no automatic way to undo the effect of a macro.  If you  need  to  ac-
  3674. complish  this  effect,  you should define another macro for that purpose.  For
  3675. instance, to undo the effect of "do ibm" so that you could connect to,  say,  a
  3676. DEC VAX, you could:
  3677.  
  3678.   def vax set par none,set hand none,set flo x,set tim off,set loc off
  3679.  
  3680. Then  you  can  "do  ibm" whenever you want to use the IBM system, and "do vax"
  3681. whenever you want to use the VAX.
  3682.  
  3683. If you wish to view the macro expansion whenever you issue a  DO  command,  you
  3684. can SET TAKE-ECHO ON.
  3685.  
  3686.  
  3687. Local File Management Commands
  3688.  
  3689. These  commands  are  executed  on your local PC, and generally invoke DOS ser-
  3690. vices.  This allows you to perform common DOS functions without leaving Kermit.
  3691. All  file specifications may include device and/or directory fields.  The local
  3692. file management commands are:
  3693.  
  3694. CWD path
  3695.         Changes  the  current  working  directory  to  the  given  path.    All
  3696.         references to local file names without explicit  paths  will  refer  to
  3697.         that  path.  A drive letter may be included to also change disk drives.
  3698.         This command affects Kermit and any inferior programs that you  RUN  or
  3699.         PUSH  to,  but  your  previous disk and directory are restored when you
  3700.         exit from Kermit.
  3701.  
  3702. DELETE filespec
  3703.         Deletes  the  specified  file  or  files.   As in DOS, the names of the
  3704.         deleted files are not listed, only the  message  "file(s)  deleted"  or
  3705.         "file(s)  not  found",  and  if  you  give  the  command  "delete *.*",
  3706.         Kermit-MS will prompt "Are you sure?" since DOS is doing the work.
  3707.  
  3708. DIRECTORY [filespec]
  3709.         Lists  the  names,  sizes,  and  creation dates of files that match the
  3710.         given file specification.  If no filespec  is  given,  the  command  is
  3711.         equivalent to DIR *.*.  Normal DOS switches are effective.
  3712.  
  3713. SPACE   Performs  the MS-DOS CHKDSK function by running the CHKDSK program from
  3714.         the current path.  CHKDSK summarizes your disk and memory usage.
  3715. 5.6.1. Program Management Commands                                      Page 68
  3716.  
  3717. -------------------------------------------------------------------------------
  3718. RUN command
  3719.         Passes  the  command  line to COMMAND.COM for execution.  Any legal DOS
  3720.         operation is permitted: running a program (perhaps  with  command  line
  3721.         arguments  or i/o redirection), executing a DOS command, or executing a
  3722.         batch file.  The COMMAND.COM file should be in the current path.   Ker-
  3723.         mit  is  suspended  while  the  command  is  executed and automatically
  3724.         resumes afterward.  You may even nest RUN KERMIT commands several times
  3725.         if  memory  is  available.    The  command will be executed directly by
  3726.         COMMAND.COM so follow the rules of DOS.  Example:  
  3727.  
  3728.           Kermit-MS>run more < kim.txt
  3729.  
  3730. TYPE filespec
  3731.         Displays  the  specified  local file on the screen.  Automatic pause is
  3732.         not available at the end of a page (but see above example  for  how  to
  3733.         accomplish this).  On most systems, Ctrl-S can be typed to stop scroll-
  3734.         ing and Ctrl-Q to continue scrolling.
  3735. 5.6.1. Program Management Commands                                      Page 69
  3736.  
  3737. -------------------------------------------------------------------------------
  3738. 5.6.2. COMMANDS FOR TERMINAL CONNECTION
  3739.  
  3740. The CONNECT command connects your PC as a terminal to the remote system so that
  3741. you  may conduct a session there, and the HANGUP command may be used to discon-
  3742. nect your modem (if you have one) from the remote system.  There  is  presently
  3743. no  DIAL  command;  modems  may be dialed "manually" during CONNECT or by using
  3744. scripts.  Scripts are described in detail in subsequent sections.
  3745.  
  3746. For completeness, the descriptions below contain copious reference to  the  SET
  3747. commands,  which  let  you  modify  all  sorts  of  terminal  and communication
  3748. parameters (the SET commands are described in a later section).   MS-Kermit  is
  3749. initially  set up with the following parameters, so that you only need to issue
  3750. SET commands for those that need to be changed:
  3751.  
  3752.     PORT                    1 (in most cases, e.g. COM1 on the IBM PC family)
  3753.     TERMINAL                VT102(*) emulation (on the IBM PC  family  and  DEC
  3754.                             Rainbow)
  3755.     SPEED                   Whatever the serial card is currently set to.
  3756.     PARITY                  None
  3757.     FLOW-CONTROL            XON/XOFF
  3758.     HANDSHAKE               None
  3759.     LOCAL-ECHO              Off
  3760.     DISPLAY                 7-bit characters
  3761.     INPUT TRANSLATION       Off
  3762.     ESCAPE                  Control-Rightbracket
  3763.  
  3764. (*)  The  VT102  terminal  is compatible with the VT100, but includes a few ad-
  3765. ditional functions.
  3766.  
  3767.  
  3768. The CONNECT Command
  3769.  
  3770. Syntax: CONNECT -or- C
  3771.  
  3772. The CONNECT command establishes  an  interactive  terminal  connection  to  the
  3773. remote  system  using the currently selected communications port (SET PORT COM1
  3774. or COM2) with all settings currently in effect for  that  port,  emulating  the
  3775. currently selected type of terminal.
  3776.  
  3777. During  CONNECT,  the  characters you type are sent out the communication port,
  3778. and the characters that arrive at the port are displayed on the screen  or  in-
  3779. terpreted  by  the  selected  terminal  emulator.    If  you SET LOCAL-ECHO ON,
  3780. MS-Kermit will also display the characters you type on the screen.
  3781.  
  3782. Before you issue the CONNECT command, be sure to set the correct  communication
  3783. speed  (SET  SPEED)  and any other necessary communication parameters (e.g. SET
  3784. PARITY, SET LOCAL-ECHO).  If you have SET DEBUG ON, then (on  certain  systems,
  3785. particularly the IBM PC), terminal emulation will be disabled and received con-
  3786. trol characters will be displayed in special notation.
  3787.  
  3788. By default, 7-bit ASCII characters are displayed on the screen.    If  you  SET
  3789. DISPLAY  8, then 8-bit characters will be used (useful for "national" character
  3790. sets).  Character translation will be done according to any SET TRANSLATION IN-
  3791. PUT  and  SET  KEY  commands you have issued.  In addition, characters that are
  3792. sent to the screen will also be recorded in a disk file or on a printer if  you
  3793. have issued a LOG SESSION command.
  3794. 5.6.2. COMMANDS FOR TERMINAL CONNECTION                                 Page 70
  3795.  
  3796. -------------------------------------------------------------------------------
  3797. To  get back to the PC, type the escape character followed by the letter C (for
  3798. "Close connection").  On most MS-DOS systems the  escape  character  is  Ctrl-]
  3799. (Control-Rightbracket).    That  means,  hold down the Ctrl key, press "]", and
  3800. then type the letter C.
  3801.  
  3802.   Kermit-MS>connect        Connect to remote system.
  3803.  
  3804.     Conduct terminal session here...
  3805.  
  3806.   ^]c                      Escape back to PC.
  3807.   Kermit-MS>               Prompt reappears.
  3808.  
  3809. This is called "escaping back".  You can use the SET ESCAPE command  to  change
  3810. the escape character to something besides "^]", or you can assign the escaping-
  3811. back operation to a single key or key combination with SET KEY (on the  IBM  PC
  3812. the default for this is Alt-X).
  3813.  
  3814. You can include the CONNECT command in a TAKE command file, but not "bare" text
  3815. to be sent to the remote system during CONNECT (use scripts for that, see  Sec-
  3816. tion  5.7).    When a TAKE file includes a CONNECT command, no further commands
  3817. will be executed from the file until after you escape back.
  3818.  
  3819. When you CONNECT, the program attempts to raise the DTR and RTS RS-232 signals,
  3820. and  it  takes no specific action to lower them unless you explicitly issue the
  3821. HANGUP command; thus you can EXIT from Kermit-MS and restart it  without  drop-
  3822. ping  a  dialup connection.  While CONNECTed, you can communicate directly with
  3823. an autodialer or "smart modem" to control the communications line, hang it  up,
  3824. and the like, for instance, by typing AT commands to a Hayes-like modem.
  3825.  
  3826.   Kermit-MS>set speed 2400 (See Section 5.6.9)
  3827.   Kermit-MS>connect
  3828.   AT                       Now you're talking to the modem.
  3829.   OK                       Your modem responds
  3830.   ATDT8765432              Type the modem's dialing command.
  3831.   RINGING
  3832.   CONNECT 2400
  3833.   Welcome to ...           Now you're talking to the host computer.
  3834.   Please login:
  3835.  
  3836. MS-Kermit  makes  no attempt to monitor the modem's Carrier Detect (CD) or Data
  3837. Set Ready (DSR) signals, and will take no notice if they drop.  Thus it is  not
  3838. possible  to  automatically  terminate  a  session if the connection is broken.
  3839. However, you may query  the  status  of  these  modem  signals  yourself  using
  3840. Kermit's SHOW MODEM command.
  3841.  
  3842. When  using Kermit to connect two PCs "back to back," SET LOCAL-ECHO ON so that
  3843. when you CONNECT to the other PC to send messages to its operator, you can  see
  3844. what  you are typing.  Depending on the system, you may have to type a carriage
  3845. return and a linefeed (Control-J) at the end of each line in order to make  the
  3846. display look right.
  3847. 5.6.2. COMMANDS FOR TERMINAL CONNECTION                                 Page 71
  3848.  
  3849. -------------------------------------------------------------------------------
  3850. The HANGUP Command
  3851.  
  3852. On  serial  port  connections, the HANGUP command attempts to momentarily lower
  3853. the modem signals DTR and RTS.  It may be used to hang up the phone when dialed
  3854. up  through  a  modem, or to get the attention of port contention units or ter-
  3855. minal concentrators that operate in this manner.   On  direct  connections,  it
  3856. will  probably  have no effect.  On local area network connections, the network
  3857. session is fully terminated.
  3858.  
  3859.  
  3860. TERMINAL EMULATION
  3861.  
  3862. The IBM PC version of Kermit-MS emulates the DEC VT102 terminal by default, and
  3863. may  also  be  instructed  to  emulate  the  DEC VT52, the Heath/Zenith-19, the
  3864. Tektronix 4010 graphics terminal, or no terminal at all,  selectable  with  the
  3865. SET TERMINAL command.  Emulation of each of these terminals is nearly complete.
  3866. VT102 emulation lacks only smooth scroll and 132 column mode (some  EGA  boards
  3867. allow it).  Double-height, double-width characters are supported, but simulated
  3868. using ordinary characters.
  3869.  
  3870. The IBM PC's 40-column (large character) screen mode may be used during CONNECT
  3871. if  you SET TERMINAL NONE (but you may also have to inform the remote host that
  3872. your screen width is 40).  This can provide improved  readability  to  visually
  3873. impaired  persons,  but at the expense of terminal emulation.  To use 40-column
  3874. mode, enter the DOS command "MODE 40" (or CO40 or BW40).
  3875.  
  3876. On color monitors, the foreground and background colors may be  set  using  SET
  3877. TERMINAL  COLOR,  and  inverse/normal video display may also be selected, along
  3878. with many other terminal parameters.  A complete list of the commands,  default
  3879. key configurations, and escape sequences accepted by the IBM PC Kermit terminal
  3880. emulator is given in section 5.15.1.   Non-IBM-compatible  PCs  have  different
  3881. terminal emulation options.  See section 5.9.
  3882.  
  3883.  
  3884. Escape-Level Commands
  3885.  
  3886. The  escape  character,  normally Control-], is used to regain the attention of
  3887. Kermit-MS during CONNECT  (you  can  change  the  escape  character  using  SET
  3888. ESCAPE).  When you type the escape character, Kermit-MS waits for you to follow
  3889. it with a single character command.  For instance, the single character command
  3890. "?"  produces  a  list of available single character commands.  This command is
  3891. executed immediately; it may not be edited, and the program does not wait for a
  3892. carriage  return  to confirm it.  Table 5-2 shows CONNECT escape-level commands
  3893. available in Kermit-MS.  Typing any other  character  (except  the  space  bar,
  3894. which is the "null command") after the escape character will cause Kermit-MS to
  3895. beep, but will do no harm.  These actions are also Kermit action verbs and  can
  3896. be assigned to single keys.  See SET KEY for details.
  3897.  
  3898.  
  3899. The Mode Line
  3900.  
  3901. When  you  first  issue the CONNECT command, a message (on some systems, an in-
  3902. verse video "mode line") will display the most important facts about  the  con-
  3903. nection you've just established, so that you can quickly diagnose any problems.
  3904. Here's what the IBM PC mode line looks like:
  3905. 5.6.2. COMMANDS FOR TERMINAL CONNECTION                                 Page 72
  3906.  
  3907. -------------------------------------------------------------------------------
  3908. -------------------------------------------------------------------------------
  3909.  
  3910.  
  3911.  
  3912.     ?   Help -- Lists the available single-character commands.
  3913.     0   (the digit zero) Transmit a NUL (ASCII 0).
  3914.     B   Transmit a BREAK signal.
  3915.     L   Transmit a Long BREAK signal (on some systems).
  3916.     C   Close the connection and return to Kermit-MS prompt level.
  3917.     H   Hangup the phone by lowering DTR and CTS momentarily.
  3918.     F   File the current screen in the screen dump file.
  3919.     M   Toggle the mode line, i.e. turn it off if it is on or vice versa.
  3920.     P   Push to DOS; get back to CONNECT by typing EXIT.
  3921.     Q   Temporarily quit logging the remote session.
  3922.     R   Resume logging the remote session.
  3923.     S   Show the status of the connection.
  3924.     ^]  (or whatever you have set the escape character to be)
  3925.         Typing the escape character twice sends one copy of it to the connected
  3926.         host.
  3927.  
  3928.         Table 5-2:   Kermit-MS Single-Character CONNECT Escape Commands
  3929.  
  3930. -------------------------------------------------------------------------------
  3931.  
  3932. Esc-chr:^] help:^]? port:1 speed:9600 parity:odd echo:rem VT102 .... PRN
  3933.  
  3934. This shows that the escape character is Ctrl-Rightbracket, that you would  type
  3935. Ctrl-rightbracket followed by question mark ("^]?") to get help during CONNECT,
  3936. that you are connected on port 1 at 9600 baud with odd parity and remote  echo,
  3937. and  that  a  VT102  terminal  is  being emulated.  The four dots represent the
  3938. VT102s LEDs (they turn into the digits 1,2,3,4 when "lit") and PRN will show up
  3939. if the printer is activated (e.g. by Ctrl-PrintScreen).
  3940.  
  3941. The  mode  line  may be turned on and off using SET MODE, or the CONNECT escape
  3942. character followed by the letter M.
  3943.  
  3944.  
  3945. Screen Rollback
  3946.  
  3947. On the IBM PC and some  other  systems  (see  Table  5-5),  Kermit-MS  provides
  3948. several  pages  of screen memory which let you recall earlier terminal screens.
  3949. These may be scrolled up and down using keys as shown in Table 5-6.    For  in-
  3950. stance,  the  IBM PC uses PgUp (previous screen), PgDn (next screen), Ctrl-PgUp
  3951. and Ctrl-PgDn (one line at a time).  Only lines that scroll off the top of  the
  3952. screen  are  saved.   When an application clears the screen, that screen is not
  3953. saved.  These functions and others may be assigned to different keys  with  the
  3954. SET KEY command.
  3955.  
  3956. If  you  have  rolled the screen back and a new character must be displayed, it
  3957. will normally appear at the current cursor position on the old screen.  This is
  3958. useful  when  you  are trying to copy something from a previous screen.  If you
  3959. wish new characters to appear in their proper place on the "newest" screen, you
  3960. can SET TERMINAL ROLL ON.
  3961. 5.6.2. COMMANDS FOR TERMINAL CONNECTION                                 Page 73
  3962.  
  3963. -------------------------------------------------------------------------------
  3964. Screen Dump
  3965.  
  3966. The  screen  dump  feature  writes the contents of the current screen to a file
  3967. (KERMIT.SCN unless another file was selected by the SET DUMP command) when  the
  3968. CONNECT  escape-level  command F is typed.  The screen dump file is appended to
  3969. on each successive screen dump,  with  each  screen  separated  by  a  formfeed
  3970. (Ctrl-L).    This  feature may be used in conjunction with screen rollback -- a
  3971. handy way to recapture screenfuls of laboriously typed-in text after  a  remote
  3972. host  has  crashed  without saving your work.  The corresponding action verb is
  3973. "dump".  Screen dump does not function when in Tektronix graphics mode; instead
  3974. one of many graphics screen capture programs may be used independently commonly
  3975. via the DOS Shift PrtSc key combination or by LOGging the incoming byte stream.
  3976.  
  3977. A screen dump differs from a session log in two  ways.    First,  each  desired
  3978. screen  must  be  manually  filed,  and  second,  the screen dump file has been
  3979. stripped of any escape sequences, whereas the session log records them (see LOG
  3980. SESSION).
  3981.  
  3982.  
  3983. Printer Control
  3984.  
  3985. During  terminal emulation, a locally attached printer may be controlled in the
  3986. normal manner, on most systems.  Pushing the "Print  Screen"  key  (shifted  on
  3987. some  systems)  will  cause the current contents of the screen to be printed by
  3988. DOS; holding down Ctrl while depressing Print Screen will alternately start and
  3989. stop  the  spooling  of incoming characters to the printer.  On the IBM PC, the
  3990. mode line will show PRN when the printer is activated in this manner.  ^P or ^N
  3991. are  sent  to  the host during terminal emulation and do not toggle printing as
  3992. they do when you're talking directly to DOS.  CTRL-Print-Screen  can  be  simu-
  3993. lated  with  the  Kermit-MS  LOG  PRN  and  CLOSE commands.  VT102 (ANSI) style
  3994. host-controlled transparent printing is also supported on the IBM PC.  See sec-
  3995. tion 5.16.6 for technical information about MS-Kermit's printer control.
  3996.  
  3997.  
  3998. Graphics
  3999.  
  4000. MS-Kermit  on the IBM PC, compatibles, and several other systems, is capable of
  4001. emulating a Tektronix 4010 graphics terminal, for use with host-based  software
  4002. that can generate Tektronix control codes.  When you enter Tektronix emulation,
  4003. your cursor will disappear.  Don't be alarmed, this is how Tektronix  terminals
  4004. behave.
  4005.  
  4006. The  Tektronix  emulator  implements a mixture of Tek 4010 and 4014 features to
  4007. draw characters, lines, and dots in graphics mode.  These  Tektronix  terminals
  4008. have a graphics display 780 dots high by 1024 dots wide.  They use storage tube
  4009. technology whereby a dot stays illuminated until the  full  screen  is  erased.
  4010. They  also  lack  cursor  keys.  Kermit's Tek emulator maps the 1024 by 780 dot
  4011. display to the PC's current screen dimensions, say 640 across  by  200  or  350
  4012. dots high, and retains limited use of the cursor keys.  It automatically senses
  4013. the active  display  adapter  (EGA,  CGA,  Hercules,  Mono,  and  AT&T/Olivetti
  4014. 640x400)  and retains screen coloring (EGA) and the current graphics image (EGA
  4015. and Hercules) if the adapter has sufficient memory.  Pure  monochrome  systems,
  4016. of  course,  lack  a  graphics capability; in this case Kermit approximates the
  4017. graphic image by writing dots as plus signs.
  4018.  
  4019. Tektronix graphics mode is entered two different ways, automatically and volun-
  4020. 5.6.2. COMMANDS FOR TERMINAL CONNECTION                                 Page 74
  4021.  
  4022. -------------------------------------------------------------------------------
  4023. tarily:
  4024.  
  4025.    1. Automatically  (which you can prevent via the Kermit command DISABLE
  4026.       TEK).  While emulating a VT102, VT52, or Heath-19, reception of  the
  4027.       byte pair ESCAPE Control-L causes the PC to change to graphics mode,
  4028.       clear the screen, and obey new  input  as  Tektronix  commands.    A
  4029.       second   automatic   entry  is  reception  of  the  escape  sequence
  4030.       "ESC [ ? 3 8 h" which does the same as above except  the  screen  is
  4031.       not  cleared.    Automatic  mode  is  exited  by either reception of
  4032.       Control-X or "ESC [ ? 3 8 l" (lower case L), or by toggling the ter-
  4033.       minal type (ALT minus, Kermit verb\KTermtype) to VT102, or something
  4034.       other than TEK.  (These "ESC [ ? 3 8 h/l" sequences derive from  the
  4035.       DEC VT340 terminal.)
  4036.  
  4037.    2. Voluntary mode is when terminal type TEK4010 is selected by the Ker-
  4038.       mit command SET TERMINAL TEK4010 or by toggling to it as above.   It
  4039.       is  exited  by  SET  TERMINAL another-kind or by toggling to another
  4040.       kind.  ENABLE or DISABLE TEK and the exit-Tek-mode escape  sequences
  4041.       are not applicable to voluntary mode.
  4042.  
  4043. Here are several common questions about Tek mode, and their answers:
  4044.  
  4045.    1. "How  do  I  escape  from  graphics  mode  back  to  being a regular
  4046.       terminal?"  Within CONNECT mode, you can type  the  \KTermtype  key,
  4047.       which  is  assigned  by  default to Alt-Minus.  Repeated pressing of
  4048.       this key "toggles"  among  Kermit's  terminal  types,  VT102,  VT52,
  4049.       Heath-19, and Tektronix.  You can also escape back to Kermit-MS com-
  4050.       mand level and issue an explicit SET TERMINAL command to change  the
  4051.       terminal type.
  4052.  
  4053.    2. "How  can  I return to the graphics screen without erasing it?"  The
  4054.       graphics screen is preserved if your graphics adapter has sufficient
  4055.       memory  (see  Table 5-3).  In this case, both your text and graphics
  4056.       screens will be preserved when you toggle back and forth  between  a
  4057.       character terminal (e.g. VT102) and Tektronix.
  4058.  
  4059.    3. "How do I erase the graphics screen?"  You can type the \KReset key,
  4060.       which is normally assigned to Alt-=.  The screen also clears if  the
  4061.       host sends a Control-L or ESC Control-L.
  4062.  
  4063. While acting as a Tek terminal Kermit uses the keyboard translation appropriate
  4064. to the VT102 terminal.  However, received escape sequences are  interpreted  by
  4065. the  Tek emulator and VT102 escape codes are inoperative.  The Tek emulator ab-
  4066. sorbs the ESCAPE and following character  and  treats  any  additional  unknown
  4067. items as ordinary text.
  4068.  
  4069. The  emulator  can  display text characters from a built-in 8-by-8 dot font for
  4070. characters Space through DELete (no control codes nor special characters).    A
  4071. backspace  operation  erases  the character under the final cursor location (an
  4072. extension beyond a real Tektronix 4010).  Tabs are converted to single  spaces.
  4073. Only the low 7 bits of the character are used.
  4074.  
  4075. While in Tek mode the emulator behaves as a simple TTY device for ordinary text
  4076. and as a line or dot drawing Tektronix device for commands listed in Table 5-8.
  4077. The  screen  resolution  is  governed by the kind of active display adapter and
  4078. monitor in the PC (Table 5-3).  Kermit senses this automatically when  graphics
  4079. 5.6.2. COMMANDS FOR TERMINAL CONNECTION                                 Page 75
  4080.  
  4081. -------------------------------------------------------------------------------
  4082. mode  is  entered.  Graphics are saved on page 1 of screen memory.  Coloring is
  4083. determined by the current terminal status, either the default  screen  or  that
  4084. overridden by the command SET TERMINAL COLOR.
  4085.  
  4086. -------------------------------------------------------------------------------
  4087.  
  4088.  
  4089.  
  4090. Display Adapter               Display Mode                                     
  4091. EGA w/256KB    Hi res color   16 dec  640x350, graphics saved, 16 colors.
  4092.                Med res color  14      640x200, graphics saved, 8 colors.
  4093.                Monochrome     15      640x350, graphics saved, b/w.
  4094. EGA w/64KB     Hi res color   16      640x350, graphics not saved,
  4095.                                        4 colors of red, white, blue, black.
  4096.                Med res color  14      640x200, graphics saved, 8 colors.
  4097.                Monochrome     15      640x350, graphics not saved.
  4098. CGA            Color          6       640x200, graphics not saved, b/w.
  4099. Hercules       Monochrome     none    720x348, graphics saved if memory.
  4100. Monochrome     Monochrome     7       80 by 25 text, graphics not saved.
  4101. AT&T/Olivetti  any            72      640x400, grahics not saved, b/w.
  4102.  
  4103.   Table 5-3:   Adapters Supported by IBM PC MS-Kermit for Tektronix Emulation
  4104.  
  4105. -------------------------------------------------------------------------------
  4106.  
  4107. The technical details of Tektronix emulation are presented in section 5.15.7.
  4108. 5.6.2. COMMANDS FOR TERMINAL CONNECTION                                 Page 76
  4109.  
  4110. -------------------------------------------------------------------------------
  4111. 5.6.3. COMMANDS FOR FILE TRANSFER
  4112.  
  4113. MS-Kermit's SEND, GET, and RECEIVE invoke the Kermit file transfer protocol for
  4114. error-checked transmission  of  files  between  MS-Kermit  and  another  Kermit
  4115. program  on the other end of the connection.  There are also commands for "raw"
  4116. transfer of files (no error checking)  with  systems  that  don't  have  Kermit
  4117. programs:  LOG  SESSION (for capturing text files on your PC) and TRANSMIT (for
  4118. uploading text files to the remote system).
  4119.  
  4120. During file transfer, MS-Kermit normally displays its progress on the screen as
  4121. shown  in  Figure  5-1.  The items in the right-hand column are updated more or
  4122. less at random.  In the current version, the percent done  is  filled  in  only
  4123. when sending files, not when receiving.  Several other display options are also
  4124. available; see SET DISPLAY.
  4125.  
  4126. -------------------------------------------------------------------------------
  4127.  
  4128.  
  4129.  
  4130.              Kermit-MS: V2.30  8 Jan 88
  4131.  
  4132.              File name: FOT.
  4133.     KBytes transferred: 7
  4134.    Percent transferred: 52%
  4135.                Sending: In progress
  4136.  
  4137.      Number of packets: 74
  4138.          Packet length: 93
  4139.      Number of retries: 2
  4140.             Last error: None
  4141.           Last warning: None
  4142.  
  4143.              Figure 5-1:   MS-Kermit File Transfer Display Screen
  4144.  
  4145. -------------------------------------------------------------------------------
  4146.  
  4147. Although MS-Kermit makes no distinction between text  and  binary  files,  most
  4148. other  Kermit  programs  do.   Therefore, before you attempt to transfer binary
  4149. files with another type of system (say, a VAX, or an IBM mainframe), be sure to
  4150. give  the appropriate command -- usually something like SET FILE TYPE BINARY --
  4151. to the Kermit on the remote end.
  4152.  
  4153. File transfers involving floppy disks will be slow and noisy.  Hard  disks  are
  4154. much  faster  (and  quieter),  and RAM disks faster still (and totally silent).
  4155. But if you store files on a RAM disk, be sure to move them to a real  disk  be-
  4156. fore  turning  off your PC.  And before attempting to transfer files to the PC,
  4157. make sure you have enough room on the selected device.  Kermit does not provide
  4158. a way for you to change disks during a file transfer.
  4159.  
  4160.  
  4161. The SEND Command
  4162.  
  4163. Syntax:  SEND filespec1 [filespec2]
  4164.  
  4165. The  SEND  command causes a file or file group to be sent from the local MS-DOS
  4166. system to the Kermit on the remote system.  The remote Kermit may be running in
  4167. 5.6.3. COMMANDS FOR FILE TRANSFER                                       Page 77
  4168.  
  4169. -------------------------------------------------------------------------------
  4170. either  server or interactive mode; in the latter case, you should already have
  4171. given it a RECEIVE command and escaped back  to  your  PC.    S  is  a  special
  4172. non-unique abbreviation for SEND.
  4173.  
  4174. filespec1  may  contain  the    wildcard  characters  "*" to match zero or more
  4175. characters within a field, and/or "#" (first position) or  "?"  (elsewhere)  to
  4176. match any single character.  If filespec1 contains wildcard characters then all
  4177. matching files will be sent, in the same order that MS-DOS would show them in a
  4178. directory  listing.    If  filespec1  specifies  a  single file, you may direct
  4179. Kermit-MS to send that file with a different name, given in filespec2.  For in-
  4180. stance, in the command 
  4181.  
  4182.   Kermit-MS>send foo.bar framus.widget
  4183.  
  4184. filespec2  begins  with  the  first nonblank character after filespec1 and ends
  4185. with the carriage return; thus it may contain blanks or other  unusual  charac-
  4186. ters  that  may  be  appropriate on the target machine.  The alphabetic case of
  4187. text in filespec2 is preserved in transmission, so if case matters on the  tar-
  4188. get system, be sure to type filespec2 appropriately.
  4189.  
  4190. If  the  SEND command is specified by itself on the command line, then you will
  4191. be prompted separately for the name of the file to send, and the name  to  send
  4192. it under:
  4193.  
  4194.   Kermit-MS>send
  4195.    Local Source File: c:\chris\xcom1.txt
  4196.    Remote Destination File: com1.txt
  4197.  
  4198. If  a file can't be opened for read access, standard MS-DOS recovery procedures
  4199. will take place.  For example:
  4200.  
  4201.   Not ready error reading drive A
  4202.   Abort, Retry, Ignore?
  4203.  
  4204. Kermit remains active even if you select "Abort" (DOS's word, not ours).
  4205.  
  4206. Files will be sent with  their  MS-DOS  filename  and  filetype  (for  instance
  4207. FOO.TXT,  no  device or pathname).  Special characters in the file name are not
  4208. converted.  If there is no filetype, then only the name will be  sent,  without
  4209. the  terminating dot.  Each file is sent as is, with no conversions done on the
  4210. data, except for possibly stopping at a terminating  Control-Z  character  (see
  4211. the SET EOF command).
  4212.  
  4213. Once  you  give  Kermit-MS the SEND command, the name of each file will be dis-
  4214. played on your screen as the transfer begins.  Packet, retry, and other  counts
  4215. will be displayed along with informational messages during the transfer, in the
  4216. style specified by SET DISPLAY.  If the file is successfully  transferred,  you
  4217. will  see  "Complete",  otherwise  there  will  be  an error message.  When the
  4218. specified operation is done, the program will sound a beep.
  4219.  
  4220. Several single-character commands may be given while  a  file  transfer  is  in
  4221. progress:
  4222.  
  4223.   ^X  (Control-X)  Stop  sending the current file and go on to the next one, if
  4224.       any.
  4225. 5.6.3. COMMANDS FOR FILE TRANSFER                                       Page 78
  4226.  
  4227. -------------------------------------------------------------------------------
  4228.   ^Z  Stop sending this file, and don't send any further files.
  4229.  
  4230.   ^C  Return to Kermit-MS command level immediately without sending any kind of
  4231.       notification to the remote system.  (^Z or even ^E is preferable.)
  4232.  
  4233.   ^E  Like  ^C,  but send an Error packet to the remote Kermit in an attempt to
  4234.       bring it back to server or interactive command level.
  4235.  
  4236.   CR  Simulate a timeout: resend the current packet, or NAK the expected one.
  4237.  
  4238. Control-X, Control-Z, and Control-E send the proper protocol  messages  to  the
  4239. remote  Kermit  to  bring it gracefully to the desired state.  Control-C leaves
  4240. the remote Kermit in whatever state it happens to be in,  possibly  retransmit-
  4241. ting  its  last  packet  over and over, up to its retry limit.  You should only
  4242. have to use Control-C in dire emergencies (the  remote  Kermit  is  stuck,  the
  4243. remote  system  crashed, etc), or at those times when you realize that you have
  4244. given a file transfer command to Kermit-MS without first having told the remote
  4245. Kermit about it.
  4246.  
  4247.  
  4248. The RECEIVE Command
  4249.  
  4250. Syntax: RECEIVE [filespec]
  4251.  
  4252. The  RECEIVE  command  tells Kermit-MS to receive a file or file group from the
  4253. other system.  The file is stored under the name it was transmitted  with,  ex-
  4254. cept  that  any  illegal characters are translated to X's.  Kermit-MS passively
  4255. waits for the file to arrive; this command is not to be used when talking to  a
  4256. Kermit  server  (use GET for that).  You should already have issued a SEND com-
  4257. mand to the remote Kermit and escaped back  to  Kermit-MS  before  issuing  the
  4258. RECEIVE command.  R is a special non-unique abbreviation for RECEIVE.
  4259.  
  4260. If  the optional filespec is provided, incoming files will be stored under that
  4261. name.  If the filespec is really just a path then files are  stored  where  the
  4262. path indicates.  If it is an actual filename the first incoming file is renamed
  4263. and any additional files either overwrite the first (if FILE WARNING is OFF) or
  4264. are renamed slightly from the filespec (digits are added to the end of the main
  4265. filename part before the  dot  and  extension)  if  FILE  WARNING  is  ON  (the
  4266. default). The filespec may include any combination of the following fields:
  4267.  
  4268.   Device designator
  4269.       Store the file on the designated device, in  the  current  directory  for
  4270.       that  device.   If no device designator is given, store it on the current
  4271.       default device.
  4272.  
  4273.   Directory path
  4274.       Store  the file in the designated directory.  If no path given, store the
  4275.       file in the current directory.
  4276.  
  4277.   File name
  4278.       Store the file under the name given.  If no name is given, store it under
  4279.       the name it was sent under, converted, if necessary, to suit DOS  conven-
  4280.       tions,  and modified, if SET WARNING ON, to avoid overwriting any file of
  4281.       the same name in the same directory.
  4282.  
  4283. If an incoming file does not arrive in its entirety,  Kermit-MS  will  normally
  4284. 5.6.3. COMMANDS FOR FILE TRANSFER                                       Page 79
  4285.  
  4286. -------------------------------------------------------------------------------
  4287. discard  it  and it will not appear in your directory.  You may change this be-
  4288. havior by using the command SET INCOMPLETE KEEP, which will cause  as  much  of
  4289. the file as arrived to be saved on the disk.
  4290.  
  4291. The same single-character commands are available as during SEND:
  4292.  
  4293.   ^X  Request that the remote Kermit stop sending the current file, and proceed
  4294.       to the next one immediately.  Since this is an optional  feature  of  the
  4295.       Kermit protocol, the remote Kermit might not honor the request.
  4296.  
  4297.   ^Z  Request  that  the  remote  Kermit terminate the entire transfer; this is
  4298.       also an optional feature that may or may not be supported by  the  remote
  4299.       Kermit.
  4300.  
  4301.   ^C, ^E, and CR operate in the same way as they do during SEND.  In this case,
  4302.       ^E should always do what ^Z is supposed to do.
  4303.  
  4304. If WARNING is OFF and you type ^X or ^Z to interrupt the transfer,  you'll  ei-
  4305. ther get a partial new file, or else both the old and the new file of that name
  4306. will be lost, depending on SET INCOMPLETE.  In any case, when WARNING  is  off,
  4307. files with the same name as incoming files will not survive.
  4308.  
  4309. Caution: If an incoming file's name (the part before the dot) corresponds to an
  4310. MS-DOS device name, such as NUL, COM1, CON, AUX, or PRN, output will go to that
  4311. device, rather than to a file with that name.  This is a feature of MS-DOS.
  4312.  
  4313.  
  4314. 5.6.4. Hints for Transferring Large Files
  4315.  
  4316. During  a  prolonged file transfer session, things can go wrong that are beyond
  4317. Kermit's control.  The longer the session, the greater the probability it  will
  4318. be fatally interrupted.  But you can take a few precautions:
  4319.  
  4320.    - Make  sure  there  is sufficient disk space at the receiving end.  If
  4321.      possible, first run a disk utility (such as CHKDSK on MS-DOS systems)
  4322.      to clean out any bad disk blocks.
  4323.  
  4324.    - If you are using a telephone connection, make sure your session won't
  4325.      be interrupted by call waiting, people picking up  other  extensions,
  4326.      etc.
  4327.  
  4328.    - Don't  attempt  to  transfer  a  single file of many megabytes over a
  4329.      telephone connection.  The longer the call, the greater the chance of
  4330.      disconnection  (carrier  loss).   Although it's a bother, it may save
  4331.      time in the long run to break the file up into smaller pieces, trans-
  4332.      fer the pieces, and then recombine on the other end.
  4333.  
  4334.    - SET  INCOMPLETE  KEEP  on  the receiving end, so that if the transfer
  4335.      fails, then the partial file will be retained.  Then  chop  the  part
  4336.      that wasn't transferred into a separate file, reconnect, and send it.
  4337.      Then join the pieces together.
  4338.  
  4339. Consider moving truly massive amounts of data on magnetic media.  "Never under-
  4340. stimate the bandwidth of a station wagon full of magnetic tapes!"
  4341. 5.6.5. Commands for Raw Uploading and Downloading                       Page 80
  4342.  
  4343. -------------------------------------------------------------------------------
  4344. 5.6.5. Commands for Raw Uploading and Downloading
  4345.  
  4346. MS-Kermit  can  be used to send files to, or capture files from, remote systems
  4347. that do not have Kermit programs available.  No error checking or correction is
  4348. done,  so  the  results can very likely contain corrupted characters, spurts of
  4349. noise, gaps, or extraneous system messages or prompts.  The command for upload-
  4350. ing is TRANSMIT, and for downloading LOG SESSION.
  4351.  
  4352. To  minimize  loss  of  data  during  these  operations,  be  sure  to  SET the
  4353. FLOW-CONTROL and HANDSHAKE parameters to match the characteristics of the  sys-
  4354. tem on the other end.
  4355.  
  4356.  
  4357. The TRANSMIT Command
  4358.  
  4359. Syntax: TRANSMIT filespec [prompt-character]
  4360.  
  4361. The  TRANSMIT  command  provides  a  basic raw upload (export) facility to send
  4362. straight ASCII text files to the  host  without  packets,  error  checking,  or
  4363. retransmissions,  but using all the currently selected communication parameters
  4364. for flow control, parity, etc.  Information is read from the disk file  a  line
  4365. at a time, sent out the serial port, and the command waits for a single charac-
  4366. ter prompt (normally linefeed) from the host before sending the next file line.
  4367. A  disk  file line ends with carriage-return-linefeed (CRLF), but only the car-
  4368. riage return is sent, just as you only type carriage return at  the  end  of  a
  4369. line, not CR and LF.  Most remote systems will echo the CR and then also supply
  4370. a LF, which indicates that they have processed  the  line  and  are  ready  for
  4371. another one.  Setting the prompt to binary zero, \0, makes the TRANSMIT command
  4372. proceed without waiting for a prompt.  Pressing the local Return key  simulates
  4373. arrival of a prompt character.
  4374.  
  4375. Typically,  before  using this command to upload a file, you would start a text
  4376. editor (preferably a line-oriented, rather than  full-screen,  editor)  on  the
  4377. remote  host  and put it into text insertion mode.  When the file has been com-
  4378. pletely transmitted, you would manually enter the required sequence for getting
  4379. the  editor out of text insertion mode, and then make any necessary corrections
  4380. by hand.  Here's an example for VAX/VMS:
  4381.  
  4382.   Kermit-MS>set flow xon/xoff Set flow control to match VAX/VMS.
  4383.   Kermit-MS>connect           Connect to VAX.
  4384.   $ edt foo.txt               Start the EDT editor.
  4385.   *i                          Put it into "insert" mode.
  4386.   ^]c                         Escape back to Kermit-MS.
  4387.   Kermit-MS>transmit foo.txt  Upload the file a line at a time.
  4388.    ...                        The lines are displayed on your screen.
  4389.   Kermit-MS>connect           When done, connect back to the VAX.
  4390.   ^Z                          Type Ctrl-Z to exit EDT insert mode.
  4391.   *exit                       Exit from EDT to save the file.
  4392.   $
  4393.  
  4394. If transmission appears to be stuck, you can wake it up by  typing  a  carriage
  4395. return  on  the  keyboard.    You  can  cancel the TRANSMIT command by typing a
  4396. Control-C.  Control-Z's or other control characters in the file  may  have  ad-
  4397. verse  effects  on the host.  For this reason, you should use TRANSMIT only for
  4398. files that contain 7-bit printing  ASCII  characters,  spaces,  tabs,  carriage
  4399. returns, linefeeds, and possibly formfeeds.
  4400. 5.6.5. Commands for Raw Uploading and Downloading                       Page 81
  4401.  
  4402. -------------------------------------------------------------------------------
  4403. The LOG SESSION Command
  4404.  
  4405. Syntax: LOG SESSION [filespec]
  4406.  
  4407. The LOG SESSION command lets you copy the characters that appear on your screen
  4408. during CONNECT into the specified file on the PC.  You can use this command  to
  4409. download files by displaying (usually with a command like TYPE) the file on the
  4410. remote system while logging is in effect.  Example:
  4411.  
  4412.   Kermit-MS>set flow xon/xoff Set flow control to match VAX/VMS.
  4413.   Kermit-MS>connect           Connect to the VAX.
  4414.   $ type foo.bar              Give this command, but don't type CR yet.
  4415.   ^]c                         Escape back.
  4416.   Kermit-MS>log sess foo.bar  Start logging.
  4417.   Kermit-MS>connect           Connect back.
  4418.                               Now type the carriage return.
  4419.   This is the file FOO.BAR.   The file is displayed on your screen
  4420.   Blah blah ...               and captured into PC file FOO.BAR.
  4421.   $                           The prompt is captured too.
  4422.   ^]c                         When done, escape back
  4423.   Kermit-MS>close             and close the log file.
  4424.  
  4425. The PC file FOO.BAR now contains a (possibly  mutilated)  copy  of  the  remote
  4426. computer's  FOO.BAR  file.    It probably has the remote system's prompt at the
  4427. end, which you can edit out.  The session  log  can  also  be  used  to  record
  4428. typescripts,  editing  sessions, Tektronix graphics output, or any other output
  4429. from, or dialog with, the remote computer.  The  LOG  and  CLOSE  commands  are
  4430. described further below, in section 5.6.8.
  4431.  
  4432.  
  4433. 5.6.6. Kermit Server Commands
  4434.  
  4435. Kermit-MS  can  act as a Kermit server, and can also interact with other Kermit
  4436. servers.  Normally, the remote Kermit is put into server mode.  Then the  local
  4437. Kermit  becomes a "client", and may issue repeated commands to the server with-
  4438. out having to connect and escape back repeatedly.  Servers can not only  trans-
  4439. fer  files,  but  can also provide a variety of file management functions.  The
  4440. SERVER command puts MS-Kermit into server mode, and the DISABLE and ENABLE com-
  4441. mands modify the behavior of the server.
  4442.  
  4443. Kermit  servers respond only to information sent as Kermit protocol packets and
  4444. not to ordinary CONNECT-mode commands.  When MS-Kermit is the client,  it  uses
  4445. the  SEND  command (described above) to send files to a server, the GET command
  4446. (not RECEIVE) to get files from a server, the REMOTE  commands  to  invoke  the
  4447. file  management  functions  of the server, and the BYE, FINISH, or LOGOUT com-
  4448. mands to shut down the server.  The MS-Kermit server can also  be  returned  to
  4449. interactive mode by typing Ctrl-C or Ctrl-Break on the PC's console keyboard.
  4450.  
  4451.  
  4452. The SERVER Command
  4453.  
  4454. Kermit-MS is capable of acting as a full-fledged Kermit server for users coming
  4455. in through one of the communication ports or a local  area  network.    To  put
  4456. Kermit-MS  into server mode, first issue any desired SET commands to select and
  4457. configure the desired port, then DISABLE any undesired functions, and then type
  4458. the  SERVER  command.    Kermit-MS will await all further instructions from the
  4459. 5.6.6. Kermit Server Commands                                           Page 82
  4460.  
  4461. -------------------------------------------------------------------------------
  4462. client Kermit on the other end of the connection, which may  be  hardwired,  or
  4463. connected  through  a network or autoanswer modem.  In the following example, a
  4464. Kermit server is set up for dialing in:
  4465.  
  4466.   Kermit-MS>set port 1
  4467.   Kermit-MS>set baud 1200
  4468.   Kermit-MS>connect
  4469.   ATS0=1
  4470.   OK
  4471.   ^]c
  4472.   Kermit-MS>set timer on
  4473.   Kermit-MS>set warning on
  4474.   Kermit-MS>disable all
  4475.   Kermit-MS>server
  4476.  
  4477. Before putting Kermit in server mode in this case, it was necessary to  connect
  4478. to  the  modem  (in  this  example, a Hayes) and put it into autoanswer mode by
  4479. typing the ATS0=1 command.
  4480.  
  4481. MS-Kermit 2.30 server mode supports the following requests:
  4482.  
  4483.   SEND           REMOTE CWD          REMOTE SEND
  4484.   GET            REMOTE DELETE       REMOTE SPACE
  4485.   FINISH         REMOTE DIRECTORY    REMOTE TYPE
  4486.   BYE            REMOTE HELP         REMOTE WHO
  4487.   LOGO           REMOTE HOST
  4488.  
  4489. REMOTE CWD can be used to change both directories and devices.  The REMOTE SEND
  4490. command  accepts a one line message on the command line which will be displayed
  4491. on the operator's console.  An MS-Kermit  Server  can  DISABLE  recognition  of
  4492. selected REMOTE commands to help reduce accidents.
  4493.  
  4494.     CAUTION: The method used for most of the REMOTE commands is to invoke a
  4495.     task with the user's command line, redirect standard output to  a  tem-
  4496.     porary  file,  $KERMIT$.TMP, send that file back to the remote end, and
  4497.     then delete the file.  Sufficient space must be available to store this
  4498.     file.  To service DOS commands or user tasks the boot drive must hold a
  4499.     copy of COMMAND.COM.  PATH will not  be  searched  (this  can  be  dis-
  4500.     asterous on a floppy disk based system).
  4501.  
  4502.     FURTHER  CAUTION:  Any  of these DOS tasks or programs may encounter an
  4503.     error, and in that case, DOS will generally put  the  familiar  "Abort,
  4504.     Retry, Ignore?" message on the screen, and will wait for an answer from
  4505.     the keyboard.  This will hang the server until a  human  comes  to  the
  4506.     keyboard  and  gives  a  response.  The same thing will happen when any
  4507.     program is invoked that interacts with the real console.  For instance,
  4508.     REMOTE  SPACE  works  by  running  CHKDSK and if CHKDSK finds something
  4509.     wrong with the disk while tallying up the space, it will  ask  (at  the
  4510.     console) if you want to it to be fixed.  This, too, will hang the serv-
  4511.     er.
  4512.  
  4513.     MORAL: The MS-DOS Kermit server should probably not be used for  REMOTE
  4514.     commands  unless  someone  is  around  to  take care of it when it gets
  4515.     stuck.
  4516.  
  4517. For local network operation, the SET PORT NET command (with no node name)  must
  4518. 5.6.6. Kermit Server Commands                                           Page 83
  4519.  
  4520. -------------------------------------------------------------------------------
  4521. be  issued  before  the  SERVER command.  MS-Kermit then becomes a network-wide
  4522. server, and other client Kermits can start a network session with it  by  using
  4523. the  name  of the Kermit Server, which is shown on the server's screen when SET
  4524. PORT NET is given.  The Kermit Server accepts connections from  other  Kermits,
  4525. but only one at a time.  There may be many Kermit Servers active on the network
  4526. simultaneously because each has a unique node name.  Operations are exactly the
  4527. same  as  with  serial port usage and the session (equivalent to a dialed phone
  4528. connection) is maintained between the pair until too many  timeouts  occur,  or
  4529. the  client  Kermit  issues a HANGUP command, exits to DOS, or SETs PORT NET to
  4530. another node.  In the latter cases, the server remains  available  for  use  by
  4531. other client Kermits.  If a client Kermit issues the BYE or FINISH command, the
  4532. network server is shut down (unless it was started with FIN disabled).
  4533.  
  4534.  
  4535. The DISABLE and ENABLE Commands
  4536.  
  4537. For security purposes, it may be desirable to leave your PC  in  Kermit  server
  4538. mode  so that it can be dialed in to, but with certain functions unavailable to
  4539. those who dial in.  The DISABLE and ENABLE commands provide this control.
  4540.  
  4541. The DISABLE and ENABLE commands affect the following functions, with the effect
  4542. of DISABLEs noted:
  4543.  
  4544.     CWD     Changing of directories, disabled entirely.
  4545.     DEL     Deletion of files confined to current directory.
  4546.     DIR     Production of directory listings confined to current directory.
  4547.     FIN     Shutting down the server (applies also to BYE) disabled entirely.
  4548.     GET     Getting files from the server confined to current directory.
  4549.     HOST    Execution of all REMOTE HOST (DOS) commands disabled entirely.
  4550.     SEND    Forces files sent to server into current directory.
  4551.     SPACE   Asking the server for a disk space report, disabled.
  4552.     TYPE    REMOTE TYPE files confined to current directory.
  4553.     ALL     All of the above.
  4554.     TEK     Automatic  invocation  of Tektronix graphics mode by host commands.
  4555.             This function is not related to server mode, and is not included in
  4556.             the ALL term.
  4557.  
  4558. For  reasons  which  should  be  obvious,  the Kermit server does not provide a
  4559. REMOTE ENABLE command!
  4560.  
  4561.  
  4562. The GET Command
  4563.  
  4564. Syntax: GET remote-filespec
  4565.  
  4566. The GET command requests a remote Kermit server to send the file or file  group
  4567. specified by remote-filespec.  This command can be used only when Kermit-MS has
  4568. a Kermit server active on the other end of the connection.  This means that you
  4569. must  have  CONNECTed  to the other system, logged in, run Kermit there, issued
  4570. the SERVER command, and escaped back (e.g. "^]C") to the local  Kermit-MS  (or,
  4571. in  the case of LAN operation, a Kermit server must be running somewhere on the
  4572. network).  If the remote Kermit does not have a SERVER command, then you should
  4573. use SEND and RECEIVE as described above.
  4574.  
  4575. You  may  use  the GET command in a special way to specify a different name for
  4576. storing the incoming file.  Just type GET alone on a  line,  and  you  will  be
  4577. 5.6.6. Kermit Server Commands                                           Page 84
  4578.  
  4579. -------------------------------------------------------------------------------
  4580. prompted separately for the remote filespec and the local filespec:
  4581.  
  4582.   Kermit-MS>get
  4583.    Remote Source File: com1 txt
  4584.    Local Destination File: a:xcom1.txt
  4585.  
  4586. The  local  file name may contain a device field, and/or a directory specifica-
  4587. tion. Device and directory specifications in the local  destination  file  name
  4588. work the same way as in the RECEIVE command.
  4589.  
  4590. The  remote  filespec  is any string that can be a legal file specification for
  4591. the remote system; it is not parsed or  validated  locally.    It  can  contain
  4592. whatever wildcard or file-group notation is valid on the remote system.
  4593.  
  4594. Once the file transfer begins, the GET command behaves exactly like the RECEIVE
  4595. command.
  4596.  
  4597. Warning:  If the remote filespec is to contain a semicolon, and the GET command
  4598. is  being issued from a TAKE command file, you must prefix the semicolon with a
  4599. backslash.  Otherwise, all characters beginning with the semicolon will be  ig-
  4600. nored:  
  4601.  
  4602.   get me.home\;0
  4603.  
  4604.  
  4605. 5.6.7. Commands for Controlling Remote Kermit Servers
  4606.  
  4607. The  BYE,  FINISH,  and  LOGOUT commands allow you to shut down a remote Kermit
  4608. server:
  4609.  
  4610. BYE     When communicating with a remote Kermit server, use the BYE command  to
  4611.         shut  down the server, log out its job, and exit locally from Kermit-MS
  4612.         to DOS.  On local area networks, BYE also terminates the  network  ses-
  4613.         sion.
  4614.  
  4615. FINISH  Like  BYE,  FINISH  shuts down the remote server.  However, FINISH does
  4616.         not log out the server's job.  You are left at Kermit-MS  prompt  level
  4617.         so that you can connect back to the job on the remote system.  On local
  4618.         area nets, FINISH shuts down the MS-Kermit server, but in  a  way  that
  4619.         allows it to be restarted as if no interruption had occurred.
  4620.  
  4621. LOGOUT  The  LOGOUT  command  is  identical to the BYE command, except you will
  4622.         remain at Kermit-MS prompt level, rather than exit to DOS, so that  you
  4623.         can  establish  or  use  another  connection  without having to restart
  4624.         MS-Kermit.
  4625.  
  4626.  
  4627. The REMOTE Commands
  4628.  
  4629. The REMOTE keyword is a prefix for a number of commands.  It indicates that the
  4630. command  is  to be performed by a remote Kermit server.  Not all Kermit servers
  4631. are capable of executing all of these commands, and some Kermit servers may  be
  4632. able to perform functions for which Kermit-MS does not yet have the correspond-
  4633. ing commands.  In case you send a command the server cannot  execute,  it  will
  4634. send  back  a message stating that the command is unknown to it.  If the remote
  4635. server can execute the command, it will send  the  results,  if  any,  to  your
  4636. 5.6.7. Commands for Controlling Remote Kermit Servers                   Page 85
  4637.  
  4638. -------------------------------------------------------------------------------
  4639. screen.
  4640.  
  4641. Here are the REMOTE commands that Kermit-MS may issue:
  4642.  
  4643. REMOTE CWD [directory]
  4644.         Ask the server to Change your Working Directory  on  the  remote  host,
  4645.         that  is, the default source and destination area for file transfer and
  4646.         management.  You will be prompted for a password, which will  not  echo
  4647.         as  you type it.  If you do not supply a password (i.e. you type only a
  4648.         carriage return), the server  will  attempt  to  access  the  specified
  4649.         directory  without  a password.  If you do not supply a directory name,
  4650.         your default or login directory on the remote system  will  be  assumed
  4651.         and you will not be prompted for a password.
  4652.  
  4653. REMOTE DELETE filespec
  4654.         Ask the server to delete the specified file or files on the remote sys-
  4655.         tem.  In response, the server may display a list of the files that were
  4656.         or were not successfully deleted.
  4657.  
  4658. REMOTE DIRECTORY [filespec]
  4659.         Ask  the  server to display a directory listing of the specified files.
  4660.         If no files are specified, then the list should include  all  files  in
  4661.         the current working directory.
  4662.  
  4663. REMOTE HELP 
  4664.         Ask the server to list the services it provides.
  4665.  
  4666. REMOTE HOST [command]
  4667.         Ask  the  server  to  send  the  command to the remote system's command
  4668.         processor for execution.
  4669.  
  4670. REMOTE KERMIT command
  4671.         Send  the  command  to the remote Kermit for interpretation as a Kermit
  4672.         command in the remote Kermit server's own command syntax.  Most  Kermit
  4673.         servers,  including  Kermit-MS, do not yet recognize REMOTE KERMIT com-
  4674.         mands.
  4675.  
  4676. REMOTE SEND message
  4677.         Send the one line message to be displayed on the Server's screen.
  4678.  
  4679. REMOTE SPACE [directory]
  4680.         Ask the server to  provide  a  brief  summary  of  disk  usage  in  the
  4681.         specified area on the remote host or, if none specified, the default or
  4682.         current area.
  4683.  
  4684. REMOTE TYPE filespec
  4685.         Ask  the server to display the contents of the specified remote file or
  4686.         files on your screen.
  4687.  
  4688. REMOTE WHO [who-spec]
  4689.         Ask  the  server  to  list  actively logged on users; optional who-spec
  4690.         qualifies the list and uses the syntax of the server system.
  4691. 5.6.8. The LOG and CLOSE Commands                                       Page 86
  4692.  
  4693. -------------------------------------------------------------------------------
  4694. 5.6.8. The LOG and CLOSE Commands
  4695.  
  4696. Syntax: LOG {PACKET, SESSION} [filespec]
  4697.         CLOSE
  4698.  
  4699. LOG SESSION specifies  that  your  terminal  session  during  CONNECT  will  be
  4700. recorded  in  the indicated file (whose name defaults to KERMIT.LOG in the cur-
  4701. rent directory), with any input character translations applied according to SET
  4702. TRANSLATION  INPUT.    The  filespec  may include a device specification and/or
  4703. directory path.  The LOG SESSION command allows you to "capture" files  from  a
  4704. remote   system  that  doesn't  have  Kermit,  as  well  as  to  record  remote
  4705. typescripts.  LOG PACKET causes the log file to record all packets in file  ex-
  4706. changes (DEBUG need not be set ON).  Both kinds of logging can be active simul-
  4707. taneously but only one filename can be specified -- everything goes to the same
  4708. log  file.  The log is closed when you EXIT from Kermit-MS or when you issue an
  4709. explicit CLOSE command.
  4710.  
  4711. If the log file already exists then new material is appended to it.  Try not to
  4712. delete an open log file (CLOSE it first) because DOS will become confused.
  4713.  
  4714. During  terminal emulation, the LOG command records all the characters that ar-
  4715. rive from the remote host in the specified file,  including  escape  sequences.
  4716. If  you  have  SET  LOCAL-ECHO ON, it will also record the characters you type.
  4717. Logging may be suspended and resumed within a terminal session with the CONNECT
  4718. escape-level  commands  Q  and  R. The log file will be composed of 7-bit ASCII
  4719. bytes if (a) PARITY is other than NONE, or (b) DISPLAY is SET to 7.  If DISPLAY
  4720. is  8  and  PARITY  is NONE, or if DEBUG is ON, then the log will contain 8-bit
  4721. bytes.
  4722.  
  4723. You may LOG PRN to cause the logging information to be printed directly on your
  4724. printer.  Any escape sequences that are sent to the screen are also sent to the
  4725. printer.
  4726.  
  4727. If you want to record information without imbedded escape  sequences,  use  the
  4728. screen  dump  feature,  invoked by the CONNECT escape-level command F, which is
  4729. described under the CONNECT command.
  4730.  
  4731. A session log cannot be played back directly on the PC from the log file.    To
  4732. relive the session, you must transfer it to the remote system and display it in
  4733. "binary mode" (e.g. cat in Unix) which CONNECTed.
  4734. 5.6.8. The LOG and CLOSE Commands                                       Page 87
  4735.  
  4736. -------------------------------------------------------------------------------
  4737. 5.6.9. The SET Command
  4738.  
  4739. Syntax: SET parameter value
  4740.      -or- SET parameter parameter value
  4741.  
  4742. The SET command establishes or modifies parameters for file  transfer  or  ter-
  4743. minal  connection.   You can examine their values with the STATUS command.  The
  4744. following SET commands are available in Kermit-MS:
  4745.  
  4746.  
  4747.                 BAUD  Communications port line speed (synonym for SPEED)
  4748.                 BELL  Whether to beep at the end of a transaction
  4749.     BLOCK-CHECK-TYPE  Level of error checking for file transfer
  4750.                DEBUG  Display packet contents during file transfer
  4751.         DEFAULT-DISK  Default disk drive for file i/o
  4752.                DELAY  Wait number seconds before Sending a file
  4753.          DESTINATION  Default destination device for incoming files
  4754.              DISPLAY  For selecting the type of file transfer display
  4755.                 DUMP  Screen dump file (or device) name
  4756.          END-OF-LINE  Packet termination character
  4757.                  EOF  Method for determining or marking end of file
  4758.               ESCAPE  Escape character for CONNECT
  4759.         FLOW-CONTROL  Enable or disable XON/XOFF
  4760.            HANDSHAKE  Half-duplex line turnaround option
  4761.           INCOMPLETE  What to do with an incompletely received file
  4762.                INPUT  Behavior of INPUT command for scripts
  4763.                  KEY  Specify key redefinitions
  4764.           LOCAL-ECHO  Specify which computer does the echoing during CONNECT
  4765.            MODE-LINE  Whether to display a mode line during terminal emulation
  4766.               PARITY  Character parity to use
  4767.                 PORT  Select a communications port
  4768.               PROMPT  Change the "Kermit-MS>" prompt to something else
  4769.              RECEIVE  Request remote Kermit to use specified parameters
  4770.               REMOTE  For running Kermit-MS interactively from back port
  4771.                RETRY  Packet retransmission threshold
  4772.                 SEND  Use the specified parameters during file transfer
  4773.                SPEED  Communications port line speed (synonym for BAUD)
  4774.            TAKE-ECHO  Control echoing of commands from TAKE files
  4775.             TERMINAL  Emulation and parameters
  4776.                TIMER  Enable/disable timeouts during file transfer
  4777.          TRANSLATION  Enable/disable/specify conversion of arriving characters
  4778.              WARNING  Specify how to handle filename collisions
  4779.  
  4780. The SET commands are now described in detail, in alphabetical order.
  4781.  
  4782.  
  4783. SET BAUD
  4784.  
  4785. Syntax: SET BAUD number
  4786.  
  4787. Set the speed (in bits per second,  commonly  called  baud)  of  the  currently
  4788. selected  terminal  communications  port  (COM1 by default) to 300, 1200, 1800,
  4789. 2400, 4800, 9600, or other common speed, and  on  the  IBM  PC  family,  higher
  4790. speeds  including  19200, 38400, 57600, and 115200.  Both connected systems, as
  4791. well as any intervening communication equipment, must be able  to  support  the
  4792. specified baud rate, and both systems should be set to the same baud rate.
  4793. 5.6.9. The SET Command                                                  Page 88
  4794.  
  4795. -------------------------------------------------------------------------------
  4796. Some implementations do not support the SET BAUD command.  But Kermit-MS leaves
  4797. the current communication port settings alone unless  you  issue  explicit  SET
  4798. commands to change them, so you may use MODE or other DOS programs to establish
  4799. the desired settings before running Kermit.
  4800.  
  4801. On certain systems, when you first run Kermit after powering the system up, you
  4802. may  get  a  message "Unrecognized baud rate".  This means that Kermit tried to
  4803. read the baud rate from the port and none was set.  Simply  use  SET  BAUD  (if
  4804. available) or the DOS MODE command to set the desired baud rate.
  4805.  
  4806. SET SPEED is a synomym for SET BAUD.
  4807.  
  4808.  
  4809. SET BELL
  4810.  
  4811. Syntax: SET BELL {ON, OFF}
  4812.  
  4813. Specifies  whether  the  bell  (beeper)  should sound upon completion of a file
  4814. transfer operation.  Normally ON.
  4815.  
  4816.  
  4817. SET BLOCK-CHECK-TYPE
  4818.  
  4819. Syntax: SET BLOCK-CHECK-TYPE {1, 2, 3}
  4820.  
  4821. Selects the error detection method: a 1-character 6-bit  checksum  (the  normal
  4822. case), a 2-character 12-bit checksum, or a 3-character 16-bit cyclic redundancy
  4823. check (CRC).  If the other Kermit program is not capable of type 2 or 3  check-
  4824. ing  methods,  automatic fallback to type 1 will occur.  The more secure type 2
  4825. and 3 block checks take essentially no more execution time than  the  simple  1
  4826. character  checksum.    SET  BLOCK 3 is a stronger check than SET BLOCK 2.  SET
  4827. BLOCK 2 or 3 is recommended for use with long packets (see below),  noisy  com-
  4828. munication lines, binary (8-bit data) files, and text files containing critical
  4829. data (budgets, grades, etc).
  4830.  
  4831.  
  4832. SET DEBUG
  4833.  
  4834. Syntax: SET DEBUG {PACKET, SESSION, ON, OFF}
  4835.  
  4836. With DEBUG PACKET, Kermit will display packet traffic  on  your  screen  during
  4837. file  transfer.   With the normal file transfer display, regular-length packets
  4838. sent  and  received  are  displayed  in  fixed-size  slots.    The  display  of
  4839. extended-length  packets,  however  (see  SET  RECEIVE PACKET-LENGTH), tends to
  4840. overlap.  If this bothers you, then also SET DISPLAY SERIAL, or LOG the packets
  4841. rather than displaying them.
  4842.  
  4843. With  DEBUG  SESSION,  during terminal emulation (on the IBM PC, Rainbow, and a
  4844. few others), control characters are displayed in  uparrow  ("^")  notation  and
  4845. characters  with the 8th bit set are preceded by the tilde ("~") sign, and your
  4846. session log (if any) will record 8-bit bytes, rather than 7-bit ASCII,  regard-
  4847. less  of  SET  DISPLAY  or  SET PARITY.  Character translation (SET TRANSLATION
  4848. INPUT) is not done during session debugging.  The effect of SET  DEBUG  SESSION
  4849. during  terminal connection can be disconcerting, but it gives you a convenient
  4850. line monitor equivalent to a specialized device  that  costs  several  thousand
  4851. dollars,  and  it  can  prove  very  handy for tracking down data communication
  4852. 5.6.9. The SET Command                                                  Page 89
  4853.  
  4854. -------------------------------------------------------------------------------
  4855. problems.
  4856.  
  4857. SET DEBUG ON turns on both SESSION and PACKET  debugging,  and  SET  DEBUG  OFF
  4858. turns them both off.
  4859.  
  4860.  
  4861. SET DEFAULT-DISK
  4862.  
  4863. Syntax: SET DEFAULT-DISK x:
  4864.  
  4865. Specify  the  default  disk drive to use for file transfer, directory listings,
  4866. and so forth.  Equivalent to typing the DOS command for changing disks (A:, B:,
  4867. etc).    Affects Kermit and all inferior processes, but when you exit from Ker-
  4868. mit, you will still have the same default disk as when you entered.
  4869.  
  4870.  
  4871. SET DELAY
  4872.  
  4873. Syntax: SET DELAY number
  4874.  
  4875. Wait the specified number of seconds before starting a file transfer.  Intended
  4876. for  use  when  the  other side needs appreciable time to become ready, such as
  4877. rearranging cables, changing programs, etc.,  or  when  MS-DOS  Kermit  is  the
  4878. remote  Kermit  (e.g.  after  CTTY COM1, SET REMOTE ON).  The number is 0 to 63
  4879. seconds, normally 0.
  4880.  
  4881.  
  4882. SET DESTINATION
  4883.  
  4884. Syntax: SET DESTINATION {DISK, PRINTER, SCREEN}
  4885.  
  4886. SET DESTINATION PRINTER will cause incoming files to be sent  directly  to  the
  4887. printer;  SCREEN will send output normally destined for the disk to the screen.
  4888. The normal destination is DISK.  SET DESTINATION affects only files transferred
  4889. with SEND, GET, or RECEIVE; it cannot be used to reroute the output from REMOTE
  4890. server commands.
  4891.  
  4892.  
  4893. SET DISPLAY
  4894.  
  4895. Syntax: SET DISPLAY {QUIET, REGULAR, SERIAL, 7-BIT, 8-BIT}
  4896.  
  4897. During file transfer, MS-DOS Kermit's regular display  is  a  formatted  screen
  4898. whose  fields  are  randomly  updated  with  file  names, packet numbers, error
  4899. counts, percent done, error messages, and so forth.
  4900.  
  4901. If you wish to run Kermit-MS interactively through the back port, for  instance
  4902. after  the operator has done CTTY COM1, you must give the command SET REMOTE ON
  4903. (which, currently at least, is equivalent to  SET  DISPLAY  QUIET);  this  sup-
  4904. presses  the  file transfer display screen, so that the display won't interfere
  4905. with the file transfer itself.  You can also use this command to  suppress  the
  4906. display  in  local  mode,  in case you are using a system that allows you to do
  4907. other work while file transfer proceeds in the background.
  4908.  
  4909. If you have your PC connected to a  speaking  device  (a  common  practice  for
  4910. visually  impaired  people), or you are logging the display screen to a printer
  4911. 5.6.9. The SET Command                                                  Page 90
  4912.  
  4913. -------------------------------------------------------------------------------
  4914. (using DOS ^P or kermit > prn), the random nature of the regular  display  will
  4915. make  the  results of little use.  SET DISPLAY SERIAL is provided for this pur-
  4916. pose; it causes the program to report progress "serially" on the  screen.    In
  4917. serial mode, error messages are preceeded with the word "Error" and repeat mes-
  4918. sages with the word "Retry".  Packets are numbered as dots with every tenth be-
  4919. ing  a  plus  sign.  The packet display is automatically broken across lines at
  4920. every 70th packet.  The serial display makes much more sense when  spoken  than
  4921. does the regular display.
  4922.  
  4923. The  serial display does not show the percent and kilobytes transferred.  It is
  4924. the default display style for generic MS-DOS Kermit; REGULAR is the default for
  4925. all others.
  4926.  
  4927. The  last  two parameters, 7-BIT and 8-BIT, control the size of characters sent
  4928. to the screen during terminal emulation.  7-BIT is the default and includes all
  4929. ASCII characters.  8-BIT is useful with national and line drawing characters.
  4930.  
  4931.  
  4932. SET DUMP
  4933.  
  4934. Syntax: SET DUMP filespec
  4935.  
  4936. On  those  systems that support this feature, change the file or device name of
  4937. the screen dump file.  The normal file name is KERMIT.SCN.  See the section  on
  4938. terminal  emulation  for details about screen dumps.  If the specified file al-
  4939. ready exists then new material is appended to old.
  4940.  
  4941.  
  4942. SET END-OF-LINE
  4943.  
  4944. Syntax: SET END-OF-LINE number
  4945.  
  4946. If the remote system needs packets to be terminated by anything other than car-
  4947. riage  return, specify the decimal value, 0-31, of the desired ASCII character.
  4948. Equivalent to SET SEND END-OF-LINE (SET END-OF-LINE is kept only for historical
  4949. reasons, and the parameter really should be called END-OF-PACKET anyway.)
  4950.  
  4951.  
  4952. SET EOF
  4953.  
  4954. Syntax: SET EOF {CTRL-Z, NOCTRL-Z}
  4955.  
  4956. Controls  how the end of file is handled.  CTRL-Z specifies a Control-Z charac-
  4957. ter should be appended to the end of an incoming file, unless it  already  ends
  4958. with  a  Control-Z.  Certain MS-DOS text editors and other applications require
  4959. files to be in this format.  For outbound files, treat the first  Control-Z  as
  4960. the  end  of  the  local file, and do not send it or any subsequent characters.
  4961. NOCTRL-Z is the default; incoming files are stored, and MS-DOS files are  sent,
  4962. exactly as is, in their entirety.
  4963. 5.6.9. The SET Command                                                  Page 91
  4964.  
  4965. -------------------------------------------------------------------------------
  4966. SET ESCAPE
  4967.  
  4968. Syntax: SET ESCAPE character
  4969.  
  4970. Specify  the  control character you want to use to "escape" from remote connec-
  4971. tions back to Kermit-MS.   On  most  systems  the  default  is  "^]"  (Control-
  4972. Rightbracket),  which  was chosen because it is a character you would otherwise
  4973. rarely type.
  4974.  
  4975. The character is entered literally after SET ESCAPE or in backslash number form
  4976. (\29),  and  should be chosen from the ASCII control range.  It is not possible
  4977. to use non-ASCII characters (like function keys) for this purpose (but see  SET
  4978. KEY for a way around this restriction).
  4979.  
  4980.  
  4981. SET FLOW-CONTROL
  4982.  
  4983. Syntax: SET FLOW-CONTROL {XON/XOFF, NONE}
  4984.  
  4985. Specify the full duplex flow control to be done on the currently selected port.
  4986. The options are XON/XOFF and NONE.  The specified type of flow control will  be
  4987. done  during  both  terminal emulation and file transfer.  By default, XON/XOFF
  4988. flow control is selected.  XON/XOFF should not be used  on  half-duplex  (local
  4989. echo)  connections,  or with other systems that do not support it.  If XON/XOFF
  4990. is used, HANDSHAKE should be set to NONE.
  4991.  
  4992.  
  4993. SET HANDSHAKE
  4994.  
  4995. Syntax: SET HANDSHAKE {CODE number, BELL, CR, LF, NONE, XOFF, XON}
  4996.  
  4997. Specify any half-duplex line turnaround handshake character to be  used  during
  4998. file  transfer on the currently selected port.  The CODE number form allows any
  4999. ASCII character to be specified by its decimal ASCII code.  Handshake  is  NONE
  5000. by default; if set to other than NONE, then FLOW-CONTROL should be set to NONE.
  5001. In operation the handshake character is sought at  the  end  of  each  received
  5002. packet,  following  the  normal END-OF-LINE character, but is not sent for out-
  5003. going packets.
  5004.  
  5005.  
  5006. SET INCOMPLETE
  5007.  
  5008. Syntax: SET INCOMPLETE {DISCARD, KEEP}
  5009.  
  5010. Specifies what to do with files that arrive incompletely: discard them or  keep
  5011. them.  They are normally discarded.
  5012.  
  5013.  
  5014. SET INPUT
  5015.  
  5016. Syntax: SET INPUT {CASE, DEFAULT-TIMEOUT, ECHO, TIMEOUT-ACTION}
  5017.  
  5018. SET INPUT controls the behavior of the script INPUT command (see the section on
  5019. scripts for more information):
  5020. 5.6.9. The SET Command                                                  Page 92
  5021.  
  5022. -------------------------------------------------------------------------------
  5023. SET INPUT CASE {IGNORE, OBSERVE}
  5024.     Says  whether or not to distinguish upper and lower case letters when doing
  5025.     a matchup in the INPUT command.  OBSERVE causes upper and lower  case  let-
  5026.     ters to be distinguished.  The default is to IGNORE case distinctions.
  5027.  
  5028. SET INPUT DEFAULT-TIMEOUT seconds
  5029.     Changes the waiting time from one second to this new value.
  5030.  
  5031. SET INPUT ECHO {ON, OFF}
  5032.     Show  on  the screen characters read from the serial port during the script
  5033.     operation, or not.  Default is ON, show them.
  5034.  
  5035. SET INPUT TIMEOUT-ACTION {PROCEED, QUIT}
  5036.     Determines  whether or not the current TAKE command file is to be continued
  5037.     or exited if a timeout occurs.  PROCEED  is  the  default  and  means  that
  5038.     timeouts are ignored.  QUIT causes the current script file to be exited and
  5039.     control passed to either the next higher level script  file  (if  there  is
  5040.     one) or to Kermit's main prompt.
  5041.  
  5042.  
  5043. SET KEY
  5044.  
  5045. Syntax: SET KEY key-specifier [key-definition]
  5046.   Also: SET KEY {ON, OFF, CLEAR}
  5047.  
  5048.     WARNING: The format and functions of this command have changed substan-
  5049.     tially since version 2.29B and earlier.  The changes were made in order
  5050.     to  allow  key  redefinition  to work on a wider variety of systems and
  5051.     keyboards without customization of the program  source  code  for  each
  5052.     configuration.  See section 5.10 for further details.
  5053.  
  5054. The  SET  KEY command is one of the most useful -- and confusing -- features of
  5055. MS-Kermit.  Typical uses:
  5056.  
  5057.    - You're used to having the ESC key in the upper  left  corner  of  the
  5058.      keyboard,  but  your new PC keyboard has an accent grave ("`") there.
  5059.      You can use SET KEY to make the accent key transmit an ESC,  and  you
  5060.      can assign accent grave to some other key.
  5061.  
  5062.    - You  send  a lot of electronic mail, and always sign it the same way.
  5063.      You can put your "signature" on a single key to save yourself  a  lot
  5064.      of repetitive typing.
  5065.  
  5066.    - You  must  set  up  your PC's function keys or numeric keypad to work
  5067.      properly with a host application.
  5068.  
  5069. The SET KEY command does these things and more, and SHOW KEY  gives  us  assis-
  5070. tance.  A key can be defined to:
  5071.  
  5072.    - send a single character other than what it would normally send,
  5073.    - send a string of multiple characters,
  5074.    - invoke a CONNECT-mode Kermit action verb,
  5075.    - send itself again.
  5076.  
  5077. SET KEY specifies that when the designated key is struck during terminal emula-
  5078. tion, the specified character or string is sent or the specified Kermit  action
  5079. 5.6.9. The SET Command                                                  Page 93
  5080.  
  5081. -------------------------------------------------------------------------------
  5082. verb  is  performed.    Key  definitions  operate  only  during CONNECT, not at
  5083. Kermit-MS> or DOS command level.
  5084.  
  5085. The key-specifier is the identification of the key expressed in  system-depend-
  5086. ent  terms.    This can be a letter, such as Q for the key which emits an upper
  5087. case Q, or the numeric ASCII value of the letter in  backslash  notation  (e.g.
  5088. "\81"),  or  else the numerical "scan code" observed by the system when the key
  5089. is pressed (e.g. "\3856" for Ctrl-Alt-Q on an IBM PC).    Material  printed  on
  5090. keycaps  is  not necessarily a guide to what the key-specifier should be.  When
  5091. the word CLEAR is used in place of a key-specifier,  all  key  definitions  are
  5092. cleared and then any built-in definitions are restored.
  5093.  
  5094. A string definition is one or more characters, including 8-bit values expressed
  5095. in backslash form, such as
  5096.  
  5097.   SET KEY \315 top \13 list\13    IBM F1 key sends "top <cr> list<cr>"
  5098.   SET KEY S L                     S key sends upper case L
  5099.   SET KEY T \27[m                 T key sends three bytes ESC [ m
  5100.  
  5101. The string begins with the first non-spacing character following the key  iden-
  5102. tification  and  continues  until  the  end  of line, exclusive of any trailing
  5103. spaces.  If a semicolon comment is used and the definition is given in  a  TAKE
  5104. file,  the  line  ends  at the last non-spacing character before the semicolon.
  5105. Curly braces, {...<}>, can be use to delimit the string in case  you  want  the
  5106. definition  to  include trailing spaces.  All text after the closing bracket is
  5107. ignored.  
  5108.  
  5109.   SET KEY \315 {login } this extra text is ignored
  5110.  
  5111. This manual does not contain a list of all the scan codes for all the  keys  on
  5112. all  the  keyboards  on  all  the PCs supported by MS-Kermit -- that would be a
  5113. manual in itself.  Rather, in order to obtain the key-specifier for the SET KEY
  5114. command, you must type a SHOW KEY command and press the desired key or key com-
  5115. bination.  This will report a scan code that you can use as the  key  specifier
  5116. in  a SET KEY command.  To do this for many keys is a laborious process, so you
  5117. should collect all your SET KEY commands into a file, which you  can  TAKE,  or
  5118. put them in your MSKERMIT.INI file.
  5119.  
  5120. If  you enter SET KEY by itself, with no key specifier, the command will prompt
  5121. you to press the selected key and again for the  definition  string.    Certain
  5122. characters,  like ESC and CR, may not be entered literally into the string, but
  5123. can be included by inserting escape codes of the form \nnn,  a  backslash  fol-
  5124. lowed by a 1- to 4-digit number corresponding to the ASCII value of the desired
  5125. character.  Where an ASCII digit follows directly  after  a  backslash  number,
  5126. confusion can be avoided by placing curly braces {} around the backslashed num-
  5127. ber; thus, \{27}5 represents the two ASCII characters ESC 5.
  5128.  
  5129. Here is an example of the use of SET KEY to assign ESC (ASCII 27) to the accent
  5130. grave key.  First the user gets the key-specifier for the key:
  5131.  
  5132.   Kermit-MS>show key
  5133.     Push key to be shown (? shows all): `
  5134.     ASCII char: ` \96 decimal is defined as
  5135.     Self, no translation.
  5136.   Free space: 145 keys and 96 string definitions, 894 string characters.
  5137. 5.6.9. The SET Command                                                  Page 94
  5138.  
  5139. -------------------------------------------------------------------------------
  5140. The free space report says that 145 more keys may be redefined, and up to 96 of
  5141. them may have multi-character strings assigned to them (as  opposed  to  single
  5142. characters),  and  that  there  are 894 bytes left for these strings, in total.
  5143. Confident that there is enough space left for a new key  definition,  the  user
  5144. proceeds:
  5145.  
  5146.   Kermit-MS>set key
  5147.     Push key to be defined: `
  5148.     Enter new definition: \27
  5149.  
  5150. Once  a key definition is constructed and tested, it may be entered on a single
  5151. line in a command file (such as MSKERMIT.INI):  
  5152.  
  5153.   set key \96 \27
  5154.  
  5155. To prevent accidents, SET KEY shows the current definition before asking for  a
  5156. new one; enter a Control-C to keep the current definition, or a carriage return
  5157. to undefine the key, or a query mark (?) to see available choices.
  5158.  
  5159. A more exact definition of SET KEY follows these construction rules:  
  5160.  
  5161.   SET KEY [<key-ident><whitespace><definition>]
  5162.  
  5163. where <key-ident> is:
  5164.  
  5165.        - a single ordinary printable ASCII character, or
  5166.        - the numerical equivalent of an ASCII character (ESC is \27), or
  5167.        - a scan code written as  a  backslashed  number  (e.g.  \3856  for
  5168.          Ctrl-Alt-Q), or
  5169.        - keyword  CLEAR which removes all current key definitions and then
  5170.          restores any built-in definitions.
  5171.        - ? (a question mark), which displays a help message.
  5172.  
  5173. Scan codes, non-printing ASCII characters, 8-bit characters, and  other  binary
  5174.     codes are written in backslash form (see Table 5-1 for ASCII codes):
  5175.  
  5176.     \123            a decimal number (decimal is the default number base)
  5177.     \d789           a decimal number (also \D)
  5178.     \o177           an octal number (also \O)
  5179.     \x0d            a hexadecimal number (also \X)
  5180.     \{b###}         braces  around  material  following  the  slash,  where the
  5181.                     numerical base letter b is d, o, x, or absent.
  5182.  
  5183. <whitespace> is one or more spaces and or tabs.
  5184.  
  5185. <definition> is:
  5186.  
  5187.     missing altogether which "undefines" a key.
  5188.  
  5189.     \number         (a number in backslash notation between 0 and 255  decimal)
  5190.                     - assigns a character with the corresponding 8-bit value.
  5191.  
  5192.     \Kverb          for a Kermit action verb; upper or lower case K is OK.
  5193.  
  5194.     \{Kverb}        Same.  Verb is the name of an action verb.
  5195. 5.6.9. The SET Command                                                  Page 95
  5196.  
  5197. -------------------------------------------------------------------------------
  5198.     text            a  string with allowed embedded whitespace and embedded bi-
  5199.                     nary chars as above.  This kind of string may not  commence
  5200.                     with sequences \K or \{K.  The string begins with the first
  5201.                     non-whitespace character and ends at the end  of  the  line
  5202.                     (exclusive of trailing spaces and comments).
  5203.  
  5204.     {text}          string  confined  to  material  within  but  excluding  the
  5205.                     braces.  Note, where the number of opening  braces  exceeds
  5206.                     the number of closing braces the end of line terminates the
  5207.                     string:  
  5208.  
  5209.                       {ab{}{{c}d ==> ab{}{{c}d
  5210.  
  5211.                     but 
  5212.  
  5213.                       {ab}{{c}d ==> ab
  5214.  
  5215.     ?               Displays help message and lists all action verbs.
  5216.  
  5217.     Control-C       Quits the Set Key command without making changes.
  5218.  
  5219. Curly braces can be used to separate backslash numbers from regular ASCII text,
  5220. such as when we want to send the two bytes ESC 8 (ESC is decimal 27):
  5221.  
  5222.   SET KEY T \{27}8
  5223.   SET KEY L {words \{27}8 more words} trailing junk to be ignored
  5224.  
  5225. If a string begins with a left curly brace then Kermit counts them and ends the
  5226. string on the matching right curly brace (or end of line); the SET  KEY  L  ex-
  5227. ample  above  relies on brace matching to omit the trailing comment.  The outer
  5228. curly brace delimiters are not sent but the inner ones are; for example:
  5229.  
  5230.   SET KEY U {a {b}\{27}8}         sends the 7 bytes "a {b}ESC8"
  5231.   SET KEY U a{ {b}\{27}8}         sends the 9 bytes "a{ {b}ESC8}"
  5232.   SET KEY U a{ {b}\{{27}}8}       sends the 15 bytes "a{ {b}\{{27}}8}"
  5233.  
  5234. A definition is removed, that is a key is defined as itself, by giving an empty
  5235. definition:
  5236.  
  5237.   SET KEY q                       q key sends q again
  5238.   SET KEY \331                    IBM left arrow key is undefined.
  5239.  
  5240. The  keyboard  can  be restored to its startup state, that is all redefinitions
  5241. removed and all built-in defitions restored, by  using  the  keyword  CLEAR  in
  5242. place of the key identification:  
  5243.  
  5244.   SET KEY CLEAR
  5245.  
  5246. Undefined  keys  which do not send ASCII characters are trapped by the keyboard
  5247. translator and are rejected; a beep results from using an  undefined  non-ASCII
  5248. key.
  5249.  
  5250. SET  KEY  OFF directs MS-Kermit to read keycodes from DOS, rather than BIOS, so
  5251. that console drivers like ANSI.SYS that operate at the DOS level  may  be  used
  5252. during  Kermit CONNECT sessions.  This would also apply to any special keyboard
  5253. replacements that come with DOS-level drivers.  SET KEY ON turns key definition
  5254. 5.6.9. The SET Command                                                  Page 96
  5255.  
  5256. -------------------------------------------------------------------------------
  5257. back on, and returns Kermit to processing keystrokes at the BIOS level.
  5258.  
  5259.  
  5260. Kermit Action Verbs:
  5261.  
  5262. An  action  verb is the shorthand expression for a named Kermit procedure, such
  5263. as "generate the proper sequence for a left  arrow,"  "show  status,"  "send  a
  5264. BREAK,"  and  others; verbs are complex actions and each verb has a name.  In a
  5265. key definition the verb name is preceeded by backslash K (\K)  to  avoid  being
  5266. confused with a string.  Verbs and strings cannot be used together on a key.
  5267.  
  5268.   SET KEY \331 \Klfarr
  5269.   SET KEY \2349 \Kexit
  5270.  
  5271. makes  the IBM keyboard left arrow key execute the verb named lfarr which sends
  5272. the proper escape sequence for a VT102 left arrow key (which changes  depending
  5273. on  the internal state of the VT102).  The leading \K identifies the definition
  5274. as a Kermit verb, so no string can start as \K or as \{K in upper or lower case
  5275. (use  \92K).  The second example has Alt-X invoking the Leave-Connect-Mode verb
  5276. "exit" (same as Kermit escape character "^]" followed by C).
  5277.  
  5278. Each system has its own list of verbs and predefined keys.    Table  5-4  shows
  5279. those available for the IBM PC family (there are also some additional verbs for
  5280. reassigning Heath or VT100 function keys, see section 5.15.2).    The  SET  KEY
  5281. command  shows  the list of available verbs when a query mark (?) is given as a
  5282. definition.  SHOW KEY displays  all  currently  defined  keys  or  individually
  5283. selected ones; SHOW KEY can be executed only interactively.
  5284.  
  5285. Some  systems  have  preset key definitions when Kermit first begins (those for
  5286. the IBM PC are shown in section 5.15.2).  You can find out  what  they  are  on
  5287. your  system  by typing SHOW KEY, and then question mark on the next line.  You
  5288. may supplement or change the predefined keys with SET KEY commands typed inter-
  5289. actively or in MSKERMIT.INI or other command files.
  5290.  
  5291. The  MS-Kermit  CONNECT command may be used in conjunction with certain console
  5292. drivers that do their  own  key  redefinitions.    Since  MS-Kermit  intercepts
  5293. keystrokes at the BIOS level, drivers like ANSI.SYS which work at the DOS level
  5294. will have no effect during CONNECT, even though they work at MS-Kermit  command
  5295. level.    Other  drivers, like SuperKey and ProKey, work at the BIOS level, and
  5296. their key assignments will remain effective during  Kermit  terminal  sessions,
  5297. and additional Kermit SET KEY assignments may be made "on top" of them.
  5298.  
  5299.  
  5300. SET LOCAL-ECHO
  5301.  
  5302. Syntax: SET LOCAL-ECHO {ON, OFF}
  5303.  
  5304. Specify  how  characters  are echoed during terminal emulation on the currently
  5305. selected port.  ON specifies that characters are  to  be  echoed  by  Kermit-MS
  5306. (because  neither the remote computer nor the communications circuitry has been
  5307. requested to echo), and is appropriate for half-duplex connections.  LOCAL-ECHO
  5308. is OFF by default, for full-duplex, remote echo operation.
  5309. 5.6.9. The SET Command                                                  Page 97
  5310.  
  5311. -------------------------------------------------------------------------------
  5312. -------------------------------------------------------------------------------
  5313.  
  5314.  
  5315.  
  5316.   Verb           Meaning
  5317.   \Kupscn        Roll up (back) to previous screen
  5318.   \Kdnscn        Roll down (forward) to next screen
  5319.   \Khomscn       Roll up to top of screen memory
  5320.   \Kendscn       Roll down to end of screen memory (current position)
  5321.   \Kupone        Roll screen up one line
  5322.   \Kdnone        Roll screen down one line
  5323.   \Kprtscn       Print the current screen
  5324.   \Kdump         Append the current screen to dump file
  5325.   \Klogoff       Turn off session logging
  5326.   \Klogon        Turn on session logging
  5327.   \Ktermtype     Toggle terminal type
  5328.   \Kreset        Reset terminal emulator to initial state
  5329.   \Kmodeline     Toggle modeline off/on
  5330.   \Kbreak        Send a BREAK signal
  5331.   \Klbreak       Send a "long BREAK" signal
  5332.   \Khangup       Drop DTR so modem will hang up phone
  5333.   \Knull         Send a null (ASCII 0)
  5334.   \Kdos          "Push" to DOS
  5335.   \Khelp         Display CONNECT help message
  5336.   \Kstatus       Display STATUS message
  5337.   \Kexit         Escape back from CONNECT mode
  5338.   \Kgold,\Kpf1   VT102 keypad function key PF1
  5339.   \Kpf2..\Kpf4   VT102 keypad function keys
  5340.   \Kkp0..\Kkp9   VT102 keypad numeric keys
  5341.   \Kkpdot,\Kkpminus,\Kkpcoma,\Kkpenter   Other VT102 keypad keys
  5342.   \Kuparr,\Kdnarr,\Klfarr,\Krtarr   VT102 cursor (arrow) keys
  5343.  
  5344.               Table 5-4:   Kermit-MS Verbs for the IBM PC Family
  5345.  
  5346. -------------------------------------------------------------------------------
  5347.  
  5348.  
  5349. SET MODE-LINE
  5350.  
  5351. Syntax: SET MODE-LINE {ON, OFF}
  5352.  
  5353. On  systems,  like the IBM PC family, which are capable of displaying a status,
  5354. or "mode" line on the 25th line during terminal connection, disable  or  enable
  5355. this  function.    This  command has no effect on systems that do not display a
  5356. mode line during connect.
  5357.  
  5358. The mode line shows several important facts about the  connection,  like  which
  5359. port  is  being  used,  the baud rate and parity, the current escape character,
  5360. etc.  When the mode line is enabled, it may be turned on and off using the CON-
  5361. NECT escape-level command M or the Kermit verb "modeline".
  5362.  
  5363. The  mode  line occupies the 25th line of those systems that have such a thing,
  5364. and is not affected by scrolling (on some systems that have large screens,  the
  5365. mode  line  should appear on whatever the bottom line is, e.g. the 43rd).  When
  5366. emulating a VT102 or Heath-19, Kermit will allow the host to address  the  25th
  5367. line  directly using cursor positioning commands.  If this happens, Kermit will
  5368. 5.6.9. The SET Command                                                  Page 98
  5369.  
  5370. -------------------------------------------------------------------------------
  5371. remove its mode line and relinquish control of the 25th line to the host (as if
  5372. you had typed SET MODE OFF).  When no terminal is being emulated, the 25th line
  5373. (if any) is available for scrolling.  If the mode line is disabled  by  an  ap-
  5374. plication  or  by the command SET MODE OFF then the only way to revive Kermit's
  5375. mode line display is to give the command SET MODE ON.  On IBM systems  support-
  5376. ing  different  length  displays, the host needs to address the bottom line ex-
  5377. plicitly.  Also, note the line is saved  and  restored  when  CONNECT  mode  is
  5378. exited  and  reentered  so an old "fossil" mode line may reappear unexpectedly.
  5379. If this happens, you can escape back to the Kermit prompt,  say  SET  MODE  ON,
  5380. CONNECT, and toggle it off ("^]M") to clear the line.
  5381.  
  5382.  
  5383. SET PARITY
  5384.  
  5385. Syntax: SET PARITY {EVEN, ODD, MARK, SPACE, NONE}
  5386.  
  5387. Specify  the  character parity to be used on the currently selected port.  NONE
  5388. means no parity processing is done, and the 8th bit of each  character  can  be
  5389. used  for  data  when  transmitting binary files.  This is the normal case.  If
  5390. parity is other than none, then there will be 7 data bits (use of parity with 8
  5391. data bits is not supported).
  5392.  
  5393. If  you  have  set parity to ODD, EVEN, MARK, or SPACE, then Kermit-MS will re-
  5394. quest that binary files be transferred using 8th-bit-prefixing.  If  the  other
  5395. Kermit  knows  how  to do 8th-bit-prefixing (this is an optional feature of the
  5396. Kermit protocol, and some implementations of Kermit don't have it), then  8-bit
  5397. binary  files  can be transmitted successfully.  If NONE is specified, 8th-bit-
  5398. prefixing will not be requested.  Note that there  is  no  advantage  to  using
  5399. parity.    It  reduces  Kermit's file transfer efficiency without providing ad-
  5400. ditional error detection.  The SET PARITY command is  provided  only  to  allow
  5401. Kermit  to  adapt to conditions where parity is required, or 8-bit transmission
  5402. is otherwise thwarted.
  5403.  
  5404. You will need to SET PARITY to ODD, EVEN, MARK, or  possibly  SPACE  when  com-
  5405. municating  with a system, or over a network, or through modems, concentrators,
  5406. multiplexers, or front ends that require or impose character parity on the com-
  5407. munication  line.   For instance, most IBM mainframe computers use EVEN or MARK
  5408. parity; Telenet normally uses MARK parity.  If you neglect to SET  PARITY  when
  5409. the  communications  equipment  requires  it,  the symptom may be that terminal
  5410. emulation works (well or maybe only partially), but file transfer or script IN-
  5411. PUT commands do not work at all.
  5412.  
  5413. If parity is in use, then the display during terminal emulation, as well as any
  5414. session log, will be 7-bit ASCII, unless you have SET DEBUG ON (q.v.).
  5415.  
  5416. There may be situations in which you require 7-bit ASCII with no parity  during
  5417. terminal  emulation,  but  still  want  to  force 8th bit prefixing during file
  5418. transfer.  To accomplish this, SET PARITY SPACE.
  5419.  
  5420. The INPUT and TRANSMIT commands use 7 or 8 bits if parity is NONE, according to
  5421. the  SET DISPLAY command, and this may upset recognition of received characters
  5422. when the host unexpectedly sends them with its own parity.
  5423. 5.6.9. The SET Command                                                  Page 99
  5424.  
  5425. -------------------------------------------------------------------------------
  5426. SET PORT
  5427.  
  5428. Syntax: SET PORT {number, COM1, COM2, NET [nodename]}
  5429.  
  5430. On machines with more than one communications port, select the port to use  for
  5431. file  transfer and CONNECT.  This command lets you use a different asynchronous
  5432. adapter, or switch between two or more  simultaneous  remote  sessions.    Sub-
  5433. sequent  SET  BAUD, PARITY, HANDSHAKE, FLOW, and LOCAL-ECHO commands will apply
  5434. to this port only -- each port remembers its own parameters, so  that  you  may
  5435. set  them for each port and then switch between ports conveniently with the SET
  5436. PORT command.
  5437.  
  5438. SET PORT 1 selects COM1, SET PORT 2 selects COM2.  All versions default to port
  5439. 1,  except  for  the  IBM  PCjr, which uses port 2 if its internal modem is in-
  5440. stalled.  Additionally, COM3 and COM4 are supported for IBM PC's if the  system
  5441. is informed of their presence (as explained in Section 5.16.3).
  5442.  
  5443. In  "generic" MS-DOS Kermit, the following alternate forms allow you to experi-
  5444. ment with device names or numbers until you find the communication port:  
  5445.  
  5446.   SET PORT {DEVICE, FILE-HANDLE}
  5447.  
  5448. Just type a carriage return after either of these commands,  and  you  will  be
  5449. prompted for a device name or a numeric port-handle.  Keep trying till you find
  5450. one that works. File-handle 3, the system auxillary device, is conventional  on
  5451. many machines, as are device names COM1, COM2, and AUX.
  5452.  
  5453. MS-Kermit  for  the  IBM  PC family is able to operate over local area networks
  5454. through the NetBIOS interface.  The command 
  5455.  
  5456.   SET PORT NET [nodename]
  5457.  
  5458. redirects communications the LAN board installed in the local computer and  the
  5459. associated NetBIOS emulator software, if active, rather than the serial port or
  5460. the COM device driver.  It installs a unique Kermit node name in the local LAN,
  5461. so  that  other  nodes  can  refer to it when files are transferred or terminal
  5462. emulation is done.  This name is displayed when you give the SET PORT NET  com-
  5463. mand.    The server should use SET PORT NET, and the client should use SET PORT
  5464. NAME nodename, specifying the server's name,  e.g.  CHRIS.K.    Note  that  al-
  5465. phabetic case is significant in node names!
  5466.  
  5467. Both  the regular serial port and a network connection can be kept alive simul-
  5468. taneously; clearly, only one can be used at a time under MS-DOS.  MS-DOS 3.x is
  5469. not  required  for Kermit network usage, but most LANS do need DOS 3.1 or later
  5470. for conventional file server work.  Kermit needs only the NetBIOS emulator net-
  5471. work software.
  5472.  
  5473.  
  5474. SET PROMPT
  5475.  
  5476. Syntax: SET PROMPT [string]
  5477.  
  5478. This  command  allows  you  to  change the MS-DOS Kermit program's prompt.  The
  5479. string may be enclosed in curly braces.  Control characters like ESC can be in-
  5480. cluded as backslashed numbers like "\27".  ANSI.SYS and similar console drivers
  5481. can be programmed through this command.  The  string  must  be  less  than  128
  5482. 5.6.9. The SET Command                                                 Page 100
  5483.  
  5484. -------------------------------------------------------------------------------
  5485. characters.    If  the  string is omitted (missing) Kermit's original prompt of
  5486. "Kermit-MS>" is restored.
  5487.  
  5488.  
  5489. SET RECEIVE
  5490.  
  5491. Syntax: SET RECEIVE parameter value
  5492.  
  5493. This command lets you modify the ways in which MS-Kermit asks the other  Kermit
  5494. to behave.  That is, it controls the file transfer protocol options for packets
  5495. sent to MS-Kermit by the other Kermit.  The parameters and values  you  specify
  5496. in the SET RECEIVE command are sent to the other Kermit during initial negotia-
  5497. tions.
  5498.  
  5499. END-OF-LINE number
  5500.         ASCII value of packet terminator to look for on incoming packets.  Nor-
  5501.         mally carriage return.  Use this command if the other  Kermit  is  ter-
  5502.         minating its packets with some other control character.
  5503.  
  5504. PACKET-LENGTH number
  5505.         Ask the remote Kermit to use the specified maximum length  for  packets
  5506.         that  it  sends to Kermit-MS.  The normal length is 94 bytes.  Use this
  5507.         command to shorten packets if the communication line is noisy  or  ter-
  5508.         minal  buffers somewhere along the path are too small.  Shorter packets
  5509.         decrease the probability that a particular packet  will  be  corrupted,
  5510.         and will reduce the retransmission overhead when corruption occurs, but
  5511.         will increase the protocol overhead.
  5512.  
  5513.         If a length greater than 94 is  specified,  a  protocol  option  called
  5514.         "long  packets"  will  be used, provided the other Kermit also supports
  5515.         it.  Kermit-MS handles extended-length packets up to 1000  bytes  long.
  5516.         Long Packets can improve efficiency by reducing the per-packet overhead
  5517.         for a file, but they will not be used unless you  issue  this  command.
  5518.         Before  using  this option, ensure that the equipment on the communica-
  5519.         tions pathway can absorb a long packet,  and  that  the  connection  is
  5520.         clean  (retransmission of long packets is expensive!).  You should also
  5521.         SET BLOCK-CHECK 2 or 3 for more reliable error checking.
  5522.  
  5523. PADCHAR number
  5524.         Ask  the remote Kermit to use the given control character (expressed as
  5525.         a decimal number 0-31, or 127)  for  interpacket  padding.    Kermit-MS
  5526.         should never require any padding.
  5527.  
  5528. PADDING number
  5529.         Ask the remote Kermit to insert the given number of padding  characters
  5530.         before  each  packet it sends.  MS-Kermit never needs padding, but this
  5531.         mechanism might be required  to  keep  some  intervening  communication
  5532.         equipment happy.
  5533. 5.6.9. The SET Command                                                 Page 101
  5534.  
  5535. -------------------------------------------------------------------------------
  5536. START-OF-PACKET number
  5537.         If the remote Kermit will be marking the beginning of  packets  with  a
  5538.         control  character  other  than  Control-A,  use  this  command to tell
  5539.         Kermit-MS about it (the number should be the decimal ASCII value  of  a
  5540.         control  character).   This will be necessary only if the hosts or com-
  5541.         munication equipment involved cannot pass a Control-A through as  data,
  5542.         or  if some piece of communication equipment is echoing packets back at
  5543.         you.
  5544.  
  5545. TIMEOUT number
  5546.         Ask  the remote Kermit to time out after the given number of seconds if
  5547.         a packet expected from Kermit-MS has not arrived.  Use this command  to
  5548.         change the other Kermit's normal timeout interval.
  5549.  
  5550.  
  5551. SET REMOTE
  5552.  
  5553. Syntax: SET REMOTE {ON, OFF}
  5554.  
  5555. SET  REMOTE  ON removes the file transfer display (as if you had given the com-
  5556. mand SET DISPLAY QUIET).  It should be used when you are running  Kermit-MS  in
  5557. remote mode when coming in from another PC through the Kermit-MS's "back port",
  5558. to which the console has been reassigned using the DOS CTTY command, e.g.  
  5559.  
  5560.   CTTY COM1
  5561.  
  5562. It is necessary to issue the SET REMOTE ON command because (a) Kermit-MS has no
  5563. way  of  knowing that its console has been redirected, and (b) when the console
  5564. is the same as the port, the file transfer display will interfere with the file
  5565. transfer  itself.    SET  REMOTE  OFF  returns the file transfer display to its
  5566. preferred style (REGULAR or SERIAL).  When you SET REMOTE ON,  you  might  also
  5567. want  to  SET  DELAY 5 or thereabouts, to allow yourself time to escape back to
  5568. the local system before MS-Kermit starts sending packets.
  5569.  
  5570. WARNING: During CTTY console redirection, many programs  still  output  to  the
  5571. real  screen  and require input from the real keyboard and will hang the system
  5572. until keyboard requests are satisfied.  On the IBM PC, CTTY CON returns control
  5573. to  the  normal keyboard and screen (other systems may use other device names).
  5574. See section 5.16.4 for further details about remote operation.
  5575.  
  5576.  
  5577. SET RETRY
  5578.  
  5579. Syntax: SET RETRY number
  5580.  
  5581. Sets the number of times a packet is retransmitted before  the  protocol  gives
  5582. up.   The number of retries can be between 1 and 63, and is 5 by default.  This
  5583. is an especially useful parameter when the communications line is noisy or  the
  5584. remote host is very busy.  The initial packet of a file exchange is given three
  5585. times as many retries to allow both systems to become ready.
  5586. 5.6.9. The SET Command                                                 Page 102
  5587.  
  5588. -------------------------------------------------------------------------------
  5589. SET SEND
  5590.  
  5591. Syntax: SET SEND parameter value
  5592.  
  5593. The SET SEND command is primarily used to override negotiated protocol options,
  5594. or to establish them before they are negotiated.
  5595.  
  5596. END-OF-LINE number
  5597.         ASCII value of packet terminator to put on outbound packets.   Normally
  5598.         carriage  return.  Use this command if the other Kermit needs its pack-
  5599.         ets terminated with a nonstandard control character.
  5600.  
  5601. PACKET-LENGTH number
  5602.         Use this as the maximum length for outbound packets, regardless of what
  5603.         was negotiated with the other Kermit.  Normally,  you  would  use  this
  5604.         command  only  to  send shorter packets than the other Kermit requests,
  5605.         because you know something the other Kermit doesn't know, e.g.  there's
  5606.         a device on the communication path with small buffers.
  5607.  
  5608. PADCHAR number
  5609.         Use the specified control character  for  interpacket  padding.    Some
  5610.         hosts  may require some padding characters (normally NUL or DEL) before
  5611.         a packet, and certain front ends or other communication  equipment  may
  5612.         need  certain  control  characters to put them in the right modes.  The
  5613.         number is the ASCII decimal value of the padding character, (0 - 31, or
  5614.         127).
  5615.  
  5616. PADDING number
  5617.         How many copies of the pad character to send before each  packet,  nor-
  5618.         mally zero.
  5619.  
  5620. PAUSE number
  5621.         How many milliseconds to pause before sending each packet, 0-127,  nor-
  5622.         mally  zero.    This helps half-duplex systems prepare for reception of
  5623.         our packet.  Padding characters are sent only after the time limit  ex-
  5624.         pires.
  5625.  
  5626. QUOTE number
  5627.         Use the indicated printable character for prefixing  (quoting)  control
  5628.         characters and other prefix characters.  The only reason to change this
  5629.         would be for sending a very long  file  that  contains  very  many  "#"
  5630.         characters (the normal control prefix) as data.
  5631.  
  5632. START-OF-PACKET number
  5633.         Mark the beginning of outbound  packets  with  some  control  character
  5634.         other than Control-A.  This will be necessary if the remote host or the
  5635.         communication channel cannot accept a  Control-A  as  data,  or  if  it
  5636.         echoes  back  your  packets.   The remote host must have been given the
  5637.         corresponding SET RECEIVE START-OF-PACKET command.
  5638.  
  5639. TIMEOUT number
  5640.         Change  Kermit-MS's  normal timeout interval; this command is effective
  5641.         only if TIMER is set to be ON; it is normally ON so that  both  Kermits
  5642.         can control timeouts.  When the timer is ON, the default interval is 13
  5643.         seconds.
  5644. 5.6.9. The SET Command                                                 Page 103
  5645.  
  5646. -------------------------------------------------------------------------------
  5647. SET SPEED
  5648.  
  5649. Syntax: SET SPEED rate
  5650.  
  5651. Same as SET BAUD, q.v.
  5652.  
  5653.  
  5654. SET TAKE-ECHO
  5655.  
  5656. Syntax: SET TAKE-ECHO {ON, OFF}
  5657.  
  5658. Specifies whether screen display should occur during implicit or explicit  TAKE
  5659. operations on MSKERMIT.INI or other Kermit-MS command files, and during evalua-
  5660. tion of macro definitions by the DO command.  Handy for finding errors in  TAKE
  5661. files or macro definitions.
  5662.  
  5663.  
  5664. SET TERMINAL
  5665.  
  5666. Syntax: SET TERMINAL parameter [value]
  5667.  
  5668. This  command  controls  most  aspects  of  terminal  emulation.    Most of the
  5669. parameters are only settable (or meaningful) on the  IBM  PC  family  and  com-
  5670. patibles.   (Programmers who are proficient on other MS-DOS systems are invited
  5671. to fill in these functions for those systems  and  send  the  results  back  to
  5672. Columbia.)   On other systems, built-in setup modes or DOS commands can be used
  5673. to accomplish the same functions.
  5674.  
  5675. The first group of parameters tells which kind of terminal to  emulate.    When
  5676. Kermit-MS uses its built-in software for emulation, incoming characters are ex-
  5677. amined for screen control commands (escape sequences)  specific  to  that  ter-
  5678. minal, and if encountered, the commands are executed on the PC screen.
  5679.  
  5680. NONE    Act  as  a  dumb terminal.  All incoming characters will be sent to the
  5681.         screen "bare", as-is, through DOS.  If you have loaded a device  driver
  5682.         into DOS for the CON device, such as ANSI.SYS, then that driver will be
  5683.         able to interpret the codes itself.  Many non-IBM  systems  have  their
  5684.         own  screen  control  code  interpreter  built into DOS or firmware, or
  5685.         available as a loadable device driver.
  5686.  
  5687. VT52    The DEC VT-52 terminal.
  5688.  
  5689. HEATH   The Heath/Zenith-19 terminal (H19), which supports all  the  VT52  com-
  5690.         mands, plus line and character insert/delete editing functions, an ANSI
  5691.         mode, and a 25th line.
  5692.  
  5693. VT102   The DEC VT102 (ANSI) terminal, which is the same as a  VT100  but  also
  5694.         supports   line/character  insert/delete  editing  functions  and  ANSI
  5695.         printer controls.
  5696.  
  5697. TEK4010 A Tektronix 4010 graphics terminal.  Currently only available  on  IBM,
  5698.         TI, and Victor PCs.  On the IBM family, Kermit automatically senses and
  5699.         adapts to the CGA, EGA, or Hercules color board.
  5700.  
  5701. The specific escape sequences supported by Kermit for each  of  these  terminal
  5702. types  are  listed in section 5.15.1.  Note that when a Kermit program includes
  5703. 5.6.9. The SET Command                                                 Page 104
  5704.  
  5705. -------------------------------------------------------------------------------
  5706. Tektronix emulation, this can be invoked automatically while in character  mode
  5707. (VT102, VT52, or Heath emulation) when the emulator receives certain escape se-
  5708. quences.  This can be turned off using the DISABLE TEK command.
  5709.  
  5710. The remaining SET TERMINAL commands specify setup options for the selected ter-
  5711. minal:
  5712.  
  5713. CHARACTER-SET {UK, US}
  5714.         UK displays "#" (ASCII 35, number sign) as a pound  sterling  sign,  US
  5715.         displays "#" as "#".  This command applies during VT100/102 emulation.
  5716.  
  5717. COLOR number [, number [, number]]
  5718.         Several numbers, applied in left to right sequence, separated by commas
  5719.         or spaces:
  5720.  
  5721.           0   Reset  the colors to normal intensity white characters on a black
  5722.               background and use the "no-snow" mode on the IBM  Color  Graphics
  5723.               Adapter (CGA).
  5724.           1   High intensity foreground
  5725.           10  Request fast screen updating for use on the IBM Mono, EGA, or PGA
  5726.               (usually sensed and set internally by Kermit), and  some  non-IBM
  5727.               CGAs.
  5728.           3x  Foreground color
  5729.           4x  Background color
  5730.  
  5731.         where  x is a single digit from 0 to 7, which is the sum of the desired
  5732.         colors:
  5733.  
  5734.           1   Red
  5735.           2   Green
  5736.           4   Blue
  5737.  
  5738.         Example: 0, 1, 37, 44 on an IBM CGA would produce bold white characters
  5739.         on  a blue field with no snow. The snow removal business has to do with
  5740.         whether the program should synchronize with vertical retrace  when  up-
  5741.         dating  screen  memory.   This is necessary with certain color adaptors
  5742.         (like the CGA) and unnecessary for others (like the EGA).
  5743.  
  5744. CURSOR-STYLE {BLOCK, UNDERLINE}
  5745.         Sets  the cursor rendition to your preference.  Note that on some early
  5746.         IBM PCs and compatibles, the cursor may not be restored correctly after
  5747.         escaping back from CONNECT because of a bug in the early IBM BIOS.
  5748.  
  5749. KEYCLICK {ON, OFF}
  5750.         Turns electronic keyclick ON or OFF.  If your keyboard has a mechanical
  5751.         clicker  (as IBM boards do), you may not notice the effect of this com-
  5752.         mand.
  5753.  
  5754. MARGIN-BELL {ON, OFF}
  5755.         Controls  whether  the  bell  should  be sounded when the cursor passes
  5756.         column 72 near the right screen margin; wider displays set the  bell  8
  5757.         columns from the right edge.
  5758. 5.6.9. The SET Command                                                 Page 105
  5759.  
  5760. -------------------------------------------------------------------------------
  5761. NEWLINE-MODE {ON, OFF}
  5762.         ON sends a carriage-return-linefeed combination (CRLF)  when  you  type
  5763.         carriage  return  (CR)  during  terminal emulation.  OFF (default) just
  5764.         sends a CR when you type CR.
  5765.  
  5766. ROLL {ON, OFF}
  5767.         ON  unrolls  the screen to the bottom before adding new material if the
  5768.         screen had been rolled back, e.g. by Ctrl-PgUp.  ROLL OFF (the default)
  5769.         displays  new  material on the current screen, possibly overwriting old
  5770.         material.
  5771.  
  5772. SCREEN-BACKGROUND {NORMAL, REVERSE}
  5773.         NORMAL  means  dark  background, light characters.  REVERSE means light
  5774.         background, dark characters.
  5775.  
  5776. TAB {AT n, CLEAR AT n, CLEAR ALL}
  5777.         Sets  tab  stops or clears one or all tab stops; n is the numeric posi-
  5778.         tion of the tab to be set or cleared.  By default,  tabs  are  every  8
  5779.         spaces,  at positions 9, 17, 25, etc.  Only meaningful when emulating a
  5780.         terminal that has settable  tabs  (the  VT52  doesn't  really  but  the
  5781.         emulator  can set them anyway).  More than one tabstop may be specified
  5782.         by separating column numbers with commas, spaces, or tabs.  132 columns
  5783.         are supported.
  5784.  
  5785. WRAP {ON, OFF}
  5786.         ON automatically breaks screen lines (by inserting a  CRLF)  when  they
  5787.         reach  the  right  margin.    OFF disables wrapping -- if a line is too
  5788.         long, the excess characters go off the screen.  WRAP is OFF by default,
  5789.         since most hosts format lines to fit on your screen.
  5790.  
  5791.  
  5792. SET TIMER
  5793.  
  5794. Syntax: SET TIMER {ON, OFF}
  5795.  
  5796. This command enables or disables the timer that is used during file transfer to
  5797. break deadlocks that occur when expected packets do not arrive.    By  default,
  5798. the  timer  is  ON.   If the other Kermit is providing timeouts, you can safely
  5799. turn the timer OFF to avoid packet collisions that might occur when two  timers
  5800. go off simultaneously.
  5801.  
  5802.  
  5803. SET TRANSLATION
  5804.  
  5805. Syntax: SET TRANSLATION INPUT {ON, OFF, char1 char2}
  5806.  
  5807. This  command  provides  multi-language  support  (and  perhaps  other  special
  5808. effects) during CONNECT, and during execution of the INPUT, OUTPUT, PAUSE,  and
  5809. TRANSMIT  script commands, but not during file transfer or at MS-Kermit command
  5810. level.  A character that arrives at the  communication  port  (char1)  will  be
  5811. translated  to another character (char2) before display on the screen.  As many
  5812. as 256 characters may have translations specified concurrently.    But  to  see
  5813. characters  with  ASCII values higher than 127, you must also SET DISPLAY 8 and
  5814. SET PARITY NONE.
  5815.  
  5816. SET TRANSLATION INPUT ON enables translation (the keyword INPUT is required  to
  5817. 5.6.9. The SET Command                                                 Page 106
  5818.  
  5819. -------------------------------------------------------------------------------
  5820. allow  future translation mechanisms).  OFF disables the translation and is the
  5821. default.  So even if you have set up a translation table, you must  SET  TRANS-
  5822. LATION  INPUT  ON  before  it will take effect.  SHOW TRANSLATION tells whether
  5823. translation is OFF or ON, and displays any current table entries.
  5824.  
  5825. Translation table entries are made by specifying byte pairs in ASCII or numeric
  5826. backslash form:  
  5827.  
  5828.   SET TRANS INPUT \3 \13
  5829.  
  5830. converts  incoming  ASCII  ETX characters (decimal 3) to ASCII CR (decimal 13).
  5831. 8-bit values are allowed, and refer to characters in the "upper  half"  of  the
  5832. PC's character set, either the ROM characters supplied with the PC or else sub-
  5833. stitutions provided by a special device driver.
  5834.  
  5835. A more practical example shows how the user of a German PC could  use  the  SET
  5836. TRANSLATION  and  SET KEY commands to make the PC's umlaut-a key (key code 132)
  5837. send a left curly brace ("{", ASCII 123), and to display incoming curly  braces
  5838. as umlaut-a's:
  5839.  
  5840.   SET KEY \d132 \d123
  5841.   SET TRANS INP { \d132
  5842.  
  5843. (This  example  applies  to  the IBM PC German keyboard, and assumes the German
  5844. keyboard  driver,  KEYBGR,  has  been  loaded.    This  is  usually   done   in
  5845. AUTOEXEC.BAT.)
  5846.  
  5847.  
  5848. SET WARNING
  5849.  
  5850. Syntax: SET WARNING {ON, OFF}
  5851.  
  5852. Specify  what  to do when an incoming file is about to be stored under the same
  5853. name as an existing file in the target device and directory.    If  ON,  Kermit
  5854. will  warn you when an incoming file has the same name as an existing file, and
  5855. automatically rename the incoming file (as indicated in the warning message) so
  5856. as  not to destroy (overwrite) any existing one.  If OFF, the pre-existing file
  5857. is destroyed, even if the incoming file does not arrive completely.  WARNING is
  5858. ON by default as a safety measure.
  5859.  
  5860. The  new  name  is  formed by adding numbers to the part of the name before the
  5861. dot.    For  instance,  ABC.TXT  becomes  ABC00001.TXT,  ABC00001.TXT   becomes
  5862. ABC00002.TXT, etc.
  5863.  
  5864.  
  5865. The STATUS Command
  5866.  
  5867. Syntax: STATUS
  5868.  
  5869. The  STATUS  command displays the values of all the current SET options.  There
  5870. are currently no operands for the STATUS command.  It always displays  all  the
  5871. options, and the display fills the screen.
  5872. 5.6.9. The SET Command                                                 Page 107
  5873.  
  5874. -------------------------------------------------------------------------------
  5875. The SHOW Command
  5876.  
  5877. Syntax: SHOW option
  5878.  
  5879. Most  parameters  that  may  be  altered with SET commands are displayed by the
  5880. STATUS command.  The SHOW command is used for displaying macro definitions, key
  5881. redefinitions, file transfer statistics, and translations.
  5882.  
  5883. SHOW MACROS
  5884.         displays the definitions of all currently defined macros,  as  well  as
  5885.         the amount of space left for new macro definitions.
  5886.  
  5887. SHOW KEY
  5888.         allows you to determine a key's identification code and  what  it  will
  5889.         send in CONNECT mode, most useful for obtaining the identification of a
  5890.         key when SET KEY commands will be placed in a TAKE FILE.  This  command
  5891.         can  be  done  only  interactively  (use  a ? to see all defined keys).
  5892.         Refer to the terminal emulation section for examples.
  5893.  
  5894. SHOW MODEM
  5895.         displays  the  status  of  the  modem signals DSR (dataset ready, modem
  5896.         tells the PC that it is turned on and in  data  mode),  CTS  (clear  to
  5897.         send,  modem  grants  the  PC permission to send data), and CD (carrier
  5898.         detect, local modem tells the PC that it is  connected  to  the  remote
  5899.         modem).  The results may be misleading if your asynchronous adapter, or
  5900.         the connector or cable that is attached to it, is  strapped  to  supply
  5901.         these modem signals itself.
  5902.  
  5903. SHOW STATISTICS
  5904.         displays counts of characters sent and received during file  transfers,
  5905.         for  both  the  most recent transfer and the entire session, and an es-
  5906.         timate of the average baud rate while sending and listening.
  5907.  
  5908. SHOW TRANSLATION
  5909.         displays  the  entries in the 256 byte input translation table.  Values
  5910.         are expressed numerically to avoid  confusion  with  different  display
  5911.         adapters, and the command shows only entries for which input and output
  5912.         codes differ.
  5913.  
  5914.  
  5915. 5.7. SCRIPTS
  5916.  
  5917. A script is a file containing Kermit commands to be executed.  It is  the  same
  5918. as a TAKE file, in Kermit terminology, but includes INPUT, OUTPUT, PAUSE, ECHO,
  5919. and CLEAR commands to automatically detect and respond to  information  flowing
  5920. though  the serial port, actions which otherwise would be performed by the user
  5921. during CONNECT.  The login sequence of a host computer is a classical example.
  5922.  
  5923. The script commands INPUT, OUTPUT, PAUSE, and ECHO may be terminated by  typing
  5924. Control-C at the keyboard.
  5925. 5.7. SCRIPTS                                                           Page 108
  5926.  
  5927. -------------------------------------------------------------------------------
  5928. The CLEAR command
  5929.  
  5930. Syntax: CLEAR
  5931.  
  5932. The  CLEAR command flushes the buffers of the serial port to forget any earlier
  5933. material to help the INPUT command with a  clean  start.    (This  command  was
  5934. called  CLRINP  in 2.29B and earlier, and CLEAR was used to erase macro and key
  5935. definition memory).
  5936.  
  5937.  
  5938. The INPUT command
  5939.  
  5940. Syntax: INPUT [timeout] {search-string, @filespec}
  5941.  
  5942. INPUT is the most powerful of the script commands.  It  reads  characters  from
  5943. the  serial  port  continuously  until  one  of two things occurs: the received
  5944. characters match the search string or the time limit expires.  Matching strings
  5945. is the normal use, as in
  5946.  
  5947.   Kermit-MS>input 5 Login please:
  5948.  
  5949. to  recognize  the  phrase "Login please:", or else time out after trying for 5
  5950. seconds.  A special binary character \255 or \o377 or \xFF stands for the  com-
  5951. bination  carriage return and a line feed, in either order, to simplify pattern
  5952. matching.
  5953.  
  5954. Beware of characters arriving with parity set because the pattern matching con-
  5955. siders  all 8 bits of a byte unless the local parity is other than NONE and SET
  5956. DISPLAY is 7-BITS.  Arriving characters are  modified  by  first  removing  the
  5957. parity  bit, if parity is other than NONE, then they are passed through the SET
  5958. TRANSLATION INPUT converter, the high bit is again suppressed if SET DISPLAY is
  5959. 7-BITs, the result is logged and stored for pattern matching.
  5960.  
  5961. The  INPUT  and  OUTPUT  commands  have  a special syntax to replace the normal
  5962. string with text obtained from a file or device:
  5963.  
  5964.   OUTPUT @filespec
  5965.   INPUT @filespec
  5966.  
  5967. Both forms read one line of text from the file or device  and  use  it  as  the
  5968. desired  string.    A common use is to wait for a password prompt and then read
  5969. the password from the console  keyboard.    A  string  starts  with  the  first
  5970. non-spacing character and ends at either the end of line or, if executed within
  5971. a TAKE file, at a semicolon.  Indirectly obtained strings, the @filespec  form,
  5972. read  the  first line of the file up to but not including the explicit carriage
  5973. return.  Note if a trailing carriage return is  needed  it  must  be  expressed
  5974. numerically, such as \13 decimal.
  5975.  
  5976. The  behavior  of  the INPUT command can be controlled by SET INPUT parameters:
  5977. CASE, TIMEOUT-ACTION, DEFAULT-TIMEOUT, and ECHO.    If  the  TIMEOUT-ACTION  is
  5978. PROCEED  then failure to match strings is ignored and the script continues with
  5979. the next command.  Otherwise, QUIT causes the current script file to be  exited
  5980. immediately;  the  next  higher  level script file or the Kermit prompt is done
  5981. next.  CASE controls whether upper and lower case letters should be  considered
  5982. the same during matching.  DEFAULT-TIMEOUT supplies a different default for how
  5983. long to wait, in case an explicit value is not  given  in  the  INPUT  command.
  5984. 5.7. SCRIPTS                                                           Page 109
  5985.  
  5986. -------------------------------------------------------------------------------
  5987. Finally,  ECHO  controls  displaying  of  serial  port data during matching and
  5988. during the other script commands.
  5989.  
  5990. When a script fails because an INPUT command  did  not  encounter  the  desired
  5991. string within the timeout interval, the message is "?Not confirmed".
  5992.  
  5993.  
  5994. The OUTPUT command
  5995.  
  5996. Syntax: OUTPUT {string, @filespec}
  5997.  
  5998. The  OUTPUT command writes the indicated character string to the serial port as
  5999. ordinary text.  The string may contain control or other special binary  charac-
  6000. ters  by  representing  them  in the backslash numerical form.  Carriage Return
  6001. (CR), for example, is \13 decimal, \o15 octal, or \x0D hexadecimal.  The string
  6002. may use 8-bit characters if the communications parity is type NONE.
  6003.  
  6004. The OUTPUT string may not contain Kermit CONNECT-mode action verbs, but it does
  6005. recognize a special code \b or \B, which causes a BREAK  signal  to  be  trans-
  6006. mitted.
  6007.  
  6008. The  string to be transmitted starts with the first non-spacing character after
  6009. the OUTPUT command and ends at either the end of line or, if executed within  a
  6010. TAKE file, at a semicolon (if you need to output a semicolon from within a TAKE
  6011. file, use backslash notation, e.g. "\59").  Indirectly  obtained  strings,  the
  6012. @filespec form, read the first line of the file up to but not including the ex-
  6013. plicit carriage return.
  6014.  
  6015. As a convenience, text arriving at the serial port during the OUTPUT command is
  6016. shown  on the screen if SET INPUT-ECHO is ON, and stored in a 128-byte internal
  6017. buffer for rereading by a following INPUT command.
  6018.  
  6019.  
  6020. The PAUSE command
  6021.  
  6022. Syntax: PAUSE [number]
  6023.  
  6024. PAUSE simply waits one or more seconds before Kermit executes the  next  script
  6025. command.   Pauses are frequently necessary to avoid overdriving the host and to
  6026. let a modem proceed through a dialing sequence without interruptions from  Ker-
  6027. mit.   The default waiting time is set by SET INPUT DEFAULT-TIMEOUT and is nor-
  6028. mally one second.  The optional integer number selects the number of seconds to
  6029. pause  for  this command.  An explicit value of zero produces a pause of just a
  6030. few milliseconds which can be useful in some situations.
  6031.  
  6032. Text arriving during the  PAUSE  interval  is  shown  on  the  screen,  if  SET
  6033. INPUT-ECHO  is  ON, and stored in a 128-byte internal buffer for rereading by a
  6034. following INPUT command.
  6035.  
  6036.  
  6037. Script Examples
  6038.  
  6039. Figure 5-2 shows a simple script file that dials a Hayes modem and logs in to a
  6040. computer, prompting the user for her password, and then connects as a terminal.
  6041.  
  6042. Notice  the  semicolons used to indicate comments in TAKE files.  If these same
  6043. 5.7. SCRIPTS                                                           Page 110
  6044.  
  6045. -------------------------------------------------------------------------------
  6046. -------------------------------------------------------------------------------
  6047.  
  6048.  
  6049.  
  6050.   CLEAR
  6051.   SET SPEED 1200
  6052.   OUTPUT AT\13                         ; Wakeup modem.
  6053.   PAUSE 2                              ; Let it get ready.
  6054.   INPUT OK                             ; Its response.
  6055.   OUTPUT ATDT 9,555-1212\13            ; Dial the phone.
  6056.   INPUT 30 CONNECT                     ;  Wait for connection.
  6057.   PAUSE 2                              ; Breathing space for modems.
  6058.   OUTPUT \13                           ; Send carriage returns to
  6059.   PAUSE 2                              ;  awaken host, wait 2 secs
  6060.   OUTPUT \13                           ;  between them.
  6061.   INPUT 15 Please login:               ; Get expected prompt.
  6062.   OUTPUT Sari\13                       ; Send username and CR.
  6063.   SET INPUT ECHO OFF                   ; Privacy, please.
  6064.   INPUT Enter password:                ; Quietly wait for this.
  6065.   ECHO Type your password now.         ; Make our own prompt.
  6066.   OUTPUT @CON                          ; Send console keystrokes.
  6067.   OUTPUT \13                           ; Add a real carriage return
  6068.   SET INPUT ECHO ON                    ; Go verbose again.
  6069.   CONNECT                              ; Start terminal emulation
  6070.  
  6071.          Figure 5-2:   MS-Kermit Script for Dialing Up and Logging In
  6072.  
  6073. -------------------------------------------------------------------------------
  6074.  
  6075. commands were typed by hand at the Kermit prompt the semicolon  material  would
  6076. be  considered  part  of  a string!  Typing a Control-C will interrupt and ter-
  6077. minate any of the commands.
  6078.  
  6079. The MS-Kermit script package maintains a small memory buffer to allow the INPUT
  6080. command to inspect characters received during the previous few script commands.
  6081. CLEAR removes them and any others in a lower level main serial port buffer.
  6082.  
  6083. As with any TAKE file, scripts can be nested by using the TAKE command within a
  6084. script.    If an INPUT command fails to obtain a match and uses the QUIT option
  6085. or if the script simply finishes normally the TAKE file is exited  and  control
  6086. resumes where it left off in the next higher TAKE file or at the Kermit prompt.
  6087.  
  6088. A slightly more complicated combination of DOS Batch and Kermit Script files is
  6089. shown in Figures 5-3 and 5-4 (see your DOS manual for  an  explanation  of  the
  6090. batch  file  syntax).  The purpose is to allow a user to say "SEND filename" at
  6091. the DOS prompt.  The DOS batch shell, SEND.BAT, and the login script,  KX,  are
  6092. combined  to  login  to  a  VAX through a data switch, run VMS Kermit in server
  6093. mode, transfer the file, submit it to VMS Mail, delete the disk file, shut down
  6094. the  server  and  logout  from the VAX, and report the overall transfer status.
  6095. The user is asked to provide a password interactively.  Scripts are illustrated
  6096. further in the next section.
  6097. 5.8. Initialization Files Revisited                                    Page 111
  6098.  
  6099. -------------------------------------------------------------------------------
  6100. -------------------------------------------------------------------------------
  6101.  
  6102.  
  6103. File SEND.BAT, DOS batch program:
  6104.  
  6105.   echo off
  6106.   Rem Kermit, one-line file mailer, by Joe Doupnik.
  6107.   Rem Logon to VAX, run Kermit, Send user's file,
  6108.   Rem  post via MAIL, logout from VAX.
  6109.   if ".%2" == "." goto usage
  6110.   if exist %1 goto proceed
  6111.   echo No file to send!
  6112.   :usage
  6113.   echo Usage is  SEND filename username
  6114.   goto done
  6115.   :proceed
  6116.   echo Logging onto the Vax ...
  6117.   kermit set disp q,take kx,send %1,pau,rem host mail %1 %2,pau 2,bye,
  6118.   if errorlevel 3 goto badrem
  6119.   if errorlevel 2 goto badrcv
  6120.   if errorlevel 1 goto badsnd
  6121.   echo File(s) "%1" has been mailed to %2.
  6122.   goto done
  6123.   :badrem
  6124.   echo Mail did not cooperate!
  6125.   :badrcv
  6126.   echo Receive failed!
  6127.   goto done
  6128.   :badsnd
  6129.   echo Send failed!
  6130.   goto done
  6131.   :done
  6132.   echo on
  6133.  
  6134.        Figure 5-3:   MS-DOS Batch File Invoking Kermit to Send VAX Mail
  6135.  
  6136. -------------------------------------------------------------------------------
  6137.  
  6138.  
  6139. 5.8. Initialization Files Revisited
  6140.  
  6141. At  Columbia  University,  we  have  IBM  370-series mainframes running VM/CMS,
  6142. DECSYSTEM-20 mainframes running TOPS-20, a VAX 8700 running Unix.  All of these
  6143. systems  are  accessible  through a Gandalf PACX port contention unit.  The IBM
  6144. systems have two different kinds of front ends, a COMTEN 3695 (similar  to  IBM
  6145. 3705) for linemode half-duplex connections, and various Series/1-style protocol
  6146. converters (including the 7171 and  4994)  for  full-screen,  full-duplex  3270
  6147. emulation,  all of which use various combinations of parity and other settings.
  6148. Figure 5-5 shows an MSKERMIT.INI file composed by Vace Kundakci of Columbia  to
  6149. automate  the  task  of  switching  his  PC/AT among all these systems.  It il-
  6150. lustrates the creative use of macros and scripts.  Numerous site-  and  system-
  6151. dependent key definitions have been omitted.
  6152.  
  6153. A  bit  of explanation might clarify some of this.  PACX is our port contention
  6154. unit.  Its output appears in even parity.  It prompts us to  "Enter  node  name
  6155. =>",  and  we  respond  with the name of one of our systems or front ends, like
  6156. 5.8. Initialization Files Revisited                                    Page 112
  6157.  
  6158. -------------------------------------------------------------------------------
  6159. -------------------------------------------------------------------------------
  6160.  
  6161.  
  6162. File KX, Kermit script:
  6163.  
  6164.   Comment Login script for VAXA via Micom data PBX Switch.
  6165.   set input timeout quit
  6166.   set input echo off
  6167.   set display quiet
  6168.   output \13
  6169.   comment - "slowly." and "CLASS" are part of the switch's prompt.
  6170.   input 10 slowly.
  6171.   input 10 CLASS
  6172.   pause
  6173.   comment - Slowly tell switch "vaxa", wait for beep.
  6174.   output v
  6175.   output a
  6176.   output x
  6177.   output a
  6178.   output \13
  6179.   pause
  6180.   input 5 \7
  6181.   comment - Done with Switch, wake up the VAX and log in.
  6182.   pause
  6183.   output \13
  6184.   pause
  6185.   input 5 Username:
  6186.   set input timeout proceed
  6187.   output MYNAME\13
  6188.   input 2 Password:
  6189.   comment - Prompt ourselves, then get password from console.
  6190.   echo Enter password:
  6191.   output @con
  6192.   comment - Send a carriage return at the end of the password.
  6193.   output \13
  6194.   comment - Expect ESC Z from the VAX's Set Term/Inquire...
  6195.   comment - Respond ESC [ <query symbol> 6 ; 2 c   (say we are VT102).
  6196.   comment - Note syntax for including question mark and semicolon!
  6197.   input 15 \27Z
  6198.   output \27[\{63}6\;2c
  6199.   comment Look for VMS dollar sign prompt
  6200.   input 15 $
  6201.   comment Start VMS Kermit and place it in server mode
  6202.   output kermit server\13
  6203.   comment - allow server's message to finish, "machine." appears twice.
  6204.   input 10 machine.
  6205.   input 10 machine.
  6206.   pause
  6207.  
  6208.      Figure 5-4:   MS-Kermit Script for Logging into VAX and Sending Mail
  6209.  
  6210. -------------------------------------------------------------------------------
  6211.  
  6212. CU20B or CU20D (DEC-20s), SIMA or SIMB (7171s), CUVMA or CUVMB (IBM  mainframes
  6213. front  ended by COMTEN), or CUNIXC (a VAX).  To connect to a given system, Vace
  6214. types "do cu20b" or "do sima" to invoke a "connecting" macro.  Each  of  these,
  6215. 5.8. Initialization Files Revisited                                    Page 113
  6216.  
  6217. -------------------------------------------------------------------------------
  6218. -------------------------------------------------------------------------------
  6219.  
  6220.  
  6221.  
  6222.   ; MSKERMIT.INI for IBM PC/AT Kermit 2.30, by Vace Kundakci
  6223.  
  6224.   COMMENT - INPUT command defaults for scripts
  6225.   set inp tim quit
  6226.   set inp echo off
  6227.   set inp case observe
  6228.  
  6229.   COMMENT - Macros for connecting to PACX and selecting various systems
  6230.   def cu20b do pacx,o cu20b\13,do 2065
  6231.   def cu20d do pacx,o cu20d\13,do 2065
  6232.   def sima do pacx,o sima\13,do 7171
  6233.   def simb do pacx,o simb\13,do 4994
  6234.   def cunixc do pacx,o cunixc\13,do 8700
  6235.   def cuvma do pacx,o cuvm\13,do 3695,o vma\13,do 3083
  6236.   def cuvmb do pacx,o cuvm\13,do 3695,o vmb\13,do 3083
  6237.  
  6238.   COMMENT - Macros for logging in to various systems.
  6239.   def pacx cle,set par e,o \13,i 5 Enter node name =>\32,pau
  6240.   def 3695 i 5 SWITCHING CHARACTERS:\32\32
  6241.   def 3083 i 5 ONLINE,o L\32,do pwd,do vml,c
  6242.   def 8700 i 5 login:\32,do pwd,do dec,c
  6243.   def 2065 i 5 \13\10\64,o ter vt102\13,do pwd,do dec,c
  6244.   def 7171 pau,cle,o \13,i 5 TERMINAL TYPE:\32,o vt-100\13,do 3270
  6245.   def 4994 pau,cle,o \13,i 5 terminal type:\32,pau,o vt100\13,do 3270
  6246.   def 3270 pau,cle,o \13,o L\32,do pwd,do xed,c
  6247.  
  6248.   COMMENT - Macros for communicating with various systems
  6249.   def vml set par m,set k \270 \8,set k \3 \Kbreak,do tty
  6250.   def xed set par e,set k \270 \8,set k \3,do def
  6251.   def dec set par n,set k \270 \127,set k \3,do def
  6252.   def def set tim of,set loc of,set ter wr of,set han non,set flo xon
  6253.   def tty set tim on,set loc on,set ter wr on,set han xon,set flo non
  6254.  
  6255.   COMMENT - Macro for obtaining user ID and password
  6256.   def pwd echo user:,o @con,o \13, do pw2
  6257.   def pw2 echo Password:,o @con,o \13
  6258.  
  6259.             Figure 5-5:   An Advanced MS-Kermit Initialization File
  6260.  
  6261. -------------------------------------------------------------------------------
  6262.  
  6263. in  turn,  invokes  the  PACX macro to navigate through the PACX to the desired
  6264. system, and then invokes the appropriate macro (3695, 7171, etc)  to  get  past
  6265. any  associated  front  end  (e.g.  to  tell  the COMTEN which IBM mainframe is
  6266. wanted, or to tell the protocol converter what terminal to emulate),  and  then
  6267. to  login  on  the  desired  system,  prompting  on  the screen for user ID and
  6268. password.  Finally, a macro like "vml" (VM linemode),  "xed"  (XEDIT,  i.e.  VM
  6269. full  screen),  or  "dec"  (DEC-20 or VAX) is executed to set the communication
  6270. parameters for the system just logged in to.   The  key  definitions  that  are
  6271. shown  in  the "vml", "xed", and "dec" macros assign the host's character dele-
  6272. tion code (backspace or rubout) to the AT's backarrow key.
  6273. 5.9. MS-Kermit Features for Different Systems                          Page 114
  6274.  
  6275. -------------------------------------------------------------------------------
  6276. 5.9. MS-Kermit Features for Different Systems
  6277.  
  6278. As noted early on, MS-Kermit was designed primarily for the IBM PC family,  and
  6279. later  adapted  to various non-IBM-compatible MS-DOS (and even non-MS-DOS) sys-
  6280. tems.  Some of these adaptations provide all the features of the  IBM  PC  ver-
  6281. sion,  others  provide only a subset, and still others may include features not
  6282. available on the IBM family.  These features are all  of  the  system-dependent
  6283. variety; the Kermit file transfer protocol should be implemented identically on
  6284. all versions of MS-Kermit.  The most obvious differences are  in  the  terminal
  6285. emulation  options  and  the keyboards.  Table 5-5 shows the terminal emulation
  6286. options for the systems presently supported by Kermit-MS, and Table 5-6,  shows
  6287. which  keys  are  used  for screen rollback on the various systems supported by
  6288. MS-Kermit.
  6289.  
  6290. -------------------------------------------------------------------------------
  6291.  
  6292.  
  6293.  
  6294.   System         EscChar   Capabilities Terminal Service
  6295.   ACT Apricot      ^]            K      VT52 ???
  6296.   DEC Rainbow      ^]      R   P K D    VT102 firmware
  6297.   DECmate/DOS      ^]            K      VT100
  6298.   Generic DOS      ^]            K      Depends on system
  6299.   Grid Compass     ^]            K      ???
  6300.   HP-110           ^]            K      Dumb terminal
  6301.   HP-150           ^]      R     K      HP-2623 firmware
  6302.   IBM PC family    ^]      R M P K D    H19,VT52,VT102,Tek emulation
  6303.   Intel 3xx        ^]            K      Uses real terminal
  6304.   NEC APC3         ^]      R M P K D    H19,VT52,VT102 emulation
  6305.   NEC APC          ^]      R   P K      VT100, ADM3A firmware
  6306.   Olivetti M24     ^]      R M P K D    Same as IBM PC
  6307.   Sanyo MBC55x     ^]      R M P K D    H19,VT52,VT102 emulation
  6308.   Wang PC          ^A            K      Wang firmware
  6309.   TI Pro           ^]        M P K      VT100/Tektronix
  6310.   Victor 9000      Alt-]     M P K D    H19,VT52,VT102 and/or Tek4010
  6311.   Zenith Z100      ^]            K      Heath-19 emulation
  6312.  
  6313.  R=Rollback, M=Modeline, P=Printer control, K=Key redefinition, D=screen Dump
  6314.  
  6315.                Table 5-5:   Kermit-MS Terminal Emulation Options
  6316.  
  6317. -------------------------------------------------------------------------------
  6318.  
  6319. Another difference is the default communication port, the number of  communica-
  6320. tion  ports  supported,  and the names given to them.  For instance, the IBM PC
  6321. family supports COM1 and COM2, and uses COM1 by default.  MS-Kermit may be per-
  6322. suaded  to  support higher-numbered IBM ports using the method outlined in sec-
  6323. tion 5.16.3.  For remote operation, IBM's name for the console is  CON,  so  if
  6324. you CTTY COM1, you do CTTY CON to put the PC back to normal.
  6325. 5.9. MS-Kermit Features for Different Systems                          Page 115
  6326.  
  6327. -------------------------------------------------------------------------------
  6328. -------------------------------------------------------------------------------
  6329.  
  6330.  
  6331.  
  6332. System    Screen Down   Line Down       Screen Up   Line Up
  6333. IBM PC    PgUp          Ctrl-PgUp       PgDn        Ctrl-PgDn
  6334. Rainbow   PrevScreen    Ctrl-PrevScreen NextScreen  Ctrl-NextScreen
  6335. HP-150    Prev          Shift-UpArrow   Next        Shift-DownArrow
  6336. NEC APC   Uparrow       Ctrl-UpArrow    DownArrow   Ctrl-DownArrow
  6337. NEC APC3  PgUp          Ctrl-PgUp       PgDn        Ctrl-PgDn
  6338. Sanyo 55x PgUp          Ctrl-RtArrow    PgDn        Ctrl-PgDn
  6339.  
  6340. The IBM PC also allows use of the Home key to get to the  top  of  its  display
  6341. memory and End key to get to the bottom, and the keypad minus (-) key to toggle
  6342. the mode line on and off.  The Rainbow uses Shift-Next-Screen  to  get  to  the
  6343. bottom  of  its  display memory, but provides no key for moving directly to the
  6344. top.
  6345.  
  6346.                    Table 5-6:   Kermit-MS Screen Scroll Keys
  6347.  
  6348. -------------------------------------------------------------------------------
  6349.  
  6350.  
  6351. The DEC Rainbow
  6352.  
  6353. The  DEC  Rainbow  version  of  MS-Kermit 2.30 uses the built-in VT102 terminal
  6354. firmware and setup modes, and can operate at speeds up to 9600 baud.  It has no
  6355. 25th  screen  line,  and therefore no Kermit mode line during CONNECT.  It sup-
  6356. ports only the Rainbow's single communication port, and not the  printer  port,
  6357. so  SET  PORT for the Rainbow is not implemented (but of course the printer may
  6358. be used for printing.)  The Rainbow may be put in remote mode by CTTY AUX,  and
  6359. returned  to  normal with CTTY SCRN.  The Rainbow supports several SET TERMINAL
  6360. commands: VT102, VT52, and ROLL.
  6361.  
  6362. The keypad and cursor keys all work properly in VT102 and VT52 modes and in ap-
  6363. plication  as  well  as  native  states  (they never had in previous versions).
  6364. Newline mode is activated for received characters (LF ==> CR/LF).  Screen  roll
  6365. back  is  almost 11 screenfuls.  Table 5-7 shows the verb names and default key
  6366. assignments for the Rainbow.  On the main typewriter keyboard the shifted comma
  6367. and period are converted to special keys available for Set Key assignment with-
  6368. out impacting the normal unshifted ASCII actions; Shift Lock has no  effect  on
  6369. these keys.
  6370.  
  6371.  
  6372. The DECmate II
  6373.  
  6374. MS-Kermit for the DECmate II with the XPU option is somewhat similar to Rainbow
  6375. Kermit.  It uses built-in terminal VT100 firmware  and  setup  modes  and  baud
  6376. rates  up  to  9600  on the single communication port.  The printer port is not
  6377. available for communications in this version.  There is no mode line, but other
  6378. connect-mode escapes are supported, including sending BREAK.  Disks A through I
  6379. are supported, and the floppy disk format is compatible with the Rainbow.   DEC
  6380. utilities are available for file conversion between DOS and WPS-8 files.
  6381. 5.9. MS-Kermit Features for Different Systems                          Page 116
  6382.  
  6383. -------------------------------------------------------------------------------
  6384. -------------------------------------------------------------------------------
  6385.  
  6386.  
  6387.  
  6388.   Rainbow Key           Verb Name      Operation
  6389.  
  6390.   PF1                   \Kpf1,\Kgold   Keypad function key
  6391.   PF2..PF4              \Kpf2..\Kpf4   Keypad function keys
  6392.   keypad 0..9           \Kkp0..\Kkp9   Keypad digit keys
  6393.   keypad -              \Kkpminus      Keypad minus key
  6394.   keypad ,              \Kkpcoma       Keypad commma
  6395.   keypad .              \Kkpdot        Keypad dot (period) key
  6396.   keypad Enter          \Kkpenter      Keypad Enter key
  6397.  
  6398.   up arrow              \Kuparr        Cursor keys
  6399.   down arrow            \Kdnarr
  6400.   left arrow            \Klfarr
  6401.   right arrow           \Krtarr
  6402.   Shift Prev Screen     \Khome         Rewind to start of screen buffer
  6403.   Shift Next Screen     \Kend          Unwind to end of screen buffer
  6404.   Ctrl Prev screen      \Kupone        Backup one screen line
  6405.   Ctrl Next screen      \Kdnone        Advance one screen line
  6406.   Prev screen           \Kupscn        Backup one screen
  6407.   Next screen           \Kdnscn        Advance one screen
  6408.   Print Screen          \Kprtscr       Copy screen to printer
  6409.   Ctrl Print Screen     \Ktoggle_prn   Toggle echoing screen to printer
  6410.                                         (printer failure resets toggle)
  6411.   Do                    \Kdump         Copy screen to file (KERMIT.SCN)
  6412.   Break                 \Kbreak        Send a BREAK
  6413.   Shift Break           \Klbreak       Send a Long BREAK
  6414.   Main Screen           \KDOS          Push to DOS
  6415.   Help                  \Khelp         Show Connect mode help menu
  6416.   Exit                  \Kexit         Exit Connect mode
  6417.   *                     \Knull         send a null out the serial port
  6418.   *                     \Khangup       hangup phone by dropping DTR, RTS
  6419.   *                     \Klogon        resume logging, if active
  6420.   *                     \Klogof        suspend logging
  6421.   *                     \Kstatus       display status table
  6422.  
  6423.   * (verbs not pre-assigned to keys)
  6424.  
  6425.  
  6426.                Table 5-7:   Kermit-MS Verbs for the DEC Rainbow
  6427.  
  6428. -------------------------------------------------------------------------------
  6429.  
  6430.  
  6431. The NEC APC3
  6432.  
  6433. The NEC APC3 version of MS-Kermit assumes that the ANSI.SYS driver has been in-
  6434. stalled and that a color monitor is being used; the color  graphics  option  is
  6435. not  used  by  Kermit.  Although the display should be entirely sensible with a
  6436. monochrome system, it has not been tested.  Differences from the IBM PC version
  6437. include:
  6438.  
  6439. SET BAUD: The useful baud rates supported range from 300 to 9600.
  6440. 5.9. MS-Kermit Features for Different Systems                          Page 117
  6441.  
  6442. -------------------------------------------------------------------------------
  6443. SET  PORT:  The  available  ports  are 1, 2, 3, or their equivalents AUX, AUX2,
  6444. AUX3.
  6445.  
  6446. SET TERMINAL COLOR: Instead of specifying colors by  number,  the  words  BLUE,
  6447. RED, MAGENTA, GREEN, CYAN, YELLOW, or WHITE are appropriate.  This is the color
  6448. of the text in connect mode; background colors are not available.    Monochrome
  6449. monitors will respond with display changing from most dim to most bright if the
  6450. colors are specified in the order given.
  6451.  
  6452. SET TERMINAL KEYCLICK: Not implemented in Kermit; use the NEC provided command.
  6453.  
  6454. SET TERMINAL SCREEN-BACKGROUND: Not implemented.
  6455.  
  6456. During terminal emulation, screen scroll is handled by the PgUp and PgDn  keys.
  6457. If  used  in combination with the Ctrl key, the display moves but one line.  If
  6458. used in combination with the Fnc key, the display scrolls to  the  end  of  the
  6459. buffer.    The  Fnc-INS  combination toggles the mode line on/off.  The Fnc-DEL
  6460. combination toggles the terminal emulation type.    The  Fnc-Break  combination
  6461. resets  the emulator.  The Help key pulls down the connect mode menu.  The ANSI
  6462. escape sequence for disable/enable cursor is implemented.
  6463.  
  6464.  
  6465. 5.10. Compatibility with Older Versions of MS-DOS Kermit
  6466.  
  6467. The last monolithic (single source file) release of  MS-DOS  Kermit  was  1.20.
  6468. Meanwhile, implementations based on versions of that vintage will have at least
  6469. the following incompatibilies from the version described here:
  6470.  
  6471.    - "RECEIVE filespec" is used instead of "GET filespec".   There  is  no
  6472.      GET  command  in older versions, and no way to specify a new name for
  6473.      an incoming file.
  6474.    - No LOCAL or REMOTE commands.
  6475.    - No 8th-bit prefixing, repeat counts, CRCs or 2-character checksums.
  6476.    - No TAKE or initialization files.
  6477.    - No command macros or command line arguments.
  6478.    - No terminal session logging.
  6479.  
  6480. and others, depending on the specific version.
  6481.  
  6482. Incompatibilities between 2.29 and 2.30 include:
  6483.  
  6484.    - LOCAL command has been removed from 2.30.
  6485.    - CLEAR command now means clear serial port buffer rather than key  and
  6486.      macro definitions.  Key and macro definition string space is now gar-
  6487.      bage collected, so a CLEAR command for them is no longer necessary.
  6488.    - CLRINP command is gone (replaced by CLEAR).
  6489.    - Numbers of the form \nnn default to decimal rather than octal.
  6490.    - Status of Default Disk is now shown as default disk and path.
  6491.    - LOG  filespec  replaced  by  LOG  SESSION  filespec  and  LOG  PACKET
  6492.      filespec.
  6493.    - SET  KEY  and SHOW KEY commands use different key identifications and
  6494.      syntax:
  6495.  
  6496. MS-Kermit no longer understands keycap names such as F1 and  BACKSPACE  because
  6497. the  codes are now highly dependent on individual keyboards, software, and com-
  6498. puters.  Also, not every key press  combination  is  supported  by  the  system
  6499. 5.10. Compatibility with Older Versions of MS-DOS Kermit               Page 118
  6500.  
  6501. -------------------------------------------------------------------------------
  6502. software  and  key  codes do depend on the keyboard in use.  Thus, the SHOW KEY
  6503. command is normally used to obtain codes for keys on  your  system.    In  most
  6504. cases,  defining one key also redefines all other keys sending the same charac-
  6505. ter.  This is a side effect of  not  knowing  the  physical  details  of  every
  6506. keyboard.    However,  efforts  have been made to recognize many such "aliased"
  6507. keys and to generate unique identifications for each. Special keys, such as F1,
  6508. F2  and others which do not send an ASCII code are usually unique and are iden-
  6509. tified by scan codes.
  6510.  
  6511. Previous versions of MS Kermit used a different key coding  algorithm  and  not
  6512. all  old  codes  map to the expected keys.  However, Kermit does attempt to use
  6513. the older SET KEY syntax properly as much as possible.  The  older  syntax  re-
  6514. quired  the  keyword SCAN followed by a number WITHOUT the BACKSLASH.  The cur-
  6515. rent MS Kermit uses decimal as the default number base  and  previous  versions
  6516. used  octal  in  certain commands.  So, when Kermit senses an old style SET KEY
  6517. command it converts the number, displays the new format  and  gives  a  warning
  6518. message.  It is best to make a new style SET KEY file.
  6519.  
  6520.  
  6521. 5.11. What's Missing
  6522.  
  6523. Kermit-MS  has  plenty of room for improvement.  Missing features (which may be
  6524. added in future releases) include:
  6525.  
  6526.    - Sliding windows.
  6527.    - Attribute packets.
  6528.    - Login  script  elaboration  within  the  Kermit   command   structure
  6529.      (variables, conditional branching, etc).
  6530.    - Substitutible parameters for TAKE and DO commands.
  6531.    - Default filetype for TAKE command files.
  6532.    - DIAL  command,  telephone  directory,  explicit  support  for various
  6533.      modems.
  6534.    - A way to play back session logs directly from disk to screen.
  6535.    - Trapping of carrier loss.
  6536.    - Pause at end of screen during local TYPE.
  6537.    - Piped operation a la UNIX (e.g. "compress foo.bar | kermit send").
  6538.    - Transaction file logging.
  6539.    - A way to accept default values for omitted trailing  fields  in  com-
  6540.      mands.
  6541.    - A better built-in help facility.
  6542.    - Simple Control and Meta key reassignment.
  6543.    - Separation  of  STATUS output into several screens for terminal, com-
  6544.      munication, and protocol parameters.
  6545.    - Specification of character sequences having special meaning  to  com-
  6546.      munications "black boxes" which use ASCII characters for control pur-
  6547.      poses.  Byte stuffing or character doubling may be required.
  6548.  
  6549. Future releases of MS-Kermit will probably have major portions of  the  program
  6550. (now  written  entirely  in assembler) replaced by C-language code.  This would
  6551. include the file transfer portions, the command parser, etc.
  6552. 5.12. Installation of Kermit-MS                                        Page 119
  6553.  
  6554. -------------------------------------------------------------------------------
  6555. 5.12. Installation of Kermit-MS
  6556.  
  6557. If you already have Kermit on your PC, you can use it to obtain new versions of
  6558. Kermit-MS  when  they appear on the central system at your site.  If you do not
  6559. have Kermit or any other reliable file capture facility on your PC, you can or-
  6560. der  a  Kermit  diskette  from Columbia (write to Kermit Distribution, Columbia
  6561. University Center for Computing Activities, 612 West 115th Street, New York, NY
  6562. 10025,  USA,  for  information), or from any of a number of user groups or dis-
  6563. kette services.  If you absolutely can't get a Kermit diskette, but have access
  6564. to  another  computer  that has a copy of the MS-DOS Kermit program (usually in
  6565. ".BOO" format, explained below), there are two recommended methods for  getting
  6566. it onto your PC:
  6567.  
  6568.    1. Use another file capture facility to get it.
  6569.  
  6570.    2. Type  in and run the "baby Kermit" program (72 lines) from chapter 7
  6571.       of the Kermit book.
  6572.  
  6573. The first method involves either "raw capture" (no error checking), or else use
  6574. of  (gasp!)  another  protocol,  such as Xmodem, which, like Kermit, requires a
  6575. program to execute the same protocol on both ends of the connection.
  6576.  
  6577. Raw capture generally involves "typing" the file on the  other  computer,  with
  6578. your  PC  taking the place of the terminal, and rather than displaying the file
  6579. on the screen as it's being typed, your PC is storing it on the disk.  This  is
  6580. a  tricky  process, however, because data can easily be lost or corrupted.  For
  6581. instance, you could write a very short BASIC program to capture a file in  this
  6582. way,  but  it  could probably not keep up -- even at low baud rates -- with the
  6583. transmission speed unless you included the tricky serial port  BASIC  commands.
  6584. The  DOS  command COPY COM1 filename command has the same speed problem, and it
  6585. stops only when it receives a Control-Z character from the other computer.
  6586.  
  6587. If the other computer has Kermit on it -- which is likely, since this is  prob-
  6588. ably  the  reason you want to get Kermit onto your PC -- you should type in the
  6589. receive-only BASIC Kermit program listed on pp.186-188 of the Kermit book,  and
  6590. then  use  it  in  conjunction with the other computer's Kermit to transfer the
  6591. file.  Make sure to set a long enough delay on the other computer to give your-
  6592. self  time to escape back to the PC and start up the "baby Kermit" before pack-
  6593. ets start to arrive, otherwise you'll probably get fatal DOS i/o errors.
  6594.  
  6595. Note that  Kermit  programs  are  often  distributed  under  names  other  than
  6596. "Kermit".    The  Columbia  Kermit  program library contains hundreds of Kermit
  6597. programs, which must be given unique names.  MS-DOS Kermit for the IBM PC,  for
  6598. instance,  is  called MSVIBM.BOO.  Once you have this program in .EXE format on
  6599. your disk, you probably should rename it to KERMIT.EXE, because it's harder  to
  6600. remember (and type) the distribution name.
  6601.  
  6602. You  will  probably  also  want  to create an MS-Kermit initialization file.  A
  6603. sample is distributed with MS-Kermit as MSVIBM.INI.  This should be tailored to
  6604. your  requirements,  and  then renamed to MSKERMIT.INI, and stored where Kermit
  6605. can find it (according to the DOS PATH and APPEND commands).
  6606.  
  6607. Finally, if you run Kermit often, you might want to have your AUTOEXEC.BAT file
  6608. copy  Kermit, the initialization file, and a copy of COMMAND.COM to a RAM disk.
  6609. The procedure is explained in section 5.5.
  6610. 5.12. Installation of Kermit-MS                                        Page 120
  6611.  
  6612. -------------------------------------------------------------------------------
  6613. ".BOO Files"
  6614.  
  6615. MS-Kermit (and many other Kermit programs) are often distributed using  a  spe-
  6616. cial encoding called "boo" (short for "bootstrap") format, developed especially
  6617. for distribution of MS-Kermit over networks and communication lines.  MS-Kermit
  6618. has  grown  to  have  so  many features that the binary program image (the .EXE
  6619. file) has become quite large.  But binary files are  generally  not  compatible
  6620. with  the  common  labeled  tape formats (e.g. ANSI D), electronic mail, or raw
  6621. downloading -- the methods most commonly used for Kermit distribution.
  6622.  
  6623. A common practice is to encode .EXE  and  other  binary  files  into  printable
  6624. characters,  such  as hexadecimal digits, for transportability.  A simple "hex"
  6625. encoding results in two characters per 8-bit  binary  byte,  plus  CRLFs  added
  6626. every  80  (or  less)  hex  characters  to  allow  the  file  to  pass  through
  6627. card-oriented links.  A hex file is therefore more than twice as large  as  the
  6628. original binary file.
  6629.  
  6630. A  .BOO file is a more compact, but somewhat more complicated, encoding.  Every
  6631. three binary bytes (24 bits) are split up into four 6-bit bytes with 48  (ASCII
  6632. character  "0")  added to each, resulting in four ASCII characters ranging from
  6633. "0" (ASCII 48) to "o" (ASCII 111), with CRLFs added at  or  near  "column  76".
  6634. The  resulting file size would therefore be about 4/3 the .EXE file size.  This
  6635. is still quite large, so .BOO  files  also  compress  consecutive  null  (zero)
  6636. bytes.    Up to 78 consecutive nulls are compressed into two characters.  Tilde
  6637. ("~") is the null-compression lead-in, and the  following  character  indicates
  6638. how many nulls are represented (subtract 48 from this character's ASCII value).
  6639. For instance "~A" means 17 consecutive nulls; "~~" means 78 of them.   Repeated
  6640. nulls are very common in .EXE files.
  6641.  
  6642. 4-for-3 encoding combined with null compression reduces the size of the encoded
  6643. file to approximately the same size as the original .EXE  file,  and  sometimes
  6644. even smaller.  The first line of a .BOO file is the name (in plain text) of the
  6645. original file.  Here's what the first few lines of a  typical  .BOO  file  look
  6646. like:
  6647.  
  6648.   MSVIBM.EXE
  6649.   CEYP0Id05@0P~3oomo2Y01FWeP8@007P000040HB4001`W~28bL005\W~2JBP00722V0ZHPYP:
  6650.   \8:H2]R2V0[`PYP:68>H2S23V0YHPiP:Xg800;Qd~2UWD006Yg~2Ogl009]o~2L8000;20~~~~
  6651.   ~~~~~~~:R2H008TV?P761T410<H6@P40j4l6RRH0083l17@PP?`1M@?YSP20o0Ee0nUD0h3l
  6652.   1WD3jO@3]0VjW03=8L?X4`N0o01h1\H6~20l>0i7n0o1]e7[@2\PO=8LH60@00Raj>04^97Xh0
  6653.  
  6654.  
  6655. Programs for Handling .BOO Files
  6656.  
  6657. Kermit Distribution includes several useful .BOO-file programs:
  6658.  
  6659. MSBPCT.BAS      This  Microsoft BASIC program can be used on any PC to decode a
  6660.                 .BOO file into an .EXE file.  It's about 50 lines line,  so  it
  6661.                 can be typed in.
  6662.  
  6663. MSBPCT.BOO      BASIC  programs  run  rather slowly, so .BOO-file decoders have
  6664.                 also  been  written  in  high-level  languages  like   C.   The
  6665.                 MSBPCT.EXE  file that was produced by compiling MSBPCT.C is en-
  6666.                 coded  into  MSBPCT.BOO,  which  can  be  decoded   back   into
  6667.                 MSBPCT.EXE  using MSBPCT.BAS.  Once you've done that, you don't
  6668.                 need to run the slow BASIC version any more, which is a  bless-
  6669. 5.12. Installation of Kermit-MS                                        Page 121
  6670.  
  6671. -------------------------------------------------------------------------------
  6672.                 ing,  because  the  MS-Kermit .BOO file takes more than half an
  6673.                 hour to decode using the BASIC version, but only seconds  using
  6674.                 MSBPCT.EXE.
  6675.  
  6676. MSBPCT.*        There  are  .BOO-file  decoders written in other languages too,
  6677.                 like assembler, Turbo Pascal, etc.  Take your pick.   They  all
  6678.                 do the same thing.
  6679.  
  6680. MSBMKB.*        This is the program for encoding an .EXE file into a .BOO file.
  6681.                 It is written in C, compiled, and translated (by  itself)  into
  6682.                 .BOO  format,  suitable for decoding back into .EXE form by any
  6683.                 of the MSBPCT programs.
  6684.  
  6685. MSBHEX.* are programs for producing and decoding straight hex files.
  6686.  
  6687.  
  6688. 5.13. Program Organization
  6689.  
  6690. Kermit-MS version 2 is composed of separate assembler source  files,  assembled
  6691. separately, and linked together.  The modules are:
  6692.  
  6693. System/Device Independent:
  6694.  
  6695. MSSKER.ASM      Main program
  6696. MSSSEN.ASM      File sender
  6697. MSSRCV.ASM      File receiver
  6698. MSSSER.ASM      Server operation
  6699. MSSFIL.ASM      File i/o
  6700. MSSCMD.ASM      Command parser
  6701. MSSTER.ASM      CONNECT command
  6702. MSSCOM.ASM      Packet reader and sender
  6703. MSSSET.ASM      SET, SHOW, and STATUS commands
  6704. MSSSCP.ASM      Script CLEAR, ECHO, INPUT, OUTPUT, PAUSE, TRANSMIT commands
  6705. MSSFIN.ASM      Dummy  module  to  find  the  end  of the data segment; must be
  6706.                 linked LAST.
  6707. MSSDEF.H        Data structure definitions and equates
  6708.  
  6709. System/Device Dependent:
  6710.  
  6711. MSGxxx.ASM      System-dependent graphics terminal for system xxx
  6712. MSUxxx.ASM      System-dependent keyboard translator for system xxx
  6713. MSXxxx.ASM      System-dependent code for system xxx
  6714. MSYxxx.ASM      Terminal emulation for system xxx
  6715. MSZxxx.ASM      More terminal emulation for system xxx
  6716.  
  6717. The xxx is replaced by a 3-letter code for the particular system, e.g. IBM  for
  6718. the IBM PC family, RB1 for the Rainbow-100, etc.
  6719.  
  6720. The  modular  organization  allows  easier modification of the program, quicker
  6721. transfer of modified portions from system-to-system.  The modules are  designed
  6722. to  be  well-defined and self-contained, such that they can be easily replaced.
  6723. For instance, someone who prefers windows and mice to typing commands should be
  6724. able  to  replace  the command parsing module without having to worry about the
  6725. effect on the other modules.
  6726.  
  6727. To assemble any of the Kermit modules, file MSSDEF.H must  be  on  the  default
  6728. 5.13. Program Organization                                             Page 122
  6729.  
  6730. -------------------------------------------------------------------------------
  6731. disk.
  6732.  
  6733. All  the  Kermit  implementations  require  the modules MSSCMD, MSSCOM, MSSFIL,
  6734. MSSKER, MSSRCV, MSSSCP, MSSSEN, MSSSER, MSSSET, MSSTER, MSSFIN.  MSSFIN must be
  6735. linked last.
  6736.  
  6737. Each  particular  implementation requires at least an MSXxxx module, usually an
  6738. MSUxxx module, and, if it is doing terminal  emulation  in  software,  also  an
  6739. MSYxxx and possible also an MSZxxx module, and for graphics terminal emulation,
  6740. also an MSGxxx module.  See the batch or make files from the  source  distribu-
  6741. tion  for  details  of  exactly which modules are required for a particular im-
  6742. plementation.
  6743.  
  6744. Once all the required object modules exist, they  may  be  linked  together  to
  6745. produce a Kermit program.  For example, on the IBM PC:
  6746.  
  6747.   A>link
  6748.  
  6749.      Microsoft Object Linker V2.00
  6750.   (C) Copyright 1982 by Microsoft Inc.
  6751.  
  6752.   Object Modules [.OBJ]: msscmd+msscom+mssfil+mssker+mssrcv+mssscp+msssen+
  6753.   mssser+mssset+msster+msgibm+msuibm+msxibm+msyibm+mszibm+mssfin
  6754.   Run File [MSSCMD.EXE]: kermit
  6755.   List File [NUL.MAP]:;
  6756.  
  6757.       A>
  6758.  
  6759.  
  6760. 5.14. Bringing Kermit to New Systems
  6761.  
  6762. You  can bring Kermit-MS to MS-DOS systems that are not explicitly supported in
  6763. one of two ways -- attempt to run the "generic" MS-DOS Kermit on it, or add ex-
  6764. plicit code to support your system.
  6765.  
  6766. To  get  started with Kermit on a new system, try running "generic" MS-DOS Ker-
  6767. mit; in many cases, it will run as is.  The generic  version  accomplishes  all
  6768. its port and console i/o through DOS calls, and during terminal connection does
  6769. not attempt to emulate any particular kind of terminal.   In  some  cases,  the
  6770. generic version may still require some fiddling to run on a new system; for in-
  6771. stance, different systems refer to their communication ports in different  ways
  6772. --  COM1,  J1,  AUX,  etc.  The SET PORT command allows you to specify the port
  6773. using any of these device names, or using DOS file handles -- keep trying until
  6774. you find the one that works.  Generic MS-DOS Kermit will probably run no faster
  6775. than 1200 baud, and it only works with DOS 2.0 or later.
  6776.  
  6777. If you want to write code to explicitly support a new  system,  first  call  or
  6778. write Kermit Distribution at Columbia to make sure no one else is already doing
  6779. the same work.  If you're the first, then begin by reading the file MSXAAA.DOC,
  6780. provided  with the MS-DOS Kermit sources in the Kermit distribution, which is a
  6781. guide to the system dependent modules of Kermit-MS.  Then create new MSUxxx.ASM
  6782. and  MSXxxx.ASM  modules, and, if your version is also doing terminal emulation
  6783. in software, also an MSY and possibly an MSZ module patterned after those  that
  6784. have been written for other systems.
  6785. 5.14. Bringing Kermit to New Systems                                   Page 123
  6786.  
  6787. -------------------------------------------------------------------------------
  6788. 5.15. Kermit-MS VT102 Terminal Emulator Technical Summary
  6789.  
  6790.  
  6791. 5.15.1. Treatment of Inbound Characters During Terminal Emulation
  6792.  
  6793. Many  things  can  happen to a character that arrives at the communication port
  6794. before you see it, depending on all the factors mentioned above.    The  actual
  6795. sequence of events is:
  6796.  
  6797.    1. Obtain character from serial port.
  6798.    2. Remove high bit if parity is other than none.
  6799.    3. Detect and remove xon/xoff if FLOW is XON/XOFF.
  6800.    4. If DEBUG is active (ON or SESSION) then put character to debug style
  6801.       display, otherwise:
  6802.    5. If transparent printing is active (for VT102 emulators)  then  print
  6803.       the character but do not show it on the display, otherwise:
  6804.    6. Remove high-order bit if DISPLAY is 7-bit
  6805.    7. Translate  if TRANSLATE INPUT is ON, but skip this step if an escape
  6806.       sequence is in progress
  6807.    8. If LOG SESSION is active then copy character to the log file
  6808.    9. Pass the character to the terminal emulator  for  interpretation  or
  6809.       display.
  6810.  
  6811. The  following  sections  summarize the Kermit-MS keyboard and screen operation
  6812. during emulation of H19, VT52, and VT102 terminals, prinicipally for the IBM PC
  6813. but  also  used by the NEC APC3, Victor 9000, and Sanyo 55x systems.  Note that
  6814. spaces shown between characters of escape sequences are there for ease of read-
  6815. ing.  The actual sequences contain no spaces.
  6816. 5.15.1. Treatment of Inbound Characters During Terminal Emulation      Page 124
  6817.  
  6818. -------------------------------------------------------------------------------
  6819. 5.15.2. Keyboard Layout and Characters Sent
  6820.  
  6821. Here  is  how  the  keypad  functions are assigned to the IBM keyboard function
  6822. keys.  You may change them by using the SET KEY command to define a desired key
  6823. as  the appropriate Kermit action verb; use SET KEY without a definition to un-
  6824. define a key.  Names of appropriate verbs are also shown for use in the Set Key
  6825. command, such as
  6826.  
  6827.   Set Key \2352 \Kbreak           (IBM Alt-B assigned to verb BREAK)
  6828.  
  6829. Verb  names  are  system  dependent, use ? in the Set Key definition part for a
  6830. list of local verbs.  IBM PC verbs are listed in Table 5-4; IBM key values  are
  6831. either  straight  ASCII or the IBM Bios scan code, plus 256, plus 512 for Shift
  6832. key held down, plus 1024 for Control key held down, plus 2048 for Alt key  held
  6833. down; non-ASCII keys are always 256 decimal or greater.  Keys particular to the
  6834. Enhanced Keyboard have 4096 added to the result.
  6835.  
  6836. ---------------------------------------------------------------------------
  6837.  
  6838.     Heath-19 and VT52 Keypads                 VT102 keypad
  6839.        IBM Keys                                 IBM keys
  6840. +------+------+-------+----------+   +------+------+------+------+
  6841. | Blue |  Red |  Grey | up arrow |   |  PF1 |  PF2 |  PF3 |  PF4 |
  6842. |  F1  |  F2  |  F3   | up arrow |   |  F1  |  F2  |  F3  |  F4  |
  6843. +------+------+-------+----------+   +------+------+------+------+
  6844. |  7   |  8   |  9    |down arrow|   |  7   |  8   |  9   |  -   |
  6845. |  F5  |  F6  |  F7   |down arrow|   |  F5  |  F6  |  F7  |  F8  |
  6846. +------+------+-------+----------+   +------+------+------+------+
  6847. |  4   |  5   |  6    | rgt arrow|   |  4   |  5   |  6   |  ,   |
  6848. |  F9  |  F10 |  SF1  | rgt arrow|   |  F9  |  F10 |  SF1 |  SF2 |
  6849. +------+------+-------+----------+   +------+------+------+------+
  6850. |  1   |  2   |  3    |left arrow|   |  1   |  2   |  3   |  E   |
  6851. |  SF3 |  SF4 |  SF5  |left arrow|   |  SF3 |  SF4 |  SF5 |  n  S|
  6852. +------+------+-------+----------+   +------+------+------+  t  F|
  6853. |  0------0   |  .    |  Enter   |   |  0------0   |  .   |  e  6|
  6854. |  SF7        |  SF8  |  SF6     |   |   SF7       |  SF8 |  r   |
  6855. +-------------+-------+----------+   +-------------+------+------+
  6856.  
  6857. SF1 means push Shift and F1 keys simultaneously
  6858. ---------------------------------------------------------------------------
  6859.  
  6860.  CURSOR KEYS:
  6861.                                        H-19 & VT52           VT102
  6862.  VT52/H19 key   IBM Verb  IBM key       All Modes      Numeric   Application
  6863.  
  6864.  up arrow       UPARR    up arrow       ESC A          ESC [ A   ESC O A
  6865.  down arrow     DNARR    down arrow     ESC B          ESC [ B   ESC O B
  6866.  right arrow    RTARR    right arrow    ESC C          ESC [ C   ESC O C
  6867.  left arrow     LFARR    left arrow     ESC D          ESC [ D   ESC O D
  6868.  
  6869.  AUXILIARY KEYPAD:
  6870.                                       Heath-19 & VT52         VT102
  6871.  VT52/H19 key   IBM Verb  IBM key     Numeric Applic.   Numeric   Applic.
  6872.  
  6873.  PF1/HF7/Blue   GOLD,PF1   F1         ESC P   ESC P     ESC O P   ESC O P
  6874.  PF2/HF8/Red    PF2        F2         ESC Q   ESC Q     ESC O Q   ESC O Q
  6875. 5.15.2. Keyboard Layout and Characters Sent                            Page 125
  6876.  
  6877. -------------------------------------------------------------------------------
  6878.  PF3/HF9/Grey   PF3        F3         ESC R   ESC R     ESC O R   ESC O R
  6879.  PF4/HF1        PF4        F4         ESC S   ESC S     ESC O S   ESC O S
  6880.  0              KP0        SF7        0       ESC ? p   0         ESC O p
  6881.  1              KP1        SF3        1       ESC ? q   1         ESC O q
  6882.  2              KP2        SF4        2       ESC ? r   2         ESC O r
  6883.  3              KP3        SF5        3       ESC ? s   3         ESC O s
  6884.  4              KP4        F9         4       ESC ? t   4         ESC O t
  6885.  5              KP5        F10        5       ESC ? u   5         ESC O u
  6886.  6              KP6        SF1        6       ESC ? v   6         ESC O v
  6887.  7              KP7        F5         7       ESC ? w   7         ESC O w
  6888.  8              KP8        F6         8       ESC ? x   8         ESC O x
  6889.  9              KP9        F7         9       ESC ? y   9         ESC O y
  6890.  comma  (,)     KPCOMA     SF2        ,       ESC ? l   ,         ESC O l
  6891.  minus  (-)     KPMINUS    F8         -       ESC ? m   -         ESC O m
  6892.  period (.)     KPDOT      SF8        .       ESC ? n   .         ESC O n
  6893.  Enter          KPENTER    SF6        ^M(cr)  ESC ? M   ^M        ESC O M
  6894.  
  6895.  (SFn means hold down Shift key while pressing Function key n.)
  6896.  
  6897. An often confusing item is knowing the mode of the auxillary keypad: numeric or
  6898. application.    Digital  Equipment  Corporation designed the terminal to change
  6899. modes only under command from the remote computer  and  not  at  all  from  the
  6900. keyboard.  So the startup state is numeric/cursor mode, and reception of escape
  6901. sequences "ESC [ ? 1 h" or "l" changes the mode.  Kermit verbs for  the  keypad
  6902. and  cursor  keys generate the correct escape sequences appropriate to the cur-
  6903. rent mode and terminal type.
  6904.  
  6905. A best attempt is made to safely test for the 101/102 key Enhanced keyboard and
  6906. use it if present.  If it is present then the keyboard translator separates the
  6907. individual arrow keys from those on the numeric keypad and also  separates  the
  6908. asterisk  and  forward  slash  keys  on  the  keypad  from those on the regular
  6909. typewriter keyboard.  These special Enhanced keyboard keys are reported as scan
  6910. codes with 4096 added to the base scan code.
  6911.  
  6912.  OTHER IBM KEYS OPERATIONAL IN CONNECT MODE:
  6913.  
  6914.  IBM key         IBM Verb      Action
  6915.  
  6916.  Keypad Del                    Send ASCII Del code (rubout) \127
  6917.  Backspace (<-)                Send ASCII Del code (rubout) \127  (BS is \8)
  6918.  Keypad -        MODELINE      Toggle mode line on/off (only if Mode Line is
  6919.                                enabled and not used by the host).
  6920.  Alt -           TERMTYPE      Toggle among H-19, VT52, and VT100 emulations.
  6921.  Alt =           RESET         Clear screen and reset terminal emulator to
  6922.                                starting (setup) state.
  6923.  Alt B           BREAK         Send a BREAK signal
  6924.  Alt H           HELP          Show drop down help menu (detailed below)
  6925.  Alt S           STATUS        Show settings
  6926.  Alt X           EXIT          Exit Connect mode, back to Kermit prompt
  6927.  
  6928.  Home            HOMSCN        Roll screen up (text down) to beginning of
  6929.                                 storage.
  6930.  End             ENDSCN        Roll screen down (text up) to end of storage.
  6931.  PgUp            UPSCN         Roll screen up (back, earlier) one screen.
  6932.  PgDn            DNSCN         Roll screen down (forward, later) one screen.
  6933.  Ctrl-PgUp       UPONE         Roll screen up one line.
  6934. 5.15.2. Keyboard Layout and Characters Sent                            Page 126
  6935.  
  6936. -------------------------------------------------------------------------------
  6937.  Ctrl-PdDn       DNONE         Roll screen down one line.
  6938.  
  6939.  Control PrtSc   PRTSCN        Toggle  on/off copying of received text to
  6940.                                printer, "PRN" shows on far right of mode
  6941.                                line when activated.
  6942.  
  6943.  Control-End     DUMP          Dump image of screen to a disk file or device.
  6944.                                Default filename is KERMIT.SCN in the current
  6945.                                directory. Use command SET DUMP to change the
  6946.                                filename.  Screen images are appended to the
  6947.                                file, separated by formfeeds.
  6948.  
  6949.  Shift-PrtSc     Standard DOS Print-screen, dump screen image to printer.
  6950.  
  6951. "Alt  -"  means  hold  down  Alt  and  type  minus on the upper key rank.  This
  6952. switches among the various kinds of emulation but does not change most  operat-
  6953. ing parameters of the emulator.
  6954.  
  6955. CONNECT ESCAPE COMMANDS:
  6956.  
  6957. Type the Kermit escape character (normally "^]"), then one of the keys below:
  6958.  
  6959.                                                          (equivalent IBM Verb)
  6960.      ?   display this short list.                                HELP
  6961.      0   send a null character.                                  NULL
  6962.      B   send a BREAK signal.                                    BREAK
  6963.      C   close connect session & return to Kermit prompt.        EXIT
  6964.      F   dump screen to filespec, default is KERMIT.SCN.         DUMP
  6965.      H   hangup the phone or network connection                  HANGUP
  6966.      L   send a Long BREAK signal                                LBREAK
  6967.      M   toggle mode line on/off.                                MODELINE
  6968.      P   push to DOS.                                            DOS
  6969.      Q   quit (suspend) logging.                                 LOGOFF
  6970.      R   resume logging.                                         LOGON
  6971.      S   show status.                                            STATUS
  6972.      Kermit escape character itself: send it to the host.
  6973.  
  6974.  
  6975. 5.15.3. Responses To Characters Received By the Terminal Emulator
  6976.  
  6977. Unknown  escape  sequences  of the form "ESC char" are absorbed by the emulator
  6978. without further effect; longer unknown escape sequences echo the extra  charac-
  6979. ters.
  6980.  
  6981. DEC  VT102 functions while in ANSI (VT102) mode, unsupported features marked by
  6982. an asterisk (*):
  6983.  
  6984.  Escape Seq     Mnemonic       Description of Action
  6985.  
  6986.  ESC D          IND            Index, moves cursor down one line, can scroll
  6987.  ESC E          NEL            Move cursor to start of line below, can scroll
  6988.  ESC H          HTS            Set one horizontal tab at current position
  6989.  ESC M          RI             Reverse Index, cursor up one line, can scroll
  6990.  ESC Z          DECID          Identify terminal (response is ESC [ ? 6 c)
  6991.  ESC c          RIS            Reset terminal to initial state
  6992.  ESC =          DECKPAM        Enter keypad application mode
  6993. 5.15.3. Responses To Characters Received By the Terminal Emulator      Page 127
  6994.  
  6995. -------------------------------------------------------------------------------
  6996.  ESC >          DECKNPNM       Enter keypad numeric mode
  6997.  ESC 7          DECSC          Save cursor position and attributes
  6998.  ESC 8          DECRC          Restore cursor from previously saved position
  6999.  ESC # 3        DECDHL         Double height and width line, top half
  7000.  ESC # 4        DECDHL         Double height and width line, bottom half
  7001.  ESC # 5        DECSWL         Single height and width line
  7002.  ESC # 6        DECDWL         Double width single height line
  7003.  ESC # 8        DECALN         Test screen alignment, fill screen with E's
  7004.  ESC [ Pn @     ICH            ANSI insert Pn spaces at and after cursor
  7005.  ESC [ Pn A     CUU            Cursor up Pn lines, does not scroll
  7006.  ESC [ Pn B     CUD            Cursor down Pn lines, does not scroll
  7007.  ESC [ Pn C     CUF            Cursor forward, stays on same line
  7008.  ESC [ Pn D     CUB            Cursor backward, stays on same line
  7009.  ESC [ Pn; Pn H CUP            Set cursor to row, column (same as HVP)
  7010.  ESC [ Ps J     ED             Erase in display:
  7011.                                 0 = cursor to end of screen, inclusive
  7012.                                 1 = start of screen to cursor, inclusive
  7013.                                 2 = entire screen, reset lines to single
  7014.                                     width, cursor does not move.
  7015.  ESC [ Ps K     EL             Erase in line:
  7016.                                 0 = cursor to end of line, inclusive
  7017.                                 1 = start of line to cursor, inclusive
  7018.                                 2 = entire line, cursor does not move
  7019.  ESC [ Pn L     IL             Insert Pn lines preceding current line.
  7020.  ESC [ Pn M     DL             Delete Pn lines from current downward, incl.
  7021.  ESC [ Pn P     DCH            Delete Pn chars from cursor to left, incl.
  7022.  ESC [ Pn; Pn R CPR            Cursor report (row, column), sent by terminal
  7023.                                Example: home position yields ESC [ 1; 1 R
  7024.  ESC [ Pn c     DA             Device attributes (reports ESC [ ? 6 ; 2 c)
  7025.  ESC [ Pn; Pn f HVP            Set cursor to row, column (same as CUP)
  7026.  ESC [ Ps g     TBC            Tabs clear, 0 = at this position, 3 = all
  7027.  ESC [ 4 h      IRM            Insert mode on
  7028.  ESC [ 20 h     LNM            Set newline mode (cr => cr/lf)
  7029.  ESC [ 4 l      IRM            Replacement mode on
  7030.  ESC [ 20 l     LNM            Reset newline mode (cr => cr)
  7031.  ESC [ ? Ps;...;Ps h  SM       Set mode, see table below
  7032.  ESC [ ? Ps;...;Ps l  RM       Reset mode, see table below
  7033.          Ps     Mnemonic       Mode           Set (h)        Reset (l)
  7034.          0                     error (ignored)
  7035.          1      DECCKM         cursor keys    application    cursor/numeric
  7036.          2      DECANM         ANSI/VT52      ANSI/VT102     VT52
  7037.          3      DECCOLM        Columns        +132 col       80 col
  7038.          4      DECSCLM       *Scrolling      smooth         jump
  7039.          5      DECSCNM        Screen         reverse video  normal
  7040.          6      DECOM          Origin         relative       absolute
  7041.          7      DECAWM         Autowrap       on             off
  7042.          8      DECARM        *Autorepeat     on             off
  7043.          9      DECINLM       *Interlace      on             off
  7044.          18     DECPFF         Printer termination character, use FF if set
  7045.          19     DECPEX         Printer extent,set=screen,off=scrolling region
  7046.          38     n/a            Graphics (Tek) ++graphics     text
  7047.                              + See comments on EGA boards.
  7048.                             ++ Ignored if DISABLE TEK has been given.
  7049.  ESC [ Pn i     MC             Printer controls (Media Copy)
  7050.          0                      Print whole Screen
  7051.          4                      Exit printer controller (transparent print)
  7052. 5.15.3. Responses To Characters Received By the Terminal Emulator      Page 128
  7053.  
  7054. -------------------------------------------------------------------------------
  7055.          5                      Enter printer controller (transparent print)
  7056.  ESC [ ? Pn i   MC             Printer controls (Media Copy)
  7057.          1                      Print line containing cursor
  7058.          4                      Exit auto print (stop echoing to printer)
  7059.          5                      Enter autoprint (echo screen chars to printer)
  7060.  ESC [ Ps;...;Ps m  SGR        Select graphic rendition
  7061.                                 0 = all attributes off (#'s 1, 4, 5, 7)
  7062.                                 1 = bold, intensify foreground
  7063.                                 4 = underscore (reverse video on IBM CGA)
  7064.                                 5 = blink
  7065.                                 7 = reverse video
  7066.                 non-DEC extensions: 30-37 = foreground color = 30 + colors
  7067.                                     40-47 = background color = 40 + colors
  7068.                                     colors: 1 = red, 2 = green, 4 = blue
  7069.  ESC [ Ps n     DSR            Device Status Report.
  7070.                                Response from VT100: 0=ready, 3=malfunction.
  7071.                                Command to VT100: 5=report status with DSR,
  7072.                                6=report cursor position using CPR sequence.
  7073.  ESC [ Ps;...;Ps q  DECLL      Load LEDs, Ps = 0 means clear LED #1-4
  7074.                                Ps = 1,2,3,4 sets LED # 1,2,3,4 on status line.
  7075.  ESC [ Pn; Pn r DECSTBM        Set top and bottom scrolling margins, resp.
  7076.                                ESC [ r resets margin to full screen.
  7077.  ESC [ sol x    DECREQTPARM    Request terminal parameters, see table below
  7078.  ESC [ sol; par; nbits; xspeed; rspeed; clkmul; flags x
  7079.                 DECREPTPARM    Reports terminal parameters
  7080.                                sol = 0  request; terminal can send unsolicited
  7081.                                  reports - supported as sol = 1 below.
  7082.                                sol = 1, request; term reports only on request
  7083.                                sol = 2, this is a report (DECREPTPARM)
  7084.                                sol = 3, terminal reporting only on request
  7085.                                par = 1 none, 2 space, 3 mark, 4 odd, 5 even
  7086.                                nbits = 1 (8 bits/char), 2 (7 bits/char)
  7087.                                xspeed,rspeed = transmit & receive speed index
  7088.   0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,128 correspond to speeds of
  7089.   50,75,110,134.5,150,200,300,600,1200,1800,2000,2400,3600,4800,9600,19200,
  7090.   and 38400 baud.              clkmul = 1 (clock rate multiplier is 16)
  7091.                                flags = 0-15 (Setup Block #5), always 0 here
  7092.  ESC [ 2; Ps y  DECST          *Confidence tests - not supported
  7093.                 SCS            Select character sets.
  7094.  ESC ( A        SCS            G0 points to UK symbols
  7095.  ESC ) A        SCS            G1 points to UK symbols
  7096.  ESC ( B        SCS            G0 points to ASCII symbols
  7097.  ESC ) B        SCS            G1 points to ASCII symbols
  7098.  ESC ( 0        SCS            G0 points to special (line drawing) graphics
  7099.  ESC ) 0        SCS            G1 points to special (line drawing) graphics
  7100.  ESC ( 1        SCS            G0 points to alt char ROM - UK symbols
  7101.  ESC ) 1        SCS            G1 points to alt char ROM - UK symbols
  7102.  ESC ( 2        SCS            G0 points to alt graphics ROM - as ESC ( 0
  7103.  ESC ) 2        SCS            G1 points to alt graphics ROM - as ESC ) 0
  7104.                                 (Separate graphics used for DEC and Heath)
  7105.  ^E             ENQ           *Answerback message (not supported)
  7106.  ^G             BELL           Sound VT102 style beep
  7107.  ^H             BS             Backspace, move cursor left one character
  7108.  ^I             HT             Horizontal tab, move cursor to next tabstop
  7109.  ^J             LF             Linefeed, move cursor down one line
  7110.  ^K             VT             Vertical Tab, treated as a line feed
  7111. 5.15.3. Responses To Characters Received By the Terminal Emulator      Page 129
  7112.  
  7113. -------------------------------------------------------------------------------
  7114.  ^L             FF             Formfeed, treated as a line feed
  7115.  ^M             CR             Carriage return, move cursor to col 1
  7116.  ^N             SO             Select usage of G1 character set
  7117.  ^O             SI             Select usage of G0 character set
  7118.  ^X             CAN            Cancel escape sequence in progress
  7119.  ^Z             SUB            Treated as a CAN
  7120.  
  7121.  Other extensions:
  7122.  ESC [ 25; Pc f                VT52/VT100 move cursor to 25th line.
  7123.  ESC [ 25; Pc H                VT52/VT100 move cursor to 25th line.
  7124.                                (These will disable Kermit's own status line.)
  7125.  ESC * char                    VT200 series graphics command, ignored.
  7126.  
  7127.  
  7128. 5.15.4. DEC VT102 Functions While in VT52 Mode
  7129.  
  7130.  Escape sequence               Description of action
  7131.  
  7132.  ESC A                         Cursor up
  7133.  ESC B                         Cursor down
  7134.  ESC C                         Cursor right
  7135.  ESC D                         Cursor left
  7136.  ESC F                         Enter graphics mode
  7137.  ESC G                         Exit graphics mode
  7138.  ESC H                         Cursor home
  7139.  ESC I                         Reverse line feed
  7140.  ESC J                         Erase to end of screen
  7141.  ESC K                         Erase to end of line
  7142.  ESC V                         Print cursor line
  7143.  ESC X                         Exit Printer Controller mode, transparent print
  7144.  ESC Y row column              Direct cursor address, offset from space
  7145.  ESC W                         Enter Printer Controller mode,transparent print
  7146.  ESC Z                         Identify (response is ESC / Z)
  7147.  ESC ^ (caret)                 Enter autoprint mode (printer echoes screen)
  7148.  ESC _ (underscore)            Exit autoprint mode
  7149.  ESC ]                         Print Screen
  7150.  ESC =                         Enter alternate keypad mode
  7151.  ESC >                         Exit alternate keypad mode
  7152.  ESC <                         Enter ANSI mode (changes to VT102)
  7153.  
  7154.  
  7155. 5.15.5. Heath-19 Functions While in Non-ANSI Mode
  7156.  
  7157.  Escape seq     Mnemonic       Description of action
  7158.  
  7159.  ESC A          HCUU           Cursor Up
  7160.  ESC B          HCUD           Cursor Down
  7161.  ESC C          HCUF           Cursor Forward, stays on same line
  7162.  ESC D          HCUB           Cursor Backward, stays on same line
  7163.  ESC E          HCD            Clear display
  7164.  ESC F          HEGM           Enter Graphics mode
  7165.  ESC G          HXGM           Exit Graphic mode
  7166.  ESC H          HCUH           Cursor Home
  7167.  ESC I          HRI            Reverse Index
  7168.  ESC J          HEOP           Erase to end of page
  7169.  ESC K          HEOL           Erase to end of line
  7170. 5.15.5. Heath-19 Functions While in Non-ANSI Mode                      Page 130
  7171.  
  7172. -------------------------------------------------------------------------------
  7173.  ESC L          HIL            Insert line
  7174.  ESC M          HDL            Delete line
  7175.  ESC N          HDCH           Delete character
  7176.  ESC O          HERM           Exit Insert Char mode
  7177.  ESC Y row col  HDCA           Direct cursor addressing, offset from space
  7178.  ESC Z          HID            Identify (response is ESC / K  which is a VT52)
  7179.  ESC b          HBD            Erase Beginning of display
  7180.  ESC j          HSCP           Save cursor position
  7181.  ESC k          HRCP           Set cursor to saved position
  7182.  ESC l          HEL            Erase entire line
  7183.  ESC n          HCPR           Cursor Position Report request
  7184.  ESC o          HEBL           Erase beginning of line
  7185.  ESC p          HERV           Enter Reverse Video mode
  7186.  ESC q          HXRV           Exit Reverse Video mode
  7187.  ESC r Bn       HMBR           *Modify baud rate - not supported
  7188.  ESC t          HEKS           *Enter Keypad shifted mode, not supported
  7189.  ESC u          HXKS           *Exit Keypad shifted mode, not supported
  7190.  ESC v          HEWA           Wrap around at end of line
  7191.  ESC w          HXWA           Discard at end of line
  7192.  ESC x Ps       HSM            Set Mode. See table below
  7193.  ESC y Ps       HRM            Reset Mode. See table below
  7194.  
  7195.          Ps     Mnemonic       Mode            Set (x)        Reset (y)
  7196.          1      HSM/HRM        25th line       enabled       +disabled
  7197.          2                    *keyclick        off            on
  7198.          3                    *holdscreen      enabled        disabled
  7199.          4                     cursor type     block          underline
  7200.          5                     cursor on/off   on             off
  7201.          6                    *keypad-shifted  shifted        unshifted
  7202.          7                     alt app keypad  enabled        disabled
  7203.          8                    *linefeed        lf=>cr/lf      lf=>lf
  7204.          9                     newline mode    cr=>cr/lf      cr=>cr
  7205.                               + disabling the 25th line also clears it
  7206.  
  7207.  ESC z          HRAM           Reset to power-up configuration
  7208.  ESC =          HAKM           Enter Alternate Keypad mode
  7209.  ESC >          HXAM           Exit Alternate Keypad mode
  7210.  ESC <          HEAM           Enter ANSI mode (ESC [ stuff)
  7211.  ESC @          HEIM           Enter Insert Char mode
  7212.  ESC [          HEHS          *Enter Hold Screen mode, not supported
  7213.  ESC \          HXHS          *Exit Hold Screen mode, not supported
  7214.  ESC { and }    HEK, HDK      *Keyboard enable/disable, not supported
  7215.  ESC ]          HX25          *Transmit 25th line, not supported
  7216.  ESC #          HXMP          *Transmit page, not supported
  7217.  
  7218.  
  7219. 5.15.6. Heath-19 Functions While in ANSI Mode
  7220.  
  7221.  Escape Seq     Mnenonic       Description of Action
  7222.  
  7223.  ESC [ s        PSCP           Save cursor position & attributes
  7224.  ESC [ u        PRCP           Restore cursor position & attributes
  7225.  ESC [ z        PRAM           Reset to power-up configuration
  7226.  ESC [ 2 J      ED             Erase entire screen but do not move cursor;
  7227.                                regular Heath-19 moves cursor to Home.
  7228.  ESC [ ? 2 h    PEHM           Revert to normal Heath-19 non-ANSI mode
  7229. 5.15.6. Heath-19 Functions While in ANSI Mode                          Page 131
  7230.  
  7231. -------------------------------------------------------------------------------
  7232.  ESC [ > Ps h   SM             Same as ESC x Ps
  7233.  ESC [ > Ps l   RM             Same as ESC y Ps
  7234.  
  7235. Plus most of the ANSI escape sequences listed for the VT102.
  7236.  
  7237.  
  7238. 5.15.7. Tektronix 4010/4014 Graphics Terminal Functions
  7239.  
  7240. MS-Kermit's Tektronix 4010 emulator responds to ordinary text, several  special
  7241. control  codes  (for  drawing lines and dots), and several escape sequences, as
  7242. shown in Table 5-8.  The commands SET DEBUG and SET TRANSLATION INPUT  are  ef-
  7243. fective in Tek mode.
  7244.  
  7245. -------------------------------------------------------------------------------
  7246.  
  7247.  
  7248.  
  7249. Control Code                  Action
  7250. FS,  Control-\ Backslash      draw dots
  7251. GS,  Control-] Right square bracket   draw lines
  7252. RS,  Control-^ Caret          Draw dots incrementally
  7253. US,  Control-_ Underscore     Display text
  7254. BEL, Control-G                Beep, make a noise
  7255. BS,  Control-H                Backspace, destructive delete
  7256. HT,  Control-I                Tab, convert to single space
  7257. LF,  Control-J                Line feed, go down one line
  7258. VT,  Control-K                Move up one text line
  7259. FF,  Control-L                Clears the screen
  7260. CR,  Control-M                Carriage return, start of line
  7261. CAN, Control-X                Exit Tek sub-mode, or ignore
  7262. DEL, RUBOUT                   Delete code, same as BS
  7263.  
  7264. Escape Sequence                       Action
  7265. ESC Control-E                 Send a status report
  7266. ESC Control-L                 Clear the screen
  7267. ESC Control-Z                 Activate crosshairs (GIN mode)
  7268. ESC Z                         Send terminal identification
  7269. ESC ` (accent grave)                  Use solid lines in drawing
  7270. ESC a through ESC e                   Use dashed line patterns:
  7271.                                a=fine dots, b=short dashes
  7272.                                c=dash dot,  d=long dash dot
  7273.                                e=dash dot dot.
  7274. ESC [ ? 3 8 l                 Exit Tek mode (become text terminal, VT102 etc)
  7275. ESC [ ? 3 8 h                 Enter Tek mode (from VT102 mode)
  7276.  
  7277.  Table 5-8:   Response of MS-Kermit Tektronix Emulator to Received Characters
  7278.  
  7279. -------------------------------------------------------------------------------
  7280.  
  7281. In  the  table,  US  is the name for the ASCII character Control-Underscore, 31
  7282. decimal.  Text is written starting with the last drawn point  being  the  lower
  7283. left  corner  of  the first 8 by 8 character cell.  The drawing position is up-
  7284. dated by 8 dots to the right for each character, and lines wrap  at  column  80
  7285. (column  90  for Hercules boards).  If text extends "below the screen" the sign
  7286. "More >" is shown at the bottom right corner and the user needs to press a  key
  7287. to  continue.    Then the screen will be cleared and the new text will start at
  7288. 5.15.7. Tektronix 4010/4014 Graphics Terminal Functions                Page 132
  7289.  
  7290. -------------------------------------------------------------------------------
  7291. the top of the screen (no scrolling is done in graphics mode).  A real Tek 4010
  7292. begins  new text at column 40 and will overwrite dots from older material.  The
  7293. high resolution EGA screen and the Hercules screen will hold 43 lines, the  CGA
  7294. and  Monochome screens hold 25 lines, and the AT&T screen holds 50 lines.  Her-
  7295. cules screens are 90  characters  wide  and  others  are  80  characters  wide.
  7296. Monochrome  systems  lack graphics so the text is the normal hardware character
  7297. font placed at the nearest  normal  80x25  location  (similarly,  "drawing"  on
  7298. Monochrome  systems  is  achieved  by  using a text plus ("+") sign where a dot
  7299. would appear).  Text mode is interrupted  by  the  drawing  commands  discussed
  7300. below.
  7301.  
  7302.  
  7303. Drawing commands GS, FS, RS:
  7304.  
  7305. 1. Draw a line or move to a point: GS <xy xy ... xy>
  7306.  
  7307. GS  is  the  name for ASCII character Control-] (right square bracket), decimal
  7308. 29.  <xy> stands for an encoded x,y coordinate as explained below.  One or more
  7309. x,y  coordinates may follow GS and line segments are drawn from point to point.
  7310. The first point is reached without drawing so that GS and the initial <xy> is a
  7311. simple  "move-to"  command  rather than a "draw-to" command.  Lines may be con-
  7312. structed from six dash patterns described in Table 5-8.  <xy>  coordinates  are
  7313. encoded by separating the 10 bit value of x and of y into 5 bit components, ad-
  7314. ding an ASCII space (32) to each to form a printable character, and then adding
  7315. two high bits to each to identify which component is being represented: high-y,
  7316. low-y, high-x, or low-x.  They are transmitted in that order,  with  the  low-x
  7317. byte  always  sent  last.   In fact, bytes may be omitted if they do not change
  7318. from point to point, provided that low-x is always sent.    These  bytes  range
  7319. from  ASCII  space  (32 decimal) to ASCII DEL (127 decimal).  Details are given
  7320. below, and summarized in Table 5-10.  This mode completes when a new command or
  7321. CRLF  (carriage  return,  line  feed)  arrives;  escape sequences are processed
  7322. transparently but other control codes are ignored.  The interrupting  character
  7323. is accepted and processed next.
  7324.  
  7325. 2. Draw dots at given locations: FS <xy xy ... xy>
  7326.  
  7327. FS is the name for the ASCII character Control-\ (backslash), decimal 28.  <xy>
  7328. is in the same form as above.  A dot is drawn at each x,y  point.    This  mode
  7329. completes  when a new command or a CRLF character arrives; escape sequences are
  7330. processed transparently but other control codes are ignored.  The  interrupting
  7331. character is accepted and processed next.
  7332.  
  7333. 3.  Draw  dots  from the current location: RS <pen> <direction> <direction> ...
  7334. <direction>
  7335.  
  7336. RS is the name for the ASCII character Control-^ (caret), decimal 30.   pen  is
  7337. the  character  Space (32 decimal) to move without drawing or P (80 decimal) to
  7338. draw while moving.  <direction> is one of the letters A, E, D, F, B, J, H, I as
  7339. shown in Table 5-9.
  7340.  
  7341. Example:  RS  P  J J J (no spaces here, naturally) means draw three dots in the
  7342. southwest direction, stepping to each in turn.  This mode completes when a  new
  7343. command  or  a non-<pen> or non-<direction> character arrives; the interrupting
  7344. character is accepted and processed next.
  7345. 5.15.7. Tektronix 4010/4014 Graphics Terminal Functions                Page 133
  7346.  
  7347. -------------------------------------------------------------------------------
  7348. -------------------------------------------------------------------------------
  7349.  
  7350.  
  7351.  
  7352. <direction>  Move One Tek Dot This Way
  7353.      A       East (right)
  7354.      E       East and North         F   D   E
  7355.      D       North (up)
  7356.      F       North and West         B   *   A     (* is current location)
  7357.      B       West
  7358.      J       South and West         J   H   I
  7359.      H       South
  7360.      I       South and East
  7361.  
  7362.                   Table 5-9:   Tektronix Dot-Drawing Commands
  7363.  
  7364. -------------------------------------------------------------------------------
  7365.  
  7366.  
  7367. Graphics INput (GIN) mode:
  7368.  
  7369. Graphics input mode is entered when ESC Control-Z is received.  A crosshair  is
  7370. drawn  on  the screen and may be moved by the numeric keypad arrows (fine scale
  7371. motion) or the Shift key and these arrows (coarse scale motion).   Pressing  an
  7372. ASCII-producing key sends the position of the crosshairs to the host as the se-
  7373. quence of: pressed key, X  coordinate,  Y  coordinate,  carriage  return,  then
  7374. removes the crosshairs, and then returns to text mode.  The coordinates are en-
  7375. coded as for a GS command, but with the Kind bits omitted (see Table 5-10).  If
  7376. the host echos the report Kermit tries to absorb it without comment; otherwise,
  7377. the text might be shown starting at the crosshairs.  One may  prematurely  exit
  7378. GIN  mode  by typing Control-C or Control-Break.  Shift-PrtSc (DOS screen dump)
  7379. remains active, however.
  7380.  
  7381. The six byte report string might be echoed by the host so the emulator attempts
  7382. to  read  the  next  six  incoming bytes and suppress them while they match the
  7383. report. Normally, the host is prepared to receive the report and it should turn
  7384. off echoing during the process.
  7385.  
  7386.  
  7387. Status or Position Report:
  7388.  
  7389. ESCAPE  Control-E  requests  a  status report from the emulator.  Tek terminals
  7390. have many sub-fields.  Kermit-MS sends a byte of 24 hex for being in text  mode
  7391. or  20  hex  otherwise, followed by the encoded X then Y coordinates and a car-
  7392. riage return.  Coordinates are encoded 5 bits at a time similar to the GS  com-
  7393. mand except the Kind bits are omitted (see Table 5-10).
  7394.  
  7395.  
  7396. Identification Report:
  7397.  
  7398. ESCAPE  Z  requests  terminal identification, as for VT52 and VT102.  Currently
  7399. this report is the 10 character sequence IBM_TEK ESCAPE / Z (no spaces).
  7400. 5.15.7. Tektronix 4010/4014 Graphics Terminal Functions                Page 134
  7401.  
  7402. -------------------------------------------------------------------------------
  7403. Screen Capturing:
  7404.  
  7405. Kermit does not implement a graphics screen capture facility.  There  are  many
  7406. such  Terminate-and-Stay-Resident  (TSR)  programs  in  circulation,  as either
  7407. public domain offerings or parts of commercial  packages  (Paint  programs  and
  7408. even GRAPHICS.COM from DOS).  High resolution EGA screens require more than the
  7409. GRAPHICS.COM program.  MS Windows tells the program (Kermit-MS) the  system  is
  7410. using a pure text-only monochrome adapter so dots are shown as plus signs.
  7411.  
  7412. Although  Kermit  cannot  save  graphics  screens  directly  (e.g.  via the ^]F
  7413. connect-mode command), the received Tektronix escape  sequences  can  still  be
  7414. logged to a PC file using the LOG SESSION command.  The resulting log cannot be
  7415. "played back" directly on the PC, but it can be transferred to the host and run
  7416. through  Kermit's Tek emulator again, just like a character-mode Kermit session
  7417. log.
  7418.  
  7419.  
  7420. VGA Modes:
  7421.  
  7422. Considerable  effort  went  into  ensuring  the  graphics  display  would  work
  7423. automatically and not damage monitors.  Thus, Kermit-MS safely tests the active
  7424. display adapter for its kind and capabilities before  starting  graphics  mode.
  7425. Recent  EGA+  display  boards  are capable of the 640 by 480 scan-line 16-color
  7426. "VGA" mode which is now available on IBM PS/2 computers.  The Tek emulator will
  7427. happily  run  with  480  scan lines, but: there is no easy and safe way to test
  7428. systems if they fully support it, and the normal 256KB of video memory  is  in-
  7429. sufficient  to  save a full graphics image.  So activating these higher resolu-
  7430. tion modes is left to individuals to  modify  three  simple  constants  in  the
  7431. source  code  of  file  MSGIBM.ASM and experiment with their own system.  Other
  7432. systems can be added by individuals in the same manner.
  7433.  
  7434.  
  7435. Coordinate Encoding:
  7436.  
  7437. Coordinate 0,0 is the lower left corner and the X axis is the  horizontal  one.
  7438. Tektronix  positions  are mapped into the typically 640 dots wide by 200 or 350
  7439. dots high PC screen and thus adjacent Tek  positions  may  yield  the  same  PC
  7440. screen dot.
  7441.  
  7442. 4010-like  devices use positions from 0 to 1023 for both X and Y, although only
  7443. 0 to 779 are visible for Y due to screen geometry.  The Tek screen is 10.24  by
  7444. 7.80 inches and coordinates are sent as 1-4 characters.
  7445.  
  7446. 4014-like devices use positions 0 to 4095, but each movement is a multiple of 4
  7447. positions unless the high-resolution LSBXY are sent.  This makes it  compatible
  7448. with the 4010 in that a full sized plot fills the screen.  The emulator accepts
  7449. the LSBXY components but does not use them.
  7450.  
  7451. The various modes are summarized in Table 5-10, in which the following notation
  7452. is used:
  7453.  
  7454.     HIX, HIY = High order 5 bits of a 10 or 12 bit position.
  7455.     LOX, LOY = Middle order 5 bits of position (low order of Tek 4010).
  7456.     LSBXY = Low order 2 bits of X + low order 2 bits of Y (4014 mode),
  7457.        recognized by the Tek emulator but not used to calculate position.
  7458. 5.15.7. Tektronix 4010/4014 Graphics Terminal Functions                Page 135
  7459.  
  7460. -------------------------------------------------------------------------------
  7461. -------------------------------------------------------------------------------
  7462.  
  7463.  
  7464.  
  7465. Hi Y    Lo Y   Hi X    LSBXY  Characters Sent (Lo-X Always Sent)
  7466. Same    Same   Same    Same                          Lo-X
  7467. Same    Same   Same    Diff         LSB, Lo-Y,       Lo-X   4014
  7468. Same    Same   Diff    Same              Lo-Y, Hi-X, Lo-X
  7469. Same    Same   Diff    Diff         LSB, Lo-Y, Hi-X, Lo-X   4014
  7470. Same    Diff   Same    Same              Lo-Y,       Lo-X
  7471. Same    Diff   Same    Diff         LSB, Lo-Y,       Lo-X   4014
  7472. Same    Diff   Diff    Same              Lo-Y, Hi-X, Lo-X
  7473. Same    Diff   Diff    Diff         LSB, Lo-Y, Hi-X, Lo-X   4014
  7474. Diff    Same   Same    Same   Hi-Y,                  Lo-X
  7475. Diff    Same   Same    Diff   Hi-Y, LSB, Lo-Y,       Lo-X   4014
  7476. Diff    Same   Diff    Same   Hi-Y,      Lo-Y, Hi-X, Lo-X
  7477. Diff    Same   Diff    Diff   Hi-Y, LSB, Lo-Y, Hi-X, Lo-X   4014
  7478. Diff    Diff   Same    Same   Hi-Y,      Lo-Y,       Lo-X
  7479. Diff    Diff   Same    Diff   Hi-Y, LSB, Lo-Y,       Lo-X   4014
  7480. Diff    Diff   Diff    Same   Hi-y,      Lo-Y, Hi-X, Lo-X
  7481. Diff    Diff   Diff    Diff   Hi-y, LSB, Lo-Y, Hi-X, Lo-X   4014
  7482.  
  7483. Kind code for byte:           20h   60h  60h   20h   40h
  7484.                               (transmitted left to right)
  7485.  
  7486.           Table 5-10:   MS-Kermit Tektronix Coordinate Interpretation
  7487.  
  7488. -------------------------------------------------------------------------------
  7489.  
  7490. Note that LO-Y must be sent if HI-X has changed so that the Tektronix knows the
  7491. HI-X byte (in the range of 20h-3Fh) is HI-X and not HI-Y.  LO-Y  must  also  be
  7492. sent  if LSBXY has changed, so that the 4010 will ignore LSBXY and accept LO-Y.
  7493. The LSBXY byte is 
  7494.  
  7495.     60h + (MARGIN * 10h) + (LSBY * 4) + LSBX
  7496.  
  7497. MARGIN is 0 here and refers to splitting the screen left  and  right  for  text
  7498. rollover, which the Kermit Tek emulator does not do.
  7499.  
  7500.  
  7501. Tek 4010 Example:
  7502.  
  7503. Suppose  <xy>  is  point y = 300, x = 500 in Tektronix coordinates.  Split each
  7504. 10-bit coordinate into 5-bit groups, add ASCII Space (32) and add the Kind code
  7505. to each.  Send the X part last.
  7506.  
  7507.                   HI-Y     LO-Y                   HI-X     LO-X
  7508.   Y=300d=012Ch=  01001    01100   X=500d=01F4h=  01111    10100
  7509.     +32d=+20h   +10000   +10000     +32d=+20h   +10000  +100100
  7510.     +Kind code +100000 +1100000     +kind code +100000 +1000000
  7511.   Binary        111001  1111100                 111111  1100100
  7512.   ASCII            9       |                       ?       d
  7513.  
  7514. So  <xy> = (500,300) is sent or received in a GS command as "9|?d".  An example
  7515. in C (program fragments):
  7516. 5.15.7. Tektronix 4010/4014 Graphics Terminal Functions                Page 136
  7517.  
  7518. -------------------------------------------------------------------------------
  7519. #define GS   29
  7520. #define US   31
  7521. FILE *fp;                      /* File descriptor for terminal */
  7522.  . . .
  7523.  
  7524.     fputc( GS, fp); coord( 75, 65);       /* Move to 75,65      */
  7525.     fputc( US, fp); fputs("A House", fp); /* Annotate at 75,65  */
  7526.     fputc( GS, fp);                       /* Now draw lines...  */
  7527.     coord( 50, 50); coord(300, 50);       /* Bottom side        */
  7528.     coord(300,200); coord( 50,200);       /* Right wall, top    */
  7529.     coord(175,250); coord(300,200);       /* Roof               */
  7530.     fputc( GS, fp);                       /* Start a new line   */
  7531.     coord( 50, 50); coord( 50,200);       /* Left wall at 50,50 */
  7532.     . . .
  7533.  
  7534. coord(x, y) int x, y; {        /* Send x,y coordinates to Tek 4010 */
  7535.     fputc((y / 32) + 32, fp);             /* High y */
  7536.     fputc((y % 32) + 96, fp);             /* Low  y */
  7537.     fputc((x / 32) + 32, fp);             /* High x */
  7538.     fputc((x % 32) + 64, fp);             /* Low  x */
  7539. }
  7540.  
  7541.  
  7542. 5.16. IBM PC Kermit Technical Summaries
  7543.  
  7544. Under  normal  circumstances,  MS-Kermit  takes  advantage  of  the  computer's
  7545. hardware,  and often bypasses DOS (sometimes even BIOS) to achieve high perfor-
  7546. mance, to exercise special machine features, or to produce an attractive screen
  7547. display.  Thus, it is not in all respects a "well behaved" DOS program.
  7548.  
  7549. MS-Kermit  redirects interrupts 0BH (COM2/4) or 0CH (COM1/3), 16H, 23H, 24H and
  7550. returns them when done.  It uses the BIOS for keyboard, video display, and sys-
  7551. tem  information  interrupts.   It examines segment 40H for EGA operating modes
  7552. and it does direct screen reads and writes.  Memory for the  screen  roll  back
  7553. buffer is negotiated with DOS to leave room for a second copy of COMMAND.COM to
  7554. run tasks within Kermit; about 90KB to 128KB is needed for the entire  program.
  7555. Video page zero is normally used, but page one is employed to save screens with
  7556. non-standard dimensions.  Hercules and other graphics mode  displays  are  sup-
  7557. ported only in Tektronix terminal mode.  Kermit's timing delays are dynamically
  7558. adjusted each time the serial port is started to accomodate  machines  of  dif-
  7559. ferent speeds; duration of the normal software timing loop is measured with the
  7560. hardware timer chip and looping is adjusted to produce uniform delays  on  8088
  7561. through 80386 machines.
  7562.  
  7563.  
  7564. 5.16.1. Kermit-MS/IBM on Local Area Networks
  7565.  
  7566. The IBM version of Kermit-MS has support for the IBM Local Area Network NetBIOS
  7567. (and emulators) interface, Interrupt 5CH, with additional support for  selected
  7568. vendor  specific  features  (presently just AT&T STARLAN), activated by the SET
  7569. PORT NET command, described above.  Communications across a LAN  occur  through
  7570. the  NetBIOS interface using virtual circuits (Sessions), named nodes, and con-
  7571. ventional NetBIOS packets.  Kermit-MS  does  not  use  LAN  terminal  interface
  7572. packages nor the Redirector or similar functions.
  7573.  
  7574. Kermit  LAN  operations  are  harmonious  with normal network activity and many
  7575. 5.16.1. Kermit-MS/IBM on Local Area Networks                           Page 137
  7576.  
  7577. -------------------------------------------------------------------------------
  7578. pairs of Kermits can communicate simultaneously. Kermit does  not  use  conven-
  7579. tional LAN File Server functions.
  7580.  
  7581. Kermit uses the standard NetBIOS interrupt 5CH interface, for those who need to
  7582. know such things, which means it will run on most LANS including  IBM  PC  Net,
  7583. IBM Token Ring, AT&T STARLAN, and many others, and will run with Novell NetWare
  7584. software.  Presently, Kermit knows some details of STARLAN and is able to  send
  7585. a  BREAK  across  the  net and can use ISN node names with long path parts.  If
  7586. STARLAN is not operating these features are not available.   As  more  detailed
  7587. information  becomes  available  special  features  of  other  networks  can be
  7588. built-in.
  7589.  
  7590. The sequence of operations is similar for a client or server Kermit.   The  SET
  7591. PORT  NET command is issued by both. This command causes Kermit to validate the
  7592. presence of the Interrupt 5CH interface, test for vendor additions, test for  a
  7593. session  already underway, establish and display a unique Kermit node name, but
  7594. not make a network session.  The node name of the remote server machine follows
  7595. the  word  NET;  this  is  not  to be confused with our own node name discussed
  7596. below.
  7597.  
  7598. If an earlier LAN session is still active then the  current  remote  node  name
  7599. field  of  the  command  is examined for presence of a name. If a name is given
  7600. then Kermit asks the user whether to RESUME the session or  start  a  NEW  one.
  7601. Starting a new one results in Kermit hanging up the old session (HANGUP) before
  7602. proceeding; resuming an old one requires no further work at this point.
  7603.  
  7604. When Kermit attaches to the network for the first time it  needs  to  select  a
  7605. unique  local  node  name so that two systems can form a Session by using these
  7606. names as addresses. Kermit uses a simple algorithm to  make  the  name.  Kermit
  7607. probes the network adapter board/software for the name of the local system.  If
  7608. the name is present Kermit makes its own name by appending a dot K (.K) to  the
  7609. local name. If the local name is absent then Kermit first tries a standard name
  7610. of "mskermit.K"; should the network report that the name is not unique (another
  7611. node  is  using the name) then the user is asked to choose a name. This process
  7612. continues until a unique name is obtained or the user decides  to  quit.    The
  7613. final  Kermit  node name is reported on the screen; client Kermits will need to
  7614. know the name of the server Kermit.
  7615.  
  7616. Communication across the LAN begins differently for client and server  Kermits.
  7617. The  server  must  be started first, by simply placing a Kermit in server mode.
  7618. This results in a network Listen request being posted so that arriving  packets
  7619. with  the  correct  node  name  can  be delivered to the server Kermit. Next, a
  7620. client Kermit tries to connect to the server by issuing a Kermit server command
  7621. to  the  proper node name (as given in the client's SET PORT NET node command);
  7622. REMOTE WHO is a satisfactory choice. The client machine actually issues a  net-
  7623. work  Call  to  the server's node name to make a connection and then follows it
  7624. with data packets holding the Kermit server request. The  initial  exchange  of
  7625. packets  establishes a particular virtual circuit between the two nodes. If the
  7626. connection cannot be started then the client Kermit reports this  fact  to  the
  7627. user. The most common causes of a failure at this point are:
  7628.  
  7629.    1. The  client  Kermit  did  not specify the correct server Kermit node
  7630.       name (spelling errors, wrong case for letters, missing dot K),
  7631.  
  7632.    2. One or both machines are using a network adapter board which is  not
  7633.       the first in the machine; Kermit uses only the first board,
  7634. 5.16.1. Kermit-MS/IBM on Local Area Networks                           Page 138
  7635.  
  7636. -------------------------------------------------------------------------------
  7637.    3. The LAN NetBIOS emulator does not fully support IBM standard virtual
  7638.       circuits,
  7639.  
  7640.    4. The server machine was not started on the network before the client.
  7641.  
  7642. A virtual circuit will be broken if a sender or receiver gets no response to  a
  7643. request  within  a  short  time  interval  set  by  the  LAN hardware/software.
  7644. However, the LAN procedures within Kermit automatically reestablish the circuit
  7645. transparently  to  the user when new information is communicated; the last used
  7646. remote node name is remembered internally for this purpose.   This  also  means
  7647. the  server Kermit will respond to a connection from a new client Kermit if the
  7648. first client is idle for say a minute or so. A session can be terminated by the
  7649. user  by issuing the HANGUP command or by exiting Kermit. A session will not be
  7650. broken this way if the user on the client Kermit changes to  a  regular  serial
  7651. port.
  7652.  
  7653. Finally,  when Kermit returns control to DOS, but not via the PUSH command, its
  7654. unique Kermit node name is removed from the network adapter board.
  7655.  
  7656. During network communications Kermit uses network packets holding 256 bytes  of
  7657. data.  If both Kermits are given the command 
  7658.  
  7659.   SET RECEIVE PACKET 1000
  7660.  
  7661. then  the  network  and Kermit will be used to best efficiency.  Experience has
  7662. shown that the client Kermit should have its TIMER OFF because the  server  may
  7663. be  asked  to do an operation via DOS which does not complete before the client
  7664. side would timeout. An observation of some  token  passing  networks  indicates
  7665. that  Kermit  packets slightly longer than 256, 512, etc bytes result in marked
  7666. slowing down because the remaining small piece is not sent until  a  net  timer
  7667. expires.    Carrier  sense (Ethernet, STARLAN) boards seem to be more agressive
  7668. and export small packets immediately.
  7669.  
  7670. Kermit can access files on the LAN file server via DOS even while using the LAN
  7671. as  a communications medium.  Network administrators should note this point be-
  7672. cause a user operating Kermit in Server mode can allow his or her  file  server
  7673. directories to be available to other network users also running Kermit, without
  7674. additional security checking of the other users.  The network drives visible to
  7675. the Server Kermit can become devices available for Kermit-to-Kermit file trans-
  7676. fers, etc, unless the DISABLE command is used to confine access to the  current
  7677. disk  and  directory.  A corollary is when files are accessible to DOS commands
  7678. they can become public.
  7679.  
  7680.  
  7681. 5.16.2. Use of Kermit-MS with External Device Drivers
  7682.  
  7683. It is often desirable to supplement or modify the behavior of a DOS program  by
  7684. loading  it with special external device drivers.  These drivers may operate at
  7685. either the DOS or BIOS level.   When  Kermit-MS  accesses  the  BIOS  directly,
  7686. DOS-level drivers are ineffective.  When Kermit accesses the hardware directly,
  7687. both the DOS and the BIOS level drivers are locked  out.    Kermit-MS  provides
  7688. several mechanisms to allow these external drivers to operate as intended.
  7689.  
  7690. Here are a few examples:
  7691.  
  7692.    - IBM's  ANSI.SYS  console driver operates at the DOS level.  It allows
  7693. 5.16.2. Use of Kermit-MS with External Device Drivers                  Page 139
  7694.  
  7695. -------------------------------------------------------------------------------
  7696.      the major IBM PC keys to be redefined, and also  interprets  selected
  7697.      ANSI-format  escape  sequences  for screen control.  It works fine at
  7698.      Kermit-MS command level, except SHOW KEY does not  recognize  strings
  7699.      assigned  to  keys  via  ANSI.SYS, and fine at CONNECT level.  To use
  7700.      ANSI.SYS at CONNECT level, issue the Kermit-MS commands SET  KEY  OFF
  7701.      (to  read  keys via DOS) and SET TERMINAL NONE (to display characters
  7702.      through DOS).
  7703.  
  7704.    - Blind people often have speaking  or  Braille  machines  attached  to
  7705.      their  PCs.   DOS-level device drivers are generally used to redirect
  7706.      screen output to these devices, which works OK at  DOS  or  MS-Kermit
  7707.      command level.  SET TERMINAL NONE will allow this redirection to take
  7708.      place during CONNECT.  But  these  devices  also  need  to  have  the
  7709.      computer's  output  appear  as  a  coherent  stream of text, so users
  7710.      should also take care to inform the remote host to format its  output
  7711.      for  a  "dumb"  or hardcopy terminal.  In addition, Kermit-MS' normal
  7712.      file transfer display does not mesh well with these devices, but that
  7713.      can be remedied using SET DISPLAY SERIAL.
  7714.  
  7715.    - People  with motor impairments may be using special keyboard replace-
  7716.      ments supported by DOS-level  device  drivers.    As  with  ANSI.SYS,
  7717.      Kermit-MS  may be directed to use such keyboard drivers with the com-
  7718.      mand SET KEY OFF.
  7719.  
  7720.    - Other keyboard drivers are available that work,  like  Kermit-MS,  at
  7721.      BIOS level.  Examples include ProKey and SuperKey.  These may be used
  7722.      at DOS or Kermit-MS command level as well as during CONNECT.
  7723.  
  7724.    - Conceivably, drivers exist that allow DOS communication  programs  to
  7725.      emulate  terminals  other than ANSI.  You should be able to use them,
  7726.      if they exist, in conjunction with Kermit-MS by telling Kermit to SET
  7727.      TERMINAL NONE, but the speed may not be high because of the interven-
  7728.      ing DOS call.
  7729.  
  7730.  
  7731. 5.16.3. Kermit-MS/IBM Serial Port Information
  7732.  
  7733. Kermit-MS for IBM PC's and compatibles does testing of serial ports before use.
  7734. This section describes those tests so users may understand what Kermit does.
  7735.  
  7736. When a serial port is selected by the SET PORT COMx command Kermit looks at low
  7737. memory addresses in segment 40H assigned to hold the base address of each  COMx
  7738. port;  COM1 is in word 40:0H, COM2 is in word 40:2H, and so on. If the value in
  7739. the appropriate word is binary zero then Kermit declares the  port  to  be  un-
  7740. available.  Otherwise, Kermit runs read-only (i.e., safe) tests at the base ad-
  7741. dress to validate the presence of an official 8250 UART chip. If the tests fail
  7742. Kermit  indicates  it will do i/o through the slow Bios pathway; some PC clones
  7743. need to work this way even though the Bios has  speed  problems  even  at  1200
  7744. baud.  Otherwise, interrupt driven i/o will be done through the 8250 UART (that
  7745. is very fast).
  7746.  
  7747. There is a special case when a communications board is present, set  for  COM2,
  7748. but  a normal COM1 serial port is not.  Kermit detects this situation, issues a
  7749. short notice and uses the available COM2 board.
  7750.  
  7751. Many machines now have more than two serial ports, yet  there  is  no  standard
  7752. 5.16.3. Kermit-MS/IBM Serial Port Information                          Page 140
  7753.  
  7754. -------------------------------------------------------------------------------
  7755. about addresses for COM3 and COM4.  PC DOS 3.30 does not assign them either be-
  7756. cause it is really a problem of the system ROM Bios  boot  code  run  when  the
  7757. power  is turned on.  However, Kermit will use COM3 and/or COM4 if the base ad-
  7758. dress of a port is placed in low memory words 40:4H (COM3) or 40:6H (COM4); the
  7759. tests  described above are then carried out. One restriction is that the Inter-
  7760. rupt ReQuest number (IRQ in the serial port board manual) must be IRQ4 for COM3
  7761. (and  for  COM1)  and  IRQ3  for  COM4  (and for COM2). Check the board and its
  7762. manual.  DOS utility DEBUG can be used to create a short program to insert  the
  7763. board's  addresses  into  the segment 40H memory locations; a sample program is
  7764. given below.
  7765.  
  7766. -------------------------------------------------------------------------------
  7767.  
  7768.  
  7769.  
  7770.   Serial Port       Base Address IRQ           Conventions
  7771.   COM1              03F8H        4             IBM standard
  7772.   COM2              02F8H        3             IBM standard
  7773.   COM3              ?            4             Board, Kermit wants IRQ4
  7774.   COM4              ?            3             Board, Kermit wants IRQ3
  7775.  
  7776.                 Table 5-11:   IBM PC/XT/AT Serial Port Numbers
  7777.  
  7778. -------------------------------------------------------------------------------
  7779.  
  7780. The addresses shown as query marks are to be found  in  the  board's  reference
  7781. manual;  values  such  as  2E8H and 2E0H would be common.  However, there is no
  7782. standard for anything to do with COM3 and COM4.
  7783.  
  7784. Assuming that you have selected an address in harmony with the rest of the sys-
  7785. tem  (good  luck  on  that  part), set the board's switches or jumpers, and use
  7786. DEBUG to insert the address(es) in segment  40H  memory.    The  example  below
  7787. creates  a small program named SETCOM3.COM to put address 02E8H into the memory
  7788. word 40:04H for COM3 and writes the program to drive  A.  (Disregard  the  xxxx
  7789. items below):
  7790.  
  7791.   A> DEBUG                        don't type these comments
  7792.   -n a:setcom3.com                sets name of output file
  7793.   -a                              assemble command
  7794.   xxxx:100 mov ax,40              value 40h
  7795.   xxxx:103 mov es,ax              put it into register es
  7796.   xxxx:105 mov ah,02              the 02 part of 02E8H
  7797.   xxxx:107 mov al,e8              the E8 part of same
  7798.   xxxx:109 es:
  7799.   xxxx:10A mov [4],ax             store in 40:4 for com3 ([6] for com4)>
  7800.   xxxx:10D int 20                 return to DOS
  7801.   xxxx:10F                        blank line to end assemble mode
  7802.   -r cx                           show contents of register cx
  7803.   CX 0000
  7804.   : 0f                            set register cx to write 0fh bytes
  7805.   -w                              write material to the disk file
  7806.   -q                              quit debug
  7807.   A> DEBUG setcom3.com
  7808.   -u                              unassemble to see if all is well
  7809.   -q                              quit debug
  7810. 5.16.3. Kermit-MS/IBM Serial Port Information                          Page 141
  7811.  
  7812. -------------------------------------------------------------------------------
  7813. Note,  for  COM4,  use  [6]  above  rather  than [4], and of course employ your
  7814. board's port address in place of 02E8H (check the manual).  Finally, try it:
  7815.  
  7816.   A> setcom3                      run the program
  7817.   A> DEBUG                        now see what's down there
  7818.   -d 40:00                        display bytes in seg 40H
  7819.  
  7820.          ( Shows many bytes.  See yours?  Good. )
  7821.  
  7822.   -q
  7823.   A>
  7824.  
  7825. A small side effect noted in practice is the first time the extra port is  used
  7826. there  may be garbage from it.  Just return to the Kermit prompt and try again,
  7827. if necessary SET PORT to the other COM lines momentarily, all  should  be  well
  7828. the second time.
  7829.  
  7830. More technical comments, for those with an interest.  When Kermit finishes with
  7831. a port it disables interrupts for that serial port and returns the  IRQ  signal
  7832. line  to  its  state found when Kermit started since many devices can share the
  7833. same Interrupt ReQuest line but only one device at a time can be active  on  an
  7834. IRQ.    If  you find that transmissions are good but there is no reception then
  7835. another device has stolen the IRQ; disable it or find a guru.  Kermit will work
  7836. with  non-standard  addresses for COM1 and COM2 but the IRQ's must be as in the
  7837. table above.  Accessing a non-existent port produces a  message  and  all  com-
  7838. munications are discarded safely in the bit bucket.
  7839.  
  7840.  
  7841. 5.16.4. CTTY COMx for IBM Machines
  7842.  
  7843. The  DOS  command  CTTY  COMx  redirects the standard input and output from the
  7844. keyboard and screen, respectively, to the indicated communications channel.  If
  7845. a  Kermit  Server  is operated this way, "through the back port", then both DOS
  7846. and Kermit can access the port hardware simultaneously; a deadlock develops  on
  7847. IBM machines.  The items below refer to only the IBM version of Kermit-MS.
  7848.  
  7849. Kermit-MS/IBM  version 2.30 successfully resolves the deadlock in the following
  7850. manner.  When Kermit requires the serial port it also attaches itself to Inter-
  7851. rupt  16H, the Bios RS232 serial port routine.  Code within Kermit receives the
  7852. DOS serial port requests via Interrupt 16H and either passes the request to the
  7853. Bios  if  the COM line is not that used by Kermit or it handles the request in-
  7854. ternally for conflicting situations.  When the same port is used  by  both  DOS
  7855. and  Kermit, Kermit discards DOS output material (typically a prompt, but could
  7856. be the dreaded Abort, Retry, Ignore message) and returns a success code to DOS,
  7857. it  returns an ascii Backspace code to DOS read requests (this is a key item to
  7858. keep DOS complacent while  Kermit  communicates),  and  it  returns  reasonable
  7859. status  for  modem  status.    The interception ceases when Kermit releases the
  7860. port, such as when the Kermit prompt is displayed, and this lets  DOS  converse
  7861. out the serial port.
  7862.  
  7863. It  is  worth  restating  that a large number of programs bypass DOS to achieve
  7864. higher performance.  When such programs are started through the back door  they
  7865. may  still  require input from the real keyboard and will hang, waiting for it.
  7866. There is nothing to do about this situation except a) don't let it  happen,  b)
  7867. contact  the  local  operator  to  push some keys.  Kermit-MS is not a Bulletin
  7868. Board Server.
  7869. 5.16.5. Screen Sizes and the EGA Board, IBM Versions                   Page 142
  7870.  
  7871. -------------------------------------------------------------------------------
  7872. 5.16.5. Screen Sizes and the EGA Board, IBM Versions
  7873.  
  7874. Support has been included for Enhanced Graphics  Adapter  (EGA)  video  display
  7875. boards  which  can  be  configured for other than the standard 80 columns by 25
  7876. lines, say 132 columns or 43 lines or other.  Three boards, the Tseng Labs  EVA
  7877. board  with  the  132 column kit installed, the ATI EGA Wonder, and the Video 7
  7878. Deluxe, can be controlled directly by Kermit for 80/132 column changes.   Other
  7879. boards  need to be placed in the desired display mode by the user.  Kermit then
  7880. adapts to the settings if the board obeys standard rules for using the Bios EGA
  7881. memory  areas in segment 40H.  The Video-7 Vega Deluxe board has been used suc-
  7882. cessfully in all screen sizes, including 132 columns by 43 lines, with  an  NEC
  7883. Multisync monitor.
  7884.  
  7885. The  IBM EGA board has several noteworthy bugs which are now standards.  One is
  7886. the cursor dots are not always on the correct scan lines  when  the  number  of
  7887. screen  lines  is other than 25.  Kermit-MS attempts to compensate for this at-
  7888. tribute.  Screen roll back space is fixed in size so there are fewer pages  for
  7889. more  dense  screens;  standard  screens  use  an internal buffer, non-standard
  7890. screens use a buffer plus video page 1. ANSI.SYS is hard coded for 25 line dis-
  7891. plays  so all DOS i/o will eventually overwrite itself on line 25; the emulator
  7892. does not use DOS i/o.  Commercial replacements for ANSI.SYS should be  able  to
  7893. use all screen lines.
  7894.  
  7895. Screen  dumps work correctly if done with Kermit commands.  DOS PrintScreen may
  7896. or may not, depending on your EGA board.
  7897.  
  7898. When the VT102 receives escape sequences to change between 80  and  132  column
  7899. modes the screen is reset and the Tseng Labs, ATI, or Video 7 board is asked to
  7900. change modes (but only if that board is present); other  display  adapters  are
  7901. left  in their current state.  The right margin is enforced strongly so a board
  7902. in 132 column mode will not display material to the right of column 80  if  the
  7903. emulator  is  in 80 column mode.  Similarly, material to the right of column 80
  7904. is not preserved in the emulator if the display  adapter  is  operating  in  80
  7905. column  mode;  real  VT102s  keep  that  invisible  material in hardware memory
  7906. whereas the emulator does not.
  7907.  
  7908. Reference is made to line 25 in the emulator; this is normally the  status/mode
  7909. line  in  Kermit.    Real  VT102's  have only 24 line displays.  If the display
  7910. adapter is set for a different number of lines per screen then the 25th line is
  7911. interpreted  to  mean the bottom display adapter line, such as line 43.  Should
  7912. the host access the status/mode line then the line is declared to  be  disabled
  7913. (same  as  SET MODE OFF) so that Kermit's own status information does not over-
  7914. write the host's when the screen is restored.  Toggling a  disabled  mode  line
  7915. has  no  effect;  only SET MODE ON will enable it again.  The Heath-19 terminal
  7916. has the unusual feature that disabling the mode line (ESC y 1) also clears it.
  7917.  
  7918.  
  7919. 5.16.6. Kermit-MS/IBM Printer Control
  7920.  
  7921. The IBM PC MS-Kermit VT102 terminal emulator  also  supports  full  transparent
  7922. printing  of  8-bit  binary  bytes.    The escape sequence "ESC [ 5 i" turns on
  7923. transparent printing, in which all further 8-bit characters are  sent  directly
  7924. to  the  printer, bypassing the SET TRANSLATION INPUT filter, and are not shown
  7925. on the screen.  Escape sequence "ESC [ 4 i" turns off transparent printing  and
  7926. the  escape  sequence  is not sent to the printer.  Non-transparent printing is
  7927. controlled by the "ESC [ ? 5 i" and "ESC [ ? 4 i"  sequences.    Such  printing
  7928. 5.16.6. Kermit-MS/IBM Printer Control                                  Page 143
  7929.  
  7930. -------------------------------------------------------------------------------
  7931. simply  duplicates  text  intended  for the screen, excluding escape sequences.
  7932. The text also appears on the screen.
  7933.  
  7934. Kermit-MS accesses the system printer through DOS calls several  ways;  neither
  7935. the  Bios  nor the hardware are used.  Files directed to the printer by the SET
  7936. DESTINATION PRINTER command are written by opening a file  with  the  name  PRN
  7937. (DOS's  name  for  the  system printer) and writing to it the same as to a disk
  7938. file; DOS provides limited buffering.  LOGging to device  PRN  works  the  same
  7939. way,  as  can be noticed by the last line or so not being printed until the log
  7940. file is CLOSED.  DOS is used again while emulating a terminal in CONNECT  mode.
  7941. If the VT102 emulator found in the IBM PC is used for transparent or Controller
  7942. printing (via arcane escape sequences sent from the host) single characters are
  7943. written  to DOS file handle 4, the DOS standard print device.  If the screen is
  7944. echoed to the printer via the typical Control PrtSc key combination, or  equiv-
  7945. alent,  single  characters  are  written by the DOS function 05H Printer Output
  7946. call.  In both cases of terminal emulation the printer's ready status is  found
  7947. by the DOS IOCTL 44H call.  Only the Control PrtSc case results in the PRN mes-
  7948. sage being displayed on the status line.  Finally, the classical IBM  PC  Shift
  7949. PrtSc  command to copy the whole screen to the printer is unknown to Kermit be-
  7950. cause the system Bios traps the key combination and does not tell Kermit  about
  7951. it.    If the Control P command is given to DOS before Kermit starts then again
  7952. characters are echoed by the  system  Bios  without  Kermit's  knowledge;  this
  7953. situation can result in lost characters.
  7954.  
  7955. Print spoolers generally operate by being told an existing filename and then in
  7956. the background they steal cpu cycles  to  read  from  disk  and  write  to  the
  7957. printer.    The  DOS  PRINT command invokes such a spooler.  Although an active
  7958. Kermit does not feed these software programs directly the  spooler  and  Kermit
  7959. can  compete  for cpu cycles and characters can be lost.  If a non-DOS resident
  7960. program intercepts characters destined for the printer device and  spools  them
  7961. Kermit does not know about it and similar competion can occur.
  7962.  
  7963. During  file  transfers  printing is carefully sequenced to occur only when the
  7964. local Kermit is in control of the communications line so  that  a  small  pause
  7965. will  not  result in missing characters arriving at the serial port.  When ter-
  7966. minal emulation is active then printing competes for cpu time with  the  serial
  7967. port  routines.    Generally, the serial port wins such contests if the port is
  7968. interrupt driven (Generic Kermit is not interrupt driven, so beware).  However,
  7969. the printing itself can use enough cpu cycles to delay processing of characters
  7970. to the screen and eventually the receive buffer of the serial port fills to the
  7971. high  water  mark  and  an  XOFF  flow control character is sent to the host to
  7972. suspend further transmissions until we send an XON.  If FLOW is NONE  then  ex-
  7973. pect  lost  characters  at  the serial port.  Experience with ordinary IBM PC's
  7974. through 80386 machines at very high baud rates indicates no characters are lost
  7975. when  FLOW  is  XON/XOFF.    However,  it  is possible on some machines for the
  7976. printer to have priority over the serial port, and hence to have  lost  charac-
  7977. ters,  especially  if  a  Terminate Stay Resident program intercepts characters
  7978. destined for the printer and keeps interrupts turned off too long.
  7979. 6. UNIX KERMIT                                                         Page 144
  7980.  
  7981. -------------------------------------------------------------------------------
  7982. 6. UNIX KERMIT
  7983.  
  7984. Program:    Frank da Cruz, Bill Catchings, Jeff  Damens,  Columbia  University;
  7985.             Herm Fischer, Encino CA; contributions by many others.
  7986. Language:   C
  7987. Documentation:
  7988.             Christine Gianone, Frank da Cruz
  7989. Version:    4E(070)
  7990. Date:       January 24, 1988
  7991.  
  7992. C-Kermit is an implementation of Kermit, written modularly and transportably in
  7993. C.  The protocol state transition table is written in wart, a (non-proprietary)
  7994. lex-like preprocessor for C. System-dependent primitive functions are  isolated
  7995. into  separately compiled modules so that the program should be easily portable
  7996. among Unix systems and also to non-Unix systems that have C compilers, such  as
  7997. VAX/VMS,  Data  General AOS/VS, Apollo Aegis, the Apple Macintosh, and the Com-
  7998. modore Amiga.  This document applies to Unix implementations of  C-Kermit,  and
  7999. in most ways also to the VMS, Data General, and other implementations.
  8000.  
  8001.  
  8002. Unix Kermit Capabilities At A Glance:
  8003.  
  8004.   Local operation:                   Yes
  8005.   Remote operation:                  Yes
  8006.   Login scripts:                     Yes (UUCP style)
  8007.   Transfer text files:               Yes
  8008.   Transfer binary files:             Yes
  8009.   Wildcard send:                     Yes
  8010.   File transfer interruption:        Yes
  8011.   Filename collision avoidance:      Yes
  8012.   Can time out:                      Yes
  8013.   8th-bit prefixing:                 Yes
  8014.   Repeat count prefixing:            Yes
  8015.   Alternate block checks:            Yes
  8016.   Terminal emulation:                Yes
  8017.   Communication settings:            Yes
  8018.   Transmit BREAK:                    Yes (most versions)
  8019.   Support for dialout modems:        Yes
  8020.   IBM mainframe communication:       Yes
  8021.   Transaction logging:               Yes
  8022.   Session logging:                   Yes
  8023.   Debug logging:                     Yes
  8024.   Packet logging:                    Yes
  8025.   Act as server:                     Yes
  8026.   Talk to server:                    Yes
  8027.   Advanced server functions:         Yes
  8028.   Local file management:             Yes
  8029.   Command/Init files:                Yes
  8030.   UUCP and multiuser line locking:   Yes
  8031.   Long packets:                      Yes
  8032.   Sliding Windows:                   No
  8033.   File attributes packets:           No
  8034.   Command macros:                    No
  8035.   Raw file transmit:                 No
  8036.  
  8037. All numbers in the C-Kermit documentation are decimal unless noted otherwise.
  8038. 6. UNIX KERMIT                                                         Page 145
  8039.  
  8040. -------------------------------------------------------------------------------
  8041. C-Kermit  provides  traditional  Unix  command line operation as well as inter-
  8042. active command prompting and execution.  The command line options  provide  ac-
  8043. cess  to a basic subset of C-Kermit's capabilities; the interactive command set
  8044. is far richer.
  8045.  
  8046. On systems with dialout modems, C-Kermit's  command  file,  DIAL  command,  and
  8047. login  script  facilities  provide a counterpart to UUCP for file transfer with
  8048. non-UNIX operating systems, including the use of scheduled  (e.g.  late  night)
  8049. unattended operation.
  8050.  
  8051.  
  8052. 6.1. The Unix File System
  8053.  
  8054. Consult  your  Unix manual for details about the file system under your version
  8055. of Unix.  In general, Unix files have lowercase names, possibly containing  one
  8056. or  more  dots  or  other special characters.  Unix directories are tree-struc-
  8057. tured.  Directory levels are separated by slash ("/") characters.  For example,
  8058.  
  8059.   /usr/foo/bar
  8060.  
  8061. denotes the file bar in the directory /usr/foo.  Alphabetic case is significant
  8062. in Unix file and directory names, i.e. "a" is a different file  (or  directory)
  8063. from "A".  Wildcard or "meta" characters allow groups of files to be specified.
  8064. "*" matches any string; "?" matches any single character.
  8065.  
  8066. When C-Kermit is invoked with file arguments  specified  on  the  Unix  command
  8067. line,  the  Unix  shell  (Bourne Shell, C-Shell, K-Shell, etc) expands the meta
  8068. characters itself, and in this case a wider variety is available.  For example,
  8069.  
  8070.   kermit -s ~/ck[uvm]*.{upd,bwr}]
  8071.  
  8072. is  expanded by the Berkeley C-Shell into a list of all the files in the user's
  8073. home directory (~/) that start with the characters "ck", followed by  a  single
  8074. character  "u", "v", or "m", followed by zero or more characters, followed by a
  8075. dot, followed by one of the strings "upd" or "bwr".  Internally,  the  C-Kermit
  8076. program itself expands only the "*" and "?" meta characters.
  8077.  
  8078. Unix  files are linear (sequential) streams of 8-bit bytes.  Text files consist
  8079. of 7-bit ASCII characters, with the high-order bit off (0), and lines separated
  8080. by  the Unix newline character, which is linefeed (LF, ASCII 10).  This distin-
  8081. guishes Unix text files from those on most other ASCII systems, in which  lines
  8082. are  separated by a carriage-return linefeed sequence (CRLF, ASCII 13, followed
  8083. by linefeed, ASCII 10).  Binary files are likely to contain data  in  the  high
  8084. bits of the file bytes, and have no particular line or record structure.
  8085.  
  8086. When  transferring  files,  C-Kermit  will convert between upper and lower case
  8087. filenames and between LF and CRLF line terminators automatically,  unless  told
  8088. to  do  otherwise.   When binary files must be transferred, the program must be
  8089. instructed not to perform LF/CRLF conversion (-i on the command  line  or  "set
  8090. file type binary" interactively; see below).
  8091. 6.2. File Transfer                                                     Page 146
  8092.  
  8093. -------------------------------------------------------------------------------
  8094. 6.2. File Transfer
  8095.  
  8096. If  C-Kermit  is  in  local mode, the screen (stdout) is continously updated to
  8097. show the progress of the file transer.  A dot is printed for  every  four  data
  8098. packets, other packets are shown by type:
  8099.  
  8100.     I Exchange Parameter Information
  8101.     R Receive Initiate
  8102.     S Send Initiate
  8103.     F File Header
  8104.     G Generic Server Command
  8105.     C Remote Host Command
  8106.     N Negative Acknowledgement (NAK)
  8107.     E Fatal Error
  8108.     T Indicates a timeout occurred
  8109.     Q Indicates a damaged, undesired, or illegal packet was received
  8110.     % Indicates a packet was retransmitted
  8111.  
  8112. You may type certain "interrupt" commands during file transfer:
  8113.  
  8114.     Control-F:  Interrupt the current File, and go on to the next (if any).
  8115.     Control-B:  Interrupt the entire Batch of files, terminate the transaction.
  8116.     Control-R:  Resend the current packet
  8117.     Control-A:  Display a status report for the current transaction.
  8118.  
  8119. These  interrupt characters differ from the ones used in other Kermit implemen-
  8120. tations to avoid conflict with commonly used Unix shell  interrupt  characters.
  8121. With  Version  7,  System  III, and System V implementations of Unix, interrupt
  8122. commands must be preceeded by the 'connect' escape character (e.g. normally-\).
  8123. Ctrl-F  and  Ctrl-B are effective only during the transfer of data (D) packets,
  8124. and cannot be used to interrupt a transfer that has not yet reached that stage.
  8125.  
  8126.     CAUTION:  If Control-F or Control-B is used to cancel an incoming file,
  8127.     and  a file of the same name previously existed, and the "file warning"
  8128.     feature is not enabled, then the previous copy of the  file  will  dis-
  8129.     appear.
  8130.  
  8131. EMERGENCY EXIT:  When running Unix Kermit in remote mode, if you have started a
  8132. protocol operation (sending or receiving a file, server command wait, etc), you
  8133. will  not  be able to communicate with the terminal in the normal way.  In par-
  8134. ticular, you cannot stop the protocol  by  typing  the  normal  Unix  interrupt
  8135. characters,  since  the  terminal  has  been put in "raw mode".  If you need to
  8136. regain control quickly -- for instance, because the protocol is  stuck  --  you
  8137. can  type  two Control-C's directly to the Unix Kermit program ("connect" first
  8138. if necessary):  
  8139.  
  8140.     Control-C Control-C
  8141.  
  8142. This will cause the program to exit and restore the terminal to normal.
  8143. 6.3. Command Line Operation                                            Page 147
  8144.  
  8145. -------------------------------------------------------------------------------
  8146. 6.3. Command Line Operation
  8147.  
  8148. The C-Kermit command line syntax conforms to the Proposed Syntax Standards  for
  8149. Unix  System  Commands  put forth by Kathy Hemenway and Helene Armitage of AT&T
  8150. Bell Laboratories in Unix/World, Vol.1, No.3, 1984.  The rules that apply are:
  8151.  
  8152.    - Command names must be between 2 and 9 characters ("kermit" is 6).
  8153.    - Command names must include lower case letters and digits only.
  8154.    - An option name is a single character.
  8155.    - Options are delimited by '-'.
  8156.    - Options with  no  arguments  may  be  grouped  (bundled)  behind  one
  8157.      delimiter.
  8158.    - Option-arguments cannot be optional.
  8159.    - Arguments immediately follow options, separated by whitespace.
  8160.    - The order of options does not matter.
  8161.    - '-' preceded and followed by whitespace means standard input.
  8162.  
  8163. A group of bundled options may end with an option that has an argument.
  8164.  
  8165. The following notation is used in command descriptions:
  8166.  
  8167. fn      A  Unix  file specification, possibly containing the "wildcard" charac-
  8168.         ters `*' or `?' (`*' matches all character strings, `?'    matches  any
  8169.         single character).
  8170.  
  8171. fn1     A Unix file specification which may not contain `*' or `?'.
  8172.  
  8173. rfn     A  remote  file  specification in the remote system's own syntax, which
  8174.         may denote a single file or a group of files.
  8175.  
  8176. rfn1    A remote file specification which should denote only a single file.
  8177.  
  8178. n       A decimal number between 0 and 94.
  8179.  
  8180. c       A decimal number between 0 and 127 representing the value of  an  ASCII
  8181.         character.
  8182.  
  8183. cc      A  decimal  number  between 0 and 31, or else exactly 127, representing
  8184.         the value of an ASCII control character.
  8185.  
  8186. [ ]     Any field in square braces is optional.
  8187.  
  8188. {x,y,z} Alternatives are listed in curly braces.
  8189.  
  8190. C-Kermit command line options may specify any combination of actions  and  set-
  8191. tings.    If C-Kermit is invoked with a command line that specifies no actions,
  8192. then it will issue a prompt and  begin  interactive  dialog.    Action  options
  8193. specify either protocol transactions or terminal connection.
  8194.  
  8195. -s fn   Send  the  specified  file  or  files.   If fn contains wildcard (meta)
  8196.         characters, the Unix shell expands it into a list.  If fn is  '-'  then
  8197.         kermit sends from standard input, which may come from a file:  
  8198.  
  8199.           kermit -s - < foo.bar
  8200.  
  8201.         or a parallel process:  
  8202. 6.3. Command Line Operation                                            Page 148
  8203.  
  8204. -------------------------------------------------------------------------------
  8205.           ls -l | grep christin | kermit -s -
  8206.  
  8207.         You  cannot use this mechanism to send terminal typein.  If you want to
  8208.         send a file whose actual name is "-" you can precede  it  with  a  path
  8209.         name, as in 
  8210.  
  8211.           kermit -s ./-
  8212.  
  8213. -r      Receive a file or files.  Wait passively for files to arrive.
  8214.  
  8215. -k      Receive  (passively)  a file or files, sending them to standard output.
  8216.         This option can be used in several ways:
  8217.  
  8218.         kermit -k
  8219.             Displays  the  incoming  files  on  your screen; to be used only in
  8220.             "local mode" (see below).
  8221.  
  8222.         kermit -k > fn1
  8223.             Sends  the  incoming file or files to the named file, fn1.  If more
  8224.             than one file arrives,  all  are  concatenated  together  into  the
  8225.             single file fn1.
  8226.  
  8227.         kermit -k | command
  8228.             Pipes the incoming data (single or multiple files) to the indicated
  8229.             command, as in 
  8230.  
  8231.               kermit -k | sort > sorted.stuff
  8232.  
  8233. -a fn1  If you have specified a file transfer option, you may give an alternate
  8234.         name for a single file with the -a ("as") option.  For example, 
  8235.  
  8236.           kermit -s foo -a bar
  8237.  
  8238.         sends the file foo telling the receiver that its name is bar.  If  more
  8239.         than  one  file  arrives or is sent, only the first file is affected by
  8240.         the -a option:  
  8241.  
  8242.           kermit -ra baz
  8243.  
  8244.         stores the first incoming file under the name baz.
  8245.  
  8246. -x      Begin server operation.  May be used in either local or remote mode.
  8247.  
  8248. Before proceeding, a few words about remote and local operation are  necessary.
  8249. C-Kermit  is  "local"  if it is running on PC or workstation that you are using
  8250. directly, or if it is running on a multiuser system and transferring files over
  8251. an  external  communication line -- not your job's controlling terminal or con-
  8252. sole.  C-Kermit is remote if it is running on a multiuser system and  transfer-
  8253. ring  files  over  its  own controlling terminal's communication line (normally
  8254. /dev/tty), connected to your PC or workstation.
  8255.  
  8256. If you are running C-Kermit on a PC, it is normally used in  local  mode,  with
  8257. the  "back  port" designated for file transfer and terminal connection.  If you
  8258. are running C-Kermit on a multiuser (timesharing) system, it is in remote  mode
  8259. unless  you  explicitly  point it at an external line for file transfer or ter-
  8260. minal connection.  The following command sets C-Kermit's "mode":
  8261. 6.3. Command Line Operation                                            Page 149
  8262.  
  8263. -------------------------------------------------------------------------------
  8264. -l dev  Line -- Specify a terminal line to use for file transfer  and  terminal
  8265.         connection, as in 
  8266.  
  8267.           kermit -l /dev/ttyi5
  8268.  
  8269. When an external line is being used, you will also need some additional options
  8270. for successful communication with the remote system:
  8271.  
  8272. -b n    Baud -- Specify the baud rate for the line given in the -l  option,  as
  8273.         in 
  8274.  
  8275.           kermit -l /dev/ttyi5 -b 9600
  8276.  
  8277.         This  option  should  always  be included with the -l option, since the
  8278.         speed of an external line is not necessarily what you expect.
  8279.  
  8280. -p x    Parity -- e,o,m,s,n (even, odd, mark, space, or none).   If  parity  is
  8281.         other  than none, then the 8th-bit prefixing mechanism will be used for
  8282.         transferring 8-bit binary data, provided the  opposite  Kermit  agrees.
  8283.         The default parity is none.
  8284.  
  8285. -t      Specifies  half  duplex,  line  turnaround  with  XON  as the handshake
  8286.         character.
  8287.  
  8288. The following commands may be used only with a C-Kermit which is  local  either
  8289. by default or else because the -l option has been specified.
  8290.  
  8291. -g rfn  Actively  request  a remote server to send the named file or files; rfn
  8292.         is a file specification in the remote host's own syntax.  If fn happens
  8293.         to  contain  any  special  shell characters, like space, '*', '[', etc,
  8294.         these must be quoted, as in 
  8295.  
  8296.           kermit -g x\*.\?
  8297.  
  8298.         or 
  8299.  
  8300.           kermit -g "profile exec"
  8301.  
  8302. -f      Send a 'finish' command to a remote server.
  8303.  
  8304. -c      Establish a terminal connection over  the  specified  or  default  com-
  8305.         munication line, before any protocol transaction takes place.  Get back
  8306.         to  the  local  system  by  typing  the  escape   character   (normally
  8307.         Control-Backslash) followed by the letter 'c'.
  8308.  
  8309. -n      Like  -c,  but  after a protocol transaction takes place; -c and -n may
  8310.         both be used in the same command.  The use of -n and -c is  illustrated
  8311.         below.
  8312.  
  8313. If the other Kermit is on a remote system, the -l and -b options should also be
  8314. included with the -r, -k, or -s options.
  8315.  
  8316. Several other command-line options are provided:
  8317.  
  8318. -i      Specifies that files should be sent or received exactly "as is" with no
  8319.         conversions.    This option is necessary for transmitting binary files.
  8320. 6.3. Command Line Operation                                            Page 150
  8321.  
  8322. -------------------------------------------------------------------------------
  8323.         It may also be used in Unix-to-Unix transfers (it must be given to both
  8324.         Unix Kermit programs), where it will improve performance by circumvent-
  8325.         ing the normal text-file conversions, and will allow  mixture  of  text
  8326.         and binary files in a single file group.
  8327.  
  8328. -w      Write-Protect -- Avoid filename collisions for incoming files.
  8329.  
  8330. -e n    Extended  packet  length -- Specify that C-Kermit is allowed to receive
  8331.         packets up to length n, where n may be between 10 and some  large  num-
  8332.         ber,  like  1000,  depending on the system.  The default maximum length
  8333.         for received packets is 90.  Packets longer than 94 will be  used  only
  8334.         if  the  other  Kermit  supports,  and agrees to use, the "long packet"
  8335.         protocol extension.
  8336.  
  8337. -q      Quiet -- Suppress screen update during file transfer, for  instance  to
  8338.         allow a file transfer to proceed in the background.
  8339.  
  8340. -d      Debug -- Record debugging information in the file debug.log in the cur-
  8341.         rent directory.  Use this option if you believe  the  program  is  mis-
  8342.         behaving, and show the resulting log to your local Kermit maintainer.
  8343.  
  8344. -h      Help -- Display a brief synopsis of the command line options.
  8345.  
  8346. The command line may contain no more than one protocol action option.
  8347.  
  8348. Files  are  sent with their own names, except that lowercase letters are raised
  8349. to upper, pathnames are stripped off, certain special characters like (`~') and
  8350. (`#')  are changed to `X', and if the file name begins with a period, an `X' is
  8351. inserted before it.  Incoming files are stored under  their  own  names  except
  8352. that  uppercase  letters  are  lowered, and, if -w was specified, a "generation
  8353. number" is appended to the name if it has the same name  as  an  existing  file
  8354. which  would  otherwise be overwritten.  If the -a option is included, then the
  8355. same rules apply to its argument.  The file transfer display shows  any  trans-
  8356. formations performed upon filenames.
  8357.  
  8358. During transmission, files are encoded as follows:
  8359.  
  8360.    - Control characters are converted to prefixed printables.
  8361.  
  8362.    - Sequences  of repeated characters are collapsed via repeat counts, if
  8363.      the other Kermit is also capable of repeated-character compression.
  8364.  
  8365.    - If parity is being used on the communication  line,  data  characters
  8366.      with  the  8th  (parity)  bit on are specially prefixed, provided the
  8367.      other Kermit is capable of 8th-bit prefixing; if  not,  8-bit  binary
  8368.      files cannot be successfully transferred.
  8369.  
  8370.    - Conversion is done between Unix newlines and carriage-return-linefeed
  8371.      sequences unless the -i option was specified.
  8372. 6.3. Command Line Operation                                            Page 151
  8373.  
  8374. -------------------------------------------------------------------------------
  8375. Command Line Examples:
  8376.  
  8377.  
  8378.   kermit -l /dev/ttyi5 -b 1200 -cn -r
  8379.  
  8380. This command connects you to the system on the other end of ttyi5 at 1200 baud,
  8381. where  you  presumably  log in and run Kermit with a 'send' command.  After you
  8382. escape back, C-Kermit waits for a file (or files) to arrive.    When  the  file
  8383. transfer is completed, you are reconnected to the remote system so that you can
  8384. logout.
  8385.  
  8386.  
  8387.   kermit -l /dev/ttyi4 -b 1800 -cntp m -r -a foo
  8388.  
  8389. This command is like the preceding one, except the remote system in  this  case
  8390. uses  half  duplex communication with mark parity.  The first file that arrives
  8391. is stored under the name foo.
  8392.  
  8393.  
  8394.   kermit -l /dev/ttyi6 -b 9600 -c | tek
  8395.  
  8396. This example uses Kermit to connect your terminal to the system  at  the  other
  8397. end of ttyi6.  The C-Kermit terminal connection does not provide any particular
  8398. terminal  emulation,  so  C-Kermit's  standard   i/o   is   piped   through   a
  8399. (hypothetical) program called tek, which performs (say) Tektronix emulation.
  8400.  
  8401.  
  8402.   kermit -l /dev/ttyi6 -b 9600 -nf
  8403.  
  8404. This command would be used to shut down a remote server and then connect to the
  8405. remote system, in order to log out or to make further use of it.  The -n option
  8406. is invoked after -f (-c would have been invoked before).
  8407.  
  8408.  
  8409.   kermit -l /dev/ttyi6 -b 9600 -qg foo.\* &
  8410.  
  8411. This  command  causes C-Kermit to be invoked in the background, getting a group
  8412. of files from a remote server (note the quoting of the `*' character).  No dis-
  8413. play  occurs  on  the  screen, and the keyboard is not sampled for interruption
  8414. commands.  This allows other work to be done while file  transfers  proceed  in
  8415. the background.
  8416.  
  8417.  
  8418.   kermit -l /dev/ttyi6 -b 9600 -g foo.\* > foo.log < /dev/null &
  8419.  
  8420. This  command  is  like  the previous one, except the file transfer display has
  8421. been redirected to the file foo.log.  Standard input  is  also  redirected,  to
  8422. prevent C-Kermit from sampling it for interruption commands.
  8423.  
  8424.  
  8425.   kermit -iwx
  8426.  
  8427. This  command  starts  up  C-Kermit as a server.  Files are transmitted with no
  8428. newline/carriage-return-linefeed conversion; the -i option is necessary for bi-
  8429. nary  file transfer and recommended for Unix-to-Unix transfers.  Incoming files
  8430. that have the same names as existing files are given new, unique names.
  8431. 6.3. Command Line Operation                                            Page 152
  8432.  
  8433. -------------------------------------------------------------------------------
  8434.   kermit -l /dev/ttyi6 -b 9600
  8435.  
  8436. This command sets the communication  line  and  speed.    Since  no  action  is
  8437. specified,  C-Kermit issues a prompt and enters an interactive dialog with you.
  8438. Any settings given on the command line remain in force during the  dialog,  un-
  8439. less explicitly changed.
  8440.  
  8441.  
  8442.   kermit
  8443.  
  8444. This command starts up Kermit interactively with all default settings.
  8445.  
  8446. The  next  example shows how Unix Kermit might be used to send an entire direc-
  8447. tory tree from one Unix system to another, using the tar  program  as  Kermit's
  8448. standard  input and output.  On the orginating system, in this case the remote,
  8449. type (for instance):
  8450.  
  8451.  
  8452.   tar cf - /usr/fdc | kermit -is -
  8453.  
  8454. This causes tar to send the directory /usr/fdc (and all its files and  all  its
  8455. subdirectories and all their files...) to standard output instead of to a tape;
  8456. kermit receives this as standard input and sends it as a binary file.   On  the
  8457. receiving system, in this case the local one, type (for instance):
  8458.  
  8459.  
  8460.   kermit -il /dev/ttyi5 -b 9600 -k | tar xf -
  8461.  
  8462. Kermit  receives  the  tar archive, and sends it via standard output to its own
  8463. copy of tar, which extracts from it a replica of the original directory tree.
  8464.  
  8465. A final example shows how a Unix compression utility might be used to speed  up
  8466. Kermit file transfers:
  8467.  
  8468.   compress file | kermit -is -     (sender)
  8469.   kermit -ik | uncompress          (receiver)
  8470.  
  8471.  
  8472. Exit Status Codes:
  8473.  
  8474. Unix  Kermit  returns  an exit status of zero, except when a fatal error is en-
  8475. countered, where the exit status is set to  one.    With  background  operation
  8476. (e.g., `&' at end of invoking command line) driven by scripted interactive com-
  8477. mands (redirected standard input and/or take  files),  any  failed  interactive
  8478. command (such as failed dial or script attempt) causes the fatal error exit.
  8479.  
  8480.  
  8481. 6.4. Interactive Operation
  8482.  
  8483. C-Kermit's  interactive  command  prompt  is  "C-Kermit>".  In response to this
  8484. prompt, you may type any valid interactive C-Kermit command.  C-Kermit executes
  8485. the  command  and  then prompts you for another command.  The process continues
  8486. until you instruct the program to terminate.
  8487.  
  8488. Commands begin with a keyword, normally an English verb, such as "send".    You
  8489. may  omit  trailing  characters  from  any keyword, so long as you specify suf-
  8490. 6.4. Interactive Operation                                             Page 153
  8491.  
  8492. -------------------------------------------------------------------------------
  8493. ficient characters to distinguish it from  any  other  keyword  valid  in  that
  8494. field.    Certain commonly-used keywords (such as "send", "receive", "connect")
  8495. also have special non-unique abbreviations ("s" for "send", "r" for  "receive",
  8496. "c" for "connect").
  8497.  
  8498. Certain  characters  have  special  functions during typein of interactive com-
  8499. mands:
  8500.  
  8501.     ?   Question mark, typed at any point in a command, will produce a  message
  8502.         explaining  what  is  possible or expected at that point.  Depending on
  8503.         the context, the message may be a brief phrase, a menu of keywords,  or
  8504.         a list of files.
  8505.  
  8506.     ESC (The  Escape  or  Altmode  key)  --  Request  completion of the current
  8507.         keyword or filename, or insertion of a default value.  The result  will
  8508.         be a beep if the requested operation fails.
  8509.  
  8510.     DEL (The  Delete  or  Rubout key) -- Delete the previous character from the
  8511.         command.  You may also use BS (Backspace, Control-H) for this function.
  8512.  
  8513.     ^W  (Control-W) -- Erase the rightmost word from the command line.
  8514.  
  8515.     ^U  (Control-U) -- Erase the entire command.
  8516.  
  8517.     ^R  (Control-R) -- Redisplay the current command.
  8518.  
  8519.     SP  (Space) -- Delimits fields (keywords, filenames, numbers) within a com-
  8520.         mand.  HT (Horizontal Tab) may also be used for this purpose.
  8521.  
  8522.     CR  (Carriage  Return)  -- Enters the command for execution.  LF (Linefeed)
  8523.         or FF (formfeed) may also be used for this purpose.
  8524.  
  8525.     \   (Backslash) -- Enter any of the  above  characters  into  the  command,
  8526.         literally.    To enter a backslash, type two backslashes in a row (\\).
  8527.         A backslash at the end of a command line causes the  next  line  to  be
  8528.         treated  as a continuation line; this is useful for readability in com-
  8529.         mand files, especially in the 'script' command.
  8530.  
  8531.     ^Z  (Control-Z) -- On systems (like Berkeley Unix, Ultrix)  with  job  con-
  8532.         trol,  suspend  Kermit,  i.e. put it into the  background in such a way
  8533.         that it can be brought back into the  foreground  (e.g.  with  an  'fg'
  8534.         shell command) with all its settings intact.
  8535.  
  8536. You  may  type  the editing characters (DEL, ^W, etc) repeatedly, to delete all
  8537. the way back to the prompt.  No action will be performed until the  command  is
  8538. entered by typing carriage return, linefeed, or formfeed.  If you make any mis-
  8539. takes, you will receive an informative error message and a new prompt  --  make
  8540. liberal  use  of `?' and ESC to feel your way through the commands.  One impor-
  8541. tant command is "help" -- you should use it the first time you run C-Kermit.
  8542.  
  8543. A command line beginning with a percent sign "%" is ignored.  Such lines may be
  8544. used to include illustrative commentary in Kermit command dialogs.
  8545.  
  8546. Interactive  C-Kermit accepts commands from files as well as from the keyboard.
  8547. When you start C-Kermit, the program looks for the file .kermrc in your home or
  8548. current  directory  (first  it looks in the home directory, then in the current
  8549. 6.4. Interactive Operation                                             Page 154
  8550.  
  8551. -------------------------------------------------------------------------------
  8552. one) and executes any commands it finds there.  These commands must be  in  in-
  8553. teractive  format,  not  Unix  command-line  format.   A "take" command is also
  8554. provided  for  use  at  any  time  during  an  interactive  session,  to  allow
  8555. interactive-format  commands  to  be executed from a file; command files may be
  8556. nested to any reasonable depth.
  8557.  
  8558. Here is a brief list of C-Kermit interactive commands:
  8559.  
  8560.               %  Comment
  8561.               !  Execute a Unix shell command, or start a shell.
  8562.             bye  Terminate and log out a remote Kermit server.
  8563.           close  Close a log file.
  8564.         connect  Establish a terminal connection to a remote system.
  8565.             cwd  Change Working Directory.
  8566.            dial  Dial a telephone number.
  8567.       directory  Display a directory listing.
  8568.            echo  Display arguments literally.
  8569.            exit  Exit from the program, closing any open files.
  8570.          finish  Instruct a remote Kermit server to exit, but not log out.
  8571.             get  Get files from a remote Kermit server.
  8572.            help  Display a help message for a given command.
  8573.             log  Open a log file -- debugging, packet, session, transaction.
  8574.            quit  Same as 'exit'.
  8575.         receive  Passively wait for files to arrive.
  8576.          remote  Issue file management commands to a remote Kermit server.
  8577.          script  Execute a login script with a remote system.
  8578.            send  Send files.
  8579.          server  Begin server operation.
  8580.             set  Set various parameters.
  8581.            show  Display values of 'set' parameters.
  8582.           space  Display current disk space usage.
  8583.      statistics  Display statistics about most recent transaction.
  8584.            take  Execute commands from a file.
  8585.  
  8586. The 'set' parameters are:
  8587.  
  8588.     block-check  Level of packet error detection.
  8589.           delay  How long to wait before sending first packet.
  8590.          duplex  Specify which side echoes during 'connect'.
  8591.     escape-character  Prefix for "escape commands" during 'connect'.
  8592.            file  Set various file parameters.
  8593.    flow-control  Communication line full-duplex flow control.
  8594.       handshake  Communication line half-duplex turnaround character.
  8595.      incomplete  Disposition for incompletely received files.
  8596.            line  Communication line device name.
  8597.    modem-dialer  Type of modem-dialer on communication line.
  8598.          parity  Communication line character parity.
  8599.          prompt  The C-Kermit program's interactive command prompt.
  8600.         receive  Parameters for inbound packets.
  8601.           retry  Packet retransmission limit.
  8602.            send  Parameters for outbound packets.
  8603.           speed  Communication line speed.
  8604.        terminal  Terminal parameters.
  8605.  
  8606. The 'remote' commands are:
  8607. 6.4. Interactive Operation                                             Page 155
  8608.  
  8609. -------------------------------------------------------------------------------
  8610.             cwd  Change remote working directory.
  8611.          delete  Delete remote files.
  8612.       directory  Display a listing of remote file names.
  8613.            help  Request help from a remote server.
  8614.            host  A command to the remote host in its own command language.
  8615.           space  Display current disk space usage on remote system.
  8616.            type  Display a remote file on your screen.
  8617.             who  Display who's logged in, or get information about a user.
  8618.  
  8619. Most of these commands are described adequately in the Kermit User Guide or the
  8620. Kermit  book.    Special  aspects of certain Unix Kermit commands are described
  8621. below.
  8622.  
  8623.  
  8624.                               THE 'SEND' COMMAND
  8625.  
  8626. Syntax:  send fn  - or -  send fn1 rfn1
  8627.  
  8628. Send the file or files denoted by fn to the other Kermit, which should be  run-
  8629. ning as a server, or which should be given the 'receive' command.  Each file is
  8630. sent under its own name (as described above, or as specified by the  'set  file
  8631. names'  command).  If the second form of the 'send' command is used, i.e.  with
  8632. fn1 denoting a single Unix file, rfn1 may be specified as a name to send it un-
  8633. der.    The  'send' command may be abbreviated to 's', even though 's' is not a
  8634. unique abbreviation for a top-level C-Kermit command.
  8635.  
  8636. The wildcard (meta) characters `*' and `?' are accepted in fn.  If `?' is to be
  8637. included, it must be prefixed by `\' to override its normal function of provid-
  8638. ing help.  `*' matches any string, `?' matches any  single  character.    Other
  8639. notations  for  file  groups,  like `[a-z]og', are not available in interactive
  8640. commands (though of course they are available on the command line).    When  fn
  8641. contains  `*'  or  `?' characters, there is a limit to the number of files that
  8642. can be matched, which varies from system to system.  If  you  get  the  message
  8643. "Too many files match" then you'll have to make a more judicious selection.  If
  8644. fn was of the form 
  8645.  
  8646.   usr/longname/anotherlongname/*
  8647.  
  8648. then C-Kermit's string space will fill up rapidly  --  try  doing  a  cwd  (see
  8649. below) to the path in question and reissuing the command.
  8650.  
  8651. Note  --  C-Kermit sends only from the current or specified directory.  It does
  8652. not traverse directory trees.  If the source directory contains subdirectories,
  8653. they  will be skipped.  By the same token, C-Kermit does not create directories
  8654. when receiving files.  If you have a need to do this, you can pipe tar  through
  8655. C-Kermit,  as  shown in the example on page 152, or under System III/V Unix you
  8656. can use cpio.
  8657.  
  8658. Another Note -- The 'send' command does not skip over  "invisible"  files  that
  8659. match  the  file  specification;  Unix  systems usually treat files whose names
  8660. start with a dot (like .login, .cshrc, and .kermrc) as  invisible.    Similarly
  8661. for "temporary" files whose names start with "#".
  8662. 6.4. Interactive Operation                                             Page 156
  8663.  
  8664. -------------------------------------------------------------------------------
  8665.                              THE 'RECEIVE' COMMAND
  8666.  
  8667. Syntax:  receive  - or -  receive fn1
  8668.  
  8669. Passively  wait  for files to arrive from the other Kermit, which must be given
  8670. the 'send' command -- the 'receive' command does not work in conjunction with a
  8671. server  (use  'get'  for  that).  If fn1 is specified, store the first incoming
  8672. file under that name.  The 'receive' command may be abbreviated to 'r'.
  8673.  
  8674.  
  8675.                               THE 'GET' COMMAND:
  8676.  
  8677. Syntax:  get rfn
  8678.  
  8679.       or: get
  8680.               rfn
  8681.               fn1
  8682.  
  8683. Request a remote Kermit server to send the named file or files.  Since a remote
  8684. file  specification  (or  list)  might  contain  spaces, which normally delimit
  8685. fields of a C-Kermit command, an alternate form of the command is  provided  to
  8686. allow  the inbound file to be given a new name: type 'get' alone on a line, and
  8687. you will be prompted separately for the remote and local  file  specifications,
  8688. for example
  8689.  
  8690.   C-Kermit>get
  8691.    Remote file specification: profile exec
  8692.    Local name to store it under: profile.exec
  8693.  
  8694. As  with 'receive', if more than one file arrives as a result of the 'get' com-
  8695. mand, only the first will be stored under the alternate name given by fn1;  the
  8696. remaining  files will be stored under their own names if possible.  If a `?' is
  8697. to be included in the remote file specification, you must prefix it with `\' to
  8698. suppress its normal function of providing help.
  8699.  
  8700. If  you  have started a multiline 'get' command, you may escape from its lower-
  8701. level prompts by typing a carriage return in response to the prompt, e.g.
  8702.  
  8703.   C-Kermit>get
  8704.    Remote file specification: foo
  8705.    Local name to store it under: (Type a carriage return here)
  8706.   (cancelled)
  8707.   C-Kermit>
  8708.  
  8709.  
  8710.                              THE 'SERVER' COMMAND:
  8711.  
  8712. The 'server' command places C-Kermit in "server mode" on the currently selected
  8713. communication  line.   All further commands must arrive as valid Kermit packets
  8714. from the Kermit on the other end of the line.    The  Unix  Kermit  server  can
  8715. respond to the following commands:
  8716.  
  8717. Command                Server Response
  8718.   get                    Sends files
  8719.   send                   Receives files
  8720.   bye                    Attempts to log itself out
  8721. 6.4. Interactive Operation                                             Page 157
  8722.  
  8723. -------------------------------------------------------------------------------
  8724.   finish                 Exits to level from which it was invoked
  8725.   remote directory       Sends directory lising
  8726.   remote delete          Removes files
  8727.   remote cwd             Changes working directory
  8728.   remote type            Sends files to your screen
  8729.   remote space           Reports about its disk usage
  8730.   remote who             Shows who's logged in
  8731.   remote host            Executes a Unix shell command
  8732.   remote help            Lists these capabilities
  8733.  
  8734. The  Unix  Kermit  server  cannot always respond properly to a BYE command.  It
  8735. will attempt to do so using "kill()", but this will not work on all systems  or
  8736. under  all conditions because of the complicated process structures that can be
  8737. set up under Unix.
  8738.  
  8739. If the Kermit server is directed at an external line  (i.e.  it  is  in  "local
  8740. mode")  then  the console may be used for other work if you have 'set file dis-
  8741. play off'; normally the program expects the console to be used to observe  file
  8742. transfers  and  enter  status queries or interruption commands.  The way to get
  8743. C-Kermit into background operation from interactive command level  varies  from
  8744. system  to system (e.g. on Berkeley Unix you would halt the program with ^Z and
  8745. then use the C-Shell 'bg' command to continue it in the background).  The  more
  8746. common method is to invoke the program with the desired command line arguments,
  8747. including "-q", and with a terminating "&".
  8748.  
  8749. When the Unix Kermit server is given a 'remote host' command,  it  executes  it
  8750. using  the  shell  invoked  upon  login,  e.g. the Bourne shell or the Berkeley
  8751. C-Shell.
  8752.  
  8753.  
  8754.                   THE 'REMOTE', 'BYE', AND 'FINISH' COMMANDS:
  8755.  
  8756. C-Kermit may itself request services from a remote Kermit server.  In  addition
  8757. to 'send' and 'get', the following commands may also be sent from C-Kermit to a
  8758. Kermit server:
  8759.  
  8760.     remote cwd [directory]
  8761.         If the optional remote directory specification is included, you will be
  8762.         prompted on a separate line for a password, which will not echo as  you
  8763.         type  it.    If  the remote system does not require a password for this
  8764.         operation, just type a carriage return.
  8765.  
  8766.     remote delete rfn       delete remote file or files.
  8767.     remote directory [rfn]  directory listing of remote files.
  8768.     remote host command     command in remote host's own command language.
  8769.     remote space            disk usage report from remote host.
  8770.     remote type [rfn]       display remote file or files on the screen.
  8771.     remote who [user]       display information about who's logged in.
  8772.     remote help             display remote server's capabilities.
  8773.  
  8774.     bye and finish:
  8775.         When  connected  to  a  remote  Kermit server, these commands cause the
  8776.         remote server to terminate; 'finish' returns it  to  Kermit  or  system
  8777.         command  level  (depending on the implementation or how the program was
  8778.         invoked); 'bye' also requests it to log itself out.
  8779. 6.4. Interactive Operation                                             Page 158
  8780.  
  8781. -------------------------------------------------------------------------------
  8782.                         THE 'LOG' AND 'CLOSE' COMMANDS:
  8783.  
  8784. Syntax: log {debugging, packets, session, transactions} [ fn1 ]
  8785.  
  8786. C-Kermit's progress may be logged in various ways.  The 'log' command  opens  a
  8787. log,  the  'close' command closes it.  In addition, all open logs are closed by
  8788. the 'exit' and 'quit' commands.  A name may be specified for a log file; if the
  8789. name is omitted, the file is created with a default name as shown below.
  8790.  
  8791. log debugging
  8792.     This produces a voluminous log of the internal workings of C-Kermit, of use
  8793.     to  Kermit developers or maintainers in tracking down suspected bugs in the
  8794.     C-Kermit program.  Use of this feature dramatically slows down  the  Kermit
  8795.     protocol.  Default name: debug.log.
  8796.  
  8797. log packets
  8798.     This produces a record of all the packets that go in and out  of  the  com-
  8799.     munication port.  This log is of use to Kermit maintainers who are tracking
  8800.     down protocol problems in either C-Kermit or any Kermit  that  C-Kermit  is
  8801.     connected to.  Default name:  packet.log.
  8802.  
  8803. log session
  8804.     This log will contain a copy of everything you see on  your  screen  during
  8805.     the  'connect' command, except for local messages or interaction with local
  8806.     escape commands.  Default name:  session.log.
  8807.  
  8808. log transactions
  8809.     The transaction log is a record of all the files that were sent or received
  8810.     while transaction logging was in effect.    It  includes  time  stamps  and
  8811.     statistics,  filename  transformations,  and records of any errors that may
  8812.     have occurred.  The transaction log allows you to have long unattended file
  8813.     transfer  sessions  without  fear  of  missing  some  vital screen message.
  8814.     Default name:  transact.log.
  8815.  
  8816. The 'close' command explicitly closes a log, e.g. 'close debug'.
  8817.  
  8818. Note:  Debug and Transaction logs are a compile-time option;  C-Kermit  may  be
  8819. compiled  without these logs, in which case it will run faster, it will take up
  8820. less space on the disk, and the commands relating to them will not be present.
  8821.  
  8822.  
  8823.                         LOCAL FILE MANAGEMENT COMMANDS:
  8824.  
  8825. Unix Kermit allows some degree of local file management from  interactive  com-
  8826. mand level:
  8827.  
  8828. directory [fn]
  8829.     Displays a listing of the names, modes, sizes, and dates of files  matching
  8830.     fn (which defaults to `*').  Equivalent to `ls -l'.
  8831.  
  8832. cwd [directory-name]
  8833.     Changes Kermit's working directory to the one  given,  or  to  the  default
  8834.     directory  if the directory name is omitted.  This command affects only the
  8835.     Kermit process and any processes it may subsequently create.
  8836.  
  8837. space
  8838. 6.4. Interactive Operation                                             Page 159
  8839.  
  8840. -------------------------------------------------------------------------------
  8841.     Display  information about disk space and/or quota in the current directory
  8842.     and device.
  8843.  
  8844. ! [command]
  8845.     The  command  is  executed  by the Unix shell.  If no command is specified,
  8846.     then an interactive shell is started;  exiting  from  the  shell,  e.g.  by
  8847.     typing Control-D or 'exit', will return you to C-Kermit command level.  Use
  8848.     the `!' command to provide file  management  or  other  functions  not  ex-
  8849.     plicitly  provided  by  C-Kermit  commands.    The  `!' command has certain
  8850.     peculiarities:
  8851.  
  8852.        - C-Kermit attempts to use your preferred, customary (login) shell.
  8853.        - At least one space must separate the '!' from the shell command.
  8854.        - A 'cd' (change directory) command executed in  this  manner  will
  8855.          have no effect -- use the C-Kermit 'cwd' command instead.
  8856.  
  8857.  
  8858.                         THE 'SET' AND 'SHOW' COMMANDS:
  8859.  
  8860. Since  Kermit  is designed to allow diverse systems to communicate, it is often
  8861. necessary to issue special instructions  to  allow  the  program  to  adapt  to
  8862. peculiarities  of the another system or the communication path.  These instruc-
  8863. tions are accomplished by the 'set' command.  The 'show' command may be used to
  8864. display  current  settings.   Here is a brief synopsis of settings available in
  8865. the current release of C-Kermit:
  8866.  
  8867. block-check {1, 2, 3}
  8868.     Determines  the  level  of  per-packet  error  detection.  "1" is a single-
  8869.     character 6-bit checksum, folded to include the values  of  all  bits  from
  8870.     each  character.    "2"  is  a  2-character,  12-bit  checksum.    "3" is a
  8871.     3-character, 16-bit cyclic redundancy check (CRC).  The  higher  the  block
  8872.     check,  the  better  the  error detection and correction and the higher the
  8873.     resulting overhead.  Type 1 is most commonly used; it is supported  by  all
  8874.     Kermit  implementations,  and it has proven adequate in most circumstances.
  8875.     Types 2 or 3 would be used to  advantage  when  transferring  8-bit  binary
  8876.     files over noisy lines.
  8877.  
  8878. delay n
  8879.     How many seconds to wait before sending the first  packet  after  a  'send'
  8880.     command.  Used in remote mode to give you time to escape back to your local
  8881.     Kermit and issue a 'receive' command.  Normally 5 seconds.
  8882.  
  8883. duplex {full, half}
  8884.     For  use  during  'connect'.    Specifies  which side is doing the echoing;
  8885.     'full' means the other side, 'half' means C-Kermit must echo typein itself.
  8886.  
  8887. escape-character cc
  8888.     For use during 'connect' to get C-Kermit's attention.  The escape character
  8889.     acts as a prefix to an 'escape command', for instance to close the  connec-
  8890.     tion  and  return  to  C-Kermit  or  Unix command level.  The normal escape
  8891.     character is Control-Backslash (28).  The escape character is also used  in
  8892.     System  III/V  implementations  to  prefix  interrupt  commands during file
  8893.     transfers.
  8894.  
  8895. file {display, names, type, warning}
  8896.     Establish various file-related parameters:
  8897. 6.4. Interactive Operation                                             Page 160
  8898.  
  8899. -------------------------------------------------------------------------------
  8900.     display {on, off}
  8901.         Normally 'on'; when in local mode, display progress of  file  transfers
  8902.         on  the  screen (stdout), and listen to the keyboard (stdin) for inter-
  8903.         ruptions.  If off (-q on command line) none of this is  done,  and  the
  8904.         file transfer may proceed in the background oblivious to any other work
  8905.         concurrently done at the console terminal.
  8906.  
  8907.     names {converted, literal}
  8908.         Normally  converted,  which  means  that  outbound  filenames have path
  8909.         specifications stripped, lowercase letters raised to upper, tildes  and
  8910.         extra  periods  changed  to X's, and an X inserted in front of any name
  8911.         that starts  with  period.    Incoming  files  have  uppercase  letters
  8912.         lowered.  Literal means that none of these conversions are done; there-
  8913.         fore, any directory path appearing in  a  received  file  specification
  8914.         must exist and be write-accessible.  When literal naming is being used,
  8915.         the sender should not use path names in the file  specification  unless
  8916.         the same path exists on the target system and is writable.
  8917.  
  8918.     type {binary, text} [{7, 8}]
  8919.         The file type is normally text, which means that conversion is done be-
  8920.         tween  Unix  newline  characters  and  the carriage-return/linefeed se-
  8921.         quences required by the canonical Kermit file transmission format,  and
  8922.         in  common use on non-Unix systems.  Binary means to transmit file con-
  8923.         tents without conversion.  Binary (`-i' in command  line  notation)  is
  8924.         necessary  for  binary  files, and desirable in all Unix-to-Unix trans-
  8925.         actions to cut down on overhead.
  8926.  
  8927.         The optional trailing parameter tells the bytesize for  file  transfer.
  8928.         It  is  8  by  default.    If you specify 7, the high order bit will be
  8929.         stripped from each byte of sent and received files.  This is useful for
  8930.         transferring text files that may have extraneous high order bits set in
  8931.         their disk representation (e.g.  Wordstar  or  similar  word  processor
  8932.         files).
  8933.  
  8934.     warning {on, off}
  8935.         Normally off, which means that incoming files will  silently  overwrite
  8936.         existing files of the same name.  When on (`-w' on command line) Kermit
  8937.         will check if an arriving file would overwrite an existing file; if so,
  8938.         it  will construct a new name for the arriving file, of the form foo~n,
  8939.         where foo is the name they share and n is a "generation number"; if foo
  8940.         exists,  then  the new file will be called foo~1.  If foo and foo~1 ex-
  8941.         ist, the new file will be foo~2, and so on.  If the new name  would  be
  8942.         longer than the maximum length for a filename, then characters would be
  8943.         deleted from the end first, for instance, thelongestname  on  a  system
  8944.         with a limit of 14 characters would become thelongestn~1.
  8945.  
  8946.             CAUTION:  If Control-F or Control-B is used to cancel an incom-
  8947.             ing file, and a file of the same name previously  existed,  and
  8948.             the  "file  warning"  feature is not enabled, then the previous
  8949.             copy of the file will disappear.
  8950.  
  8951. flow-control {none, xon/xoff}
  8952.     Normally xon/xoff for full duplex flow control.  Should be set to 'none' if
  8953.     the other system cannot do xon/xoff flow control, or if you have  issued  a
  8954.     'set  handshake' command.  If set to xon/xoff, then handshake should be set
  8955.     to none.  This setting applies during both  terminal  connection  and  file
  8956. 6.4. Interactive Operation                                             Page 161
  8957.  
  8958. -------------------------------------------------------------------------------
  8959.     transfer.    Warning:  This command may have no effect on certain Unix sys-
  8960.     tems, where Kermit puts the communication line into 'rawmode', and  rawmode
  8961.     precludes flow control.
  8962.  
  8963. incomplete {discard, keep}
  8964.     Disposition for incompletely received files.  If an incoming file is inter-
  8965.     rupted  or  an  error occurs during transfer, the part that was received so
  8966.     far is normally discarded.  If you "set incomplete  keep"  then  such  file
  8967.     fragments will be kept.
  8968.  
  8969. handshake {xon, xoff, cr, lf, bell, esc, none}
  8970.     Normally none.  Otherwise, half-duplex communication line turnaround  hand-
  8971.     shaking  is  done, which means Unix Kermit will not reply to a packet until
  8972.     it has received the indicated handshake character or has timed out  waiting
  8973.     for  it;  the  handshake setting applies only during file transfer.  If you
  8974.     set handshake to other than none, then flow should be set to none.
  8975.  
  8976. line [device-name]
  8977.     The device name for the communication line to be used for file transfer and
  8978.     terminal connection, e.g. /dev/ttyi3.  If you specify a device name, Kermit
  8979.     will be in local mode, and you should remember to issue any other necessary
  8980.     'set' commands, such as 'set speed'.  If you omit the device  name,  Kermit
  8981.     will  revert  to  its  default mode of operation.  If you specify /dev/tty,
  8982.     Kermit will enter remote mode (useful when  logged  in  through  the  "back
  8983.     port"  of  a  system normally used as a local-mode workstation).  When Unix
  8984.     Kermit enters local mode, it attempts to synchronize  with  other  programs
  8985.     (like  uucp)  that  use  external  communication lines so as to prevent two
  8986.     programs using the same  line  at  once;  before  attempting  to  lock  the
  8987.     specified  line,  it  will  close  and  unlock  any  external line that was
  8988.     previously in use.  The method used for locking is the  "uucp  lock  file",
  8989.     explained in more detail later.
  8990.  
  8991. modem-dialer {direct, hayes, racalvadic, ventel, ...}
  8992.     The type of modem dialer on the communication line.  "Direct" indicates ei-
  8993.     ther there is no dialout modem, or that if the line requires carrier detec-
  8994.     tion to open, then 'set line' will  hang  waiting  for  an  incoming  call.
  8995.     "Hayes",  "Ventel",  and  the  others  indicate  that 'set line' (or the -l
  8996.     argument) will prepare for  a  subsequent  'dial'  command  for  the  given
  8997.     dialer.    Support for new dialers is added from time to time, so type 'set
  8998.     modem ?' for a list of those supported in your copy of  Kermit.    See  the
  8999.     description of the 'dial' command
  9000.  
  9001. parity {even, odd, mark, space, none}
  9002.     Specify character parity for use in packets and terminal  connection,  nor-
  9003.     mally  none.    If  other  than none, C-Kermit will seek to use the 8th-bit
  9004.     prefixing mechanism for transferring 8-bit binary data, which can  be  used
  9005.     successfully  only  if  the  other Kermit agrees; if not, 8-bit binary data
  9006.     cannot be successfully transferred.
  9007.  
  9008. prompt [string]
  9009.     The  given  string  will  be  substituted for "C-Kermit>" as this program's
  9010.     prompt.  If the string is omitted, the prompt will revert  to  "C-Kermit>".
  9011.     If  the string is enclosed in doublequotes, the quotes will be stripped and
  9012.     any leading and trailing blanks will be retained.
  9013.  
  9014. send parameter
  9015. 6.4. Interactive Operation                                             Page 162
  9016.  
  9017. -------------------------------------------------------------------------------
  9018.     Establish  parameters to use when sending packets.  These will be in effect
  9019.     only for the initial packet sent, since the other Kermit may override these
  9020.     parameters during the protocol parameter exchange (unless noted below).
  9021.  
  9022.     end-of-packet cc
  9023.         Specifies the control character needed by the other Kermit to recognize
  9024.         the  end of a packet.  C-Kermit sends this character at the end of each
  9025.         packet.  Normally 13 (carriage return),  which  most  Kermit  implemen-
  9026.         tations  require.    Other  Kermits require no terminator at all, still
  9027.         others may require a different terminator, like linefeed (10).
  9028.  
  9029.     packet-length n
  9030.         Specify  the  maximum  packet  length  to  send.  Normally 90.  Shorter
  9031.         packet lengths can be useful on noisy lines, or with systems  or  front
  9032.         ends  or networks that have small buffers.  The shorter the packet, the
  9033.         higher the overhead, but the lower the chance of a  packet  being  cor-
  9034.         rupted  by  noise,  and  the less time to retransmit corrupted packets.
  9035.         This command overrides the value requested by the other  Kermit  during
  9036.         protocol initiation unless the other Kermit requests a shorter length.
  9037.  
  9038.     pad-character cc
  9039.         Designate a character to send before each packet.   Normally,  none  is
  9040.         sent.    Outbound padding is sometimes necessary for communicating with
  9041.         slow half duplex systems that provide no other means of line turnaround
  9042.         control.   It can also be used to send special characters to communica-
  9043.         tions equipment that needs to be put  in  "transparent"  or  "no  echo"
  9044.         mode,  when this can be accomplished in by feeding it a certain control
  9045.         character.
  9046.  
  9047.     padding n
  9048.         How many pad characters to send, normally 0.
  9049.  
  9050.     start-of-packet cc
  9051.         The normal Kermit packet prefix is Control-A (1); this command  changes
  9052.         the  prefix  C-Kermit  puts on outbound packets.  The only reasons this
  9053.         should ever be changed would be: Some piece of equipment somewhere  be-
  9054.         tween  the  two  Kermit programs will not pass through a Control-A; or,
  9055.         some piece of of equipment similarly placed is echoing its input.    In
  9056.         the  latter  case,  the recipient of such an echo can change the packet
  9057.         prefix for outbound packets to be different from that of arriving pack-
  9058.         ets,  so  that the echoed packets will be ignored.  The opposite Kermit
  9059.         must also be told to change the prefix for its inbound packets.
  9060.  
  9061.     timeout n
  9062.         Specifies the number of seconds you want the other Kermit to wait for a
  9063.         packet before timing it out and requesting retransmission.
  9064.  
  9065. receive parameter
  9066.     Establish  parameters to request the other Kermit to use when sending pack-
  9067.     ets.
  9068.  
  9069.     end-of-packet cc
  9070.         Requests  the  other Kermit to terminate its packets with the specified
  9071.         character.
  9072.  
  9073.     packet-length n
  9074. 6.4. Interactive Operation                                             Page 163
  9075.  
  9076. -------------------------------------------------------------------------------
  9077.         Specify  the maximum packet length to that you want the other Kermit to
  9078.         send, normally 90.  If you specify a length of 95 or greater,  then  it
  9079.         will  be used if the other Kermit supports, and agrees to use, the Ker-
  9080.         mit protocol extension for long packets.  In  this  case,  the  maximum
  9081.         length  depends  upon the systems involved, but there would normally be
  9082.         no reason for packets to be more than about 1000 characters in  length.
  9083.         The  'show  parameters' command displays C-Kermit's current and maximum
  9084.         packet lengths.
  9085.  
  9086.     pad-character cc
  9087.         C-Kermit  normally does not need to have incoming packets preceded with
  9088.         pad characters.  This command allows C-Kermit to request the other Ker-
  9089.         mit to use cc as a pad character.  Default cc is NUL, ASCII 0.
  9090.  
  9091.     padding n
  9092.         How many pad characters to ask for, normally 0.
  9093.  
  9094.     start-of-packet cc
  9095.         Change  the  prefix C-Kermit looks for on inbound packets to correspond
  9096.         with what the other Kermit is sending.
  9097.  
  9098.     timeout n
  9099.         Normally, each Kermit partner sets its packet timeout interval based on
  9100.         what the opposite Kermit requests.  This command allows you to override
  9101.         the  normal procedure and specify a timeout interval for Unix Kermit to
  9102.         use when waiting for packets from the other Kermit.  If you specify  0,
  9103.         then  no timeouts will occur, and Unix Kermit will wait forever for ex-
  9104.         pected packets to arrive.
  9105.  
  9106. speed {0, 110, 150, 300, 600, 1200, 1800, 2400, 4800, 9600}
  9107.     The  baud rate for the external communication line.  This command cannot be
  9108.     used to change the speed of your own console terminal.  Many  Unix  systems
  9109.     are set up in such a way that you must give this command after a 'set line'
  9110.     command before you can use the line.  'set baud'  is  a  synomym  for  'set
  9111.     speed'.
  9112.  
  9113. terminal
  9114.     Used for specifying terminal parameters.  Currently, 'bytesize' is the only
  9115.     parameter provided, and it can be set to 7 or 8.  It's 7 by default.
  9116.  
  9117.  
  9118.                               THE 'SHOW' COMMAND:
  9119.  
  9120. Syntax: show {parameters, versions}
  9121.  
  9122. The  "show"  command  with  the  default  argument of "parameters" displays the
  9123. values of all the  'set'  parameters  described  above.    If  you  type  "show
  9124. versions",  then C-Kermit will display the version numbers and dates of all its
  9125. internal modules.  You should use the "show versions" command to ascertain  the
  9126. vintage of your Kermit program before reporting problems to Kermit maintainers.
  9127. 6.4. Interactive Operation                                             Page 164
  9128.  
  9129. -------------------------------------------------------------------------------
  9130.                            THE 'STATISTICS' COMMAND:
  9131.  
  9132. The  statistics  command  displays  information  about  the  most recent Kermit
  9133. protocol transaction, including file and communication line i/o, timing and ef-
  9134. ficiency,  as  well  as  what  encoding options were in effect (such as 8th-bit
  9135. prefixing, repeat-count compression).
  9136.  
  9137.  
  9138.                         THE 'TAKE' AND 'ECHO' COMMANDS:
  9139.  
  9140. Syntax: take fn1
  9141.      echo [text to be echoed]
  9142.  
  9143. The 'take' command instructs C-Kermit to execute commands from the named  file.
  9144. The  file may contain any interactive C-Kermit commands, including 'take'; com-
  9145. mand files may be nested to any reasonable depth, but it may not  contain  text
  9146. to  be sent to a remote system during the 'connect' command.  This means that a
  9147. command file like this:
  9148.  
  9149.   set line /dev/tty17
  9150.   set speed 9600
  9151.   connect
  9152.   login myuserid
  9153.   mypassword
  9154.   etc
  9155.  
  9156. will not send "login myserid" or any of the following text to the  remote  sys-
  9157. tem.  To carry on a canned dialog, use the 'script' command, described later.
  9158.  
  9159. The '%' command is useful for including comments in take-command files.  It may
  9160. only be used at the beginning of a line.
  9161.  
  9162. The 'echo' command may be used within command files  to  issue  greetings,  an-
  9163. nounce progress, ring the terminal bell, etc.  The 'echo' command should not be
  9164. confused with the Unix 'echo' command, which can  be  used  to  show  how  meta
  9165. characters would be expanded.  The Kermit echo command simply displays its text
  9166. argument (almost) literally at the terminal; the argument may contain octal es-
  9167. capes  of the form "\ooo", where o is an octal digit (0-7), and there may be 1,
  9168. 2, or 3 such digits, whose value specify an ASCII character, such as "\007" (or
  9169. "\07"  or  just "\7") for beep, "\012" for newline, etc.  Of course, each back-
  9170. slash must be must be entered twice in order for it to be passed along  to  the
  9171. echo command by the Kermit command parser.
  9172.  
  9173. Take-command  files  are  in  exactly  the same syntax as interactive commands.
  9174. Note that this implies that if you want  to  include  special  characters  like
  9175. question  mark  or  backslash  that you would have to quote with backslash when
  9176. typing interactive commands, you must quote these characters the  same  way  in
  9177. command  files.  Long lines may be continued by ending them with a single back-
  9178. slash.
  9179.  
  9180. Command files may be used in lieu of command macros, which have not been imple-
  9181. mented in this version of C-Kermit.  For instance, if you commonly connect to a
  9182. system called 'B' that is connected to ttyh7 at 4800 baud, you could  create  a
  9183. file called b containing the commands
  9184.  
  9185.   % C-Kermit command file to connect to System B thru /dev/ttyh7
  9186. 6.4. Interactive Operation                                             Page 165
  9187.  
  9188. -------------------------------------------------------------------------------
  9189.   set line /dev/ttyh7
  9190.   set speed 4800
  9191.   % Beep and give message
  9192.   echo \\007Connecting to System B...
  9193.   connect
  9194.  
  9195. and  then simply type 'take b' (or 't b' since no other commands begin with the
  9196. letter 't') whenever you wish to connect to system B. Note  the  comment  lines
  9197. and the beep inserted into the 'echo' command.
  9198.  
  9199. For  connecting  to  IBM  mainframes,  a number of 'set' commands are required;
  9200. these, too, can be conveniently collected into a 'take' file like this one:
  9201.  
  9202.   % Sample C-Kermit command file to set up current line
  9203.   % for IBM mainframe communication
  9204.   %
  9205.   set parity mark
  9206.   set handshake xon
  9207.   set flow-control none
  9208.   set duplex half
  9209.  
  9210. Note that no single command is available to wipe out all of these settings  and
  9211. return  C-Kermit  to its default startup state; to do that, you can either res-
  9212. tart the program, or else make a command file that executes the necessary 'set'
  9213. commands:
  9214.  
  9215.   % Sample C-Kermit command file to restore normal settings
  9216.   %
  9217.   set parity none
  9218.   set handshake none
  9219.   set flow-control xon/xoff
  9220.   set duplex full
  9221.  
  9222. An  implicit  'take'  command  is executed upon your .kermrc file when C-Kermit
  9223. starts up, upon either interactive or command-line  invocation.    The  .kermrc
  9224. file  should  contain  'set'  or other commands you want to be in effect at all
  9225. times.  For instance, you might want override the default action when  incoming
  9226. files have the same names as existing files -- in that case, put the command 
  9227.  
  9228.   set file warning on
  9229.  
  9230. in  your  .kermrc  file.    On some non-Unix systems that run C-Kermit, the in-
  9231. itialization file might have a different name, such as kermit.ini.
  9232.  
  9233. Errors encountered during execution of take files (such as failure to  complete
  9234. dial  or script operations) cause termination of the current take file, popping
  9235. to the level that invoked it (take file,  interactive  level,  or  the  shell).
  9236. When  kermit  is  executed in the background, errors during execution of a take
  9237. file are fatal.
  9238.  
  9239. Under Unix, you may  also  use  the  shell's  redirection  mechanism  to  cause
  9240. C-Kermit to execute commands from a file:  
  9241.  
  9242.   kermit < cmdfile
  9243.  
  9244. or you can even pipe commands in from another process:  
  9245. 6.4. Interactive Operation                                             Page 166
  9246.  
  9247. -------------------------------------------------------------------------------
  9248.   cmdprocess | kermit
  9249.  
  9250.  
  9251.                             THE 'CONNECT' COMMAND:
  9252.  
  9253. The  'connect'  command  ('c'  is  an  acceptable  non-unique  abbreviation for
  9254. 'connect') links your terminal to another computer as if it were a  local  ter-
  9255. minal  to  that  computer, through the device specified in the most recent 'set
  9256. line' command, or through the default device if your system is a PC or worksta-
  9257. tion.   All characters you type at your keyboard are sent out the communication
  9258. line (and if you have 'set duplex half', also displayed on  your  screen),  and
  9259. all  characters arriving at the communication port are displayed on the screen.
  9260. Current settings of speed, parity, duplex, and flow-control  are  honored,  and
  9261. the  data connection is 7 bits wide unless you have given the command 'set ter-
  9262. minal bytesize 8'.  If you have issued a 'log session' command, everything  you
  9263. see  on your screen will also be recorded to your session log.  This provides a
  9264. way to "capture" files from remote systems  that  don't  have  Kermit  programs
  9265. available.
  9266.  
  9267. To  get  back  to your own system, you must type the escape character, which is
  9268. Control-Backslash (^\) unless you have changed it with the  'set  escape'  com-
  9269. mand,   followed  by  a  single-character  command,  such  as  'c'  for  "close
  9270. connection".  Single-character commands include:
  9271.  
  9272.   c     Close the connection
  9273.   b     Send a BREAK signal
  9274.   0     (zero) send a null
  9275.   s     Give a status report about the connection
  9276.   h     Hangup the phone
  9277.   ^\    Send Control-Backslash itself (whatever you  have  defined  the  escape
  9278.         character to be, typed twice in a row sends one copy of it).
  9279.  
  9280. Uppercase  and  control  equivalents  for  (most of) these letters are also ac-
  9281. cepted.  A space typed after the  escape  character  is  ignored.    Any  other
  9282. character will produce a beep.
  9283.  
  9284. The  connect  command simply displays incoming characters on the screen.  It is
  9285. assumed any screen control sequences sent by the host will be  handled  by  the
  9286. firmware  or  emulation  software  in your terminal or PC.  If special terminal
  9287. emulation is desired, then the 'connect' command can invoked from the Unix com-
  9288. mand line (-c or -n), piped through a terminal emulation filter, e.g.  
  9289.  
  9290.   kermit -l /dev/acu -b 1200 -c | tek
  9291.  
  9292.  
  9293.                               THE 'DIAL' COMMAND:
  9294.  
  9295. Syntax: dial telephone-number-string
  9296.  
  9297. This  command  controls  dialout  modems; you should have already issued a "set
  9298. line" and "set speed" command to identify  the  terminal  device,  and  a  "set
  9299. modem"  command  to  identify the type of modem to be used for dialing.  In the
  9300. "dial" command, you supply the phone number and the Kermit program feeds it  to
  9301. the modem in the appropriate format and then interprets dialer return codes and
  9302. modem signals to inform you whether the call was  completed.    The  telephone-
  9303. number-string  may  contain  imbedded  modem-dialer commands, such as comma for
  9304. 6.4. Interactive Operation                                             Page 167
  9305.  
  9306. -------------------------------------------------------------------------------
  9307. Hayes pause, or `&' for Ventel dialtone wait and `%' for Ventel pause  (consult
  9308. your modem manual for details).
  9309.  
  9310. At the time of this writing, support is included for the following modems:
  9311.  
  9312.    - AT&T 7300 Internal Modem
  9313.    - Cermetek Info-Mate 212A
  9314.    - Concord Condor CDS 220
  9315.    - DEC DF03-AC
  9316.    - DEC DF100 Series
  9317.    - DEC DF200 Series
  9318.    - General DataComm 212A/ED
  9319.    - Hayes Smartmodem 1200 and compatibles
  9320.    - Penril
  9321.    - Racal Vadic
  9322.    - US Robotics 212A
  9323.    - Ventel
  9324.  
  9325. Support for new modems is added to the program from time to time; you can check
  9326. the current list by typing "set modem ?".
  9327.  
  9328. The device used for dialing out is the one selected in  the  most  recent  "set
  9329. line"  command  (or on a workstation, the default line if no "set line" command
  9330. was given).  The "dial" command calls locks the path (see the section  on  line
  9331. locking  below) and establishes a call on an exclusive basis.  If it is desired
  9332. to dial a call and then return to the shell (such as to  do  kermit  activities
  9333. depending  on standard in/out redirection), it is necessary to place the dialed
  9334. call under one device name (say, "/dev/cua0") and  then  escape  to  the  shell
  9335. within  Kermit  on a linked device which is separate from the dialed line (say,
  9336. "/dev/cul0").  This is the same technique used by uucp (to allow  locks  to  be
  9337. placed separately for dialing and conversing).
  9338.  
  9339. Because  modem  dialers have strict requirements to override the carrier-detect
  9340. signal most Unix implementations expect, the sequence for dialing is more rigid
  9341. than most other C-Kermit procedures.
  9342.  
  9343. Example one:
  9344.  
  9345.   kermit -l /dev/cul0 -b 1200
  9346.   C-Kermit>set modem-dialer hayes    hint: abbreviate set m h
  9347.   C-Kermit>dial 9,5551212
  9348.   Connected!
  9349.   C-Kermit>connect                   hint: abbreviate c
  9350.   logon, request remote server, etc.
  9351.   ^\c                                escape back
  9352.   C-Kermit> ...
  9353.   C-Kermit>quit                      hint: abbreviate q
  9354.  
  9355. this disconnects modem, and unlocks line.
  9356.  
  9357. Example two:
  9358.  
  9359.   kermit
  9360.   C-Kermit>set modem-dialer ventel
  9361.   C-Kermit>set line /dev/cul0
  9362.   C-Kermit>dial 9&5551212%
  9363. 6.4. Interactive Operation                                             Page 168
  9364.  
  9365. -------------------------------------------------------------------------------
  9366.   Connected!
  9367.   C-Kermit> ...
  9368.  
  9369. Example three:
  9370.  
  9371.   kermit
  9372.   C-Kermit>take my-dial-procedure
  9373.   Connected!
  9374.  
  9375.   file my-dial-procedure:
  9376.   set modem hayes
  9377.   set line /dev/tty99
  9378.   dial 5551212
  9379.   connect
  9380.  
  9381. In  general, C-Kermit requires that the modem provide the "carrier detect" (CD)
  9382. signal when a call is in progress, and remove that signal when  the  call  com-
  9383. pletes  or the line drops.  If a modem switch setting is available to force CD,
  9384. it should normally not be in that setting.  C-Kermit  also  requires  (on  most
  9385. systems)  that  the modem track the computer's "data terminal ready" (DTR) sig-
  9386. nal.  If a switch setting is available to  simulate  DTR  asserted  within  the
  9387. modem,  then  it  should  normally not be in that setting.  Otherwise the modem
  9388. will be unable to hang up at the end of a call or when interrupts are  received
  9389. by Kermit.
  9390.  
  9391. For  Hayes    dialers,  two important switch settings are #1 and #6.  Switch #1
  9392. should be normally be UP so that the modem can act according to your computer's
  9393. DTR signal.  But if your computer, or particular implementation of Kermit, can-
  9394. not control DTR, then switch 1 should be DOWN.  Switch #6 should normally be UP
  9395. so  carrier-detect functions properly (but put it DOWN if you have trouble with
  9396. the UP position).  Switches #2 (English  versus  digit  result  codes)  and  #4
  9397. (Hayes echoes modem commands) may be in either position.
  9398.  
  9399. If  you want to interrupt a dial command in progress (for instance, because you
  9400. just realize that you gave it the wrong number), type a Control-C to  get  back
  9401. to command level.
  9402.  
  9403.  
  9404.                              THE 'SCRIPT' COMMAND:
  9405.  
  9406. Syntax: script expect send [expect send] . . .
  9407.  
  9408. "expect" has the syntax: expect[-send-expect[-send-expect[...]]]
  9409.  
  9410. The  'script'  command  carries  on  a "canned dialog" with a remote system, in
  9411. which data is sent according to the remote system's responses.  The typical use
  9412. is for logging in to a remote system automatically.
  9413.  
  9414. C-Kermit's  script  facility operates in a manner similar to that commonly used
  9415. by the Unix UUCP system's "L.sys" file entries.  A login script is  a  sequence
  9416. of the form:  
  9417.  
  9418.   expect send [expect send] . . .
  9419.  
  9420. where  expect  is a prompt or message to be issued by the remote site, and send
  9421. is the string (names, numbers, etc) to return, and expects are  separated  from
  9422. 6.4. Interactive Operation                                             Page 169
  9423.  
  9424. -------------------------------------------------------------------------------
  9425. sends  by  spaces.  The send may also be the keyword EOT, to send Control-D, or
  9426. BREAK, to send a break signal.  Letters in sends may be prefixed by `~' to send
  9427. special characters, including:
  9428.  
  9429.     ~b  backspace
  9430.     ~s  space
  9431.     ~q  `?'(trapped by Kermit's command interpreter)
  9432.     ~n  linefeed
  9433.     ~r  carriage return
  9434.     ~t  tab
  9435.     ~'  single quote
  9436.     ~~  tilde
  9437.     ~"  double quote
  9438.     ~x  XON (Control-Q)
  9439.     ~c  don't append a carriage return
  9440.     ~o[o[o]]  an octal character
  9441.     ~d  delay approx 1/3 second during send
  9442.     ~w[d[d]]  wait specified interval during expect, then time out
  9443.  
  9444. As  with  some UUCP systems, sent strings are followed by ~r unless they have a
  9445. ~c.
  9446.  
  9447. Only the last 7 characters in each expect are matched.  A null expect, e.g.  ~0
  9448. or two adjacent dashes, causes a short delay before proceeding to the next send
  9449. sequence.  A null expect always succeeds.
  9450.  
  9451. As with UUCP, if the expect string does not arrive, the script  attempt  fails.
  9452. If  you  expect that a sequence might not arrive, as with UUCP, conditional se-
  9453. quences may be expressed in the form:  
  9454.  
  9455.   -send-expect[-send-expect[...]]
  9456.  
  9457. where dashed sequences are followed as long as previous expects fail.  Timeouts
  9458. for expects can be specified using ~w; ~w with no arguments waits 15 seconds.
  9459.  
  9460. Expect/send  transactions  can  be  easily be debugged by logging transactions.
  9461. This records all exchanges, both expected and actual.    The  script  execution
  9462. will also be logged in the session log, if that is activated.
  9463.  
  9464. Note that `\' characters in login scripts, as in any other C-Kermit interactive
  9465. commands, must be doubled up.  A line may be ended with a single `\'  for  con-
  9466. tinuation.
  9467.  
  9468. Example one:
  9469.  
  9470. Using  a  modem,  dial  a  UNIX  host site.  Expect "login" (...gin), and if it
  9471. doesn't come, simply send a null string with a ~r.  (Some Unixes require either
  9472. an  EOT  or  a  BREAK instead of the null sequence, depending on the particular
  9473. site's "logger" program.)  After providing user id and password, respond "x" to
  9474. a  question-mark prompt, expect the Bourne shell "$" prompt (and send return if
  9475. it doesn't arrive).  Then cd to directory kermit, and run  the  program  called
  9476. "wermit", entering the interactive connect state after wermit is loaded.
  9477.  
  9478.   set modem ventel
  9479.   set line /dev/tty77
  9480.   set baud 1200
  9481. 6.4. Interactive Operation                                             Page 170
  9482.  
  9483. -------------------------------------------------------------------------------
  9484.   dial 9&5551212
  9485.   script gin:--gin:--gin: smith ssword: mysecret ~q x $--$ \
  9486.    cd~skermit $ wermit
  9487.   connect
  9488.  
  9489. Note  that  'set  line'  is  issued after 'set modem', but before 'set baud' or
  9490. other line-related parameters.
  9491.  
  9492. Example two:
  9493.  
  9494. Using a modem, dial the Telenet network.  This network  expects  three  returns
  9495. with  slight  delays between them.  These are sent following null expects.  The
  9496. single return is here sent as a null string, with a return appended by default.
  9497. Four  returns  are  sent  to  be  safe before looking for the prompt.  Then the
  9498. Telenet id and password are entered.  Then Telenet is instructed to connect  to
  9499. a  host  site  (c 12345).  The host has a data switch that asks "which system";
  9500. the script responds "myhost" (if the "which system" prompt doesn't appear,  the
  9501. Telenet  connect command is reissued).  The script waits for an "@" prompt from
  9502. the host, then sends the user ID ("joe") and  password  ("secret"),  looks  for
  9503. another  "@" prompt, runs Kermit, and in response to the Kermit's prompt (which
  9504. ends in ">"), gives the commands "set parity even" and  "server".    Files  are
  9505. then  exchanged.  The commands are in a take file; note the continuation of the
  9506. 'script' command onto several lines using the `\' terminator.
  9507.  
  9508.   set modem hayes
  9509.   set line /dev/acu
  9510.   set speed 1200
  9511.   set parity mark
  9512.   dial 9,5551212
  9513.   script ~0 ~0 ~0 ~0 ~0 ~0 ~0 ~0 @--@--@ id~saa001122 = 002211 @ \
  9514.       c~s12345 ystem-c~s12345-ystem myhost @ joe~ssecret @ kermit \
  9515.       > set~sparity~seven > server
  9516.   send some.stuff
  9517.   get some.otherstuff
  9518.   bye
  9519.   quit
  9520.  
  9521. Since these commands may be executed totally in the background, they  can  also
  9522. be  scheduled.  A typical shell script, which might be scheduled by cron, would
  9523. be as follows (csh used for this example):
  9524.  
  9525.   #
  9526.   #keep trying to dial and log onto remote host and exchange files
  9527.   #wait 10 minutes before retrying if dial or script fail.
  9528.   #
  9529.   cd someplace
  9530.   while ( 1 )
  9531.           kermit < /tonight.cmd >> nightly.log &
  9532.           if ( ! $status ) break
  9533.           sleep 600
  9534.   end
  9535.  
  9536. File tonight.cmd might have two takes in it, for example, one to  take  a  file
  9537. with  the set modem, set line, set baud, dial, and script, and a second take of
  9538. a file with send/get commands for  the  remote  server.    The  last  lines  of
  9539. tonight.cmd should be a bye and a quit.
  9540. 6.4. Interactive Operation                                             Page 171
  9541.  
  9542. -------------------------------------------------------------------------------
  9543.                               THE 'HELP' COMMAND:
  9544.  
  9545. Syntax: help
  9546.    or: help keyword
  9547.    or: help {set, remote} keyword
  9548.  
  9549. Brief  help messages or menus are always available at interactive command level
  9550. by typing a question mark at any point.  A slightly more verbose form  of  help
  9551. is  available through the 'help' command.  The 'help' command with no arguments
  9552. prints a brief summary of how to enter commands and how to  get  further  help.
  9553. 'help'  may be followed by one of the top-level C-Kermit command keywords, such
  9554. as 'send', to request information about a command.  Commands such as 'set'  and
  9555. 'remote'  have  a further level of help.  Thus you may type 'help', 'help set',
  9556. or 'help set parity'; each will provide a successively more detailed  level  of
  9557. help.
  9558.  
  9559.  
  9560.                         THE 'EXIT' AND 'QUIT' COMMANDS:
  9561.  
  9562. These two commands are identical.  Both of them do the following:
  9563.  
  9564.    - Attempt to insure that the terminal is returned to normal.
  9565.    - Relinquish access to any communication line assigned via 'set line'.
  9566.    - Relinquish any uucp and multiuser locks on the communications line.
  9567.    - Hang  up the modem, if the communications line supports data terminal
  9568.      ready.
  9569.    - Close any open logs or other files.
  9570.  
  9571. After exit from C-Kermit, your default directory will be the same as  when  you
  9572. started the program.  The 'exit' command is issued implicitly whenever C-Kermit
  9573. halts normally, e.g. after a command line invocation, or after certain kinds of
  9574. interruptions.
  9575.  
  9576.  
  9577. 6.5. UUCP Lock Files
  9578.  
  9579. Unix  has  no  standard  way  of obtaining exclusive access to an external com-
  9580. munication line.  When you issue the 'set line' command to  Unix  Kermit,  Unix
  9581. would  normally  grant  you  access  to  the line even if some other process is
  9582. making use of it.  The method adopted by  most  Unix  systems  to  handle  this
  9583. situation  is  the  "UUCP  lock  file".    UUCP, the Unix-to-Unix Copy program,
  9584. creates a file in its  directory  (usually  /usr/spool/uucp,  on  some  systems
  9585. /etc/locks)  with a name like LCK..name, where name is the device name, for in-
  9586. stance tty07.
  9587.  
  9588. Unix Kermit uses UUCP lock files in order to avoid conflicts with UUCP, tip, or
  9589. other  programs that follow this convention.  Whenever you attempt to access an
  9590. external line using the 'set line' command or `-l' on the command line,  Kermit
  9591. looks  in the UUCP directory for a lock file corresponding to that device.  For
  9592. instance, if you 'set line /dev/ttyi6' then Kermit looks for the file 
  9593.  
  9594.   /usr/spool/uucp/LCK..ttyi6
  9595.  
  9596. If it finds this file, it gives you an error message and a directory listing of
  9597. the file so that you can see who is using it, e.g.
  9598. 6.5. UUCP Lock Files                                                   Page 172
  9599.  
  9600. -------------------------------------------------------------------------------
  9601.   -r--r--r--  1 fdc        4 May  7 13:02 /usr/spool/uucp/LCK..ttyi6
  9602.  
  9603. In this case, you would look up user fdc to find out how soon the line will be-
  9604. come free.
  9605.  
  9606. This convention requires that the  uucp  directory  be  publicly  readable  and
  9607. writable.  If it is not, the program will issue an appropriate warning message,
  9608. but will allow you to proceed at your own risk (and the risk of anyone else who
  9609. might also be using the same line).
  9610.  
  9611. If  no lock file is found, Unix Kermit will attempt create one, thus preventing
  9612. anyone who subsequently tries to run Kermit, UUCP, tip, or similar programs  on
  9613. the  same line from gaining access until you release the line.  If Kermit could
  9614. not create the lock file (for instance because the  uucp  directory  is  write-
  9615. protected),  then  you  will  receive  a warning message but will be allowed to
  9616. proceed at your -- and everyone else's -- risk.  When  Kermit  terminates  nor-
  9617. mally, your lock file is removed.
  9618.  
  9619. Even  when  the  lock directory is writable and readable, the locking mechanism
  9620. depends upon all users using the same name for the same device.   If  a  device
  9621. has  more  than one path associated with it, then a lock can be circumvented by
  9622. using an alias.
  9623.  
  9624. When a lock-creating program abruptly terminates, e.g. because it crashes or is
  9625. killed  via  shell  command,  the  lock  file  remains  in  the uucp directory,
  9626. spuriously indicating that the line is in use.  If the lock file  is  owned  by
  9627. yourself,  you  may  remove it.  Otherwise, you'll have to get the owner or the
  9628. system manager to remove it, or else wait for a system task to do so; uucp sup-
  9629. ports  a function (uuclean) which removes these files after a predetermined age
  9630. -- uucp sites tend to run this function periodically via crontab.
  9631.  
  9632. Locking is not needed, or used, if communications occur over the  user's  login
  9633. terminal line (normally /dev/tty).
  9634.  
  9635. It may be seen that line locking is fraught with peril.  It is included in Unix
  9636. Kermit only because other Unix communication programs rely on it.  While it  is
  9637. naturally  desirable  to  assure  exclusive  access  to  a line, it is also un-
  9638. desirable to refuse access to a vacant line only because  of  a  spurious  lock
  9639. file, or because the uucp directory is not appropriately protected.
  9640.  
  9641.  
  9642. 6.6. C-Kermit under Berkeley or System III/V Unix:
  9643.  
  9644. C-Kermit  may be interrupted at command level or during file transfer by typing
  9645. Control-C.  The program will perform its normal exit  function,  restoring  the
  9646. terminal and releasing any lock.  If a protocol transaction was in progress, an
  9647. error packet will be sent to the opposite  Kermit  so  that  it  can  terminate
  9648. cleanly.
  9649.  
  9650. C-Kermit  may  be invoked in the background ("&" on shell commmand line).  If a
  9651. background process is "killed", the user will have to manually remove any  lock
  9652. file  and  may  need  to  restore  the  modem.  This is because the kill signal
  9653. (kill(x,9)) cannot be trapped by Kermit.
  9654.  
  9655. During execution of a system command ('directory', 'cwd', or `!'), C-Kermit can
  9656. often  be returned to command level by typing a single Control-C.  (With System
  9657. 6.6. C-Kermit under Berkeley or System III/V Unix:                     Page 173
  9658.  
  9659. -------------------------------------------------------------------------------
  9660. III/V, the usual  interrupt  function  (often  the  DEL  key)  is  replaced  by
  9661. Control-C.)
  9662.  
  9663. Under  Berkeley  Unix  only:  C-Kermit may also be interrupted by ^Z to put the
  9664. process in the background.  In this case the terminal is  not  restored.    You
  9665. will  have  to type Control-J followed by "reset" followed by another Control-J
  9666. to get your terminal back to normal.
  9667.  
  9668. Control-C, Control-Z, and Control-\ lose their normal functions during terminal
  9669. connection and also during file transfer when the controlling tty line is being
  9670. used for packet i/o.
  9671.  
  9672. If you are running C-Kermit in "quiet mode" in the foreground, then  interrupt-
  9673. ing  the  program  with a console interrupt like Control-C will not restore the
  9674. terminal to normal conversational operation.  This is because the  system  call
  9675. to  enable console interrupt traps will cause the program to block if it's run-
  9676. ning in the background, and the primary reason for quiet mode is to  allow  the
  9677. program  to  run  in  the background without blocking, so that you can do other
  9678. work in the foreground.
  9679.  
  9680. If C-Kermit is run in the background ("&" on shell commmand line), then the in-
  9681. terrupt  signal  (Control-C)  (and System III/V quit signal) are ignored.  This
  9682. prevents an interrupt signal intended for a foreground job (say a  compilation)
  9683. from being trapped by a background Kermit session.
  9684.  
  9685.  
  9686. 6.7. C-Kermit on the DEC Pro-3xx with Pro/Venix Version 1
  9687.  
  9688. The  DEC Professional 300 series are PDP-11/23 based personal computers.  Venix
  9689. Version 1 is a Unix v7 derivative.  It should not be confused with  Venix  Ver-
  9690. sion 2, which is based on ATT System V; these comments apply to Venix Version 1
  9691. only.  C-Kermit runs in local mode on the Pro-3xx when invoked  from  the  con-
  9692. sole;  the default device is /dev/com1.dout.  When connected to a remote system
  9693. (using C-Kermit's 'connect' command), Pro/Venix itself  (not  Kermit)  provides
  9694. VT52  terminal  emulation.   Terminal operation at high speeds (like 9600 baud)
  9695. requires xon/xoff flow control, which unfortunately  interferes  with  applica-
  9696. tions such as the EMACS that use Control-Q and Control-S as commands.
  9697.  
  9698. When  logging  in to a Pro-3xx (or any workstation) through the "back port", it
  9699. may be necessary to give the command  "set  line  /dev/tty"  in  order  to  get
  9700. C-Kermit to function correctly in remote mode (on a system in which it normally
  9701. expects to be operating in local mode).
  9702.  
  9703.  
  9704. 6.8. C-Kermit under VAX/VMS
  9705.  
  9706. C-Kermit can be built using VAX-11 C to run under VMS.  Most  of  the  descrip-
  9707. tions  in this manual hold true, but it should be noted that as of this writing
  9708. the VMS support is not thoroughly tested, and no explicit  support  exists  for
  9709. the various types of VMS files and their attributes.
  9710.  
  9711. The C-Kermit init file for VMS is called KERMIT.INI.
  9712. 6.9. C-Kermit on the Macintosh and other Systems                       Page 174
  9713.  
  9714. -------------------------------------------------------------------------------
  9715. 6.9. C-Kermit on the Macintosh and other Systems
  9716.  
  9717. The  "protocol kernel" of C-Kermit is also used by Columbia's Macintosh Kermit.
  9718. The user and system interface is  entirely  different,  and  is  covered  in  a
  9719. separate document.
  9720.  
  9721. There  is  also  a Kermit for the Commodore Amiga based on C-Kermit, as well as
  9722. versions for MS-DOS, Data General operating systems, etc.
  9723.  
  9724.  
  9725. 6.10. C-Kermit Restrictions and Known Bugs
  9726.  
  9727.    1. Editing characters:  The program's  interactive  command  interrupt,
  9728.       delete,  and  kill  characters are Control-C, Delete (or Backspace),
  9729.       and Control-U, respectively.  There is currently no  way  to  change
  9730.       them  to  suit your taste or match those used by your shell, in case
  9731.       those are different.
  9732.  
  9733.    2. Flow control:  C-Kermit attempts to use XON/XOFF flow control during
  9734.       protocol  operations,  but  it also puts the communication line into
  9735.       "rawmode".  On many systems, rawmode disables flow control, so  even
  9736.       though  you  may  have  "set flow xon/xoff", no flow control will be
  9737.       done.  This is highly system and Unix-version dependent.
  9738.  
  9739.    3. High baud rates:  There's no way to specify baud rates  higher  than
  9740.       9600  baud.  Most Unix systems don't supply symbols for them (unless
  9741.       you use EXTA, EXTB), and even when they do, the program has  no  way
  9742.       of  knowing whether a specific port's serial i/o controller supports
  9743.       those rates.
  9744.  
  9745.    4. Modem controls:  If a connection is made over a  communication  line
  9746.       (rather  than  on  the controlling terminal line), and that line has
  9747.       modem controls, (e.g. data  terminal  ready  and  carrier  detection
  9748.       implementation),  returning  to  the shell level will disconnect the
  9749.       conversation.  In that case, one should use  interactive  mode  com-
  9750.       mands,  and  avoid use of piped shell-level operation (also see 'set
  9751.       modem-dialer' and 'dial' commands.)
  9752.  
  9753.    5. Login Scripts:  The present login scripts implementation follows the
  9754.       Unix conventions of uucp's "L.sys" file, rather than the normal Ker-
  9755.       mit "INPUT/OUTPUT" style.
  9756.  
  9757.    6. Dial-out vs dial-in  communications  lines:    C-Kermit  requires  a
  9758.       dial-out or dedicated line for the "set line" or "-l" options.  Most
  9759.       systems have some lines dedicated  to  dial-in,  which  they  enable
  9760.       "loggers"  on,  and  some  lines  available  for  dial-out.   Recent
  9761.       releases of Unix (ATT & Berkeley) have mechanisms for  changing  the
  9762.       directionality of a line.
  9763.  
  9764.    7. Using  C-Kermit  on  Local Area Networks:  C-Kermit can successfully
  9765.       operate at speeds up to 9600 baud over LANs,  provided  the  network
  9766.       buffers are big enough to accommodate Kermit packets.
  9767.  
  9768.       When  computers are connected to LAN's through asynchronous terminal
  9769.       interfaces, then the connection should be configured to do  XON/XOFF
  9770.       flow  control between the network interface and the computer, rather
  9771. 6.10. C-Kermit Restrictions and Known Bugs                             Page 175
  9772.  
  9773. -------------------------------------------------------------------------------
  9774.       than passing these signals through transparently.    This  can  help
  9775.       prevent  Kermit from overrunning the LAN's buffers if they are small
  9776.       (or if the LAN is congested), and will can also prevent the LAN from
  9777.       overrunning a slow Kermit's buffers.
  9778.  
  9779.       If  the network hardware cannot accept 100 characters at a time, and
  9780.       flow control cannot be done between the network  and  the  computer,
  9781.       then  Kermit's  "set send/receive packet-length" command can be used
  9782.       to shorten the packets.
  9783.  
  9784.    8. Resetting terminal after abnormal termination or kill: When C-Kermit
  9785.       terminates abnormally (say, for example, by a kill command issued by
  9786.       the operator) the user may need to reset the  terminal  state.    If
  9787.       commands  do  not  seem  to  be  accepted  at  the shell prompt, try
  9788.       Control-J "stty sane" Control-J  (use  "reset"  on  Berkeley  Unix).
  9789.       That  should  take  the  terminal  out of "raw mode" if it was stuck
  9790.       there.
  9791.  
  9792.    9. Remote host commands  may  time-out  on  lengthy  activity:    Using
  9793.       "remote  host"  to instruct the C-Kermit server to invoke Unix func-
  9794.       tions (like "make") that might take a long time  to  produce  output
  9795.       can cause timeout conditions.
  9796.  
  9797.   10. XOFF  deadlocks:    When  connecting back to C-Kermit after a trans-
  9798.       action, or after finishing the server, it may be necessary to type a
  9799.       Control-Q  to  clear  up  an  XOFF  deadlock.   There's not much the
  9800.       program can do about this...
  9801.  
  9802.  
  9803. 6.11. How to Build C-Kermit for a Unix System
  9804.  
  9805. The C-Kermit files, as distributed from Columbia, all  begin  with  the  prefix
  9806. "ck".    You  should  make  a  directory  for these files and then cd to it.  A
  9807. makefile is provided to build C-Kermit for  various  Unix  systems  (there  are
  9808. separate  makefiles  for  VMS and the Macintosh).  As distributed, the makefile
  9809. has the name "ckuker.mak".  You should rename it to "makefile"  and  then  type
  9810. "make xxx", where xxx is the symbol for your system, for instance "make bsd" to
  9811. make C-Kermit for 4.x BSD Unix.  The result will be a program called  "wermit".
  9812. You  should test this to make sure it works; if it does, then you can rename it
  9813. to "kermit" and install it for general use.  See the makefile for a list of the
  9814. systems supported and the corresponding "make" arguments.
  9815.  
  9816.  
  9817. 6.12. Adapting C-Kermit to Other Systems
  9818.  
  9819. C-Kermit is designed for portability.  The level of portability is indicated in
  9820. parentheses after the module name: "C" means any system that has a  C  compiler
  9821. that conforms to the description in "The C Programming Language" by Kernighan &
  9822. Ritchie (Prentice-Hall, 1978).  "Cf" is like "C", but also requires  "standard"
  9823. features like printf and fprintf, argument passing via argv/argc, and so on, as
  9824. described in Kernighan & Ritchie.  "Unix" means the module should be useful un-
  9825. der  any  Unix  implementation;  it requires features such as fork() and pipes.
  9826. Anything else means that the module is  particular  to  the  indicated  system.
  9827. C-Kermit file names are of the form:
  9828.  
  9829. ck<system><what>.<type>
  9830. 6.12. Adapting C-Kermit to Other Systems                               Page 176
  9831.  
  9832. -------------------------------------------------------------------------------
  9833. where the part before the dot is no more than 6 characters long, the part after
  9834. the dot no more than 3 characters long, and:
  9835.  
  9836. <type> is the file type:
  9837.  
  9838.   c:    C language source
  9839.   h:    Header file for C language source
  9840.   w:    Wart preprocessor source, converted by Wart (or Lex) to a C program
  9841.   nr:   Nroff/Troff text formatter source
  9842.   mss:  Scribe text formatter source
  9843.   doc:  Documentation
  9844.   hlp:  Help text
  9845.   bld:  Instructions for building the program
  9846.   bwr:  A "beware" file - list of known bugs
  9847.   upd:  Program update log
  9848.   mak:  Makefile
  9849.  
  9850. <system> is a single character to tell what system the file applies to:
  9851.  
  9852.   a:    Descriptive material, documentation
  9853.   c:    All systems with C compilers
  9854.   d:    Data General
  9855.   h:    Harris computers (reserved)
  9856.   i:    Commodore Amiga (Intuition)
  9857.   m:    Macintosh
  9858.   p:    IBM PC, PC-DOS (reserved)
  9859.   u:    Unix
  9860.   v:    VAX/VMS
  9861.   w:    Wart
  9862.  
  9863. <what> is mnemonic (up to 3 characters) for what's in the file:
  9864.  
  9865.   aaa:  A "read-me" file, like this one
  9866.   cmd:  Command parsing
  9867.   con:  Connect command
  9868.   deb:  Debug/Transaction Log formats, Typedefs
  9869.   dia:  Modem/Dialer control
  9870.   fio:  System-depdendent File I/O
  9871.   fns:  Protocol support functions
  9872.   fn2:  More protocol support functions
  9873.   ker:  General C-Kermit definitions, information, documentation
  9874.   mai:  Main program
  9875.   pro:  Protocol
  9876.   scr:  Script command
  9877.   tio:  System-dependent terminal i/o & control and interrupt handing
  9878.   usr:  User interface
  9879.   us2:  More user interface
  9880.   us3:  Still more user interface
  9881.  
  9882. Examples:
  9883.  
  9884. ckufio.c        File i/o for Unix
  9885. ckmtio.c        Terminal i/o for Macintosh
  9886. ckuker.mss      Scribe source for for Kermit User Guide chapter
  9887. ckuker.nr       Nroff source file for Unix C-Kermit man page
  9888. 6.12. Adapting C-Kermit to Other Systems                               Page 177
  9889.  
  9890. -------------------------------------------------------------------------------
  9891. The following material discusses each of the C-Kermit modules briefly.
  9892.  
  9893. ckcmai.c, ckcker.h, ckcdeb.h (Cf):
  9894.     This  is  the  main program.  It contains declarations for global variables
  9895.     and a small amount of code to initialize some variables and invoke the com-
  9896.     mand  parser.    In  its distributed form, it assumes that command line ar-
  9897.     guments are passed to it via argc and argv.  Since this portion of code  is
  9898.     only several lines long, it should be easy to replace for systems that have
  9899.     different styles of user interaction.  The header files define symbols  and
  9900.     macros  used  by  the  various  modules  of C-Kermit.  ckcdeb.h is the only
  9901.     header file that is included by all the C-Kermit modules,  so  it  contains
  9902.     not  only  the  debug  format  definitions, but also any compiler-dependent
  9903.     typedefs.
  9904.  
  9905. ckwart.c (Cf), ckcpro.w (C):
  9906.     The  ckcpro module embodies the Kermit protocol state table and the code to
  9907.     accomplish state switching.  It is written in "wart", a language which  may
  9908.     be regarded as a subset of the Unix "lex" lexical analyzer generator.  Wart
  9909.     implements enough of lex to allow the ckprot module to function.   Lex  it-
  9910.     self  was not used because it is proprietary.  The protocol module ckcpro.w
  9911.     is read by wart, and a system-independent C program is produced.  The  syn-
  9912.     tax  of  a  Wart  program  is  illustrated by ckcpro.w, and is described in
  9913.     ckwart.doc.
  9914.  
  9915. ckcfns.c (C):
  9916.     The  module  contains  all  the Kermit protocol support functions -- packet
  9917.     formation, encoding, decoding, block check calculation, filename  and  data
  9918.     conversion, protocol parameter negotiation, and high-level interaction with
  9919.     the communication line and file system.  To accommodate small systems, this
  9920.     module has been split into two -- ckcfns.c and ckcfn2.c.
  9921.  
  9922. ckutio.c:
  9923.     This module contains the system-dependent primitives for communication line
  9924.     i/o,  timers, and interrupts for the various versions of Unix.  Certain im-
  9925.     portant variables are defined  in  this  module,  which  determine  whether
  9926.     C-Kermit  is  by  default  remote  or local, what the default communication
  9927.     device is, and so forth.  The tio module maintains its own private database
  9928.     of  file descriptors and modes for the console terminal and the file trans-
  9929.     fer communication line so that other modules (like ckcfns or  the  terminal
  9930.     connect module) need not be concerned with them.  The variations among Unix
  9931.     implementations with respect to terminal  control  and  timers  are  accom-
  9932.     modated via conditional compilation.
  9933.  
  9934. ckufio.c:
  9935.     This module contains system-dependent primitives  for  file  i/o,  wildcard
  9936.     (meta  character) expansion, file existence and access checking, and system
  9937.     command execution for the various versions of Unix.  It maintains an inter-
  9938.     nal  database  of i/o "channels" (file pointers in this case) for the files
  9939.     C-Kermit cares about -- the input file (the file which is being sent),  the
  9940.     output file (the file being received), the various logs, the screen, and so
  9941.     forth.  This module varies little among Unix implementations except for the
  9942.     wildcard  expansion  code;  the  directory structure of 4.2bsd Unix is dif-
  9943.     ferent from that of other Unix systems.  Again, variation among  Unix  sys-
  9944.     tems is selected using conditional compilation.
  9945.  
  9946. ckuusr.h, ckuusr.c, ckuus2.c, ckuus3.c (Unix):
  9947. 6.12. Adapting C-Kermit to Other Systems                               Page 178
  9948.  
  9949. -------------------------------------------------------------------------------
  9950.     This is the "user interface" for C-Kermit.  It includes the command parser,
  9951.     the screen output functions, and console input functions.  The command par-
  9952.     ser comes in two pieces -- the traditional Unix command line decoder (which
  9953.     is  quite  small and compact), and the interactive keyword parser (which is
  9954.     rather large).  This module is fully replacable; its interface to the other
  9955.     modules  is  very  simple,  and is explained at the beginning of the source
  9956.     file.  The ckuusr  module  also  includes  code  to  execute  any  commands
  9957.     directly  which don't require the Kermit protocol -- local file management,
  9958.     etc.  The module is rated "Unix" because it makes  occasional  use  of  the
  9959.     system() function.
  9960.  
  9961.     Note  that  while ckuusr is logically one module, it has been split up into
  9962.     three C source files, plus a header file for the symbols they share in com-
  9963.     mon.   This is to accommodate small systems that cannot handle big modules.
  9964.     ckuusr.c has the command line and  top-level  interactive  command  parser;
  9965.     ckuus2.c  has  the  help command and strings; ckuus3 has the set and remote
  9966.     commands along with the logging, screen, and "interrupt" functions.
  9967.  
  9968. ckucmd.c, ckucmd.h (Cf):
  9969.     This  is an interactive command parsing package developed for C-Kermit.  It
  9970.     is written portably enough to be usable on any system that has a C compiler
  9971.     that  supports  functions  like  printf.    The file name parsing functions
  9972.     depend upon primitives defined in the fio module; if these primitives  can-
  9973.     not  be  supplied for a certain system, then the filename parsing functions
  9974.     can be deleted, and the package will still be useful for parsing  keywords,
  9975.     numbers, arbitrary text strings, and so forth.  The style of interaction is
  9976.     the same as that found on the DECSYSTEM-20.
  9977.  
  9978. ckucon.c (Unix):
  9979.     This is the connect module.  As supplied, it should operate in any Unix en-
  9980.     vironment, or any C-based environment that provides  the  fork()  function.
  9981.     The  module  requires  access  to global variables that specify line speed,
  9982.     parity, duplex, flow control, etc,  and  invokes  functions  from  the  tio
  9983.     module  to  accomplish the desired settings and input/output, and functions
  9984.     from the fio module to perform session logging.  No terminal  emulation  is
  9985.     performed,  but  since  standard  i/o  is used for the console, this may be
  9986.     piped through a terminal emulation filter.  The ckucon function may be  en-
  9987.     tirely replaced, so long as the global settings are honored by its replace-
  9988.     ment.  PC implementations of C-Kermit may require the ck?con module  to  do
  9989.     screen  control,  escape sequence interpretation, etc, and may also wish to
  9990.     write special code to get the best possible performance.
  9991.  
  9992. ckudia.c (Unix):
  9993.     This  is the dialer module.  As supplied, it handles Hayes, Ventel, Penril,
  9994.     Racal-Vadic, and several other modems.
  9995.  
  9996. ckuscr.c (Unix):
  9997.     This  is  the  login  script  module.    As supplied, it handles uucp-style
  9998.     scripts.
  9999.  
  10000. Moving C-Kermit to a new system entails:
  10001.  
  10002.    1. Creating a new ck?tio module in C, assembler, or  whatever  language
  10003.       is  most  appropriate  for system programming on the new system.  If
  10004.       the system is Unix-like,  then  support  may  be  added  within  the
  10005.       ckutio.c module itself using conditional compilation.
  10006. 6.12. Adapting C-Kermit to Other Systems                               Page 179
  10007.  
  10008. -------------------------------------------------------------------------------
  10009.    2. Creating a new ck?fio module, as above.
  10010.  
  10011.    3. If  the system is not Unix-like, then a new ckuusr module may be re-
  10012.       quired, as well as a different invocation of it from ckcmai.
  10013.  
  10014.    4. If the distributed connect module doesn't work or  performs  poorly,
  10015.       then  it may be replaced.  For instance, interrupt-driven i/o may be
  10016.       required, especially if the system doesn't have forks.
  10017.  
  10018. Those who favor  a  different  style  of  user/program  interaction  from  that
  10019. provided  in ckuusr.c may replace the entire module, for instance with one that
  10020. provides a mouse/window/icon environment, a menu/function-key environment, etc.
  10021.  
  10022. A few guidelines should be followed to maintain portability:
  10023.  
  10024.    - Keep variable and function names to 6 characters or less.  Don't  use
  10025.      identifiers  that  are  distinguished  from  one  another only by al-
  10026.      phabetic case.
  10027.  
  10028.    - Keep modules small.  For instance, on a PDP-11  it  is  necessary  to
  10029.      keep  the  code segment of each module below 8K in order to allow the
  10030.      segment mapping to occur which is necessary to  run  programs  larger
  10031.      than 64K on a non-I-and-D-space machine.
  10032.  
  10033.    - Keep  strings short; many compilers have restrictive maximum lengths;
  10034.      128 is the smallest maximum string constant length we've  encountered
  10035.      so far.
  10036.  
  10037.    - Keep  (f,s)printf  formats  short.  If these exceed some compiler de-
  10038.      pendent maximum (say, 128) memory will be overwritten and the program
  10039.      will probably core dump.
  10040.  
  10041.    - Do not introduce system dependencies into ckcpro.w or ckcfn*.c.
  10042.  
  10043.    - If  a  variable  is a character, declare as CHAR, not int, to prevent
  10044.      the various sign extension and byte swapping foulups that occur  when
  10045.      characters are placed in integer variables.
  10046.  
  10047.    - Remember  that  different  systems may use different length words for
  10048.      different things.  Don't assume an integer can be used as a  pointer,
  10049.      etc.
  10050.  
  10051.    - Don't  declare  static  functions; these can wreak havoc with systems
  10052.      that do segment mapping.
  10053.  
  10054.    - In conditional compilations expressions, use #ifdef and  #ifndef  and
  10055.      not  #if,  which is not supported by some compilers.  Also, don't use
  10056.      any operators in these expressions; many compilers will fail  to  un-
  10057.      derstand expressions like #ifdef FOO | BAR.  Also, don't put trailing
  10058.      tokens on #else's or #endif's (use /* comments */).
  10059.  
  10060.    - Don't define multiline macros.
  10061.  
  10062. In general, remember that this program will have to be compilable by  old  com-
  10063. pilers and runnable on small systems.
  10064. 7. IBM 370 KERMIT                                                      Page 180
  10065.  
  10066. -------------------------------------------------------------------------------
  10067. 7. IBM 370 KERMIT
  10068.  
  10069. Program:      John Chandler (Harvard/Smithsonian Center for Astrophysics); con-
  10070.               tributions from Vace Kundakci and Daphne Tzoar (Columbia U),  Bob
  10071.               Shields  (U.  Maryland),  Victor Lee (Queens U.), Gary Bjerke (U.
  10072.               Texas  at  Austin),  Greg  Small  (UC  Berkeley),  Clark  Frazier
  10073.               (Harvard  Bus. Sch.), Bob Bolch and Steve Blankinship (Triangle),
  10074.               Ron Rusnak (U. Chicago), Roger Fajman and Dale White (NIH), Andre
  10075.               Pirard (U. Liege)
  10076. Language:     IBM 370 Assembler
  10077. Documentation:
  10078.               John Chandler (CfA)
  10079. Version:      4.0
  10080. Date:         1988 February
  10081.  
  10082. Kermit-370 is a family  of  programs  implementing  the  KERMIT  file  transfer
  10083. protocol for IBM 370-series mainframes (System/370, 303x, 43xx, 308x, etc.) un-
  10084. der a variety of operating systems.  Kermit-370 operates over asynchronous  AS-
  10085. CII communication lines attached to 3705-style front ends ("TTY" devices), to a
  10086. Series/1 or 4994 running the Yale ASCII Terminal Communication  System  or  the
  10087. IBM  7171  ASCII  Device Control Unit or a 9370 with ASCII subsystem ("SERIES1"
  10088. devices), or to SNA-type front-ends with graphics pass-through  mode,  such  as
  10089. the MICOM 7400, Datastream/Leedata 8010, and PCI 1076 ("GRAPHICS" devices), or,
  10090. in some configurations, to an IBM 3708 ("FULLSCREEN" device).  As of this writ-
  10091. ing,  the  pending  implementation  of  full  7171 compatibility in the program
  10092. product SIM3278 has not been completed.  For more details  on  front-ends,  see
  10093. the section SET CONTROLLER.
  10094.  
  10095. The  source is coded in IBM 370 assembly language and is divided into sections,
  10096. some generic and some specific to an individual operating system.    While  the
  10097. details of file-system and supervisor interaction vary widely among the systems
  10098. available for IBM 370's, the basic features are essentially  the  same.    This
  10099. chapter  will describe the features common to all variants of Kermit-370, and a
  10100. separate chapter will deal with the system-specific details for each variant.
  10101.  
  10102. IBM 370 systems have some peculiarities that users should be aware of.   First,
  10103. they  are  essentially  half-duplex  systems; the communication line must "turn
  10104. around" before any data can be sent to it.   The  "TTY"  devices  are  strictly
  10105. half-duplex, and even the "SERIES1" and "GRAPHICS" devices, although they main-
  10106. tain full-duplex communication with the terminal, must transmit a  block  at  a
  10107. time  to  the mainframe.  The fact that a packet has been received from the IBM
  10108. system through a "TTY" device is no guarantee that it is  ready  for  a  reply;
  10109. generally,  the  true  indicator  of readiness is the line turnaround character
  10110. (XON), which the operating system sends immediately before issuing a  read  re-
  10111. quest.  On some systems, however, it is possible for Kermit to do away with the
  10112. system-supplied turnaround and schedule read  requests  immediately  after  the
  10113. corresponding  writes.    It is up to the user to tell the other Kermit that it
  10114. must conform to the requirements of the IBM mainframe.
  10115.  
  10116. Second, disk files are encoded using the EBCDIC character set.    Consequently,
  10117. there are three layers of character translation on packets exchanged on a "TTY"
  10118. device.  For an incoming packet, the outer layer is provided by  the  operating
  10119. system,  which translates all characters from ASCII to EBCDIC.  Kermit-370 must
  10120. then translate the packets back to ASCII (the middle layer) in  order  to  cal-
  10121. culate  and  verify  the  checksum.    Data  arriving  through  a  "SERIES1" or
  10122. "GRAPHICS" device are still in ASCII and therefore bypass the two outer layers.
  10123. 7. IBM 370 KERMIT                                                      Page 181
  10124.  
  10125. -------------------------------------------------------------------------------
  10126. In  any  case,  Kermit-370 translates everything finally into EBCDIC (the inner
  10127. layer) before storing on disk (except BINARY files).  When Kermit-370  sends  a
  10128. file,  the  opposite translations occur.  In translation, EBCDIC characters not
  10129. representable in ASCII are replaced by nulls.  In some  cases,  several  EBCDIC
  10130. characters  are  mapped  into  a single ASCII character, but no two 7-bit ASCII
  10131. characters are translated into the same EBCDIC  character.    The  middle-layer
  10132. tables  used  by  Kermit  must be the inverses of the corresponding outer-layer
  10133. ones used by the host operating system if file transfers are to  work  at  all.
  10134. If   necessary,   the   system   programmer  should  add  the  appropriate  SET
  10135. TATOE/TETOA/TTABLE subcommands (q.v.)  to the global "INIT" file (see the  next
  10136. section).    Indeed,  it  is usually a good idea to set TTABLE ON in the global
  10137. "INIT" file to force using different built-in sets of tables for the inner  and
  10138. middle   layers,   whenever  the  system  has  "TTY"  devices.    The  standard
  10139. ASCII-to-EBCDIC translations can be found in the Appendix or the IBM System/370
  10140. Reference Card.
  10141.  
  10142. Another  distinction  of  IBM  370's  is  that they store and retrieve files as
  10143. records rather than byte streams.  Records may be either fixed-length with some
  10144. sort  of  padding  (as  needed)  or varying-length with some sort of (generally
  10145. hidden) delimiters.  Thus, Kermit-370 must assemble incoming data packets  into
  10146. records  by  stripping  off carriage return-linefeed pairs (CRLF's) and padding
  10147. with blanks or truncating as needed and must strip trailing blanks  and  append
  10148. CRLF's  to  outgoing  records.   Further, disk files typically have the records
  10149. combined into blocks for efficiency.  One consequence of this form  of  storage
  10150. is  that files have attributes describing the component records: maximum record
  10151. length (LRECL), record format (RECFM), and sometimes block size (BLKSIZE).
  10152.  
  10153. As mentioned before, Kermit-370 is a family of programs.  At present, only  the
  10154. CMS  and  TSO  versions  are operational.  Versions for DOS/VSE and MTS have at
  10155. least reached the "drawing board,"  but  no  others  have  even  been  started.
  10156. Volunteers  are always welcome to port Kermit-370 to other operating systems or
  10157. add new features to the existing family.  Anyone interested should first get in
  10158. touch  with  the Center for Computing Activities at Columbia University to find
  10159. out what projects of a similar nature are already pending (and thereby  prevent
  10160. unnecessary duplication of effort).
  10161.  
  10162.  
  10163. 7.1. Program Operation
  10164.  
  10165. Kermit-370  can  be  invoked  directly  or from a command procedure.  In either
  10166. case, it reads and executes subcommands sequentially until directed to quit and
  10167. then returns.  A subcommand consists of one or more fields (words) separated by
  10168. spaces.
  10169.  
  10170. Upon initial startup, the  program  looks  for  two  (optional)  initialization
  10171. files,  one system-wide and a second specific to the user.  Both filespecs are,
  10172. of course, system-dependent.  The purpose of these files is to allow Kermit  to
  10173. be  customized for a particular system and for a user's specific settings with-
  10174. out changing the source code.  The system-wide file, which is maintained  by  a
  10175. systems programmer, should contain Kermit subcommands that all users would need
  10176. to issue in order for Kermit to run on  the  system,  such  as  subcommands  to
  10177. modify  the ASCII/EBCDIC tables used by Kermit-370.  The user-specific file, if
  10178. any, should contain subcommands that the user generally issues every time  Ker-
  10179. mit is run.  Kermit-370 executes any subcommands found in these files as though
  10180. they were typed at the terminal.  Here is a sample "INIT" file:
  10181. 7.1. Program Operation                                                 Page 182
  10182.  
  10183. -------------------------------------------------------------------------------
  10184.   * Asterisk in column one is a comment.
  10185.   set debug on
  10186.   set warning on
  10187.   set block 3
  10188.  
  10189. During interactive execution, you may  use  the  built-in  help  feature  while
  10190. typing Kermit-370 subcommands.  A question mark ("?") typed at almost any point
  10191. in a subcommand, followed by a carriage return, produces a brief description of
  10192. what  is  expected or possible at that point.  Moreover, mistyping a subcommand
  10193. will generally produce a helpful error message or a list of possible options at
  10194. the   point  of  error.    Keywords  in  such  lists  are  displayed  with  the
  10195. minimum-length abbreviation in upper case and the remainder, if any,  in  lower
  10196. case.  In entering Kermit subcommands, any keyword may be shortened to any sub-
  10197. string that contains the minimum abbreviation.
  10198.  
  10199.  
  10200. 7.2. Kermit-370 Subcommands
  10201.  
  10202. The following is a brief summary of Kermit subcommands.   The  starred  subcom-
  10203. mands can be issued as remote Kermit commands to Kermit-370 when it is in serv-
  10204. er mode.  System-specific subcommands are omitted from this list.
  10205.  
  10206.           BYE      logs out other Kermit server.
  10207.           CWD*     establishes a new working directory.
  10208.     DIRECTORY*     displays all or part of the disk directory.
  10209.          ECHO      a line back to the user.
  10210.          EXIT      from Kermit-370.
  10211.        FINISH      other Kermit server.
  10212.           GET      file(s) from a Kermit server.
  10213.          HELP      about Kermit-370.
  10214.          HOST*     executes a system command.
  10215.        KERMIT*     executes a Kermit subcommand.
  10216.          QUIT      from Kermit-370.
  10217.       RECEIVE      file(s) from other Kermit.
  10218.          SEND      file(s) to other Kermit.
  10219.        SERVER      mode of remote operation.
  10220.           SET*     various parameters.
  10221.          SHOW*     various parameters.
  10222.         SPACE*     displays disk storage allocation.
  10223.        STATUS*     inquiry.
  10224.          TAKE*     subcommands from file.
  10225.         TDUMP*     dumps the contents of a table.
  10226.          TYPE*     a file.
  10227.         XECHO      echoes a line (transparently).
  10228.         XTYPE      displays a file (transparently).
  10229.  
  10230. Although Kermit-370 is generally a remote Kermit, it has the capability of com-
  10231. municating  with another Kermit in server mode.  In that situation, the subcom-
  10232. mand prefixes REMOTE and LOCAL refer  to  the  Kermit  server  and  Kermit-370,
  10233. respectively,  even  when  Kermit-370 is, strictly speaking, the remote Kermit.
  10234. Any replies from the Kermit server are added to a disk file (whose filespec is,
  10235. of  course,  system-dependent).  Such a transaction can be carried out, for ex-
  10236. ample, under control of a TAKE file if Kermit-370 is not operating locally.  If
  10237. the  local  Kermit  has a "magic" character sequence that switches it from ter-
  10238. minal emulation to server mode, then an entire session could be controlled from
  10239. the mainframe, possibly in response to a single command issued by a naive user.
  10240. 7.2. Kermit-370 Subcommands                                            Page 183
  10241.  
  10242. -------------------------------------------------------------------------------
  10243. For example,
  10244.  
  10245.   grab
  10246.  
  10247.        Kermit-370 is invoked and executes the following TAKE file
  10248.  
  10249.   ECHO Serve Me!        the local Kermit switches to server mode
  10250.   GET file.a            the server uploads file.a
  10251.   FINISH                the server switches back to terminal mode
  10252.  
  10253. The remainder of this section concentrates on the subcommands that have special
  10254. form or meaning for Kermit-370, but neglects those with highly system-dependent
  10255. syntax or use.
  10256.  
  10257.  
  10258.                               THE SEND SUBCOMMAND
  10259.  
  10260. Syntax: SEND [filespec [foreign-filespec]]
  10261.  
  10262. The SEND subcommand tells Kermit-370 to send a file or file group to the  other
  10263. Kermit.    If  no such file exists, Kermit-370 simply displays an error message
  10264. and issues another prompt.  If one or more files  are  sent,  their  names  are
  10265. recorded  in  memory and may be viewed later via the TDUMP subcommand (but with
  10266. no indication of whether any of them were rejected or cancelled  by  the  other
  10267. Kermit).    If this subcommand is issued without any arguments, Kermit-370 will
  10268. prompt the user for both native and foreign filespecs (and will insist on  get-
  10269. ting the former, but will do without the latter).
  10270.  
  10271. When Kermit-370 sends files using long packets (longer than 96), the throughput
  10272. is especially sensitive to the level of noise on the line because  retries  are
  10273. so  time-consuming.   Therefore, Kermit-370 adds an extra, heuristic size limit
  10274. for packets when retries have been found necessary.  When  that  is  the  case,
  10275. after  every 20 packets, Kermit computes the packet size for maximum throughput
  10276. assuming that the transmission errors were due to  sparse,  Poisson-distributed
  10277. noise  bursts.  The result of this calculation is then used as another limit on
  10278. the size of outgoing packets besides the one specified by the other Kermit.  If
  10279. no  retries  are required, then Kermit-370 assumes the line to be noiseless and
  10280. sends packets of the maximum length the other Kermit allows.  For more  details
  10281. on  the  SEND  subcommand  syntax and operation, see the chapter on the desired
  10282. system-specific version of Kermit-370.
  10283.  
  10284.  
  10285.                             THE RECEIVE SUBCOMMAND
  10286.  
  10287. Syntax: RECEIVE [filespec]
  10288.  
  10289. The RECEIVE subcommand tells Kermit-370 to accept a file or file  group.    The
  10290. user  must  issue the corresponding SEND subcommand to the other Kermit.  Under
  10291. some circumstances, the records of the received file(s) may be truncated;  when
  10292. this  happens,  Kermit  does  not  stop, but notes the fact as an error (unless
  10293. something more serious happens later).  For more details on the RECEIVE subcom-
  10294. mand  syntax and operation, see the chapter on the desired system-specific ver-
  10295. sion of Kermit-370.
  10296. 7.2. Kermit-370 Subcommands                                            Page 184
  10297.  
  10298. -------------------------------------------------------------------------------
  10299.                               THE GET SUBCOMMAND
  10300.  
  10301. Syntax: GET [foreign-filespec [filespec]]
  10302.  
  10303. The GET subcommand tells Kermit to request a file or file group from the  other
  10304. system,  which  must  have a Kermit running in server mode.  Provided the other
  10305. Kermit complies, the effect is the same as if SEND  foreign-filespec  had  been
  10306. issued  directly  to  the  other  Kermit  and RECEIVE [filespec] to Kermit-370.
  10307. other Kermit).  If this subcommand is issued without any arguments,  Kermit-370
  10308. will  prompt the user for both foreign and native filespecs (and will insist on
  10309. getting the former, but will do without the latter).  See the  respective  SEND
  10310. and RECEIVE subcommands for a description of the each filespec.
  10311.  
  10312.  
  10313.                               THE TAKE SUBCOMMAND
  10314.  
  10315. Syntax: TAKE filespec
  10316.  
  10317. Execute Kermit subcommands from the specified file, usually called a TAKE file.
  10318. The TAKE file may in turn include TAKE subcommands to a nesting depth  of  ten.
  10319. If  a  TAKE  file  includes  the  subcommand SERVER, however, the nesting count
  10320. starts over again in server mode.  The user has the option of seeing  the  sub-
  10321. commands  echoed from the TAKE file as they are executed and also the option of
  10322. automatically exiting from a TAKE file on error.  See the subcommand  SET  TAKE
  10323. for details.
  10324.  
  10325.  
  10326.                              THE SERVER SUBCOMMAND
  10327.  
  10328. Kermit-370  is  capable  of acting as a server.  In server mode, Kermit-370 can
  10329. send and receive files, execute host commands, execute a restricted set of Ker-
  10330. mit  subcommands,  and perform a variety of generic Kermit functions.  The fol-
  10331. lowing list shows the typical local Kermit commands along with the server func-
  10332. tions  they  elicit.    When Kermit-370 is talking to another Kermit running in
  10333. server mode, these same subcommands may be used in the other direction.
  10334.  
  10335. BYE                 log out the Kermit server.
  10336. FINISH              server mode.
  10337. GET                 a file or files from the server.
  10338. REMOTE
  10339.   COPY              a file or files.
  10340.   CWD               set new working directory.
  10341.   DIRECTORY         display file attributes.
  10342.   ERASE             a file or files.
  10343.   HELP              display this command summary.
  10344.   HOST              execute a system command.
  10345.   KERMIT            execute a Kermit-370 subcommand.
  10346.   RENAME            a file or files.
  10347.   SPACE             display disk space.
  10348.   TYPE              a file.
  10349. SEND                a file or files to the server.
  10350.  
  10351. If your local Kermit does not support the REMOTE KERMIT command, you  may  need
  10352. to  issue  SET  subcommands  to select various options before typing the SERVER
  10353. subcommand.  Once in server mode, Kermit-370 will await  all  further  instruc-
  10354. tions from the user Kermit on the other end of the connection until a FINISH or
  10355. 7.2. Kermit-370 Subcommands                                            Page 185
  10356.  
  10357. -------------------------------------------------------------------------------
  10358. BYE command is given.
  10359.  
  10360. Command execution in server mode is different  in  some  respects  from  normal
  10361. operation.  First of all, some Kermit subcommands are not allowed (see the list
  10362. at the beginning of this section).  Moreover, command errors  always  terminate
  10363. any  active  TAKE file.  Also, all commands will be run in the special environ-
  10364. ment that Kermit sets up during protocol transfers.  Among other things, Kermit
  10365. intercepts  all  terminal  I/O  (if  possible)  in this environment in order to
  10366. transmit the data to the local Kermit as text packets.
  10367.  
  10368. Note that some operations can be requested by several different commands.    If
  10369. for  example,  the  IBM 370 system has a command "PRT" for displaying a file, a
  10370. user interacting with a Kermit-370 server can choose to display a file  by  is-
  10371. suing  any  of  the commands: REMOTE TYPE, REMOTE HOST PRT, REMOTE KERMIT TYPE,
  10372. REMOTE KERMIT HOST PRT, or (if SYSCMD has been set ON) REMOTE KERMIT PRT.   The
  10373. first  form  simply transfers the requested file as text, but the others invoke
  10374. the "PRT" command with any specified options, intercept  the  terminal  output,
  10375. and return the results to the local Kermit.
  10376.  
  10377.  
  10378.                               THE SET SUBCOMMAND
  10379.  
  10380. Syntax: SET parameter [value]
  10381.  
  10382. The  SET subcommand establishes or modifies various parameters controlling file
  10383. transfers.  The values can, in turn, be  examined  with  the  SHOW  subcommand.
  10384. Some  parameters  have two levels.  In particular, there are two matching lists
  10385. of SEND and RECEIVE sub-parameters corresponding to  the  values  exchanged  by
  10386. Kermits  in  the  Send-Init/ACK sequence.  For each of these SEND/RECEIVE pairs
  10387. one element is encoded in outgoing parameter packets, and the other is  decoded
  10388. from incoming ones.  Setting the latter by hand may be needed to establish con-
  10389. tact and also has the effect of redefining the default value for decoding  from
  10390. subsequent  parameter  packets.    Generally,  the distinction between SEND and
  10391. RECEIVE parameters is unambiguous, the only  exception  being  TIMEOUT  (q.v.).
  10392. The following SET subcommands are available in Kermit-370:
  10393.  
  10394. APPEND              Append if file name collision.
  10395. ATOE                Modify the Kermit-370 ASCII-to-EBCDIC table.
  10396. BLOCK-CHECK         Level of error checking for file transfer.
  10397. CONTROLLER          Indicate type of terminal connection.
  10398. DEBUG               Log packet traffic during file transfer.
  10399. DELAY               Length of pause before a SEND subcommand.
  10400. EOF                 Text file truncation at CTRL-Z.
  10401. ETOA                Modify the Kermit-370 EBCDIC-to-ASCII table.
  10402. FILE                Attributes for incoming or outgoing files...
  10403.   TYPE              ... text or binary.
  10404.   other             ... system-specific attributes.
  10405. FOREIGN             Strings added to outgoing filespec...
  10406.   PREFIX
  10407.   SUFFIX
  10408. INCOMPLETE          Determine the action on an aborted file transfer.
  10409. LINE                Specify alternate communication line.
  10410. MARGIN              for sending files...
  10411.   LEFT
  10412.   RIGHT
  10413. PARITY              Indicate if 7-bit or 8-bit data.
  10414. 7.2. Kermit-370 Subcommands                                            Page 186
  10415.  
  10416. -------------------------------------------------------------------------------
  10417. RETRY               Maximum retry count...
  10418.   INIT              ... for initial packet exchange.
  10419.   PACKET            ... per packet for ongoing transfer.
  10420. SYSCMD              Try apparently invalid Kermit subcommands on host system.
  10421. TABS-EXPAND         Determine tab-to-space conversion on reception.
  10422. TAKE
  10423.   ECHO              Echo subcommands read from TAKE files.
  10424.   ERROR-ACTION      Exit from TAKE file on command error.
  10425. TEST                Facilitate testing of Kermit.
  10426. TATOE               Modify the Kermit-370 ASCII-to-EBCDIC table.
  10427. TETOA               Modify the Kermit-370 EBCDIC-to-ASCII table.
  10428. TTABLE              Determine which tables undo the terminal translation.
  10429. WARNING             Rename if filename collision.
  10430. 8-BIT-QUOTE         Determine state of 8th-bit prefixing.
  10431. SEND or RECEIVE
  10432.   END-OF-LINE       Packet terminator.
  10433.   PACKET-SIZE       Maximum packet size.
  10434.   PAD-CHAR          Character to insert before each packet.
  10435.   PADDING           Number of pad characters to insert.
  10436.   QUOTE             Use to quote control characters in packets.
  10437.   START-OF-PACKET   Packet beginning marker.
  10438.   TIMEOUT           Time limit for response.
  10439.  
  10440.  
  10441. SET APPEND
  10442.  
  10443. Syntax: SET APPEND ON or OFF
  10444.  
  10445. ON      If  an incoming file has the same name as an existing one, the new file
  10446.         is appended to the old one.  This option supersedes SET WARNING.
  10447.  
  10448. OFF     Filename collision is  handled  according  to  the  WARNING  parameter.
  10449.         (Default.)
  10450.  
  10451.  
  10452. SET ATOE etc.
  10453.  
  10454. Syntax: SET table [num1 num2]
  10455.  
  10456. This  modifies  one  of  the ASCII/EBCDIC translation tables used by Kermit-370
  10457. (for example, to conform to your system).  The  valid  table  names  are  ATOE,
  10458. ETOA, TATOE, and TETOA.  The arguments are, respectively, the offset within the
  10459. named table and the new value for that offset.  If the arguments  are  omitted,
  10460. the table is restored to its initial arrangement.  Both num1 and num2 should be
  10461. in the range 0-255 (decimal).  For example, in ATOE or TATOE, the offset is the
  10462. ASCII  character  code,  and  the new value is the new EBCDIC result code.  In-
  10463. itially, ATOE and TATOE each contain two identical copies of  the  7-bit  ASCII
  10464. character table.  Note: the meaning of the tables depends on the TTABLE setting
  10465. -- if TTABLE is OFF, the TATOE and TETOA tables are not used.
  10466. 7.2. Kermit-370 Subcommands                                            Page 187
  10467.  
  10468. -------------------------------------------------------------------------------
  10469. SET BLOCK-CHECK
  10470.  
  10471. Syntax: SET BLOCK-CHECK number
  10472.  
  10473. This determines the type of block check used during file transfer, provided the
  10474. other  Kermit  agrees.    Valid  options for number are: 1 (for a one-character
  10475. checksum), 2 (for a two-character checksum) and 3 (for a three-character  CRC).
  10476. This  is one of only two Send-Init parameters that cannot be SET separately for
  10477. SEND and RECEIVE.
  10478.  
  10479.  
  10480. SET CONTROLLER
  10481.  
  10482. Syntax: SET CONTROLLER type
  10483.  
  10484. The type may be TTY, SERIES1, GRAPHICS, or FULLSCREEN.    Kermit-370  automati-
  10485. cally  determines  whether you are connected via a Series/1 (or similar) emula-
  10486. tion controller or a TTY line.  This subcommand is provided, though,  to  allow
  10487. that choice to be superseded, and because Kermit may not be able to distinguish
  10488. between Series/1-type and other 3270-emulation controllers.  When CONTROLLER is
  10489. set  to SERIES1 or GRAPHICS, Kermit disables the 3270 protocol conversion func-
  10490. tion by putting the terminal controller into "transparent mode",  which  allows
  10491. Kermit packets to pass through intact.
  10492.  
  10493.  
  10494. SET DEBUG
  10495.  
  10496. Syntax: SET DEBUG ON or RAW or OFF
  10497.  
  10498. ON      Keep  a journal of all packets sent and received in a log file on disk.
  10499.         If the file already exists, it is erased and overwritten.  The filespec
  10500.         of  the log is, of course, system-dependent.  All packets are logged in
  10501.         EBCDIC for legibility, even  when  CONTROLLER  is  set  to  SERIES1  or
  10502.         GRAPHICS.    In  addition to the packets themselves, which are labelled
  10503.         "S" or "R" for packets sent or  received,  the  log  includes  any  ad-
  10504.         ditional status information (labelled "A"), such as the AID returned by
  10505.         a SERIES1 device.
  10506.  
  10507. RAW     The same as ON, but packets are logged in the form that is passed to or
  10508.         from  the  operating  system, i.e., EBCDIC for TTY terminals, and ASCII
  10509.         for SERIES1 and GRAPHICS terminals.
  10510.  
  10511. OFF     Stop logging packets and close the the log file.  (Default.)
  10512.  
  10513.  
  10514. SET DELAY
  10515.  
  10516. Syntax: SET DELAY number
  10517.  
  10518. Normally, Kermit-370 waits 10 seconds after the SEND subcommand before starting
  10519. the  transfer,  but this delay may be SET to any non-negative value.  Two DELAY
  10520. values have special meaning.  When DELAY is 1, the usual two-line greeting dis-
  10521. played during protocol mode is abbreviated to a short message (the default Ker-
  10522. mit prompt with three dots...), and when DELAY is 0, the greeting is suppressed
  10523. entirely, along with the extra one-second pause for the RECEIVE and SERVER sub-
  10524. commands.
  10525. 7.2. Kermit-370 Subcommands                                            Page 188
  10526.  
  10527. -------------------------------------------------------------------------------
  10528. SET EOF
  10529.  
  10530. Syntax: SET EOF ON or OFF
  10531.  
  10532. ON      Scan each incoming TEXT file for the first occurrence of CTRL-Z and ig-
  10533.         nore  the remainder of the file (but continue decoding up to the actual
  10534.         end of the file).  BINARY files are not affected.
  10535.  
  10536. OFF     Accept incoming files in their entirety.  (Default.)
  10537.  
  10538.  
  10539. SET FILE TYPE
  10540.  
  10541. Syntax: SET FILE TYPE TEXT or BINARY or V-BINARY or D-BINARY
  10542.  
  10543. TEXT       Specifies ordinary text.  ASCII-to-EBCDIC or EBCDIC-to-ASCII  trans-
  10544.            lation  is  performed on the data.  Trailing blanks are removed, and
  10545.            CRLF's are appended to outgoing records. CRLF's are used,  in  turn,
  10546.            to  determine  the  end  of  incoming records, which are padded with
  10547.            blanks if necessary to fill buffers.  (Default.)
  10548.  
  10549. BINARY     Specifies bit-stream data.  No translation is performed,  no  CRLF's
  10550.            are  added  to  outgoing  records,  and blanks are neither added nor
  10551.            removed.  Incoming bytes  are  added  successively  to  the  current
  10552.            record  buffer,  which  is  written  out  when  the current LRECL is
  10553.            reached.  Padding, if necessary, is done with nulls.
  10554.  
  10555. V-BINARY   Specifies varying-length-record binary data.  This type is like  BI-
  10556.            NARY, except that a two-byte binary prefix is added to each outgoing
  10557.            record giving the number of data bytes, and incoming records are set
  10558.            off by (and stripped of) their prefixes on receipt.
  10559.  
  10560. D-BINARY   Is  like  V-BINARY  except  that  the  length prefixes are five-byte
  10561.            ASCII-encoded decimal (right-justified with leading zeroes).
  10562.  
  10563.  
  10564. SET FOREIGN
  10565.  
  10566. Syntax: SET FOREIGN PREFIX string
  10567.  
  10568. This defines a prefix string to be added to the outgoing filespec generated  by
  10569. the  SEND  subcommand.  For example, the string might be set to "B:" to specify
  10570. output to the B disk drive on the other Kermit's system.  The default is a null
  10571. string.  There is also a FOREIGN SUFFIX handled in the same manner.
  10572.  
  10573.  
  10574. SET HANDSHAKE
  10575.  
  10576. Syntax: SET HANDSHAKE number
  10577.  
  10578. This defines the character, if any, that Kermit-370 should send (or cause to be
  10579. sent) immediately before reading each packet.  The character is  given  as  the
  10580. decimal  of  an  ASCII  control  character, or as zero if no handshake is to be
  10581. sent.  The default is 17 (XON), and any value in the range 0-31 is  valid,  but
  10582. 13 (CR) should not be used because it is generally the end-of-packet character.
  10583. When Kermit-370  is  running  through  a  full-duplex  connection  (such  as  a
  10584. 7.2. Kermit-370 Subcommands                                            Page 189
  10585.  
  10586. -------------------------------------------------------------------------------
  10587. "SERIES1"),  the  traditional  IBM  handshaking is not necessary, and HANDSHAKE
  10588. should be set to 0 (as long as the other Kermit can be instructed not to expect
  10589. a  handshake).  Note the distinction between SET HANDSHAKE in Kermit-370 (where
  10590. it defines a character to be sent) and in many micro Kermits (where it  defines
  10591. a character to be expected).
  10592.  
  10593.  
  10594. SET INCOMPLETE
  10595.  
  10596. Syntax: SET INCOMPLETE DISCARD or KEEP
  10597.  
  10598. DISCARD   Specifies that incomplete files (that is, files partially received in
  10599.           a transfer cancelled by the other Kermit) are to be erased.  This  is
  10600.           the default.  Note that when APPEND is ON, incomplete files are never
  10601.           erased, lest pre-existing data be lost.
  10602.  
  10603. KEEP      Specifies that incomplete files are to be kept.
  10604.  
  10605.  
  10606. SET LINE
  10607.  
  10608. Syntax: SET LINE [name]
  10609.  
  10610. This specifies an alternate communication line for file transfers.  If the name
  10611. is omitted, the default line (the user's terminal) is used.  The format of name
  10612. is, of course, system-dependent, and some versions of Kermit-370 do not support
  10613. any alternate lines.  No version currently allows Kermit-370 to CONNECT over an
  10614. alternate line.
  10615.  
  10616.  
  10617. SET MARGIN
  10618.  
  10619. Syntax: SET MARGIN side column
  10620.  
  10621. When Kermit-370 sends a text file, each line may be truncated on  the  left  or
  10622. right (or both) at fixed column numbers.  Only the text from the left margin to
  10623. the right margin (inclusive) will be sent, and any trailing blanks in the trun-
  10624. cated lines will be stripped.  A value of zero for either margin disables trun-
  10625. cation on that side.
  10626.  
  10627.  
  10628. SET PARITY
  10629.  
  10630. Syntax: SET PARITY MARK or NONE
  10631.  
  10632. Transparent-mode ASCII data received from a "SERIES1" or "GRAPHICS" device will
  10633. typically have either all Mark parity (seven data bits with the eighth bit set)
  10634. or no parity (eight data bits).  Kermit-370 must know which kind of  parity  to
  10635. expect in order to calculate checksums properly.  Since Kermit-370 does not ac-
  10636. tually verify parity, the other possible variants (ODD, EVEN,  and  SPACE)  are
  10637. lumped  together  with  MARK  parity  for the purpose of this subcommand, which
  10638. merely chooses between 7-bit and 8-bit data transfer.  The default is MARK.
  10639. 7.2. Kermit-370 Subcommands                                            Page 190
  10640.  
  10641. -------------------------------------------------------------------------------
  10642. SET PROMPT
  10643.  
  10644. Syntax: SET PROMPT string
  10645.  
  10646. This defines the character string that Kermit-370 displays when  asking  for  a
  10647. subcommand.   The prompt may be any string of up to 20 characters.  The default
  10648. is the name of the system-specific version of  Kermit-370  followed  by  a  ">"
  10649. sign, e.g., Kermit-CMS>.
  10650.  
  10651.  
  10652. SET RETRY
  10653.  
  10654. Syntax: SET RETRY INITIAL or PACKETS number
  10655.  
  10656. Kermit-370  resends its last packet after receiving a NAK or bad packet, but it
  10657. eventually gives up after repeated failures or the same packet.  The  limit  on
  10658. retries  can  be  set  separately for the initial packet exchange (Send-Init or
  10659. server-mode command) and for ordinary packets.  The default for INITIAL  is  16
  10660. and for PACKETS, 5.  Either limit can be set to any positive value.
  10661.  
  10662.  
  10663. SET SYSCMD
  10664.  
  10665. Syntax: SET SYSCMD ON or OFF
  10666.  
  10667. ON      If the user enters a command string which is not a valid Kermit subcom-
  10668.         mand, Kermit-370 will pass the string along to the host operating  sys-
  10669.         tem  for  execution.   If the string is rejected by the system as well,
  10670.         Kermit will report it as an invalid Kermit subcommand.  Otherwise, Ker-
  10671.         mit  will  assume  the  string  was intended as a host command and will
  10672.         simply report the completion code if non-zero.
  10673.  
  10674. OFF     Invalid Kermit subcommands are simply rejected as such.    System  com-
  10675.         mands  may  be  executed, of course, but only by specifying the generic
  10676.         prefix "HOST" or the appropriate system-specific prefix, such as CMS or
  10677.         TSO.  (Default.)
  10678.  
  10679.  
  10680. SET TABS-EXPAND
  10681.  
  10682. Syntax: SET TABS-EXPAND ON [list] or OFF
  10683.  
  10684. ON      Tab  characters  in  incoming  TEXT  files  are replaced by one or more
  10685.         blanks to bring the record size up to the next higher multiple of eight
  10686.         for  each  tab.   If tab settings other than columns 1, 9, 17, etc. are
  10687.         desired, they may be specified  explicitly  in  a  list  following  the
  10688.         keyword "ON".  Items in the list may be separated by spaces or commas.
  10689.  
  10690. OFF     Incoming tabs are retained.  (Default.)
  10691. 7.2. Kermit-370 Subcommands                                            Page 191
  10692.  
  10693. -------------------------------------------------------------------------------
  10694. SET TAKE ECHO
  10695.  
  10696. Syntax: SET TAKE ECHO ON or OFF
  10697.  
  10698. ON      Subcommands are echoed to the terminal as they are executed from a TAKE
  10699.         file.
  10700.  
  10701. OFF     Subcommands from a TAKE file are executed "silently."  (Default.)
  10702.  
  10703.  
  10704. SET TAKE ERROR-ACTION
  10705.  
  10706. Syntax: SET TAKE ERROR-ACTION CONTINUE or HALT
  10707.  
  10708. CONTINUE   Execution continues in a TAKE file regardless of  illegal  commands,
  10709.            except in server mode.  This is the default.
  10710.  
  10711. HALT       A  command error in a TAKE file causes immediate exit to Kermit sub-
  10712.            command level.
  10713.  
  10714.  
  10715. SET TEST
  10716.  
  10717. Syntax: SET TEST ON or OFF
  10718.  
  10719. ON      Allow setting the START-OF-PACKET and other special characters  to  any
  10720.         value, and suppress checksum testing on received packets.
  10721.  
  10722. OFF     Normal operation.  (Default.)
  10723.  
  10724.  
  10725. SET TTABLE
  10726.  
  10727. Syntax: SET TTABLE ON or OFF
  10728.  
  10729. ON      The translation that undoes the terminal controller's ASCII/EBCDIC con-
  10730.         version comes from the TATOE and TETOA tables, rather than the ATOE and
  10731.         ETOA tables (which are used only for translating disk files).  This op-
  10732.         tion has no effect when there is no translation  built  into  the  con-
  10733.         troller, i.e., with SERIES1 and GRAPHICS connections.
  10734.  
  10735. OFF     The  ATOE  and ETOA tables are used for all translations by Kermit-370.
  10736.         (Default.)
  10737.  
  10738.  
  10739. SET WARNING
  10740.  
  10741. Syntax: SET WARNING ON or OFF
  10742.  
  10743. ON      If an incoming file has the same filespec as an existing file on  disk,
  10744.         Kermit  will  attempt  to rename the incoming file so as not to destroy
  10745.         (overwrite) the pre-existing one.
  10746.  
  10747. OFF     Upon filename collision, the existing file will be erased and  replaced
  10748.         by the incoming file.  (Default.)
  10749. 7.2. Kermit-370 Subcommands                                            Page 192
  10750.  
  10751. -------------------------------------------------------------------------------
  10752. SET 8-BIT-QUOTE
  10753.  
  10754. Syntax: SET 8-BIT-QUOTE char or ON or OFF
  10755.  
  10756. This  controls  whether eighth-bit prefixing is done and can be used to specify
  10757. the character to be used.  This is one of only two  Send-Init  parameters  that
  10758. cannot be SET separately for SEND and RECEIVE.
  10759.  
  10760. char    Eighth-bit prefixing will be done using char, provided the other Kermit
  10761.         agrees.
  10762.  
  10763. ON      Eighth-bit prefixing will be done, provided the other Kermit explicitly
  10764.         requests it (and specifies the character).
  10765.  
  10766. OFF     Eighth-bit prefixing will not be done.  (Default.)
  10767.  
  10768.  
  10769. SET SEND/RECEIVE
  10770.  
  10771. The  following  parameters  can be set either as SEND or RECEIVE options.  As a
  10772. rule, in each pair, one is the operational value, and  the  other  is  used  to
  10773. change  the default for Send-Init packets received from the other Kermit and to
  10774. set up parameter values as if the other Kermit had specified them on  the  pre-
  10775. vious  exchange.    When both values are described, the operational one will be
  10776. first.  After a transfer, the operational values will  be  unchanged,  but  the
  10777. others  (as  displayed  by  SHOW)  will reflect the parameters specified by the
  10778. other Kermit.  The underlying defaults established by previous SET  subcommands
  10779. will still be in effect.  In the syntax descriptions, mode is SEND or RECEIVE.
  10780.  
  10781.  
  10782. END-OF-LINE
  10783.  
  10784. Syntax: SET mode END-OF-LINE number
  10785.  
  10786. RECEIVE should not be changed.
  10787.  
  10788. SEND  may be needed to establish contact.  If the other system needs packets to
  10789. be terminated by anything other than carriage return, specify the decimal value
  10790. of  the  desired  ASCII character.  number must be in the range 0-31 (decimal).
  10791. The default is 13 (CR).
  10792.  
  10793.  
  10794. PACKET-SIZE
  10795.  
  10796. Syntax: SET mode PACKET-SIZE number
  10797.  
  10798. RECEIVE defines number as the maximum length for incoming packets.   The  valid
  10799. range  is  26-9024,  but 94 is the limit for normal short-packet protocol.  The
  10800. default is 80.  In practice, the size may be limited by hardware  and  program-
  10801. ming considerations.  See the system-specific chapters for details.
  10802.  
  10803. SEND  might  be  needed  for  sending  files  to  a minimal Kermit that neither
  10804. specifies a buffer size in the Send-Init sequence nor can  accept  the  default
  10805. (80).  This parameter has no other function and is meaningful only in the range
  10806. 26-94.
  10807. 7.2. Kermit-370 Subcommands                                            Page 193
  10808.  
  10809. -------------------------------------------------------------------------------
  10810. PAD-CHAR
  10811.  
  10812. Syntax: SET mode PAD-CHAR number
  10813.  
  10814. RECEIVE defines number as the character to be used by the other Kermit for pad-
  10815. ding  packets.   The character must be an ASCII control character (in the range
  10816. 0-31).  The default is 0 (NULL).  This option is seldom useful.
  10817.  
  10818. SEND may be needed to establish contact if the other Kermit (or  the  transmis-
  10819. sion line) needs padded packets.
  10820.  
  10821.  
  10822. PADDING
  10823.  
  10824. Syntax: SET mode PADDING number
  10825.  
  10826. RECEIVE  defines  the  number  of pad characters to be used for padding packets
  10827. from the other Kermit.  This number may be anywhere from 0 to 94.  The  default
  10828. is 0.  This option is seldom useful.
  10829.  
  10830. SEND  may  be needed to establish contact if the other Kermit (or the transmis-
  10831. sion line) needs padded packets.
  10832.  
  10833.  
  10834. QUOTE
  10835.  
  10836. Syntax: SET mode QUOTE char
  10837.  
  10838. SEND indicates a printable character for prefixing (quoting) control characters
  10839. and  other prefix characters.  The only good reason to change this would be for
  10840. sending a file that contains many "#" characters (the normal control prefix) as
  10841. data.    It  must  be  a  single  character  with  ASCII  value 33-62 or 96-126
  10842. (decimal).
  10843.  
  10844. RECEIVE would be needed only for talking to  a  crippled  Kermit  that  uses  a
  10845. non-standard quoting character, but does not admit it.
  10846.  
  10847.  
  10848. START-OF-PACKET
  10849.  
  10850. Syntax: SET mode START-OF-PACKET number
  10851.  
  10852. RECEIVE  defines  number  as  the character to be expected to mark the start of
  10853. packets from the other Kermit.  The character must be an ASCII control  charac-
  10854. ter (in the range 0-31).  The default is 1 (SOH).  This may be needed to estab-
  10855. lish contact.
  10856.  
  10857. SEND may also be needed to establish contact.  It defines number as the charac-
  10858. ter to be used to mark outgoing packets.
  10859. 7.2. Kermit-370 Subcommands                                            Page 194
  10860.  
  10861. -------------------------------------------------------------------------------
  10862. TIMEOUT
  10863.  
  10864. Syntax: SET mode TIMEOUT time
  10865.  
  10866. RECEIVE  defines the time in seconds the other Kermit is to wait for a response
  10867. from Kermit-370 before resending a packet.  The default is 5.   A  value  of  0
  10868. means the other Kermit should wait indefinitely.
  10869.  
  10870. SEND  defines the time in seconds Kermit-370 is to wait for a response from the
  10871. other Kermit before resending a packet.  The default is 0.
  10872.  
  10873.  
  10874.                               THE SHOW SUBCOMMAND
  10875.  
  10876. Syntax: SHOW [option]
  10877.  
  10878. The SHOW subcommand displays the values of all parameters that can  be  changed
  10879. with  the  SET  subcommand, except for ATOE, ETOA, TATOE, and TETOA (for those,
  10880. see the TDUMP subcommand).  If specified, option can be a particular  parameter
  10881. or the keyword "ALL" (the default).  Groups of parameters, such as SEND, can be
  10882. displayed by requesting the group name, or  individual  sub-parameters  can  be
  10883. displayed by specifying the complete name.  For example, 
  10884.  
  10885.   SHOW RECEIVE EOL
  10886.  
  10887. will  display  the  decimal value of the packet terminator that Kermit-370 cur-
  10888. rently expects, i.e., 13.  Similarly, 
  10889.  
  10890.   SHOW FOREIGN
  10891.  
  10892. will display the character strings currently in use for prefix  and  suffix  on
  10893. each outgoing filespec.
  10894.  
  10895.  
  10896.                              THE STATUS SUBCOMMAND
  10897.  
  10898. Syntax: STATUS
  10899.  
  10900. This  subcommand displays information about the previously executed subcommand.
  10901. The response will include either the appropriate error message or  the  message
  10902. "No  errors".    The  initial status is "No file transfers yet".  If the status
  10903. reflects an error condition, the name of the last  file  used  (excluding  TAKE
  10904. files)  will be displayed as well.  If the error was detected by the other Ker-
  10905. mit, the message will be "Micro aborted" followed by the text  from  the  Error
  10906. packet.    Conversely, if Kermit-370 detected the error, the text of the status
  10907. message will have constituted the error packet sent out.  In any case,  if  the
  10908. last  file transfer was cancelled (by virtue of an attribute mismatch or manual
  10909. intervention), the reason for cancellation is displayed.  Also,  if  the  error
  10910. occurred in disk I/O, any available explanatory information is displayed.  Nor-
  10911. mally, the error status is altered only when a  transfer-initiating  subcommand
  10912. (SEND  or RECEIVE) is executed, but in server mode every subcommand is received
  10913. through a transfer from the other Kermit and may affect the status (except  the
  10914. STATUS subcommand itself, of course).  When Kermit-370 has been forced to trun-
  10915. cate one or more records in a RECEIVE operation (because of the current maximum
  10916. record  length),  the number of records truncated is reported.  The status dis-
  10917. play also includes throughput statistics for the last transfer: number of files
  10918. 7.2. Kermit-370 Subcommands                                            Page 195
  10919.  
  10920. -------------------------------------------------------------------------------
  10921. sent,  duration,  number  of  packets,  number  of  retries,  and  averages  of
  10922. bytes/packet and bytes/second.    These  last  two  quantities  are  calculated
  10923. separately for bytes sent and received on the communication (including padding,
  10924. if any), and the last quantity is also calculated on the basis of the number of
  10925. bytes read from or written to disk.
  10926.  
  10927. Finally, if retries were necessary, Kermit-370 computes the optimum packet size
  10928. assuming the retries to have been due to sparse, Poisson-distributed bursts  of
  10929. noise.  This is the same heuristic optimum that Kermit-370 computes and uses as
  10930. an alternative packet-size limit when sending long packets.
  10931.  
  10932.  
  10933.                              THE TDUMP SUBCOMMAND
  10934.  
  10935. Syntax: TDUMP table-name or NAMES
  10936.  
  10937. This displays the contents of table-name.  The same table can be modified using
  10938. the  SET  subcommand.  The ATOE, ETOA, TATOE, and TETOA tables can presently be
  10939. displayed and changed.  Alternatively, the filespec of each file  sent  in  the
  10940. last transfer can be displayed.
  10941.  
  10942.  
  10943.                               THE GIVE SUBCOMMAND
  10944.  
  10945. Syntax: GIVE table-name filespec
  10946.  
  10947. This compares the named table with its default values and saves the differences
  10948. in the form of a TAKE file consisting of SET subcommands that would convert the
  10949. default  into  the  current  arrangement.  ATOE, ETOA, TATOE, and TETOA are the
  10950. available tables.  The details of the filespec are system-dependent, but  those
  10951. details will, in general, be the same as for the TAKE subcommand.
  10952.  
  10953.  
  10954.                               THE HOST SUBCOMMAND
  10955.  
  10956. Syntax: HOST text of command
  10957.  
  10958. This  issues  a  command  to the host operating system from Kermit-370.  When a
  10959. command returns a  non-zero  completion  code,  the  code  will  be  displayed.
  10960. Generally,  the  name of the system (e.g., CMS) is treated as a synonym for the
  10961. HOST subcommand.
  10962.  
  10963.  
  10964.                              THE KERMIT SUBCOMMAND
  10965.  
  10966. Syntax: KERMIT text of subcommand
  10967.  
  10968. This is provided for redundancy as the  counterpart  of  the  HOST  subcommand.
  10969. Kermit-370  executes  the  specified text as a Kermit subcommand just as if the
  10970. LOCAL prefix had been entered.
  10971. 7.2. Kermit-370 Subcommands                                            Page 196
  10972.  
  10973. -------------------------------------------------------------------------------
  10974.                         THE ECHO AND XECHO SUBCOMMANDS
  10975.  
  10976. Syntax: [X]ECHO line
  10977.  
  10978. These subcommands type the line back at the user.  The line may contain control
  10979. characters  or  any desired text, including upper or lower case.  These subcom-
  10980. mands may be used, for example, to test the ASCII/EBCDIC translate tables or to
  10981. issue coded commands to the user's terminal.  XECHO differs from ECHO primarily
  10982. in that it uses transparent mode if CONTROLLER is SERIES1 or GRAPHICS.  It also
  10983. offers  its  own brand of control-character quoting, using the "^" character to
  10984. indicate that only the five low-order bits of the ASCII codes are to  be  used.
  10985. Thus,  "^a",  "^A", and "^!" are all translated to SOH (CTRL-A), while "^[" be-
  10986. comes ESC.  However, there must be one exception for "^" itself: "^>" and  "^~"
  10987. are both translated to RS (CTRL-^), but "^^" becomes just "^".
  10988.  
  10989.  
  10990.                         THE TYPE AND XTYPE SUBCOMMANDS
  10991.  
  10992. Syntax: [X]TYPE filespec
  10993.  
  10994. These  subcommands  type  the named file.  XTYPE differs from TYPE primarily in
  10995. that it uses transparent mode if CONTROLLER is SERIES1 or GRAPHICS,  and  sends
  10996. the data in bursts no larger than the current SEND PACKET-SIZE.  TYPE is effec-
  10997. tively a synonym for (and allows the same options as) the host  system  command
  10998. for listing files, but XTYPE merely sends the file "raw".
  10999.  
  11000.  
  11001. 7.3. Before Connecting to the Mainframe
  11002.  
  11003. Several  flags  must be set on the micro version of Kermit before connecting to
  11004. an IBM 370 system as a "TTY" device.  You should set the LOCAL-ECHO flag to  ON
  11005. (to  indicate  half-duplex).  This is the norm but not true in absolutely every
  11006. case; if each  character  appears  twice  on  your  terminal  screen,  set  the
  11007. LOCAL-ECHO  flag  OFF.  FLOW-CONTROL should be set to NONE, and on some systems
  11008. HANDSHAKE should be set to XON.  The parity should  be  set  according  to  the
  11009. system's specifications.  On some micro versions of Kermit, all of the above is
  11010. done in one step using the DO IBM macro (or SET IBM ON).  Set the baud rate  to
  11011. correspond to the line speed.
  11012.  
  11013. Connecting  through a "SERIES1" or "GRAPHICS" device also requires that certain
  11014. flags be set on the micro version of Kermit.  You  should  set  the  LOCAL-ECHO
  11015. flag to OFF (to indicate full-duplex).  FLOW-CONTROL should be set to XON/XOFF,
  11016. and HANDSHAKE should be set to OFF.  For many systems, the PARITY should be set
  11017. to EVEN.  Set the baud rate to correspond to the line speed.
  11018.  
  11019. One  exception  to these rules is the case where the micro Kermit is attempting
  11020. automated  file  transfer,  e.g.,  downloading  several  separate  files   from
  11021. Kermit-370  running  in server mode.  In fact, under those circumstances, hand-
  11022. shaking is necessary even with "SERIES1" connections, and the two Kermits  must
  11023. be  instructed to adopt a common handshake character (e.g., by SET HANDSHAKE 10
  11024. to Kermit-370 and SET HANDSHAKE LF to the micro).
  11025.  
  11026. In any case, you should make sure that either the micro  Kermit  or  Kermit-370
  11027. will  provide  timeouts  during file transfers (if not both).  Some versions of
  11028. Kermit-370 (notably CMS) cannot provide timeouts, and you may need to  set  the
  11029. TIMER to ON in the micro.
  11030. 7.4. After Returning from Kermit-370                                   Page 197
  11031.  
  11032. -------------------------------------------------------------------------------
  11033. 7.4. After Returning from Kermit-370
  11034.  
  11035. When  Kermit-370  receives a QUIT or EXIT subcommand or finishes the subcommand
  11036. or subcommands specified in the original command string  that  invoked  Kermit,
  11037. control is returned to the caller.  Before returning, Kermit-370 closes any ac-
  11038. tive TAKE files (the EXIT or QUIT subcommand may be issued from a  TAKE  file).
  11039. On  return,  the completion code is set from the current error status according
  11040. to the codes in Table 7-0.
  11041.  
  11042. -------------------------------------------------------------------------------
  11043.  
  11044.  
  11045. Code  Symbol  Error Message
  11046.  0    NOE     No errors
  11047.  1    NFT     No file transfers yet
  11048.  2    TRC     Transfer cancelled
  11049.  3    USC     Invalid server command
  11050.  4    TIE     Terminal I/O error
  11051.  5    BPC     Bad packet count or chksum
  11052.  6    IPS     Invalid packet syntax
  11053.  7    IPT     Invalid packet type
  11054.  8    MIS     Lost a packet
  11055.  9    NAK     Micro sent a NAK
  11056. 10    ABO     Micro aborted
  11057. 11    FNE     Invalid file name
  11058. 12    FNF     File not found
  11059. 13    FUL     Disk or file is full
  11060. 14    DIE     Disk I/O error
  11061. 15    MOP     Missing operand
  11062. 16    SYS     Illegal system command
  11063. 17    KCE     Kermit command error
  11064. 18    TIM     No packet received
  11065. 19    RTR     Records truncated
  11066. 20    COM     Bad communication line
  11067.  
  11068.              Table 7-1:   Error messages and codes for Kermit-370
  11069.  
  11070.  
  11071.  
  11072. -------------------------------------------------------------------------------
  11073.  
  11074.  
  11075. 7.5. What's New
  11076.  
  11077. Below is a list of the additions in Version 4.0 of Kermit-370:
  11078.  
  11079.    1. Code reorganization into generic 370 and system-specific sections.
  11080.  
  11081.    2. Optional separate translation tables for  counteracting  the  system
  11082.       conversion of terminal I/O.
  11083.  
  11084.    3. New GIVE subcommand for saving a modified translation table.
  11085.  
  11086.    4. A  new,  RAW debug mode for recording the packet traffic as actually
  11087.       sent and received on "GRAPHICS" and "SERIES1" devices.
  11088. 7.5. What's New                                                        Page 198
  11089.  
  11090. -------------------------------------------------------------------------------
  11091.    5. Preservation of the case of subcommands  as  typed,  with  uppercase
  11092.       conversion of only those words that must be uppercase.
  11093.  
  11094.    6. New  SET  MARGIN  subcommand  for limiting the width of a file to be
  11095.       sent.
  11096.  
  11097.    7. Settable tab  stops  for  Kermit's  conversion  of  tabs  to  spaces
  11098.       (alternative to the default 1, 9, 17, etc.).
  11099.  
  11100.    8. Replace SET SERIES1 subcommand with new SET CONTROLLER.  Support for
  11101.       multiple terminal controller types.
  11102.  
  11103.    9. New DIRECTORY and HOST subcommands following Kermit standard.
  11104.  
  11105.   10. Combination of file-attribute SET subcommands (FILE-TYPE, LRECL, and
  11106.       RECFM) into a new group SET FILE.
  11107.  
  11108.   11. Separate retry limits for initial and subsequent packet exchanges.
  11109.  
  11110.   12. Pad binary records on disk with nulls, rather than blanks.
  11111.  
  11112.   13. Automatically tune packet length when sending long packets according
  11113.       to heuristic optimum based on sparse  Poisson  statistics,  provided
  11114.       that transmission errors do occur.
  11115.  
  11116.   14. Expand  STATUS  report  to  include  the number of files in the last
  11117.       transfer, throughput statistics,  heuristic  optimum  packet  length
  11118.       (when  long packets are enabled), and the reason for any file rejec-
  11119.       tion based on A-packets.
  11120.  
  11121.   15. New subcommand TDUMP NAMES to display the list of files sent in  the
  11122.       last transfer.
  11123.  
  11124.   16. Add file creation date to A-packet repertoire.
  11125.  
  11126.   17. REMOTE COPY and REMOTE RENAME commands to a server at the other end.
  11127.  
  11128.   18. Allow long packets through a 7171 with VTAM.
  11129.  
  11130.   19. New  type D-BINARY for binary files with undelimited variable-length
  11131.       records.
  11132.  
  11133.   20. SET 8-BIT-QUOTE.  Allow 8-bit data where possible via SET PARITY.
  11134.  
  11135.   21. SET SYSCMD, so that Kermit can be told to try "illegal"  subcommands
  11136.       as host system commands instead of just rejecting them.
  11137.  
  11138.   22. SET PROMPT subcommand.
  11139.  
  11140.   23. Do not forget parameters specified by the other Kermit in I-packets.
  11141.  
  11142.   24. Keep  track  of  truncated  records  during  a RECEIVE operation and
  11143.       report the count in STATUS; also  call  truncation  an  error  after
  11144.       everything is received.
  11145.  
  11146.   25. SET  HANDSHAKE  subcommand  to alter or suppress handshake character
  11147. 7.5. What's New                                                        Page 199
  11148.  
  11149. -------------------------------------------------------------------------------
  11150.       Kermit-370 sends out after each packet.
  11151.  
  11152. Both SEND and GET prompt the user for native and foreign filespecs  if  no  ar-
  11153. guments are entered.
  11154.  
  11155.  
  11156. 7.6. What's Missing
  11157.  
  11158. Work  on  Kermit-370 will continue.  Features that need to be improved or added
  11159. include:
  11160.  
  11161.    - Detect file properties from Attribute packets  and  allow  overriding
  11162.      current parameter settings.  Also implement file archiving.
  11163.  
  11164.    - Add SET REPEAT subcommand.
  11165.  
  11166.    - Improve Kermit-370 operation as a local Kermit.
  11167.  
  11168.    - Recover  from sudden line degradation by retransmitting partial pack-
  11169.      ets.
  11170.  
  11171.    - System-specific upgrades; see the respective chapters for details.
  11172. 8. IBM VM/CMS KERMIT                                                   Page 200
  11173.  
  11174. -------------------------------------------------------------------------------
  11175. 8. IBM VM/CMS KERMIT
  11176.  
  11177. Program:      John Chandler (Harvard/Smithsonian Center for Astrophysics); con-
  11178.               tributions  from Vace Kundakci and Daphne Tzoar (Columbia U), Bob
  11179.               Shields (U. Maryland), Victor Lee (Queens U.),  Gary  Bjerke  (U.
  11180.               Texas  at  Austin),  Greg  Small  (UC  Berkeley),  Clark  Frazier
  11181.               (Harvard Bus. Sch.), Bob Bolch and Steve Blankinship  (Triangle),
  11182.               Ron Rusnak (U. Chicago), Andre Pirard (U. Liege)
  11183. Language:     IBM/370 Assembler
  11184. Documentation:
  11185.               John Chandler (CfA)
  11186. Version:      4.0 (88/1/31)
  11187. Date:         1988 February
  11188.  
  11189.  
  11190. Kermit-CMS Capabilities At A Glance:
  11191.  
  11192.   Local operation:                   No
  11193.   Remote operation:                  Yes
  11194.   Transfers text files:              Yes
  11195.   Transfers binary files:            Yes
  11196.   Wildcard send:                     Yes
  11197.   ^X/^Z interruption:                Yes (through micro)
  11198.   Filename collision avoidance:      Yes
  11199.   Can time out:                      No
  11200.   8th-bit prefixing:                 Yes
  11201.   Repeat count prefixing:            Yes
  11202.   Alternate block checks:            Yes
  11203.   Terminal emulation:                No
  11204.   Communication settings:            No
  11205.   Transmit BREAK:                    No
  11206.   Transaction logging:               Yes
  11207.   Session logging:                   No
  11208.   Raw transmit:                      Yes (no prompts)
  11209.   Sliding window:                    No
  11210.   Long packets:                      Yes
  11211.   Act as server:                     Yes
  11212.   Talk to server:                    Yes
  11213.   Advanced server functions:         Yes
  11214.   Advanced commands for servers:     Yes
  11215.   Local file management:             Yes
  11216.   Handle Attribute Packets:          Yes
  11217.   Command/init files:                Yes
  11218.   Command macros:                    No
  11219.  
  11220. Kermit-CMS is a member of the generic Kermit-370 family and shares most of  the
  11221. features and capabilities of the group.  As its name implies, Kermit-CMS is the
  11222. version of Kermit-370 that runs under the VM/CMS operating system.  The primary
  11223. documentation  for  Kermit-CMS  is  actually  the  chapter on Kermit-370, which
  11224. describes general  properties;  the  present  chapter  assumes  the  reader  is
  11225. familiar  with  that material.  Only the details specific to CMS operation will
  11226. be discussed here, e.g., command syntax relating to the CMS file system or com-
  11227. mands not offered in general by Kermit-370.
  11228. 8. IBM VM/CMS KERMIT                                                   Page 201
  11229.  
  11230. -------------------------------------------------------------------------------
  11231. CMS Specifics of Kermit-370:
  11232.  
  11233.   Global INIT file:                  SYSTEM KERMINI *
  11234.   User INIT file:                    <userid> KERMINI *
  11235.   Debug packet log:                  KER LOG A1
  11236.   Server reply log:                  KER REPLY A1
  11237.   Maximum packet size:               1913
  11238.   Maximum disk LRECL:                65535
  11239.  
  11240.  
  11241. 8.1. The VM/CMS File System
  11242.  
  11243. The  features  of  the CMS file system of greatest interest to Kermit users are
  11244. the format of file specifications (or filespecs) and the  concept  of  records.
  11245. The latter is described in the Kermit-370 chapter.
  11246.  
  11247. The VM/CMS filespec takes the form 
  11248.  
  11249.   filename filetype filemode
  11250.  
  11251. (often  abbreviated  FN  FT  FM).    The filename and filetype are one to eight
  11252. characters each.  The name field is the primary identifier for  the  file,  and
  11253. the  type  is an indicator which, by convention, tells what kind of file it is.
  11254. For instance, TEST FORTRAN is the source  of  a  Fortran  program  named  TEST.
  11255. MODULE  is  the filetype for executable programs (as distinct from object code,
  11256. which has a filetype of TEXT!).  Although some operating systems  consider  the
  11257. filetype optional, VM/CMS requires a type for each file.  Therefore, Kermit-CMS
  11258. supplies a default type of "$" for any received file if no type is provided  by
  11259. the  remote  system.   The same default is used for a missing filename.  At the
  11260. same time, the FN and FT are forced to conform to CMS rules in other  respects.
  11261. The  FN  and  FT  may contain, in any order, uppercase letters, digits, and the
  11262. special characters "$" (dollar sign), "#" (pound  sign),  "@"  (at  sign),  "+"
  11263. (plus),  "-" (hyphen), ":" (colon), and "_" (underscore).  Other characters may
  11264. be not be included.  If an invalid character is found in the FN or FT field, it
  11265. is  replaced  by  an underscore (or converted to uppercase if it is a lowercase
  11266. letter).  Also, both FN and FT are truncated, if necessary,  to  eight  charac-
  11267. ters.
  11268.  
  11269. The  filemode,  which consists of a letter and a number, is similar to a device
  11270. specification on microcomputer systems: FN FT FM would translate to FM:FN.FT in
  11271. CP/M  or MS-DOS if the filemode number is ignored.  Indeed, the filemode number
  11272. is more properly an attribute of a file than part of its name -- no  two  files
  11273. can  co-exist  with  names  that  match  all but the filemode number.  Even the
  11274. filemode letter is not a fixed part of the filespec because the same  mini-disk
  11275. could  be  accessed  under a different mode letter.  In some ways, the filemode
  11276. letter is also like a disk directory designator, since many such mini-disks may
  11277. reside  on  the  same  disk  drive.  For this reason, the Kermit concept of the
  11278. "working directory" is  equated  with  a  particular  disk  mode  letter  under
  11279. Kermit-CMS.    The  current  "working  directory" is, thus, the "home" filemode
  11280. (normally "A", which is the primary user mini-disk under CMS), and file  trans-
  11281. fers take place preferentially to and from the "home" disk.  If the filemode is
  11282. omitted from a filespec when sending, the "home" disk  is  normally  used,  but
  11283. there  is  an  option  for  using  a default of "*" instead.  In this case, the
  11284. user's disks are scanned according to the search order and the first occurrence
  11285. of  the  file  is  the  one  that  is  sent.  If the filemode is omitted from a
  11286. filespec when receiving, the "home" disk is used with a filemode number of "1".
  11287. 8.1. The VM/CMS File System                                            Page 202
  11288.  
  11289. -------------------------------------------------------------------------------
  11290. To provide compatibility with other operating systems, when Kermit-CMS sends  a
  11291. file,  it  ordinarily  makes a file header with only the filename and filetype.
  11292. It also converts the intervening blank to a period.  On the other  hand,  extra
  11293. information may be added by way of the SET FOREIGN subcommand.
  11294.  
  11295. VM/CMS  allows a group of files to be specified in a single filespec by includ-
  11296. ing the special "wildcard" characters "*" and "%".  A "*" matches any string of
  11297. characters  (even  a  null  string) from the current position to the end of the
  11298. field; a "%" matches any single character.  Here are some examples:
  11299.  
  11300.   * COBOL A   All files of type COBOL (all COBOL source files) on the A disk.
  11301.  
  11302.   F* * *      All files whose names start with F.
  11303.  
  11304.   % * B       All B-disk files with one-character FN's.
  11305.  
  11306. CMS files, like those in other IBM 370 systems, are  record-oriented  (see  the
  11307. introduction  to the Kermit-370 chapter).  In particular, CMS files are charac-
  11308. terized by record format (RECFM), which may be fixed-length or  varying-length,
  11309. and by maximum record length (LRECL).  The size of record blocks is irrelevant,
  11310. however, because CMS performs the blocking and deblocking operations  automati-
  11311. cally  and  transparently, including the spanning of records across block boun-
  11312. daries.  Records in CMS files may be up to 65535 bytes long.
  11313.  
  11314. Another file system feature of occasional interest is the  means  of  reporting
  11315. errors.    When Kermit-CMS encounters a disk error, it records the function and
  11316. error code for inclusion in the STATUS report.  The explanations can  be  found
  11317. in  the  CMS  reference  manual under the FSREAD and FSWRITE macros (which cor-
  11318. respond to the RDBUF and WRBUF functions).
  11319.  
  11320.  
  11321. 8.2. Program Operation
  11322.  
  11323. At startup time, Kermit-CMS looks for two initialization files, SYSTEM  KERMINI
  11324. and  <userid>  KERMINI  (where  <userid> is the user's logon ID).  If either of
  11325. these files exists on more than one disk, it will be read and executed from the
  11326. first  copy in the search order.  The file SYSTEM KERMINI should be placed on a
  11327. publicly accessible disk by a systems  programmer,  preferably  the  same  disk
  11328. where  the  Kermit executable module is kept.  The file <userid> KERMINI can be
  11329. maintained by the user on any convenient disk.
  11330.  
  11331. One important distinction between  Kermit-CMS  and  other  Kermits  is  that  a
  11332. program  running  under  VM/CMS is unable to interrupt a read on its "console".
  11333. This means that the CMS version of Kermit  cannot  time  out  after  sending  a
  11334. packet.    The  only way to time out is from the other side:  typing a carriage
  11335. return to the local Kermit causing it to retransmit  its  last  packet,  or  an
  11336. automatic timeout as provided by most other Kermits.
  11337.  
  11338. Five  CP  SET  parameters  (MSG, IMSG, WNG, ACNT, and TIMER) are set OFF during
  11339. protocol mode (and restored afterwards) to prevent CP from interrupting any I/O
  11340. in  progress, and RUN is set ON to ensure that Kermit can recover from acciden-
  11341. tal attention interrupts.  Also, on a TTY line, the TERMINAL  LINESIZE  is  set
  11342. OFF  to  prevent CP from inserting carriage return-linefeed pairs into packets,
  11343. TERMINAL SCROLL is set to CONT to prevent CP pauses, LINEDIT is set OFF to  en-
  11344. sure  that all characters are taken literally, and the CMS user terminal trans-
  11345. lation tables (established via the CMS SET INPUT and OUTPUT commands) are  tem-
  11346. 8.2. Program Operation                                                 Page 203
  11347.  
  11348. -------------------------------------------------------------------------------
  11349. porarily  suppressed for both short and long packet protocols.  The settings in
  11350. effect when Kermit starts up are saved as a sort of  "normal"  status  snapshot
  11351. (as  opposed  to the "protocol" status just described).  The protocol status is
  11352. selected whenever Kermit enters protocol mode and also after Kermit executes  a
  11353. CP  command  in  server mode.  Similarly, normal status is selected when Kermit
  11354. leaves protocol mode and before Kermit executes a CP command  in  server  mode.
  11355. Note:  if  Kermit  is interrupted in the midst of a transfer or while in server
  11356. mode, these parameters  will  be  left  with  peculiar  settings  (namely,  the
  11357. protocol status), and they may need to be restored by hand.
  11358.  
  11359. CMS is different from some other IBM mainframe systems in that allows a program
  11360. to take control of prompting and synchronization on "TTY"  lines.    Kermit-CMS
  11361. takes  advantage of this option, and it is not, in general, necessary to enable
  11362. handshaking on the micro Kermit before connecting to  CMS.    In  other  words,
  11363. handshaking  should  be  suppressed  for  both "TTY" and "SERIES1" devices (the
  11364. micro Kermit should have HANDSHAKE set OFF, and Kermit-CMS  should  have  HAND-
  11365. SHAKE  set  to  0).    Since  the generic Kermit-370 default handshake (XON) is
  11366. retained in Kermit-CMS, the subcommand "SET HANDSHAKE 0" is  a  good  candidate
  11367. for inclusion in SYSTEM KERMINI.
  11368.  
  11369.  
  11370. Interactive Operation:
  11371.  
  11372. To  run Kermit-CMS interactively, invoke the program from CMS by typing KERMIT.
  11373. When you see the prompt, 
  11374.  
  11375.   Kermit-CMS>
  11376.  
  11377. you may type a Kermit subcommand.  When the subcommand completes, Kermit issues
  11378. another  prompt.    The cycle repeats until you exit from the program.  For ex-
  11379. ample:
  11380.  
  11381.   KERMIT
  11382.  
  11383.   Kermit-CMS Version 4.0 (88/1/31)
  11384.   Enter ? for a list of valid commands
  11385.  
  11386.   Kermit-CMS>send foo *
  11387.  
  11388.     Files with fn FOO are sent
  11389.  
  11390.   Kermit-CMS>receive test spss
  11391.  
  11392.     File is received and called TEST SPSS A1
  11393.  
  11394.   Kermit-CMS>exit
  11395.  
  11396. The prompt string under CMS is truly interactive.  In other words,  the  string
  11397. (without  carriage  return or linefeed) appears only when fresh input is needed
  11398. from the terminal.  If, for example, Kermit is invoked  after  several  subcom-
  11399. mands  have  been  stacked  up, the stack is read and executed before the first
  11400. prompt appears.
  11401. 8.2. Program Operation                                                 Page 204
  11402.  
  11403. -------------------------------------------------------------------------------
  11404. Command Line Invocation:
  11405.  
  11406. Kermit-CMS may also be invoked with command line arguments from CMS.   The  ar-
  11407. guments  are  interpreted  as  one or more subcommands to be executed by Kermit
  11408. after completion of the initialization.  For instance:
  11409.  
  11410.   KERMIT send test fortran
  11411.  
  11412. or
  11413.  
  11414.   KERMIT set debug on # set file binary # server
  11415.  
  11416. Kermit will exit and return to CMS after completing the specified subcommand or
  11417. subcommands.    Note  that several commands may be given on the command line as
  11418. long as they are separated by the LINEND character, which is pound sign in this
  11419. case.  Note that the LINEND is a concept of CP, rather than Kermit, and applies
  11420. only to commands entered from the terminal and only when LINEDIT is on.  A com-
  11421. mand line may contain up to 130 characters.
  11422.  
  11423.  
  11424. EXEC Operation:
  11425.  
  11426. Like  other  CMS  programs, Kermit-CMS may be invoked from a CMS EXEC.  Subcom-
  11427. mands can be passed to Kermit using the program stack and/or command  line  ar-
  11428. guments.   For example, to start up Kermit-CMS and have it act as a server, in-
  11429. clude the line:
  11430.  
  11431.   KERMIT server
  11432.  
  11433. To pass more than one subcommand, they must be stacked in the  order  in  which
  11434. they  are to be executed.  To start up a Kermit-CMS server with a three charac-
  11435. ter CRC, include:
  11436.  
  11437.   &STACK set block 3
  11438.   &STACK server
  11439.   KERMIT
  11440.  
  11441. Another way of setting up multiple subcommands would be to collect the  subcom-
  11442. mands  into a TAKE file and then issue the TAKE subcommand via the command line
  11443. or program stack.  Of course,  EXEC's  may  be  executed  from  Kermit,  either
  11444. directly  or  from  a TAKE file, and Kermit subcommands, in turn, may be issued
  11445. from EXEC's as long as Kermit is active.  See  the  TAKE  subcommand  for  more
  11446. details.
  11447.  
  11448.  
  11449. Server mode:
  11450.  
  11451. Command  execution  in server mode is different in several respects from normal
  11452. operation.  First of all, some Kermit subcommands are not allowed (see the list
  11453. of  subcommands  in  the  Kermit-370 chapter).  Moreover, command errors always
  11454. terminate any active TAKE file.  Also, commands other than CP commands run in a
  11455. special  environment  with RUN ON, TIMER OFF, and so forth.  Another difference
  11456. is that Kermit intercepts all SVC instructions in order to  catch  console  I/O
  11457. and  transmit  the data to the local Kermit as text packets.  Since Kermit does
  11458. not emulate the substitution functions of the LINEDIT macro, some messages will
  11459. appear  rather  cryptic.   A more serious problem with this redirection is that
  11460. 8.2. Program Operation                                                 Page 205
  11461.  
  11462. -------------------------------------------------------------------------------
  11463. some VM/CMS system commands may issue console I/O directly to CP, so that  some
  11464. messages  never  appear  to the local Kermit (except, perhaps, as bad packets).
  11465. For non-TTY terminals, such messages are stacked up in the console output queue
  11466. and appear all at once when Kermit returns from server mode.
  11467.  
  11468.  
  11469. 8.3. Kermit-CMS Subcommands
  11470.  
  11471. Kermit-CMS  supports all the subcommands described in the corresponding section
  11472. of the Kermit-370 chapter.  In addition, there are two more, both of which  can
  11473. be  issued  as  remote  Kermit commands when Kermit-CMS is in server mode.  The
  11474. first is CMS, which is just a synonym for the generic  HOST  subcommand.    The
  11475. second  is  CP,  which  specifically  issues  a  command  to  CP.  In most cir-
  11476. cumstances, the latter is not needed, since CMS will pass along CP commands  to
  11477. CP.
  11478.  
  11479. The remainder of this section concentrates on the subcommands that have special
  11480. form or meaning for Kermit-CMS.  See also the chapter on Kermit-370 for further
  11481. details.
  11482.  
  11483.  
  11484.                               THE SEND SUBCOMMAND
  11485.  
  11486. Syntax: SEND filespec [foreign-filespec]
  11487.  
  11488. The SEND subcommand causes a file or file group to be sent from CMS to the Ker-
  11489. mit on the other system.  filespec takes the form:  
  11490.  
  11491.   filename filetype [filemode]
  11492.  
  11493. but the filemode if optional only if the foreign-filespec is omitted.
  11494.  
  11495. filespec may contain the wildcard characters "*" or "%".  If filespec  contains
  11496. wildcard  characters then all matching files will be sent.  If, however, a file
  11497. exists by the same name on more than one disk, only the  first  one  Kermit-CMS
  11498. encounters, according to the disk search order, is sent.  See also the CWD sub-
  11499. command.
  11500.  
  11501. The foreign-filespec, if any, is used for the file header of the outgoing file,
  11502. replacing  the  usual  filename.filetype  copied from the CMS filespec.  It may
  11503. take one of two forms:  
  11504.  
  11505.   filename filetype
  11506.  
  11507. or 
  11508.  
  11509.   arbitrary-string
  11510.  
  11511. Normally, this form of the SEND subcommand is used only for  single  files  be-
  11512. cause  the  foreign-filespec  is  used  only  for  the  first  file  of a group
  11513. (subsequent files having default headers).  However, in the two-token  form  of
  11514. the  foreign-filespec either the name or type may be an Equals sign "=" to sig-
  11515. nify that the corresponding CMS name or type is to  be  retained  in  the  file
  11516. header.   In that case, the partial renaming carries through an entire group of
  11517. files.  It is the user's responsibility to prevent such partial  renaming  from
  11518. sending duplicate file headers within a file group.
  11519. 8.3. Kermit-CMS Subcommands                                            Page 206
  11520.  
  11521. -------------------------------------------------------------------------------
  11522. Although the file transfer cannot be cancelled from the CMS side, Kermit-CMS is
  11523. capable of responding to "cancel file" or "cancel batch" signals from the local
  11524. Kermit;  these  are typically entered by typing Control-X or Control-Z, respec-
  11525. tively.
  11526.  
  11527.  
  11528.                             THE RECEIVE SUBCOMMAND
  11529.  
  11530. Syntax: RECEIVE [filespec]
  11531.  
  11532. The RECEIVE subcommand tells Kermit to receive a file or file  group  from  the
  11533. other system.  You should then issue a SEND subcommand to the other Kermit.
  11534.  
  11535. The format of filespec is:  
  11536.  
  11537.   filename filetype [filemode]
  11538.  
  11539. If  the  optional filespec is omitted, Kermit-CMS will use the name(s) provided
  11540. by the other Kermit.  If that name is not a legal  CMS  file  name,  Kermit-CMS
  11541. will  delete  excess  characters  and  will change illegal characters to under-
  11542. scores.  A filespec in the subcommand indicates what  name  the  incoming  file
  11543. should be given.  The filespec may include a filemode to designate the destina-
  11544. tion disk.  If none is provided, the file will be saved on the "home" disk with
  11545. filemode  number  "1".    If  you  want  to  use  the same name but a different
  11546. filemode, specify "= = FM".  Wildcards may not be used.
  11547.  
  11548. If the optional filespec is provided, but more than one file arrives, the first
  11549. file  will be stored under the given filespec, and the remainder will be stored
  11550. under their own names on the "home" disk.  If, however, "= = FM" is  used,  all
  11551. files will be placed onto the specified disk.
  11552.  
  11553. When  the  record  format  is  "F", any received record longer than the logical
  11554. record length (LRECL) will be truncated, and shorter records  will  be  padded.
  11555. The  padding  character  is a blank for text files and a null for binary files.
  11556. Received binary (but not V-binary  or  D-binary)  files  are  treated  as  byte
  11557. streams  and  broken up into records all of the logical record length.  See the
  11558. SET FILE TYPE, SET FILE LRECL, and SET FILE RECFM subcommands.
  11559.  
  11560. If an error occurs during the file  transfer,  as  much  of  the  file  as  was
  11561. received  is  saved on disk.  If the sending of a file is cancelled by the user
  11562. of the foreign system, Kermit-CMS will discard whatever had arrived, unless AP-
  11563. PEND is ON or INCOMPLETE is KEEP.
  11564.  
  11565. If the incoming file has the same name as an existing file, and WARNING is OFF,
  11566. the original file will  be  overwritten.    If  WARNING  is  set  ON,  however,
  11567. Kermit-CMS will change the incoming name so as not to obliterate the pre-exist-
  11568. ing file.  It attempts to find a unique  name  by  successively  modifying  the
  11569. original  and checking for the existence of such a file at each step.  The pro-
  11570. cedure begins by truncating the filetype to six characters  if  necessary,  and
  11571. then  appending  "$0".  If a file by that name exists, Kermit then replaces the
  11572. "0" with a "1".  It continues in this manner up to "9", and if an  unused  name
  11573. cannot be found, the transfer fails.
  11574. 8.3. Kermit-CMS Subcommands                                            Page 207
  11575.  
  11576. -------------------------------------------------------------------------------
  11577.                               THE GET SUBCOMMAND
  11578.  
  11579. Syntax: GET foreign-filespec [filespec]
  11580.  
  11581. The  GET subcommand tells Kermit to request a file or file group from the other
  11582. system, which must have a Kermit running in server mode.  The syntax is compli-
  11583. cated  by  the  allowance of two forms for the foreign-filespec, just as in the
  11584. SEND subcommand.    Here  the  parsing  is  based  on  the  number  of  "words"
  11585. (blank-delimited  strings)  in  the  subcommand argument, which can be anything
  11586. from one to five.  If the number is anything but four,  the  interpretation  is
  11587. unambiguous,  but when there are four words, the first word plays the key role.
  11588. If it has more than eight characters or contains a "." or "/", it is assumed to
  11589. be  the whole foreign-filespec; otherwise, it is assumed to be the first of two
  11590. words that, when joined by a ".", make up the filespec on the other system.
  11591.  
  11592.  
  11593.                               THE TAKE SUBCOMMAND
  11594.  
  11595. Syntax: TAKE filespec
  11596.  
  11597. Execute Kermit subcommands from the specified file, where filespec has the for-
  11598. mat  fn [ft [fm]].  The default filetype is "TAKE", and the default filemode is
  11599. "*".
  11600.  
  11601. Kermit subcommands may also be executed from CMS EXEC's, so that the TAKE  sub-
  11602. command  is,  in a sense, superfluous under VM/CMS.  In CMS terminology, Kermit
  11603. establishes a Kermit subcommand environment, and EXEC's written in  EXEC  2  or
  11604. REXX  may  invoke subcommands within that environment.  For example, to display
  11605. the current packet checksum type, an EXEC 2 would issue 
  11606.  
  11607.   &SUBCOMMAND KERMIT SHOW BLOCK-CHECK
  11608.  
  11609. and a REXX macro would issue 
  11610.  
  11611.   Address KERMIT 'SHOW BLOCK-CHECK'
  11612.  
  11613. There is one important difference between executing a TAKE file  and  an  EXEC:
  11614. the  former may issue a QUIT or EXIT subcommand, but the latter may not.  Also,
  11615. a Kermit subcommand issued from an EXEC returns a completion code according  to
  11616. the  current  error status (see the table under "After Kermit Completes" in the
  11617. Kermit-370 chapter).  An EXEC could therefore be set up to react  appropriately
  11618. to file transmission errors or other unpredictable events.
  11619.  
  11620.  
  11621.                               THE SET SUBCOMMAND
  11622.  
  11623. Syntax: SET parameter [value]
  11624.  
  11625. The  SET subcommand establishes or modifies various parameters controlling file
  11626. transfers.  The following SET parameters are available in Kermit-CMS,  but  not
  11627. in Kermit-370 in general:
  11628.  
  11629. DESTINATION         "Home" disk.
  11630. FILE
  11631.   LRECL             Logical Record length for incoming file.
  11632.   RECFM             Record format for incoming files.
  11633. 8.3. Kermit-CMS Subcommands                                            Page 208
  11634.  
  11635. -------------------------------------------------------------------------------
  11636. SEARCH-ALL          Determine the default disk search scope.
  11637.  
  11638.  
  11639. SET DESTINATION
  11640.  
  11641. Syntax: SET DESTINATION letter
  11642.  
  11643. This subcommand is equivalent to the CWD subcommand (q.v.).
  11644.  
  11645.  
  11646. SET FILE LRECL
  11647.  
  11648. Syntax: SET FILE LRECL number
  11649.  
  11650. This  sets  the  logical record length for incoming files to a number from 1 to
  11651. 65535 (64K-1).  This variable is used only for fixed format and  binary  files.
  11652. The default is 80.
  11653.  
  11654.  
  11655. SET FILE RECFM
  11656.  
  11657. Syntax: SET FILE RECFM option
  11658.  
  11659. This  sets  the  record  format  to  use for incoming files.  Valid options are
  11660. "Fixed" and "Variable" (the default).  Fixed-format records are padded or trun-
  11661. cated, as needed, to the current LRECL.
  11662.  
  11663.  
  11664. SET SEARCH-ALL
  11665.  
  11666. Syntax: SET SEARCH-ALL ON or OFF
  11667.  
  11668. ON      If the user omits the filemode from a SEND subcommand (or a GET request
  11669.         to the other Kermit), Kermit-CMS will search all accessed disks for the
  11670.         named file or files.
  11671.  
  11672. OFF     If  the  filemode  is  not  specified,  only  the  "home"  disk and its
  11673.         read-only extensions will be searched for matching files.  (Default.)
  11674.  
  11675.  
  11676.                               THE CWD SUBCOMMAND
  11677.  
  11678. Syntax: CWD letter
  11679.  
  11680. The CWD  (Change  Working  Directory)  subcommand  establishes  a  new  default
  11681. ("home")  CMS  disk.  letter may be the mode letter of any accessed disk.  Sub-
  11682. sequent file transfers take place preferentially to and from the default  disk.
  11683. The initial home disk is "A".  Note: setting the home disk in Kermit has no ef-
  11684. fect on the CMS search order.
  11685. 8.3. Kermit-CMS Subcommands                                            Page 209
  11686.  
  11687. -------------------------------------------------------------------------------
  11688.                            THE DIRECTORY SUBCOMMAND
  11689.  
  11690. Syntax: DIRECTORY [filespec]
  11691.  
  11692. Under Kermit-CMS, the DIRECTORY subcommand is identical  to  the  CMS  LISTFILE
  11693. command.
  11694.  
  11695.  
  11696.                              THE SPACE SUBCOMMAND
  11697.  
  11698. Syntax: SPACE [letter]
  11699.  
  11700. This  subcommand displays the storage allocation on the specified CMS disk.  If
  11701. letter is omitted, the default disk specified by the  CWD  subcommand  is  dis-
  11702. played.    Aside  from this default, the subcommand is identical with CMS QUERY
  11703. DISK.
  11704.  
  11705.  
  11706.                               THE GIVE SUBCOMMAND
  11707.  
  11708. Syntax: GIVE table-name filespec
  11709.  
  11710. This subcommand compares the named table with its default values and saves  the
  11711. differences  in  a  TAKE file named filespec.  The format of filespec is fn [ft
  11712. [fm]].  The default filetype is "TAKE", and the default filemode is that of the
  11713. "home" disk.  See the CWD subcommand.
  11714.  
  11715.  
  11716.                           THE CP AND CMS SUBCOMMANDS
  11717.  
  11718. Syntax: CP or CMS text of command
  11719.  
  11720. Although  Kermit-CMS does not have a full set of its own subcommands for manag-
  11721. ing local files, it provides those services through the operating system.   You
  11722. can issue any CP or CMS command, but if Kermit-CMS has been invoked as a normal
  11723. user-area program, rather than as a high-memory "resident" program  or  nucleus
  11724. extension,  other  user-area CMS commands (such as COPYFILE) are illegal.  Even
  11725. then, you can list, type, rename or delete files, send  messages,  and  so  on.
  11726. The CMS subcommand under Kermit is synonymous with the HOST subcommand.
  11727.  
  11728.  
  11729. 8.4. How to build an executable version of Kermit-CMS
  11730.  
  11731. Before  attempting  to  build Kermit-CMS, look in the Kermit distribution under
  11732. both IK0KER and IKCKER for an installation document, as well as "beware", help,
  11733. and  update files, and read them first.  They will probably contain information
  11734. that is more current than what you see here.
  11735.  
  11736. Kermit-CMS consists at present of a large assembly and a  small  optional  one.
  11737. The large assembly (KERMIT ASSEMBLE) contains the Kermit program, and the small
  11738. one (KERMBOOT ASSEMBLE) is a bootstrap program for  loading  Kermit  into  high
  11739. memory and running it.  Although KERMBOOT is all in one file in the Kermit dis-
  11740. tribution, the source for Kermit itself is in many  pieces,  some  generic  for
  11741. Kermit-370 and some specific to CMS.  All the necessary pieces are sequenced in
  11742. columns 73-80 so that the numbers form a strictly increasing sequence when  the
  11743. pieces  are  correctly  "pasted"  together.    It  is important to preserve the
  11744. 8.4. How to build an executable version of Kermit-CMS                  Page 210
  11745.  
  11746. -------------------------------------------------------------------------------
  11747. original sequence numbers so that updates,  if  any,  can  be  applied  to  the
  11748. source.
  11749.  
  11750. To create a runnable version:
  11751.  
  11752.    1. Combine  the following "ASM" files from the Kermit distribution into
  11753.       a single file with RECFM F and LRECL  80:  IK0DOC,  IK0MAC,  IKCMAC,
  11754.       IK0DEF,  IK0MAI,  IK0CMD, IK0COM, IKCUTL, and IK0PRO.  The resulting
  11755.       file is the composite source for Kermit-CMS, called KERMIT ASSEMBLE.
  11756.       This  source  must  retain  the original sequence numbers in columns
  11757.       73-80 (in other words, be sure not to resequence the source acciden-
  11758.       tally by using the editor!)
  11759.  
  11760.    2. Copy  or rename IKCBOO ASM from the Kermit distribution (if desired)
  11761.       to a file called KERMBOOT ASSEMBLE with RECFM F and LRECL 80.
  11762.  
  11763.    3. GLOBAL the necessary MACLIBs.  Under VM/SP, these are DMSSP, CMSLIB,
  11764.       OSMACRO, and TSOMAC.
  11765.  
  11766.    4. Assemble the source file(s).
  11767.  
  11768.    5. Load one file into memory via: LOAD KERMIT or LOAD KERMBOOT.  In the
  11769.       former case, the entire Kermit program is now loaded; in the latter,
  11770.       only  a bootstrap program which expects to find the object file KER-
  11771.       MIT TEXT at run time.  Under CMS/SP Release 4 and above, there is  a
  11772.       third and better option, namely, LOAD KERMIT (RLDSAVE).
  11773.  
  11774.    6. Create  the executable called KERMIT MODULE via: GENMOD KERMIT.  Al-
  11775.       ternatively (under CMS/SP Release 3 and below), create  both  KERMIT
  11776.       and  KERMBOOT  modules  to  give  the  user a choice of user-area or
  11777.       high-memory execution.  Since Kermit-CMS is  serially  reusable,  it
  11778.       can  be  reinvoked  in the user area with the START command, but the
  11779.       high-memory version must be reloaded each time.  If Kermit is loaded
  11780.       using  the  RLDSAVE option (Release 4 and above), the module can, in
  11781.       fact, be run either way; the command NUCXLOAD KERMIT will load  Ker-
  11782.       mit  "permanently"  into  high memory as a nucleus extension for in-
  11783.       vocation at need.  Note: the nucleus extension can be removed by the
  11784.       command NUCXDROP KERMIT.
  11785.  
  11786.    7. If your site's ASCII/EBCDIC translation table for TTY lines does not
  11787.       conform to the one listed in the appendix (which in turn conforms to
  11788.       the  one  given in the IBM System/370 Reference Summary), then enter
  11789.       the appropriate SET ATOE/ETOA/TATOE/TETOA subcommands in the  SYSTEM
  11790.       KERMINI  file, which should reside on the same disk as KERMIT MODULE
  11791.       (and KERMIT TEXT).  NOTE: If the ASCII/EBCDIC translation is not in-
  11792.       vertible, Kermit will not and cannot work.
  11793.  
  11794.  
  11795. 8.5. What's New
  11796.  
  11797. Below  is  a list of the more important CMS-specific features in Version 4.0 of
  11798. Kermit-CMS added since the previous release, Version 3.1,  in  September  1986.
  11799. For the list of generic additions, see the chapter on Kermit-370.
  11800.  
  11801.    1. System  commands  issued  through Kermit via the CMS or HOST subcom-
  11802.       mands are automatically passed on to CP if (a) CMS rejects them  and
  11803. 8.5. What's New                                                        Page 211
  11804.  
  11805. -------------------------------------------------------------------------------
  11806.       (b) IMPCP is set ON.
  11807.  
  11808.    2. Kermit subcommands may be executed directly from CMS EXEC's.
  11809.  
  11810.    3. Reject  files  known  (via  A-packets)  to  be too big for available
  11811.       storage.
  11812.  
  11813.    4. Bypass user translation tables and  set  TERMINAL  SCROLL  CONT  for
  11814.       protocol mode on TTY lines.
  11815.  
  11816.    5. KERMBOOT  avoids  the  loading  problem  (VIRTUAL  STORAGE  CAPACITY
  11817.       EXCEEDED) due to large GLOBAL TXTLIB's and preserves the untokenized
  11818.       command line so that Kermit may be given mixed-case or long words as
  11819.       part of the initial command.
  11820.  
  11821.  
  11822. 8.6. What's Missing
  11823.  
  11824. Work on Kermit-CMS will continue.  Features that need to be improved  or  added
  11825. include:
  11826.  
  11827.    - Allow  timeouts  so Kermit-CMS does not wait forever if a packet does
  11828.      not arrive in a timely fashion.  This is not possible  under  CMS  at
  11829.      present.
  11830.  
  11831.    - Detect  file  properties  from Attribute packets and allow overriding
  11832.      current parameter settings.  Also implement file archiving.
  11833.  
  11834.    - Add a SET REPEAT subcommand.
  11835.  
  11836.    - Finish SET LINE, so that Kermit-CMS can be used as  a  local  Kermit,
  11837.      connecting  to  a  remote  host over an alternate communication port.
  11838.      Add a CONNECT subcommand.
  11839.  
  11840.    - Intercept CP messages during protocol mode,  rather  than  just  sup-
  11841.      pressing  them.    Display  the messages later or log them or send in
  11842.      packets as appropriate.
  11843.  
  11844.    - Define EXEC variables from Kermit by analogy with the  XEDIT  EXTRACT
  11845.      subcommand.
  11846. 9. IBM MVS/TSO KERMIT                                                  Page 212
  11847.  
  11848. -------------------------------------------------------------------------------
  11849. 9. IBM MVS/TSO KERMIT
  11850.  
  11851. Program:      John Chandler (Harvard/Smithsonian Center for Astrophysics); con-
  11852.               tributions from Vace Kundakci and Daphne Tzoar (Columbia U),  Bob
  11853.               Shields  (U.  Maryland),  Victor Lee (Queens U.), Gary Bjerke (U.
  11854.               Texas  at  Austin),  Greg  Small  (UC  Berkeley),  Clark  Frazier
  11855.               (Harvard  Bus. Sch.), Bob Bolch and Steve Blankinship (Triangle),
  11856.               Ron Rusnak (U. Chicago), Roger Fajman and Dale White (NIH), Andre
  11857.               Pirard (U. Liege)
  11858. Language:     IBM/370 Assembler
  11859. Documentation:
  11860.               John Chandler (CfA)
  11861. Version:      4.0 (88/1/31)
  11862. Date:         1988 February
  11863.  
  11864.  
  11865. Kermit-TSO Capabilities At A Glance:
  11866.  
  11867.   Local operation:                   No
  11868.   Remote operation:                  Yes
  11869.   Transfers text files:              Yes
  11870.   Transfers binary files:            Yes
  11871.   Wildcard send:                     Yes
  11872.   ^X/^Z interruption:                Yes (through micro)
  11873.   Filename collision avoidance:      Yes
  11874.   Can time out:                      Yes
  11875.   8th-bit prefixing:                 Yes
  11876.   Repeat count prefixing:            Yes
  11877.   Alternate block checks:            Yes
  11878.   Terminal emulation:                No
  11879.   Communication settings:            No
  11880.   Transmit BREAK:                    No
  11881.   Transaction logging:               Yes
  11882.   Session logging:                   No
  11883.   Raw transmit:                      Yes (no prompts)
  11884.   Sliding window:                    No
  11885.   Long packets:                      Yes
  11886.   Act as server:                     Yes
  11887.   Talk to server:                    Yes
  11888.   Advanced server functions:         Yes
  11889.   Advanced commands for servers:     Yes
  11890.   Local file management:             Yes
  11891.   Handle Attribute Packets:          Yes
  11892.   Command/init files:                Yes
  11893.   Command macros:                    No
  11894.  
  11895. Kermit-TSO is a member of the generic Kermit-370 family and shares most of  the
  11896. features and capabilities of the group.  As its name implies, Kermit-TSO is the
  11897. version of Kermit-370 that runs  under  the  MVS/TSO  operating  system.    The
  11898. primary  documentation  for  Kermit-TSO  is actually the chapter on Kermit-370,
  11899. which describes general properties; the present chapter assumes the  reader  is
  11900. familiar  with  that material.  Only the details specific to TSO operation will
  11901. be discussed here, e.g., command syntax relating to the TSO file system or com-
  11902. mands not offered in general by Kermit-370.
  11903. 9. IBM MVS/TSO KERMIT                                                  Page 213
  11904.  
  11905. -------------------------------------------------------------------------------
  11906. TSO Specifics of Kermit-370:
  11907.  
  11908.   Global INIT file:                  'SYS1.KERMINI'
  11909.   User INIT file:                    KERMINI
  11910.   Debug packet log:                  KER.LOG
  11911.   Server reply log:                  KER.REPLY
  11912.   Maximum packet size:               1913
  11913.   Maximum disk LRECL:                32756
  11914.  
  11915.  
  11916. 9.1. The MVS/TSO File System
  11917.  
  11918. The  features  of  the TSO file system of greatest interest to Kermit users are
  11919. the format of file specifications (filespecs) and the concept of records.   The
  11920. latter is described in the Kermit-370 chapter.
  11921.  
  11922. The MVS/TSO filespec (called the data set name or DSN) takes the form of tokens
  11923. (known as qualifiers) of up to 8 alphanumeric  characters  each,  separated  by
  11924. periods.    Each qualifier must begin with an alphabetic or national character.
  11925. The total length must be no more than 44 characters, including periods.  To  be
  11926. precise,  a  DSN may contain uppercase letters, digits, and the special charac-
  11927. ters "$" (dollar sign), "#" (pound sign), "@" (at sign), and  "-"  (hyphen)  in
  11928. addition to the separating periods.  Other characters may be not be included.
  11929.  
  11930. There  is  another, structural restriction on data set names from the fact that
  11931. TSO data sets are all cataloged.  In a standard MVS catalog, each qualifier  of
  11932. each  DSN is associated with an index of the same name.  The index is a hierar-
  11933. chical catalog component which points downward either to a list  of  next-level
  11934. indices  or to a data set, but never to both.  Consequently, a cataloged DSN is
  11935. a chain of indices corresponding one-for-one with DSN qualifers, and  the  last
  11936. index  is  a  pointer  to the data set itself.  While there may be many indices
  11937. with the same name, no two such duplicates may both  be  chained  to  the  same
  11938. next-higher-level  index,  so  that,  if  DSN's  are  considered  as strings of
  11939. qualifiers (not of characters), no DSN can be a major substring of  any  other.
  11940. For  example,  if  the  name  'A.BB.C'  exists  in the catalog, then 'A.BB' and
  11941. 'A.BB.C.X' are illegal, but 'A.B', 'A.BB.Y', 'A.BBB',  and  'A.BB.BB'  are  all
  11942. legal.
  11943.  
  11944. A  DSN  given  in  its entirety (as in the foregoing examples) is called "fully
  11945. qualified" and must be enclosed in single quotes when entered in TSO.  However,
  11946. by  convention (and by definition) the first qualifier of each data set belong-
  11947. ing to a given user must be the user's logon ID, and, by default,  that  ID  is
  11948. the  assumed  prefix in TSO when a DSN is not enclosed in quotes.  In practice,
  11949. then, names are abbreviated by omitting the quotes and the prefix.    The  most
  11950. common  type  of name, in fact, consists of the prefix plus two more qualifiers
  11951. giving the data set's name and type, respectively,  so  that  many  files  have
  11952. DSN's  that  correspond  exactly  to  the  canonical Kermit representation of a
  11953. filespec.  For instance, TEST.FORT is the source of  a  Fortran  program  named
  11954. TEST, and its fully qualified DSN would be '<userid>.TEST.FORT', where <userid>
  11955. is the owner's logon ID.
  11956.  
  11957. While this description is complete as far as it goes,  it  omits  an  important
  11958. feature  that is widely used in organizing files under MVS and TSO, namely, the
  11959. partitioned data set (PDS).  A PDS is a data set like any other, except that it
  11960. has  members,  each of which can usually be treated as a file in its own right.
  11961. In fact, with QSAM (the file access method employed by Kermit  and  many  other
  11962. 9.1. The MVS/TSO File System                                           Page 214
  11963.  
  11964. -------------------------------------------------------------------------------
  11965. applications),  only  members,  and  not the whole PDS, may be read or written.
  11966. Thus, the term "file", as used in this chapter and the Kermit-370 chapter,  may
  11967. refer  to  either  a PDS member or an ordinary data set, but not to a PDS.  The
  11968. notation for a PDS member consists of the member name enclosed  in  parentheses
  11969. and  appended  to the DSN (and the whole enclosed in quotes if the DSN is fully
  11970. qualified).  For example, if the Fortran program TEST were copied  into  a  PDS
  11971. called DEBUG.FORT, it would then be known as 
  11972.  
  11973.   DEBUG.FORT(TEST)
  11974.  
  11975. Although the member name is written together with the DSN, it and the surround-
  11976. ing parentheses are not really part of the DSN and are not counted  toward  the
  11977. 44-character  limit.   Still, a member name must conform to the rules for a DSN
  11978. qualifier and, in addition, must not contain any hyphens.
  11979.  
  11980. All these properties of DSN's come into play when a file is being  received  by
  11981. Kermit-TSO because a valid DSN must be generated for the new data set.  For ex-
  11982. ample, any invalid character in the supplied filespec is replaced  by  a  pound
  11983. sign  (or  converted  to  uppercase  if  it is a lowercase letter).  Also, each
  11984. qualifier (and the member name, if any) is prefixed with a  pound  sign  if  it
  11985. does  not already begin with an alphabetic or national character and then shor-
  11986. tened, if necessary,  to  eight  characters.    If  no  filespec  is  supplied,
  11987. Kermit-TSO  creates  a  default DSN of "$.$".  The DSN is expanded to its fully
  11988. qualified form and then truncated at 44 characters, if need be.
  11989.  
  11990. The DSN prefix, which defaults to the user's logon ID, is similar to  a  device
  11991. specification on microcomputer systems: it selects an area of disk storage, and
  11992. it usually need not be specified.  In some ways, the prefix is also like a disk
  11993. directory  designator,  since  the  file system structure is hierarchical.  For
  11994. this reason, the Kermit concept of the "working directory" is  equated  with  a
  11995. particular DSN prefix under Kermit-TSO.  The current "working directory" is the
  11996. collection of all data sets whose names begin with the current prefix, and file
  11997. transfers take place preferentially to and from that area (i.e., unless a fully
  11998. qualified DSN is given).
  11999.  
  12000. To provide compatibility with other operating systems, when Kermit-TSO sends  a
  12001. file,  it  ordinarily  makes a file header with only the last two qualifiers of
  12002. the full DSN (or only the member name in the case of a PDS  member).    On  the
  12003. other  hand,  extra  information may be added by way of the SET FOREIGN subcom-
  12004. mand.
  12005.  
  12006. Kermit-TSO allows a group of files to be specified in a single filespec by  in-
  12007. cluding  the  special  "wildcard"  character  "*",  which matches any string of
  12008. characters (even a null string) starting at a new DSN qualifier.   Only  one  *
  12009. may  be used in a filespec.  Also, the * may not be used for the member name of
  12010. a PDS (nor for any part of a PDS name).  Here are some examples:
  12011.  
  12012.   *.COBOL   All files of type COBOL (all COBOL source  files)  in  the  current
  12013.             working directory.
  12014.  
  12015.   BATCH*H.FORT
  12016.             All files in the current directory which begin with  the  qualifier
  12017.             BATCH   and  which  end  with  H.FORT.    This  would  not  include
  12018.             BATCH.FORT, however.
  12019.  
  12020. TSO files, like those in other IBM 370 systems, are  record-oriented  (see  the
  12021. 9.1. The MVS/TSO File System                                           Page 215
  12022.  
  12023. -------------------------------------------------------------------------------
  12024. introduction  to the Kermit-370 chapter).  In particular, TSO files are charac-
  12025. terized by record format (RECFM), which may be fixed-length, varying-length, or
  12026. undefined-length;  by  maximum record length (LRECL); and by maximum block size
  12027. (BLKSIZE).  Fixed-length and varying-length may be (and, under  Kermit,  always
  12028. are)  combined  into  blocks, but undefined-length records may not.  Indeed, by
  12029. convention, they have no logical record length,  only  a  maximum  block  size.
  12030. Records  in TSO files may be up to 32760 bytes long, but varying-length records
  12031. use four bytes to specify the length and have an effective limit of 32756.
  12032.  
  12033. Another file system feature of occasional interest is the  means  of  reporting
  12034. errors.  When Kermit-TSO encounters a disk error, it attempts to prepare an ex-
  12035. planatory message for inclusion in the STATUS report.  The  primary  method  is
  12036. the standard SYNADAF macro.
  12037.  
  12038.  
  12039. 9.2. Program Operation
  12040.  
  12041. At  startup time, Kermit-TSO looks for two initialization files, 'SYS1.KERMINI'
  12042. and '<userid>.KERMINI' (where, as before, <userid> is  the  user's  logon  ID).
  12043. The  latter  file would also be known as just KERMINI.  The file 'SYS1.KERMINI'
  12044. would be maintained by a systems programmer, but KERMINI would be maintained by
  12045. the user.
  12046.  
  12047. Two parameters in the user's profile (the character delete and line delete) are
  12048. disabled during protocol mode (and restored afterwards) to prevent any conflict
  12049. in  case either of these characters has been defined to be printable.  The set-
  12050. tings in effect when Kermit starts up are saved as a sort  of  "normal"  status
  12051. snapshot  (as  opposed  to the "protocol" status just described).  The protocol
  12052. status is selected whenever Kermit enters protocol mode, and the normal  status
  12053. is  selected  when Kermit leaves protocol mode.  Note: if Kermit is interrupted
  12054. in the midst of a transfer or while in server mode, these  parameters  will  be
  12055. left with peculiar settings (namely, the protocol status), and they may need to
  12056. be restored by hand.
  12057.  
  12058. Although TSO does not allow an application program to take control of  terminal
  12059. synchronization  on  "TTY"  lines, the various full-screen emulation front ends
  12060. are quite a different matter.  The standard IBM handshake (XON) is unnecessary,
  12061. for  example,  with  a 7171 or 4994 because the front end itself turns the line
  12062. around with essentially no delay in transparent mode.  Thus, handshaking should
  12063. be suppressed for "SERIES1" devices (the micro Kermit should have HANDSHAKE set
  12064. OFF, and Kermit-TSO should have  HANDSHAKE  set  to  0).    Since  the  generic
  12065. Kermit-370  default  handshake  (XON) is retained in Kermit-TSO, the subcommand
  12066. "SET HANDSHAKE 0" is a good candidate for inclusion the  KERMINI  file  of  any
  12067. user who habitually uses "SERIES1" lines.
  12068.  
  12069.  
  12070. Interactive Operation:
  12071.  
  12072. To  run Kermit-TSO interactively, invoke the program from TSO by typing KERMIT.
  12073. When you see the prompt, 
  12074.  
  12075.   Kermit-TSO>
  12076.  
  12077. you may type a Kermit subcommand.  When the subcommand completes, Kermit issues
  12078. another  prompt.    The cycle repeats until you exit from the program.  For ex-
  12079. ample:
  12080. 9.2. Program Operation                                                 Page 216
  12081.  
  12082. -------------------------------------------------------------------------------
  12083.   KERMIT
  12084.  
  12085.   Kermit-TSO Version 4.0 (88/1/31)
  12086.   Enter ? for a list of valid commands
  12087.  
  12088.   Kermit-TSO>send foo.*
  12089.  
  12090.     Files beginning with FOO are sent
  12091.  
  12092.   Kermit-TSO>receive test.spss
  12093.  
  12094.     File is received and called TEST.SPSS
  12095.  
  12096.   Kermit-TSO>exit
  12097.  
  12098.  
  12099. Command Line Invocation:
  12100.  
  12101. Kermit-TSO may also be invoked with command line arguments from TSO.   The  ar-
  12102. guments  are interpreted as a subcommand to be executed by Kermit after comple-
  12103. tion of the initialization.  For instance:
  12104.  
  12105.   KERMIT send test.fort
  12106.  
  12107. Kermit will exit and return to TSO after completing the specified subcommand.
  12108.  
  12109.  
  12110. CLIST Operation:
  12111.  
  12112. Like other TSO programs, Kermit-TSO may be invoked from a CLIST.    Subcommands
  12113. can  be  passed to Kermit using the program input stack and/or command line ar-
  12114. guments.  For example, to start up Kermit-TSO and have it act as a server,  in-
  12115. clude the line:
  12116.  
  12117.   KERMIT server
  12118.  
  12119. To  pass  more  than one subcommand, they must be stacked in the order in which
  12120. they are to be executed.  To start up a Kermit-TSO server with a three  charac-
  12121. ter CRC, create and stack a file with the following:
  12122.  
  12123.   set block 3
  12124.   server
  12125.  
  12126. and  then  invoke  Kermit.    Like  many  utility programs, Kermit-TSO uses the
  12127. GETLINE/PUTLINE service routines for terminal I/O,  and  the  nominally  inter-
  12128. active  subcommands can thus be supplied under program control.  Another way of
  12129. setting up multiple subcommands would be to collect the subcommands into a TAKE
  12130. file  and  then  issue  the  TAKE  subcommand via the command line.  Of course,
  12131. CLIST's may be executed from Kermit, either directly or from a TAKE  file,  and
  12132. CLIST's  in turn may freely issue Kermit subcommands.  The subcommand KERMIT is
  12133. especially useful in this context for distinguishing  Kermit  subcommands  from
  12134. TSO commands.
  12135. 9.2. Program Operation                                                 Page 217
  12136.  
  12137. -------------------------------------------------------------------------------
  12138. Server mode:
  12139.  
  12140. Command  execution  in server mode is different in several respects from normal
  12141. operation.  First of all, some Kermit subcommands are not allowed (see the list
  12142. of  subcommands  in  the  Kermit-370 chapter).  Moreover, command errors always
  12143. terminate any active TAKE file.  Also, commands run in  a  special  environment
  12144. with  the User Profile temporarily modified.  Another difference is that Kermit
  12145. intercepts terminal I/O as much as possible and transmits the data to the local
  12146. Kermit as text packets.  The problem with this redirection is that some MVS/TSO
  12147. commands issue terminal I/O directly, so that some messages never appear to the
  12148. local Kermit (except, perhaps, as bad packets).
  12149.  
  12150.  
  12151. 9.3. Kermit-TSO Subcommands
  12152.  
  12153. Kermit-TSO  supports all the subcommands described in the corresponding section
  12154. of the Kermit-370 chapter.  In addition, there is the  system-specific  subcom-
  12155. mand  TSO, which is just a synonym for the generic HOST subcommand.  TSO can be
  12156. issued as a remote Kermit command when Kermit-TSO is in server mode.  Also, the
  12157. END subcommand is available as a synonym for EXIT and QUIT.
  12158.  
  12159. The remainder of this section concentrates on the subcommands that have special
  12160. form or meaning for Kermit-TSO.  See also the chapter on Kermit-370 for further
  12161. details.
  12162.  
  12163.  
  12164.                               THE SEND SUBCOMMAND
  12165.  
  12166. Syntax: SEND filespec [foreign-filespec]
  12167.  
  12168. The SEND subcommand causes a file or file group to be sent from TSO to the Ker-
  12169. mit on the other system.  DSN prefixing is done on the filespec  in  the  usual
  12170. way (see also the CWD subcommand).
  12171.  
  12172. filespec  may contain a wildcard "*".  If it does, then all matching files will
  12173. be sent, up to 711 files in all.
  12174.  
  12175. The foreign-filespec, if any, is used for the file header of the outgoing file,
  12176. replacing  the  usual  name.type  derived from the MVS/TSO filespec.  Normally,
  12177. this form of the SEND subcommand is used only  for  single  files  because  the
  12178. foreign-filespec  is  used only for the first file of a group (subsequent files
  12179. having default headers).
  12180.  
  12181. Although the file transfer cannot be cancelled from the TSO side, Kermit-TSO is
  12182. capable of responding to "cancel file" or "cancel batch" signals from the local
  12183. Kermit; these are typically entered by typing Control-X or  Control-Z,  respec-
  12184. tively.
  12185. 9.3. Kermit-TSO Subcommands                                            Page 218
  12186.  
  12187. -------------------------------------------------------------------------------
  12188.                             THE RECEIVE SUBCOMMAND
  12189.  
  12190. Syntax: RECEIVE [filespec]
  12191.  
  12192. The  RECEIVE  subcommand  tells Kermit to receive a file or file group from the
  12193. other system.  You should then issue a SEND subcommand to the other Kermit.
  12194.  
  12195. A filespec in the subcommand indicates what name the incoming  file  should  be
  12196. given.  Wildcards may not be used.  If the filespec is invalid, Kermit-TSO will
  12197. suppress the transfer.  If the optional filespec is omitted (and, in any  case,
  12198. for  all  files  after  the  first  in a group) Kermit-TSO will use the name(s)
  12199. provided by the other Kermit.  If a name is not a legal  DSN,  Kermit-TSO  will
  12200. delete  excess characters, change illegal characters to pound signs, and so on,
  12201. to create a legal name.
  12202.  
  12203. When the record format is "F", any received  record  longer  than  the  logical
  12204. record  length  (LRECL)  will be truncated, and shorter records will be padded.
  12205. The padding character is a blank for text files and a null  for  binary  files.
  12206. Received  binary  (but  not  V-binary  or  D-binary)  files are treated as byte
  12207. streams and broken up into records all of the logical record length.   See  the
  12208. SET  FILE  TYPE,  SET  FILE LRECL, SET FILE BLKSIZE, and SET FILE RECFM subcom-
  12209. mands.
  12210.  
  12211. If an error occurs during the file  transfer,  as  much  of  the  file  as  was
  12212. received  is  saved on disk.  If the sending of a file is cancelled by the user
  12213. of the foreign system, Kermit-TSO will discard whatever had arrived, unless AP-
  12214. PEND is ON or INCOMPLETE is KEEP.
  12215.  
  12216. If  the  incoming file has the same name as an existing file (either a data set
  12217. or a PDS member), and WARNING is OFF, the original file  will  be  overwritten.
  12218. If WARNING is set ON, however, Kermit-TSO will protect the existing file in one
  12219. of two ways.  If the filespec was entered  with  the  subcommand,  Kermit  will
  12220. prompt  the  user  for  permission to overwrite the file.  If the filespec came
  12221. from the foreign Kermit, Kermit-TSO will change the incoming name so as not  to
  12222. obliterate the pre-existing file.  It attempts to find a unique name by succes-
  12223. sively modifying the original and checking for the existence of such a file  at
  12224. each  step.  The procedure operates on the second qualifier of the full DSN (or
  12225. the member name in the case of a PDS member) and begins  by  truncating  it  to
  12226. seven  characters,  if necessary, and then appends "0".  If a file by that name
  12227. exists, Kermit then replaces the "0" with a "1".  It continues in  this  manner
  12228. up to "9", and if an unused name cannot be found, the transfer fails.
  12229.  
  12230.  
  12231.                               THE SET SUBCOMMAND
  12232.  
  12233. Syntax: SET parameter [value]
  12234.  
  12235. The  SET subcommand establishes or modifies various parameters controlling file
  12236. transfers.  The following SET parameters are available in Kermit-TSO,  but  not
  12237. in Kermit-370 in general:
  12238.  
  12239. FILE
  12240.   BLKSIZE           Block size for incoming file.
  12241.   LRECL             Logical Record length for incoming file.
  12242.   RECFM             Record format for incoming files.
  12243.   SPACE             Allocation unit (in tracks) for incoming files.
  12244. 9.3. Kermit-TSO Subcommands                                            Page 219
  12245.  
  12246. -------------------------------------------------------------------------------
  12247.   UNIT              Device type for incoming files.
  12248.   VOLUME            Disk pack for incoming files.
  12249. PREFIX              Default disk area.
  12250. TIMER               Determine whether Kermit-TSO should time out.
  12251.  
  12252.  
  12253. SET FILE BLKSIZE
  12254.  
  12255. Syntax: SET FILE BLKSIZE number
  12256.  
  12257. This  sets  the  block size for incoming files to a number from 1 to 32760.  In
  12258. the case of fixed-format files, this number is just an upper bound; the  actual
  12259. block  size  is  taken  to  be the largest multiple of the LRECL which does not
  12260. exceed this limit.  The default is 6233.
  12261.  
  12262.  
  12263. SET FILE LRECL
  12264.  
  12265. Syntax: SET FILE LRECL number
  12266.  
  12267. This sets the effective logical record length for incoming files  to  a  number
  12268. from 1 to 32756.  This parameter is not used for files of undefined record for-
  12269. mat.  Moreover, it is not exactly the same as the MVS/TSO LRECL, which is  four
  12270. more  than  the  actual  maximum  data  length for varying-length records.  The
  12271. default is 80.
  12272.  
  12273.  
  12274. SET FILE RECFM
  12275.  
  12276. Syntax: SET FILE RECFM option
  12277.  
  12278. This sets the record format to use for  incoming  files.    Valid  options  are
  12279. "Fixed",  "Varying"  (the  default),  and  "Undefined".  This parameter is thus
  12280. limited to a subset of the range of possibilities for the MVS/TSO  RECFM.    In
  12281. Kermit-TSO,  all  incoming  files  of fixed or varying format are automatically
  12282. blocked according to the current block size.  Fixed-format records  are  padded
  12283. or truncated, as needed, to the current LRECL.
  12284.  
  12285.  
  12286. SET FILE SPACE
  12287.  
  12288. Syntax: SET FILE SPACE number
  12289.  
  12290. This  sets  the  track allocation unit for incoming files to a number from 1 to
  12291. 32760.  The default is 5.  Since data sets are allowed as many as  15  extents,
  12292. this default provides for files up to 75 tracks.
  12293.  
  12294.  
  12295. SET FILE UNIT
  12296.  
  12297. Syntax: SET FILE UNIT type
  12298.  
  12299. This  sets  the  device  type  or  group for incoming files.  Valid options are
  12300. installation-dependent.  The default is SYSDA, which is universally  available,
  12301. but  not necessarily desirable, since many installations restrict TSO data sets
  12302. to a particular set of disk volumes.  In such cases, there is  usually  a  unit
  12303. 9.3. Kermit-TSO Subcommands                                            Page 220
  12304.  
  12305. -------------------------------------------------------------------------------
  12306. name  which  refers  only  to  those  TSO  volumes,  and  the  global INIT file
  12307. 'SYS1.KERMINI' should set the file unit parameter to that name.
  12308.  
  12309.  
  12310. SET FILE VOLUME
  12311.  
  12312. Syntax: SET FILE VOLUME name
  12313.  
  12314. This  sets  the  disk  volume  for  incoming   files.      Valid   namess   are
  12315. installation-dependent,  but  are,  in  any case, no more than six alphanumeric
  12316. characters.  The default is blank (none); in that case, the system chooses  one
  12317. of the available volumes of the specified UNIT type.
  12318.  
  12319.  
  12320. SET PREFIX
  12321.  
  12322. Syntax: SET PREFIX [string]
  12323.  
  12324. This subcommand is equivalent to the CWD subcommand (q.v.).
  12325.  
  12326.  
  12327. SET TIMER
  12328.  
  12329. Syntax: SET TIMER ON or OFF
  12330.  
  12331. This specifies whether Kermit-TSO is to maintain a timer for each packet it ex-
  12332. pects to read.  The default is ON.  If the timer is enabled,  its  duration  is
  12333. set  by the SET SEND TIMEOUT subcommand initially and then set according to the
  12334. request of the other Kermit.
  12335.  
  12336.  
  12337.                               THE CWD SUBCOMMAND
  12338.  
  12339. Syntax: CWD [string or PDSname()]
  12340.  
  12341. The CWD (Change Working Directory) subcommand establishes  a  new  default  DSN
  12342. prefix  or turns prefixing off.  This facility is similar to, but not quite the
  12343. same as, the prefix defined in the User Profile.   The  string,  if  specified,
  12344. must  consist  of  one or more DSN qualifiers, and the first must already be an
  12345. index in the disk catalog.  Subsequent file transfers take place  to  and  from
  12346. the  corresponding  disk  area  whenever a fully qualified DSN (one enclosed in
  12347. quotes) is not given.  The initial prefix is the user's  logon  ID,  i.e.,  the
  12348. same  as the default prefix in the User Profile.  If no prefix is given in this
  12349. subcommand, then prefixing is no longer performed.  The user must be careful to
  12350. remember  the  distinction  between  the prefix defined for Kermit and that for
  12351. TSO.  Pure Kermit subcommands (like SEND and TAKE) always use the  former,  but
  12352. TSO commands (and the TSO-related subcommand TYPE) use the latter.
  12353.  
  12354. An  alternative  form  of  the  CWD  subcommand allows specifying the full (but
  12355. unquoted) name of a PDS followed by paired parentheses.  When such  a  "working
  12356. directory"  is  in use, a filespec other than a fully qualified DSN is taken to
  12357. be a member name within the PDS.  For that reason, this  form  should  be  used
  12358. cautiously,  since the Kermit-TSO log filespecs (such as KER.LOG and KER.REPLY)
  12359. would be treated the same way.  In particular, it is advisable to turn on debug
  12360. mode  only  when  the Kermit prefix is a partially qualified DSN (once started,
  12361. the log continues to the same data  set  regardless  of  what  happens  to  the
  12362. 9.3. Kermit-TSO Subcommands                                            Page 221
  12363.  
  12364. -------------------------------------------------------------------------------
  12365. prefix).
  12366.  
  12367.  
  12368.                            THE DIRECTORY SUBCOMMAND
  12369.  
  12370. Syntax: DIRECTORY [filespec]
  12371.  
  12372. The  DIRECTORY  subcommand  uses the TSO LISTCAT command to display part of the
  12373. data set catalog, i.e., all data sets whose names begin with the qualifiers  in
  12374. the Kermit prefix (if any) concatenated with the given filespec (if any).
  12375.  
  12376.  
  12377.                               THE TSO SUBCOMMAND
  12378.  
  12379. Syntax: TSO text of command
  12380.  
  12381. Although  Kermit-TSO does not have a full set of its own subcommands for manag-
  12382. ing TSO files, it provides those services through the operating  system.    You
  12383. can  issue  any  TSO command, e.g., to list, type, rename or delete files, send
  12384. messages, and so on.  The TSO subcommand under Kermit is  synonymous  with  the
  12385. HOST subcommand.
  12386.  
  12387.  
  12388. 9.4. How to build an executable version of Kermit-TSO
  12389.  
  12390. Before  attempting  to  build Kermit-TSO, look in the Kermit distribution under
  12391. both IK0KER and IKTKER for an installation document, as well as "beware", help,
  12392. and  update files, and read them first.  They will probably contain information
  12393. that is more current than what you see here.
  12394.  
  12395. Kermit-TSO consists at present of a large assembly (KERMIT.ASM, containing  the
  12396. Kermit  program)  and  a small one (DYNALC.ASM, containing a subroutine for al-
  12397. locating data sets).  Although DYNALC is a single file in the Kermit  distribu-
  12398. tion,  the  source  for  Kermit  itself  is  in  many  pieces, some generic for
  12399. Kermit-370 and some specific to TSO.  All the necessary pieces are sequenced in
  12400. columns  73-80 so that the numbers form a strictly increasing sequence when the
  12401. pieces are correctly "pasted" together.    It  is  important  to  preserve  the
  12402. original  sequence  numbers  so  that  updates,  if  any, can be applied to the
  12403. source.
  12404.  
  12405. To create a runnable version:
  12406.  
  12407.    1. Combine the following "ASM" files from the Kermit distribution  into
  12408.       a  single file with RECFM=F(B) and LRECL=80: IK0DOC, IK0MAC, IKTMAC,
  12409.       IK0DEF, IK0MAI, IK0CMD, IK0COM, IKTUTL, and IK0PRO.   The  resulting
  12410.       file  is  the  composite  source  for Kermit-TSO, called KERMIT.ASM.
  12411.       This source must retain the original  sequence  numbers  in  columns
  12412.       73-80 (in other words, be sure not to resequence the source acciden-
  12413.       tally by using the editor!)
  12414.  
  12415.    2. Copy or rename IKTDYN.ASM from the Kermit  distribution  to  a  file
  12416.       called DYNALC.ASM with RECFM=F(B) and LRECL=80.
  12417.  
  12418.    3. Assemble the source file(s).
  12419.  
  12420.    4. Create  the  executable load module KERMIT using the linkage editor.
  12421. 9.4. How to build an executable version of Kermit-TSO                  Page 222
  12422.  
  12423. -------------------------------------------------------------------------------
  12424.       Kermit is designed to run as a command processor, and so it must  be
  12425.       placed  in  SYS1.CMDLIB or in a PDS concatenated to SYS1.CMDLIB (for
  12426.       example, via the STEPLIB command).
  12427.  
  12428.    5. If your site's ASCII/EBCDIC translation table for TTY lines does not
  12429.       conform to the one listed in the appendix (which in turn conforms to
  12430.       the one given in the IBM System/370 Reference Summary),  then  enter
  12431.       the   appropriate   SET   ATOE/ETOA/TATOE/TETOA   subcommands   into
  12432.       'SYS1.KERMINI'.  NOTE: If the ASCII/EBCDIC translation is not inver-
  12433.       tible, Kermit will not and cannot work.
  12434.  
  12435. In order to verify the operation of a new version of Kermit-TSO, you may run it
  12436. under TEST using the CP parameter.
  12437.  
  12438.  
  12439. 9.5. What's New
  12440.  
  12441. Below is a list of the more important features in  Version  4.0  of  Kermit-TSO
  12442. added  since  the  release  of  TSO/3708 in May 1987.  Since Version 4.0 is the
  12443. first release of Kermit-370 for TSO, some of the "new"  features  are  actually
  12444. new only to the Columbia TSO distribution.
  12445.  
  12446.    1. Suppression of LINE and CHAR delete functions during protocol mode.
  12447.  
  12448.    2. Advanced  server  functions  and  subcommands for talking to another
  12449.       Kermit running in server mode.
  12450.  
  12451.    3. Long packet protocol.
  12452.  
  12453.    4. TYPE, ECHO,  XTYPE,  and  XECHO  subcommands  (the  last  two  being
  12454.       Series/1 analogs of the first two.)
  12455.  
  12456.    5. REMOTE  KERMIT  commands honored by TSO server, including SET, SHOW,
  12457.       TAKE, TDUMP, STATUS, HOST, TSO, CWD, DIR, and TYPE.
  12458.  
  12459.    6. TEST mode for debugging.
  12460.  
  12461.    7. Multi-column, two-level, selective SHOW display.
  12462.  
  12463.    8. Send and acknowledge attribute packets.
  12464.  
  12465.    9. Optionally append to, rather than replace, old data sets with dupli-
  12466.       cate names.
  12467.  
  12468.   10. Automatic detection of terminal controller type (TTY or SERIES1).
  12469.  
  12470.   11. SYNADAF message in cases of disk I/O error.
  12471. 9.6. What's Missing                                                    Page 223
  12472.  
  12473. -------------------------------------------------------------------------------
  12474. 9.6. What's Missing
  12475.  
  12476. Work  on  Kermit-TSO will continue.  Features that need to be improved or added
  12477. include:
  12478.  
  12479.    - Detect file properties from Attribute packets  and  allow  overriding
  12480.      current parameter settings.  Also implement file archiving.
  12481.  
  12482.    - Add a SET REPEAT subcommand.
  12483.  
  12484.    - Finish  SET  LINE,  so that Kermit-TSO can be used as a local Kermit,
  12485.      connecting to a remote host over  an  alternate  communication  port.
  12486.      Add a CONNECT subcommand.
  12487.  
  12488.    - Compute file size for outgoing A-packets and implement the SPACE sub-
  12489.      command.
  12490.  
  12491.    - Reject files known (via  A-packets)  to  be  too  big  for  available
  12492.      storage.
  12493.  
  12494.    - Intercept all terminal output during protocol mode.
  12495.  
  12496.    - Allow wildcard notation for PDS members.
  12497. 10. VAX/VMS KERMIT                                                     Page 224
  12498.  
  12499. -------------------------------------------------------------------------------
  12500. 10. VAX/VMS KERMIT
  12501.  
  12502. Authors:    Robert C. McQueen, Nick Bush, Stevens Institute of Technology
  12503. Language:   BLISS-32
  12504. Documentation:
  12505.             R. McQueen, N. Bush, C. Gianone
  12506. Version:    3.3.111
  12507. Date:       April 2, 1987
  12508.  
  12509.  
  12510. VAX/VMS Kermit-32 Capabilities At a Glance:
  12511.  
  12512.   Local operation:                   Yes
  12513.   Remote operation:                  Yes
  12514.   Transfers text files:              Yes
  12515.   Transfers binary files:            Yes
  12516.   Wildcard send:                     Yes
  12517.   ^X/^Y interruption:                Yes
  12518.   Filename collision avoidance:      Yes
  12519.   Timeouts:                          Yes
  12520.   8th-bit prefixing:                 Yes
  12521.   Repeat character compression:      Yes
  12522.   Alternate block check types:       Yes
  12523.   Communication settings:            Yes
  12524.   Transmit BREAK:                    No
  12525.   IBM mainframe communication:       Yes
  12526.   Transaction logging:               Yes
  12527.   Session logging (raw capture):     Yes
  12528.   Debug logging:                     Yes
  12529.   Raw transmit:                      Yes
  12530.   Login scripts:                     No
  12531.   Act as server:                     Yes
  12532.   Talk to server:                    Yes
  12533.   Advanced commands for servers:     Yes
  12534.   Local file management:             Yes
  12535.   Command/init files:                Yes
  12536.   Long packets:                      No
  12537.   Sliding windows:                   No
  12538.   Attribute packets:                 No
  12539.  
  12540. Kermit-32 is a program that implements the Kermit file  transfer  protocol  for
  12541. the  Digital  Equipment  Corporation  VAX  series  computers  under the VAX/VMS
  12542. operating system. It is written in BLISS-32 and MACRO-32, with sources for  all
  12543. BLISS  modules also available as MACRO-32 sources.  Kermit-32 should run on any
  12544. VAX/VMS system from version 4.0 on (Version 3.1 of Kermit-32 is the  last  ver-
  12545. sion that runs under pre-4.0 releases of VMS).
  12546.  
  12547. The  first  section  of  this chapter will describe the things you need to know
  12548. about the VAX/VMS file system and how Kermit-32 uses it.   The  second  section
  12549. describes the special features of Kermit-32.  The final section contains infor-
  12550. mation of interest to those who need to install Kermit-32 on a system.
  12551. 10.1. The VAX/VMS File System                                          Page 225
  12552.  
  12553. -------------------------------------------------------------------------------
  12554. 10.1. The VAX/VMS File System
  12555.  
  12556. The two main items of interest of the VAX/VMS file system (for the Kermit user)
  12557. are the format of file specifications and the types of files and file data.
  12558.  
  12559.  
  12560. VAX/VMS File Specifications
  12561.  
  12562. VAX/VMS file specifications are of the form 
  12563.  
  12564.   NODE::DEVICE:[DIRECTORY]NAME.TYPE;VERSION
  12565.  
  12566. Under  version  3.x of VMS, NAME may be up to 9 characters, TYPE may be up to 3
  12567. characters and each item in DIRECTORY may be up to 9 character long.  Only  al-
  12568. phanumeric characters may be used in DIRECTORY, NAME and TYPE.
  12569.  
  12570. Under version 4.0 (and later) of VMS, NAME, TYPE and each item in DIRECTORY may
  12571. be up to 39 characters long, and may contain alphanumeric characters  plus  un-
  12572. derscore.
  12573.  
  12574. VERSION  is  a  decimal number indicating the version of the file (generation).
  12575. DEVICE may be either a physical or logical device name.  If  it  is  a  logical
  12576. name,  it  may be up to 63 characters long and may contain alphanumeric charac-
  12577. ters plus dollar signs and underscores.  NODE may  be  either  a  logical  name
  12578. which  translates to a DECnet node name or a physical DECnet node name.  In ei-
  12579. ther case, access information can be included (see the DECnet-VMS User's  guide
  12580. for more information).  The node name is not normally present, since most files
  12581. are accessed on the same node where the user's job is  running.    The  version
  12582. number  is  not  normally  given (in fact, should not normally be given).  When
  12583. device and/or directory are not supplied, they default to  the  user's  current
  12584. default  device  and  directory.   Therefore, NAME.TYPE is normally all that is
  12585. needed to specify a file on the user's default device and directory.   This  is
  12586. also  all  the  Kermit-32 will normally send as the name of a file being trans-
  12587. ferred.
  12588.  
  12589. The node field specifies the name (and access information) for the DECnet  node
  12590. where  the  file is located.  Kermit-32 does not transmit the node field to the
  12591. target system, but will attempt to honor a node field in an incoming file name.
  12592.  
  12593. The device field specifies a physical or "logical" device upon which  the  file
  12594. is  resident.    The  directory field indicates the area on the device, for in-
  12595. stance the area belonging to the owner of the file.  Kermit-32  does  not  nor-
  12596. mally  transmit  the  device or directory fields to the target system, but will
  12597. attempt to honor device or directory fields that may appear  in  incoming  file
  12598. names.  It  will not create new directories, however, so any directory must al-
  12599. ready exist.
  12600.  
  12601. The name is the primary identifier for the file.  The  type,  also  called  the
  12602. "extension",  is  an indicator which, by convention, tells what kind of file we
  12603. have.  For instance FOO.FOR is the source  of  a  Fortran  program  named  FOO;
  12604. FOO.OBJ  might  be the relocatable object module produced by compiling FOO.FOR;
  12605. FOO.EXE could an executable program produced by LINKing FOO.REL, and so forth.
  12606.  
  12607. VAX/VMS allows a group of files to be specified in a single file  specification
  12608. by including the special "wildcard" characters, "*" and "%".  A "*" matches any
  12609. string of characters, including no characters at all; a "%" matches any  single
  12610. 10.1. The VAX/VMS File System                                          Page 226
  12611.  
  12612. -------------------------------------------------------------------------------
  12613. character.  Here are some examples:
  12614.  
  12615. *.FOR   All  files of type FOR (all Fortran source files) in the default direc-
  12616.         tory.
  12617.  
  12618. FOO.*   Files of all types with name FOO.
  12619.  
  12620. F*.*    All files whose names start with F.
  12621.  
  12622. F*X*.*  All files whose names start with F and contain at least one X.
  12623.  
  12624. %.*     All files whose names are exactly one character long.
  12625.  
  12626. *.%%*   All files whose types are at least two characters long.
  12627.  
  12628. Wildcard notation is used on many computer systems in similar ways, and  it  is
  12629. the mechanism most commonly used to instruct Kermit to send a group of files.
  12630.  
  12631.  
  12632.                           TEXT FILES AND BINARY FILES
  12633.  
  12634. The file system used by VAX/VMS provides for a large number of attributes to be
  12635. associated with each file.  These attributes provide some indication of whether
  12636. the file is a text file, or is some other type of non-text data.  The two major
  12637. attributes that affect Pro/Kermit are the record  type  and  record  attribute.
  12638. The  record type describes how logical records are stored in the file.  Records
  12639. may be of some fixed length  (specified  by  another  attribute),  or  variable
  12640. length  (specified  within  each  record),  or  stream (implying no real record
  12641. divisions).  The record attributes describe how the breaks between records  are
  12642. to  be  treated.    For  example, a record attribute of implied carriage return
  12643. means that any program reading the file with  intentions  of  printing  it  out
  12644. should add a carriage return/line feed sequence between each record.  Other at-
  12645. tributes include FORTRAN carriage control and print file format.
  12646.  
  12647. The "standard" method of storing text in a file under VAX/VMS is to  store  one
  12648. line  of text per record (variable length records), with a carriage return/line
  12649. feed sequence implied by the end of the record (implied carriage return).  This
  12650. is  the  method  Kermit-32 uses to store files it receives when using FILE TYPE
  12651. TEXT.  Note that there are other formats which are used  to  store  text  under
  12652. VAX/VMS,  however,  the  one used be Kermit-32 is the only one which is handled
  12653. correctly by all known utility programs under VAX/VMS.    Also,  most  programs
  12654. which  work  with  text files (the editor EDT, for example) place some limit on
  12655. the length of the  lines  which  can  be  handled.    Typically  this  is  255.
  12656. Kermit-32  can  write files with up to 4095 characters on a line, which means a
  12657. text file from another system  may  be  transferred  and  stored  correctly  by
  12658. Kermit-32, but may still be unusable by certain VAX/VMS programs.
  12659.  
  12660. There  is  no  standard format for storing binary files.  Basically, any record
  12661. format with no record attributes are used for binary  files.    Since  programs
  12662. which  work  with binary files under VAX/VMS expect to see some particular for-
  12663. mat, more information is needed for transfer of binary files than for  transfer
  12664. of text files.  The current version of Kermit-32 is not capable of transferring
  12665. all types of binary files which were created on a  VAX/VMS  system  to  another
  12666. system  and  retrieving  them  intact, nor is it capable of transferring all of
  12667. types binary files created on a VAX/VMS system to  another  VAX/VMS,  P/OS,  or
  12668. RSX-11M/M+  system  intact.    However,  certain formats of binary files can be
  12669. 10.1. The VAX/VMS File System                                          Page 227
  12670.  
  12671. -------------------------------------------------------------------------------
  12672. transferred, and binary files from some other systems may be transferred  to  a
  12673. VAX and recovered intact.
  12674.  
  12675. Binary  files which are created on a VAX (or other Files-11 systems) with fixed
  12676. 512 byte records (a fairly common format) can be transferred  using  Kermit-32.
  12677. The  only  required  action is to set the file type to "fixed" in the receiving
  12678. Kermit-32.
  12679.  
  12680. Using two programs supplied with Kermit-32, it is possible to  transfer  almost
  12681. any  type  of  sequential  file  between  VAXen, or between a VAX and a P/OS or
  12682. RSX-11M/M+ system.  These two programs (VMSHEX and VMSDEH) will convert the bi-
  12683. nary files to text (using a variation on Intel hex format).  The resulting text
  12684. file can be transferred like any other, and  finally  "dehexified"  reproducing
  12685. the  original  file, with the major attributes intact.  Unfortunately, the text
  12686. files tend to be about twice the size of the  original  binary  files,  so  the
  12687. transfers  take  a  bit  longer than regular text files.  On the plus side, the
  12688. text versions of the files can be transferred to any system with a  Kermit  and
  12689. still  retrieved  intact.    They can also be transferred over 7-bit data paths
  12690. without any problems.  The bootstrap procedure (described below), makes use  of
  12691. hexified versions of the binary file which makes up Kermit-32.
  12692.  
  12693.  
  12694.                  USING THE VAX TO ARCHIVE MICROCOMPUTER FILES
  12695.  
  12696. You can use Kermit to send textual files from a microcomputer or any 8-bit sys-
  12697. tem to a VAX/VMS system with no special provisions, since Kermit-32 stores  in-
  12698. coming  files  as  text  files  (variable  length records with implied carriage
  12699. returns) unless it  is  explicitly  told  otherwise.    But  Kermit-32  has  no
  12700. automatic  way  of distinguishing an incoming binary file from an incoming text
  12701. file.  It turns out that because of the method used by  Kermit-32  for  storing
  12702. text files, a binary file can be stored like a text file so long as it does not
  12703. contain a string of more than 4095 characters  between  carriage  return,  line
  12704. feed  sequences,  and ends with a carriage return line feed.  Since most binary
  12705. files do not have these characteristics, you must inform Kermit-32 that a  file
  12706. it  is  about  to receive is to be stored as a binary file.  This is done using
  12707. the SET FILE TYPE BINARY command.  This instructs Kermit-32 to store  the  data
  12708. it  receives  in  the  file without checking for carriage return, line feed se-
  12709. quences.  The file it creates will be variable record length,  with  no  record
  12710. attributes.  Each record will contain 510 bytes of data, except the last, which
  12711. will contain whatever amount is left before the end of the file.   This  allows
  12712. Kermit-32  to  correctly  return  exactly the data it was sent when the file is
  12713. returned to the original system.
  12714.  
  12715. Note that because of the need to use a different file type for binary files, it
  12716. is  not possible to use a "wildcard send" command to send a mixture of text and
  12717. binary files to a VAX system unless the text files are not intended for use  on
  12718. the VAX; rather, you must send all text files with Kermit-32's file type set to
  12719. text, and all binary files with the file type set to binary.
  12720.  
  12721. Once you get the foreign file into the VAX system, stored with the correct file
  12722. type,  you  need  take  no  special  measures  to send it back to its system of
  12723. origin.  This is because Kermit-32 honors the record type and attributes of the
  12724. file  as  it  is stored on the VAX.  In fact, SET FILE TYPE BINARY or TEXT only
  12725. affects how Kermit-32 receives files - it does not affect how Kermit-32  trans-
  12726. mits files.
  12727. 10.1. The VAX/VMS File System                                          Page 228
  12728.  
  12729. -------------------------------------------------------------------------------
  12730.                          FILES KERMIT-32 CANNOT HANDLE
  12731.  
  12732. The  Kermit  protocol  can only accommodate transfer of sequential files, files
  12733. which are a linear sequence of bytes (or words).
  12734.  
  12735. Some files on a VAX/VMS system are not sequential, and cannot  be  successfully
  12736. sent  or  received  by Kermit-32.  These are mainly indexed data files, but can
  12737. also include other files which require more than just the data in the  file  to
  12738. be  completely reconstructed.  External control information and file attributes
  12739. are not transmitted.  However, any VMS file can be transferred with  Kermit  if
  12740. it has been "hexified" with VMSHEX.
  12741.  
  12742.  
  12743. 10.2. Program Operation
  12744.  
  12745. Kermit-32's  prompt  is normally "Kermit-32>".  If a foreign command is defined
  12746. to run Kermit-32 (eg. KERMIT := $KERMIT), Kermit-32 will accept a  single  com-
  12747. mand on the command line, like this:
  12748.  
  12749.   $
  12750.   $ Kermit send foo.bar
  12751.  
  12752.     the file is sent
  12753.  
  12754.   $
  12755.   $ mcr kermit send foo.bar
  12756.  
  12757.     the file is sent
  12758.  
  12759.   $
  12760.  
  12761. You can run the program interactively to issue several commands, like this:
  12762.  
  12763.   $
  12764.   $ run sys$system:kermit
  12765.   VMS Kermit-32 version 3.3.111
  12766.   Default terminal for transfers is: _TTA1:
  12767.  
  12768.   Kermit-32>send foo.*
  12769.  
  12770.     files are sent
  12771.  
  12772.   Kermit-32>statistics
  12773.  
  12774.     performance statistics are printed
  12775.  
  12776.   Kermit-32>receive
  12777.  
  12778.     files are received
  12779.  
  12780.   Kermit-32>exit
  12781.   $
  12782.  
  12783. Upon initial startup, Kermit-32 executes commands from its initialization file,
  12784. VMSKERMIT.INI, if any, in your directory.
  12785. 10.2. Program Operation                                                Page 229
  12786.  
  12787. -------------------------------------------------------------------------------
  12788. Command keywords may be abbreviated to their shortest  prefix  that  sets  them
  12789. apart from any other keyword valid in that field.
  12790.  
  12791. Kermit-32 provides most of the commands possible for an "ideal" Kermit program,
  12792. as described in the main part of the Kermit User Guide.  The following sections
  12793. will concentrate on system-dependent aspects of Kermit-32.
  12794.  
  12795.  
  12796. 10.3. Conditioning Your Job for Kermit
  12797.  
  12798. Kermit-32  does as much as it can to condition your line for file transfer.  It
  12799. saves all your terminal settings, and restores them after use.  However,  there
  12800. are  some sources of interference over which Kermit-32 has no control.  In par-
  12801. ticular, messages issued by other processes in your job  could  become  mingled
  12802. with  Kermit  packets  and  slow  things down or stop them entirely.  This is a
  12803. fairly rare occurence and can be  easily  avoided  by  not  running  any  other
  12804. process  which  wishes  to  perform  I/O to your terminal while you are running
  12805. Kermit-32.
  12806.  
  12807. Normally, when Kermit-32 is run, it assumes you wish to use it in  remote  mode
  12808. and  perform  file  transfers  over  the terminal line which controls your job.
  12809. This can be overridden, however, by defining a logical name  which  equates  to
  12810. some  other  terminal line in the system.  The default terminal line to be used
  12811. for file transfers is determined by the first of the  following  logical  names
  12812. which translates to a terminal line which is available for use by your process:
  12813. KER$COMM, SYS$INPUT, SYS$OUTPUT, and SYS$COMMAND.  If  none  of  these  logical
  12814. names  translate  to  an  available terminal line, there is no default terminal
  12815. line and a SET LINE command must be used before any transfer  command  is  per-
  12816. formed.  Note that this is the typical case in a batch job.
  12817.  
  12818. Kermit-32  will also default the type of parity to be used on the communication
  12819. line to that which is set on its default terminal  line  when  it  is  started.
  12820. This  means  that  if  all  communication at a site is normally done using even
  12821. parity (for example), Kermit-32 will also use even parity.
  12822.  
  12823. There are two things to keep in mind when using Kermit-32 in local mode  (where
  12824. the  file transfers are done over a different terminal line from where commands
  12825. are typed):
  12826.  
  12827.    - Under VAX/VMS, every terminal line has an owner  UIC  and  protection
  12828.      code  associated  with it.  This UIC and protection is used to deter-
  12829.      mine who can allocate (and therefore use) the terminal line when they
  12830.      are not logged in on that line.  Therefore, in order for Kermit-32 to
  12831.      be able to perform file transfers over a terminal line other than the
  12832.      one  on which you are logged in, the field of the protection code for
  12833.      the terminal which applies to your job (based on  your  UIC  and  the
  12834.      owner  UIC  of  the  terminal) must allow your job access to the ter-
  12835.      minal.  You may need to request your system  manager  to  change  the
  12836.      protection  for a terminal line to allow you to use it with Kermit-32
  12837.      in local mode.  See the section on Installation for details.
  12838.  
  12839.    - Terminal lines which have been declared as modem control  lines  will
  12840.      have  the  phone  "hung  up"  whenever the terminal line becomes free
  12841.      (deallocated).  This means that if you do not use  the  DCL  ALLOCATE
  12842.      command  to  allocate  the  terminal line to your job before entering
  12843.      Kermit-32, exiting Kermit-32 will cause the terminal  line  to  "hang
  12844. 10.3. Conditioning Your Job for Kermit                                 Page 230
  12845.  
  12846. -------------------------------------------------------------------------------
  12847.      up"  the  modem.    If  you  do  wish to get to DCL after having used
  12848.      Kermit-32 to connect a modem control line which you do not  have  al-
  12849.      located,  you  can use the PUSH command to spawn a subprocess running
  12850.      DCL.
  12851.  
  12852.  
  12853. 10.4. Kermit-32 Commands
  12854.  
  12855. This section describes the Kermit-32 commands -- in detail  where  they  differ
  12856. from  the  "ideal" Kermit, briefly where they coincide.  Kermit-32 has the fol-
  12857. lowing commands:
  12858.  
  12859.             @  synonym for "take".
  12860.           BYE  to remote server.
  12861.       CONNECT  as terminal to remote system.
  12862.          EXIT  from Kermit-32.
  12863.        FINISH  Shut down remote server.
  12864.           GET  remote files from server.
  12865.          HELP  with Kermit-32.
  12866.         LOCAL  prefix for local file management commands.
  12867.           LOG  remote terminal session.
  12868.        LOGOUT  remote server.
  12869.          PUSH  to DCL command level.
  12870.          QUIT  from Kermit-32.
  12871.       RECEIVE  files from remote Kermit.
  12872.        REMOTE  prefix for remote file management commands.
  12873.          SEND  files to remote Kermit.
  12874.        SERVER  mode of remote operation.
  12875.           SET  various parameters.
  12876.          SHOW  various parameters.
  12877.        STATUS  about most recent file transfer.
  12878.      TRANSMIT  Transmit (upload) a file with no error checking.
  12879.          TAKE  Kermit-32 commands from a file.
  12880.  
  12881.  
  12882. 10.4.1. Commands for File Transfer
  12883.  
  12884. Kermit-32 provides the standard SEND, RECEIVE, and GET commands  for  transfer-
  12885. ring files using the Kermit protocol.
  12886.  
  12887.  
  12888.                                THE SEND COMMAND
  12889.  
  12890. Syntax:
  12891.  
  12892. Sending a file or files:  
  12893.  
  12894.     SEND filespec
  12895.  
  12896. The  SEND  command  causes  a file or file group to be sent from the VAX to the
  12897. other system.  If filespec contains wildcard characters then all matching files
  12898. will be sent, in alphabetical order (according to the ASCII collating sequence)
  12899. by name.  If filespec does not contain any wildcard characters, then the single
  12900. file specified by filespec will be sent.
  12901. 10.4.1. Commands for File Transfer                                     Page 231
  12902.  
  12903. -------------------------------------------------------------------------------
  12904.   SEND Command General Operation:
  12905.  
  12906. Files will be sent with at least their VAX/VMS file name and type (for instance
  12907. FOO.BAR).  If a SET FILE NAMING FULL command has  been  given,  Kermit-32  will
  12908. also  send  the  device  name,  directory name and version number (for instance
  12909. USER$DISK:[JOE]FOO.BAR;25).  If a SET FILE NAMING UNTRANSLATED command has been
  12910. given, Kermit-32 will send the file name, type and version number (for instance
  12911. FOO.BAR;25).  If a SET FILE NAMING NORMAL_FORM command has been given (this  is
  12912. the initial default), Kermit-32 will only send the file name and type.
  12913.  
  12914. Each  file will be sent according to the record type and attributes recorded in
  12915. its file descriptor.  Kermit-32 attempts to translate all formats of text  file
  12916. (including  those with FORTRAN or print carriage control) to a format usable on
  12917. any system.  Note that there is no need to set  the  FILE  TYPE  parameter  for
  12918. sending  files,  since  Kermit-32  always  uses  the  information from the file
  12919. descriptor to determine how to send the file.
  12920.  
  12921. If communication line parity is being used (see SET PARITY), Kermit-32 will re-
  12922. quest that the other Kermit accept a special kind of prefix notation for binary
  12923. files.  This is an advanced feature, and not all Kermits have it; if the  other
  12924. Kermit  does  not  agree  to use this feature, binary files cannot be sent cor-
  12925. rectly.  This includes executable programs (like .EXE files, CP/M .COM  files),
  12926. relocatable  object  modules  (.OBJ files), as well as any text file containing
  12927. characters with the eighth bit on.
  12928.  
  12929. Kermit-32 will also ask the other Kermit whether it can handle a special prefix
  12930. encoding  for  repeated characters.  If it can, then files with long strings of
  12931. repeated characters will be  transmitted  very  efficiently.    Columnar  data,
  12932. highly  indented  text,  and  binary  files are the major beneficiaries of this
  12933. technique.
  12934.  
  12935. If you're running Kermit-32 locally, for instance dialing out  from  a  VAX  to
  12936. another  system  using an autodialer, you should have already run Kermit on the
  12937. remote system and issued either a RECEIVE or a SERVER command.  Once  you  give
  12938. Kermit-32  the  SEND  command,  the name of each file will be displayed on your
  12939. screen as the transfer begins.  If the file is  successfully  transferred,  you
  12940. will see "[OK]", otherwise there will be an error message.
  12941.  
  12942. During local operation, you can type Control-A at any point during the transfer
  12943. to get a brief status report.   You may also type Control-X or Control-Z to in-
  12944. terrupt the current file or file group.
  12945.  
  12946.  
  12947.                               THE RECEIVE COMMAND
  12948.  
  12949. Syntax:  RECEIVE [filespec]
  12950.  
  12951. The  RECEIVE  command  tells Kermit-32 to receive a file or file group from the
  12952. other system.  If only one file is being received, you may include the optional
  12953. filespec  as  the name to store the incoming file under; otherwise, the name is
  12954. taken from the incoming file header.  If the name in the header is not a  legal
  12955. VAX/VMS  file name, Kermit-32 will normally replace the illegal characters with
  12956. "X" (see SET FILE NAMING NORMAL_FORM).
  12957.  
  12958. If an incoming file has the same name  as  an  existing  file,  Kermit-32  just
  12959. creates  a  new  version  of  the  same  name and type, for instance FOO.BAR;3,
  12960. 10.4.1. Commands for File Transfer                                     Page 232
  12961.  
  12962. -------------------------------------------------------------------------------
  12963. FOO.BAR;4.
  12964.  
  12965. Incoming files will all be stored with  the  prevailing  file  type,  ASCII  by
  12966. default,  which is appropriate for text files.   If you are asking Kermit-32 to
  12967. receive binary files from a microcomputer or other 8-bit system, you must first
  12968. type  SET  FILE  TYPE BINARY.  Otherwise, an error may occur when receiving the
  12969. file, or a carriage return, line feed will be added to the end of the file  and
  12970. the file will be useless when sent back to the system of origin.
  12971.  
  12972. If parity is being used on the communications line, then 8th-bit prefixing will
  12973. be requested.  If the other side cannot do this, binary files cannot be  trans-
  12974. ferred correctly.
  12975.  
  12976. If  an  incoming  file does not arrive in its entirety, Kermit-32 will normally
  12977. discard it; it will not appear in your directory.  You may change this behavior
  12978. by  using the command SET INCOMPLETE KEEP, which will cause as much of the file
  12979. as arrived to be saved in your directory.
  12980.  
  12981. If you are running Kermit-32 locally, you should already  have  issued  a  SEND
  12982.        1
  12983. command   to  the  remote Kermit, and then escaped back to Kermit-32.  As files
  12984. arrive, their names will be displayed on your screen.  You can  type  Control-A
  12985. during the transfer for a brief status report.
  12986.  
  12987. If  a  file arrives that you don't really want, you can attempt to cancel it by
  12988. typing Control-X; this sends a cancellation request to the remote Kermit.    If
  12989. the  remote  Kermit understands this request (not all implementations of Kermit
  12990. support this feature), it will comply; otherwise it will continue to send.   If
  12991. a  file  group  is being sent, you can request the entire group be cancelled by
  12992. typing Control-Z.
  12993.  
  12994.  
  12995.                                 THE GET COMMAND
  12996.  
  12997. Syntax: GET [remote-filespec]
  12998.  
  12999. The GET command requests a remote Kermit server to send the file or file  group
  13000. specified  by remote-filespec.  This command can be used only when Kermit-32 is
  13001. local, with a Kermit server on the other end of the line specified by SET LINE.
  13002. This  means  that  you  must have CONNECTed to the other system, logged in, run
  13003. Kermit there, issued the SERVER command, and escaped back to the VAX.
  13004.  
  13005. The remote filespec is any string that can be a legal  file  specification  for
  13006. the  remote  system; it is not parsed or validated locally.  Any leading spaces
  13007. before the remote filespec are stripped, and lower case characters  are  raised
  13008. to upper case.
  13009.  
  13010. As  files  arrive,  their  names  will  be displayed on your screen.  As in the
  13011. RECEIVE command, you may type Control-A to get a brief status report, ^X to re-
  13012. quest  that  the current incoming file be cancelled, ^Z to request that the en-
  13013. tire incoming batch be cancelled.
  13014.  
  13015. _______________
  13016.  
  13017.   1
  13018.    not SERVER -- use the GET command to receive files from a Kermit server.
  13019. 10.4.1. Commands for File Transfer                                     Page 233
  13020.  
  13021. -------------------------------------------------------------------------------
  13022. If the remote Kermit is not capable of server functions, then you will probably
  13023. get  an  error  message back from it like "Illegal packet type".  In this case,
  13024. you must connect to the other Kermit, give a SEND  command,  escape  back,  and
  13025. give a RECEIVE command.
  13026.  
  13027.  
  13028.                               THE STATUS COMMAND
  13029.  
  13030. Give statistics about the most recent file transfer.
  13031.  
  13032.  
  13033.                                THE PUSH COMMAND
  13034.  
  13035. Syntax: TAKE
  13036.  
  13037. Invoke  an  inferior DCL command processor, to which you may issue any DCL com-
  13038. mands.  Type LOGOUT to return to Kermit-32.
  13039.  
  13040.  
  13041.                                THE TAKE COMMAND
  13042.  
  13043. Syntax: TAKE file-spec [ /DISPLAY ]
  13044.  
  13045. Where 'file-spec' is any normal VAX/VMS file specification.  If file-spec  does
  13046. not  specify  a file-type Kermit-32 will supply a default of .COM. The /DISPLAY
  13047. option causes the commands read from the file to be  displayed  on  the  user's
  13048. terminal.
  13049.  
  13050. The  TAKE  command tells Kermit-32 to execute commands from the specified file.
  13051. You may also use the VAX/VMS notation "@" instead of Take to specify a  command
  13052. file.
  13053.  
  13054. The file VMSKERMIT.INI is automatically taken upon program startup.
  13055.  
  13056.  
  13057. 10.4.2. Server Operation
  13058.  
  13059.  
  13060.                               THE SERVER COMMAND
  13061.  
  13062. The  SERVER  command  puts  a  remote  Kermit-32  in  "server mode", so that it
  13063. receives all further commands in packets from the local Kermit.  The  Kermit-32
  13064. server is capable (as of this writing) of executing the following remote server
  13065. commands:  SEND, GET, FINISH, BYE, REMOTE DIRECTORY, REMOTE CWD, REMOTE  SPACE,
  13066. REMOTE  DELETE,  REMOTE  TYPE,  REMOTE HELP, REMOTE COPY, REMOTE RENAME, REMOTE
  13067. SEND_MESSAGE, REMOTE WHO, and REMOTE HOST.
  13068.  
  13069. Any nonstandard parameters should be selected with SET commands before  putting
  13070. Kermit-32  into  server mode, in particular the file type. The Kermit-32 server
  13071. can send all files in the correct manner automatically.  However, if  you  need
  13072. to  ask  Kermit-32 to receive binary files you must issue the SET FILE TYPE BI-
  13073. NARY command before putting it into server mode, and then you  must  only  send
  13074. binary  files.   You cannot send a mixture of text files and 8-bit binary files
  13075. to a Kermit-32 server unless the files are not for use on the VAX.
  13076. 10.4.2. Server Operation                                               Page 234
  13077.  
  13078. -------------------------------------------------------------------------------
  13079.                              COMMANDS FOR SERVERS
  13080.  
  13081. When running in local mode, Kermit-32 allows you to give a wide range  of  com-
  13082. mands  to  a remote Kermit server, with no guarantee the that the remote server
  13083. can process them, since they are all optional features of the protocol.    Com-
  13084. mands  for  servers include the standard SEND, GET, BYE, LOGOUT and FINISH com-
  13085. mands, as well as the REMOTE command.
  13086.  
  13087. Syntax: REMOTE command
  13088.  
  13089. Send the specified command to the remote server.  If the server does not under-
  13090. stand  the  command  (all of these commands are optional features of the Kermit
  13091. protocol), it will reply with a message like "Unknown Kermit  server  command".
  13092. If  does  understand, it will send the results back, and they will be displayed
  13093. on the screen.  The REMOTE commands are:
  13094.  
  13095. COPY filespec   Copy file.  The server is asked to make a copy of the specified
  13096.                 file.    Kermit-32  will  prompt  for  the  new  file name on a
  13097.                 separate line.  Both filespecs must be in  the  correct  format
  13098.                 for  the  remote  system.  Kermit-32 does not parse or validate
  13099.                 the file specifications.  Any leading spaces will  be  stripped
  13100.                 and  lower  case characters converted to upper case.  Note that
  13101.                 this command simply provides for  copying  a  file  within  the
  13102.                 server's system - it does not cause a file to be transferred.
  13103.  
  13104. CWD [directory] Change  Working  Directory.   If no directory name is provided,
  13105.                 the server will  change  to  the  default  or  home  directory.
  13106.                 Otherwise,  you will be prompted for a password, and the server
  13107.                 will attempt  to  change  to  the  specified  directory.    The
  13108.                 password  is  entered  on a separate line, and does not echo as
  13109.                 you type it.  If access is not granted, the server will provide
  13110.                 a  message to that effect.  Note that while not all server Ker-
  13111.                 mits require (or accept)  a  password  to  change  the  working
  13112.                 directory,  Kermit-32  will always ask for one when a directory
  13113.                 name is provided.
  13114.  
  13115. DELETE filespec Delete the specified file or files.  The  names  of  the  files
  13116.                 that are deleted will appear on your screen.
  13117.  
  13118. DIRECTORY [filespec]
  13119.                 The names of the files that match the given file  specification
  13120.                 will  be  displayed on your screen, perhaps along with size and
  13121.                 date information for each file.  If no  file  specification  is
  13122.                 given, all files from the current directory will be listed.
  13123.  
  13124. DISK_USAGE [directory]
  13125.                 Display information about disk usage in the given directory (or
  13126.                 by  the  given  user).  If no directory is provided, disk usage
  13127.                 information is provided for the current working  directory  (or
  13128.                 user).  This is the same as the REMOTE SPACE command.
  13129.  
  13130. EXIT            Requests  the  server to leave Kermit, allowing the terminal to
  13131.                 be used for normal commands.
  13132.  
  13133. FINISH          Requests the server to return to the  Kermit  prompt,  allowing
  13134.                 statistics to be obtained about the transfers.
  13135. 10.4.2. Server Operation                                               Page 235
  13136.  
  13137. -------------------------------------------------------------------------------
  13138. HELP [topic]    Provide  information  about  the  given  topic.  If no topic is
  13139.                 given, provide a list of the functions that are available  from
  13140.                 the  server.  Some servers may ignore the topic and always dis-
  13141.                 play the same information.
  13142.  
  13143. HOST [command]  Pass the given command to the server's host command  processor,
  13144.                 and display the resulting output on your screen.
  13145.  
  13146. LOGIN user-id   Supply  information  to  the  server  Kermit  to  indicate what
  13147.                 user-id, account and password are to be used.  The server  Ker-
  13148.                 mit may use this to validate the user's access to the system as
  13149.                 well as for billing purposes. It may also use this  information
  13150.                 to provide the user with access to files on its system.
  13151.  
  13152. LOGOUT          Request  the  server  to  exit  Kermit  and  logout its job (or
  13153.                 process).  This command is identical to the LOGOUT command.
  13154.  
  13155. RENAME filespec Change the name on the specified file (or  files).    Kermit-32
  13156.                 will  prompt  for  the new file specification on the next line.
  13157.                 Both file specifications must be valid for the server's system.
  13158.  
  13159. SEND_MESSAGE destination-address
  13160.                 Request  the  server  to  send  a  single  line  message to the
  13161.                 specified destination address (which might be a  user-id,  ter-
  13162.                 minal designator, or some other item, depending upon the server
  13163.                 Kermit).  Kermit-32 will prompt for the single line message  on
  13164.                 the next line.
  13165.  
  13166. SPACE [directory]
  13167.                 Display information about disk usage in the given directory (or
  13168.                 by  the  given  user).  If no directory is provided, disk usage
  13169.                 information is provided for the current working  directory  (or
  13170.                 user).  This is the same as the REMOTE DISK_USAGE command.
  13171.  
  13172. STATUS          Display information about the status of the server.
  13173.  
  13174. TYPE filespec   Display the contents of the specified file on your screen.
  13175.  
  13176. WHO [user-id]   Display  information  about  the  given user.  If no user-id is
  13177.                 given, display information about the  currently  active  users.
  13178.                 Kermit-32  will  prompt  for  options for selecting what infor-
  13179.                 mation to display and/or formatting parameters.  The format  of
  13180.                 both  the user-id and the options are dependent upon the server
  13181.                 Kermit.
  13182.  
  13183.  
  13184. 10.4.3. Commands for Local File Management
  13185.  
  13186. Syntax: LOCAL [command]
  13187.  
  13188. Execute the specified command on the local system  --  on  the  VAX/VMS  system
  13189. where  Kermit-32 is running.  These commands provide some local file management
  13190. capability without having to leave the Kermit-32 program.  These  commands  are
  13191. very  similar  to the REMOTE commands in function and syntax.  They are all ex-
  13192. ecuted locally, and are available when Kermit-32 is  either  local  or  remote.
  13193. The arguments to these commands are the same as the arguments expected from the
  13194. 10.4.3. Commands for Local File Management                             Page 236
  13195.  
  13196. -------------------------------------------------------------------------------
  13197. user Kermit when Kermit-32 is processing a command in server mode.
  13198.  
  13199. COPY filespec   Make a copy of the given  file  (or  files).    Kermit-32  will
  13200.                 prompt for the new file specification.  The command is actually
  13201.                 performed by using the  DCL  COPY  command  (COPY/LOG  old-file
  13202.                 new-file), and any options which are valid on the DCL COPY com-
  13203.                 mand may be included.
  13204.  
  13205. CWD [directory] Change working directory, or, in  VAX/VMS  terminology,  change
  13206.                 the  default device/directory.  This command takes the same ar-
  13207.                 guments as the DCL SET DEFAULT  command  (i.e.,  a  device  and
  13208.                 directory, only a directory, or only a device).  If no argument
  13209.                 is given, the default device and directory are reset to that in
  13210.                 effect  when  Kermit-32  was  run.   The new default device and
  13211.                 directory will be typed out.
  13212.  
  13213. DELETE filespec Delete the specified file or files.  This command is  performed
  13214.                 by  using the DCL DELETE command (DELETE/LOG filespec).  There-
  13215.                 fore, any options which are valid on the DCL DELETE command may
  13216.                 be included.
  13217.  
  13218. DIRECTORY [filespec]
  13219.                 Provide a directory listing of the specified files.  This  com-
  13220.                 mand is performed by using the DCL DIRECTORY command (DIRECTORY
  13221.                 filespec), so any options valid for the DCL  DIRECTORY  command
  13222.                 may be included.
  13223.  
  13224. DISK_USAGE [uic]
  13225.                 Display disk usage information for the given UIC.  If no UIC is
  13226.                 given,  display  disk  usage  information  for the process UIC.
  13227.                 This command is performed by using the DCL SHOW  QUOTA  command
  13228.                 (SHOW QUOTA or SHOW QUOTA/USER=uic).
  13229.  
  13230. HELP            Display  the  help message describing the server commands which
  13231.                 are available.
  13232.  
  13233. HOST DCL command
  13234.                 Perform  the given DCL command.  The command should not perform
  13235.                 any action which will require more input.  Any output resulting
  13236.                 from the command will be typed on the terminal.
  13237.  
  13238. RENAME filespec Change  the  name of the specified file.  Kermit-32 will prompt
  13239.                 for the new name on the next line.  This command  is  performed
  13240.                 by using the DCL RENAME command (RENAME/LOG old-file new-file),
  13241.                 so any options which are valid on the DCL RENAME command may be
  13242.                 included.
  13243.  
  13244. SEND_MESSAGE terminal-name
  13245.                 Send a single line message to the given  terminal.    Kermit-32
  13246.                 will  prompt for the message on the next line.  Since this com-
  13247.                 mand is performed using the DCL REPLY command 
  13248.  
  13249.                   REPLY/TERMINAL=terminal-name "message"
  13250.  
  13251.                 OPER privileges are needed to perform it.
  13252. 10.4.3. Commands for Local File Management                             Page 237
  13253.  
  13254. -------------------------------------------------------------------------------
  13255. TYPE filespec   Display the contents of the specified file  or  files  at  your
  13256.                 terminal.    Each  file  will  be preceded by its name in angle
  13257.                 brackets.
  13258.  
  13259.  
  13260. 10.4.4. The CONNECT Command
  13261.  
  13262. Syntax: CONNECT [terminal-name]
  13263.  
  13264. Establish a terminal connection to the system connected to  the  terminal  line
  13265. specified  here or in the most recent SET LINE command, using full duplex echo-
  13266. ing and no parity unless otherwise specified in previous  SET  commands.    Get
  13267. back  to Kermit-32 by typing the escape character followed by the letter C. The
  13268. escape character is Control-Close-Square-Bracket (^]) by  default.    When  you
  13269. type the escape character, several single-character commands are possible:
  13270.  
  13271.   C   Close the connection and return to Kermit-32.
  13272.   Q   If a session log is active, temporarily Quit logging.
  13273.   R   Resume logging to the session log.
  13274.   S   Show status of the connection.
  13275.   0   Send a null character.
  13276.   ?   List all the possible single-character arguments.
  13277.   ^] (or whatever you have set the escape character to be):
  13278.       Typing the escape character twice sends one copy of it to  the  connected
  13279.       host.
  13280.  
  13281. You  can use the SET ESCAPE command to define a different escape character, and
  13282. SET PARITY, and SET  LOCAL_ECHO  to  change  those  communication-line-oriented
  13283. parameters.  Type the SHOW LINE command for information about your current com-
  13284. munication settings.
  13285.  
  13286. Kermit-32 does not have any special autodialer interface.  It assumes that  the
  13287. connection has already been made and the line assigned.
  13288.  
  13289.  
  13290. 10.4.5. The SET and SHOW Commands
  13291.  
  13292.  
  13293.                                 THE SET COMMAND
  13294.  
  13295. Syntax: SET parameter [option [value]]
  13296.  
  13297. Establish  or  modify  various parameters for file transfer or terminal connec-
  13298. tion.  You can examine their values with  the  SHOW  command.    The  following
  13299. parameters may be SET:
  13300.  
  13301.          BLOCK_CHECK  Packet transmission error detection method
  13302.            DEBUGGING  Record or display state transitions or packets
  13303.                DELAY  How long to wait before starting to send
  13304.               ESCAPE  Character for terminal connection
  13305.                 FILE  For setting file parameters like file type
  13306.            HANDSHAKE  For establishing half duplex line turnaround handshake
  13307.             IBM_MODE  For communicating with an IBM mainframe
  13308.      INCOMPLETE_FILE  What to do with an incomplete file
  13309.                 LINE  Terminal line to use for file transfer or CONNECT
  13310.           LOCAL_ECHO  For terminal connection, ON or OFF
  13311. 10.4.5. The SET and SHOW Commands                                      Page 238
  13312.  
  13313. -------------------------------------------------------------------------------
  13314.              MESSAGE  The type of typeout to be done during transfers
  13315.               PARITY  Character parity to use
  13316.               PROMPT  Change the program's command prompt
  13317.              RECEIVE  Various parameters for receiving files
  13318.         REPEAT_QUOTE Character to use for repeat compression
  13319.                RETRY  How many times to retry a packet before giving up
  13320.                 SEND  Various parameters for sending files
  13321.             TRANSMIT  Control TRANSMIT command echo and delay
  13322.  
  13323. Those  SET  commands  which differ from the "ideal" Kermit are now described in
  13324. detail.
  13325.  
  13326.  
  13327. SET DEBUGGING
  13328.  
  13329. Syntax: SET DEBUGGING options
  13330.  
  13331. Record the packet traffic, either on your terminal or in a file.  Some  reasons
  13332. for  doing  this would be to debug a version of Kermit that you are working on,
  13333. to record a transaction in which an error occurred for evidence when  reporting
  13334. bugs,  or  simply  to  vary the display you get when running Kermit-32 in local
  13335. mode.  Options are:
  13336.  
  13337. ON              Display each incoming and outgoing packet (lengthy).
  13338.  
  13339. OFF             Don't display or record debugging information (this is the nor-
  13340.                 mal mode).  If debugging was in effect, turn it off.
  13341.  
  13342. The  debugging information is recorded in the file specified by the most recent
  13343. LOG DEBUGGING command.
  13344.  
  13345.  
  13346. SET ESCAPE
  13347.  
  13348. SET ESCAPE octal-number
  13349.  
  13350. Specify the control character you want to use to "escape" from  remote  connec-
  13351. tions back to Kermit-32.  The default is 35 (Control-]).  The number is the oc-
  13352. tal value of the ASCII control character, 1 to 37 (or 177), for instance  2  is
  13353. Control-B.  After you type the escape character, you must follow it by a one of
  13354. the single-character "arguments" described under the CONNECT command, above.
  13355.  
  13356.  
  13357. SET FILE
  13358.  
  13359. Syntax: SET FILE parameter keyword
  13360.  
  13361. Establish file-related parameters:
  13362.  
  13363. TYPE keyword
  13364.         Type  of  file for VAX/VMS file output.  The choices are ASCII, BINARY,
  13365.         or FIXED.
  13366.  
  13367.         ASCII   Store the file as a standard  VAX/VMS  text  file.    Any  file
  13368.                 received  is  stored  as  variable length records with carriage
  13369.                 return, line feed sequences implied between records.   This  is
  13370. 10.4.5. The SET and SHOW Commands                                      Page 239
  13371.  
  13372. -------------------------------------------------------------------------------
  13373.                 the  format  preferred  by most utility programs under VAX/VMS.
  13374.                 An error will occur if any line is more  than  4096  characters
  13375.                 long.   Note that lines are only terminated by carriage return,
  13376.                 line feed sequences.  A carriage return that is not followed by
  13377.                 a  line  feed or a line feed that is not preceded by a carriage
  13378.                 return is not considered the end of a  line,  and  is  included
  13379.                 within the body of a record.
  13380.  
  13381.         BINARY  Store  the  file as a binary file.  Any file received is stored
  13382.                 as  variable  length  records  with   no   record   attributes.
  13383.                 Kermit-32  actually  will write 510 bytes in each record except
  13384.                 the last.  This makes each record take up one disk  block  (510
  13385.                 data  bytes  plus two bytes of record length).  The last record
  13386.                 is written containing only as much data is left to the  end  of
  13387.                 the  file.    Any  file  which is just a stream of bytes can be
  13388.                 stored as a BINARY file, and recovered intact later.   This  is
  13389.                 the preferred file type for use in archiving files.
  13390.  
  13391.         FIXED   Store  the  file  as  a  fixed  length  binary  file.  Any file
  13392.                 received is stored as fixed length 512  byte  records  with  no
  13393.                 record  attributes.    This is the format used for binary files
  13394.                 such as VAX/VMS "EXE" files and RSX-11M/M+ "TSK" files.   Since
  13395.                 even  the  last  record  of  the file is written with 512 bytes
  13396.                 (even if it is not filled), this format  does  not  necessarily
  13397.                 maintain the correct length of a file.  It should normally only
  13398.                 be used for files which are coming from a VAX/VMS system  which
  13399.                 are currently stored in fixed 512 byte records.
  13400.  
  13401. NAMING keyword
  13402.         Determine the form of names to be sent with outgoing files  and  deter-
  13403.         mine the translation performed on incoming file names.  The choices are
  13404.         FULL, NORMAL_FORM and UNTRANSLATED.
  13405.  
  13406.         FULL    Kermit-32 will send full file names (including  device,  direc-
  13407.                 tory, file name, file type and version number).  When receiving
  13408.                 a file, Kermit-32 will perform no translation of the file  name
  13409.                 (which must therefore be a legal VAX/VMS file specification).
  13410.  
  13411.         NORMAL_FORM
  13412.                 Kermit-32 will send only the file  name  and  file  type.  When
  13413.                 receiving a file, Kermit-32 will convert the file specification
  13414.                 received to contain only uppercase letters, digits, and at most
  13415.                 one  period.    Any other characters will be translated to "X".
  13416.                 There will be at most 9 characters before the period (if  any),
  13417.                 and at most 3 characters afterwards.  This forces the file name
  13418.                 to be a valid VAX/VMS file specification.  Note  that  standard
  13419.                 VAX/VMS  file  names  and  types  are  already normal form, and
  13420.                 therefore do not need translation.  This is the default.
  13421.  
  13422.         UNTRANSLATED
  13423.                 Kermit-32  will  send  only  the  file name and file type. When
  13424.                 receiving a file, Kermit-32 will not perform any conversions on
  13425.                 the file specification, which therefore must be a legal VAX/VMS
  13426.                 file specification.
  13427. 10.4.5. The SET and SHOW Commands                                      Page 240
  13428.  
  13429. -------------------------------------------------------------------------------
  13430. SET HANDSHAKE
  13431.  
  13432. Syntax: SET HANDSHAKE o
  13433.  
  13434. Sets the half duplex line turnaround handshake character to the ASCII character
  13435. whose  octal  value is o.  Normally required for communication with half duplex
  13436. systems like IBM mainframes.
  13437.  
  13438.  
  13439. SET IBM_MODE
  13440.  
  13441. Syntax: SET IBM_MODE ON or OFF
  13442.  
  13443. When IBM_MODE is set to ON, Kermit-32 will override the parity and  local  echo
  13444. settings and use odd parity, local echo on, and also enable a handshake charac-
  13445. ter of XON (control-Q, ASCII 021 octal).  This feature allows Kermit-32 to talk
  13446. with certain systems (notably some IBM mainframes), which require waiting for a
  13447. XON before sending data.
  13448.  
  13449. The various features selected by this command can be overridden subsequently by
  13450. SET PARITY, SET LOCAL_ECHO, and SET HANDSHAKE commands.
  13451.  
  13452.  
  13453. SET LINE
  13454.  
  13455. Syntax: SET LINE [terminal-name]
  13456.  
  13457. Specify   the   terminal  name  to  use  for  file  transfer  or  CONNECT;  the
  13458. terminal-name can be up to 16 characters long.  If you issue this command using
  13459. other  than  your  job's  controlling  terminal,  you will be running Kermit-32
  13460. locally, and you must log in to the remote system and run Kermit on  that  side
  13461. in order to transfer a file.  If you don't issue this command, Kermit-32 deter-
  13462. mines whether it is to run locally or remotely based on  the  default  terminal
  13463. line  found  when Kermit-32 is started.  Kermit-32 uses a list of logical names
  13464. to determine which terminal should be the default terminal line.  The first  of
  13465. these  names  which  translates to a terminal which is available (i.e., not al-
  13466. located by some other process) is used.  The logical names Kermit-32 tries  are
  13467. KER$COMM,  SYS$INPUT, SYS$$OUTPUT, and SYS$COMMAND.  If none of these translate
  13468. to an available terminal, Kermit-32 is running detached, and a terminal must be
  13469. specified  by  the  SET LINE command before any actions can be performed.  If a
  13470. terminal is found, Kermit-32 is running locally if this  is  a  terminal  other
  13471. than  the one controlling the job (i.e., different from SYS$COMMAND), otherwise
  13472. Kermit-32 is running remotely.  You can also select the line  directly  in  the
  13473. CONNECT command; the command 
  13474.  
  13475.   CONNECT TTA0
  13476.  
  13477. is equivalent to
  13478.  
  13479.   SET LINE TTA0
  13480.   CONNECT
  13481.  
  13482. If  you type SET LINE with no argument, you will deassign any previous assigned
  13483. line and revert to remote mode.
  13484. 10.4.5. The SET and SHOW Commands                                      Page 241
  13485.  
  13486. -------------------------------------------------------------------------------
  13487. SET SERVER_TIMEOUT
  13488.  
  13489. Syntax: SET SERVER_TIMEOUT number
  13490.  
  13491. This specifies the number of seconds between  timeouts  during  server  command
  13492. wait,  0  specifies  that  no timeouts should occur during server command wait.
  13493. When a Kermit server times out, it sends a NAK packet.    Some  systems  cannot
  13494. clear  piled-up NAKs from their input buffers; if you're using such a system to
  13495. communicate with a Kermit-32 server, and you expect to be  leaving  the  server
  13496. idle  for  long periods of time, you should use this command to turn off server
  13497. command-wait timeouts.
  13498.  
  13499.  
  13500. SET TRANSMIT
  13501.  
  13502. Syntax: SET TRANSMIT DELAY integer, SET TRANSMIT ECHO ON/OFF
  13503.  
  13504. It is possible to set a few parameters associated with the raw TRANSMIT command
  13505. that  vary  both  what  the user sees on the screen as well as the speed of the
  13506. transmit.
  13507.  
  13508. SET TRANSMIT DELAY
  13509.  
  13510. This parameter is the amount of time to delay after  each  carriage  return  is
  13511. transmitted.   Valid delay values range between 0 (the default) and 9 tenths of
  13512. a second.  The format of the command is: SET TRANSMIT DELAY  d  Where  d  is  a
  13513. single decimal digit representing tenths of a second.
  13514.  
  13515. Some  remote  hosts  may  not  be  able  to  receive  the characters as fast as
  13516. Kermit-32 can send them.  The TRANSMIT DELAY can be used to slow up the  trans-
  13517. fer by adding a slight delay after each line is sent.
  13518.  
  13519. The transfer also runs slower if the transmit echo is on, and the remote system
  13520. is echoing the characters as it receives them.  If the transmit delay is set to
  13521. 9  tenths  of  a  second, the remote system is echoing characters, the transmit
  13522. echo is on, and the remote system still cannot keep  up,  then  the  connection
  13523. should be made at a slower baud rate.
  13524.  
  13525. Conversely, the file transfer speed can be increased by: setting the delay to 0
  13526. and the echo off, stopping the remote system from  echoing  the  characters  it
  13527. receives, and connecting at higher baud rates.
  13528.  
  13529. SET TRANSMIT ECHO
  13530.  
  13531. This  command  controls what the user sees on the screen during the file trans-
  13532. fer.  The format of the command is SET TRANSMIT ECHO ON or OFF.
  13533.  
  13534. By default, the transmit echo is left off and the user sees the number of  each
  13535. line  after  it  has  been  transmitted.   With transmit echo on, the user sees
  13536. whatever the remote system would normally echo back to him while he  is  typing
  13537. in  a  file.    Note that turning the echo on typically slows the file transfer
  13538. down.
  13539. 10.4.5. The SET and SHOW Commands                                      Page 242
  13540.  
  13541. -------------------------------------------------------------------------------
  13542.                                THE SHOW COMMAND
  13543.  
  13544. Syntax: SHOW [option]
  13545.  
  13546. The SHOW command displays various information:
  13547.  
  13548. ALL             All parameters.
  13549.  
  13550. BLOCK_CHECK_TYPE
  13551.                 The block check type being requested.
  13552.  
  13553. COMMUNICATIONS  Parameters  affecting  the  terminal  line  being used for com-
  13554.                 munication.
  13555.  
  13556. DEBUGGING       Debugging mode in effect, if any.
  13557.  
  13558. DELAY           The number of seconds Kermit-32 will delay  before  starting  a
  13559.                 SEND or RECEIVE command when in remote mode.
  13560.  
  13561. ESCAPE          The current escape character for the CONNECT processing.
  13562.  
  13563. FILE_PARAMETERS File type, file naming, and incomplete file disposition.
  13564.  
  13565. INCOMPLETE_FILE_DISPOSITION
  13566.                 The action to take when a transfer is aborted.
  13567.  
  13568. LINE            Terminal line in use.
  13569.  
  13570. LOCAL_ECHO      Whether characters should be echoed locally when CONNECTed.
  13571.  
  13572. PACKET          For incoming and outbound packets.
  13573.  
  13574. PARITY          The parity type in use.
  13575.  
  13576. RECEIVE         For inbound packets.
  13577.  
  13578. RETRY           The number of retries to be done on bad packets.
  13579.  
  13580. SEND            For outbound packets.
  13581.  
  13582. TRANSMIT        Parameters for TRANSMIT command.
  13583.  
  13584. VERSION         The program version number of Kermit-32.
  13585.  
  13586.  
  13587. 10.4.6. Program Management Commands
  13588.  
  13589.  
  13590.                                THE HELP COMMAND
  13591.  
  13592. Syntax: HELP [topic {subtopic}]
  13593.  
  13594. Typing HELP alone prints a brief summary of Kermit-20 and its  commands.    You
  13595. can also type
  13596.  
  13597.   HELP command
  13598. 10.4.6. Program Management Commands                                    Page 243
  13599.  
  13600. -------------------------------------------------------------------------------
  13601. for  any  Kermit-20  command, e.g. "help send" or "help set parity" to get more
  13602. detailed information about a specific command.
  13603.  
  13604.  
  13605.                           THE EXIT AND QUIT COMMANDS
  13606.  
  13607. Syntax: EXIT
  13608.  
  13609. Exit from Kermit-32.  You can also exit from the Kermit-32 when it  is  waiting
  13610. for  a  command by typing a control-Z.  When Kermit-32 is running remotely, two
  13611. control-Y's will abort the transfer, bringing Kermit-32 back to  command  mode.
  13612. The two control-Y's must be typed together, as if a timeout occurs between them
  13613. the first is ignored.  When Kermit-32 is running locally, two control-Y's  will
  13614. stop  Kermit-32  and return you to DCL.  You will be able to CONTINUE if you do
  13615. not perform any command which runs  a  program.    However,  after  continuing,
  13616. control-A, control-X and control-Z will no longer be accepted as commands.
  13617.  
  13618. QUIT is a synonym for EXIT.
  13619.  
  13620.  
  13621.                                 THE LOG COMMAND
  13622.  
  13623. Syntax: LOG [option [filespec]]
  13624.  
  13625. Log the specified option to the specified file:
  13626.  
  13627. SESSION         During  CONNECT log all characters that appear on the screen to
  13628.                 the specified file.  During CONNECT, the  session  log  can  be
  13629.                 temporarily  turned off during the remote session by typing the
  13630.                 escape character followed by Q (for Quit logging),  and  turned
  13631.                 on  again by typing the escape character followed by R (for Re-
  13632.                 sume logging).
  13633.  
  13634. TRANSACTIONS    During file transfer, log the progress of each  file.    Trans-
  13635.                 action  logging  is  recommended  for  long  or unattended file
  13636.                 transfers, so that you don't have to watch the screen.  The log
  13637.                 may  be  inspected  after  the transfer is complete to see what
  13638.                 files were transferred and what errors may have occurred.
  13639.  
  13640. DEBUGGING       Log debugging info to the specified file.  If no SET  DEBUGGING
  13641.                 command  was  previously issued, the file will be opened and no
  13642.                 information written.  If DEBUGGING is turned on (either via the
  13643.                 SET  DEBUGGING  command  or  by  typed control-D during a local
  13644.                 transfer), the packet debugging information will be written  to
  13645.                 the  file.    Packet format is described in the Kermit Protocol
  13646.                 Manual.
  13647.  
  13648. Any log files are closed when you EXIT or QUIT from Kermit.  You may explicitly
  13649. close  a log file and terminate logging by using the LOG command without a file
  13650. specification.
  13651. 10.4.6. Program Management Commands                                    Page 244
  13652.  
  13653. -------------------------------------------------------------------------------
  13654.                               THE STATUS COMMAND
  13655.  
  13656. Syntax: STATUS
  13657.  
  13658. The current status of Kermit-32 will be displayed.  This includes the number of
  13659. characters  that  have  been sent and received from the remote Kermit. Also in-
  13660. cluded is an estimate of the effective baud rate of the transfer.  This  number
  13661. is not intended to be exact, but only an indication of what range of throughput
  13662. has been provided.
  13663.  
  13664.  
  13665. 10.5. Raw Upload and Download
  13666.  
  13667.  
  13668.                              THE TRANSMIT COMMAND
  13669.  
  13670. Syntax: TRANSMIT file-spec
  13671.  
  13672. The TRANSMIT command allows you to upload files "raw"  to  systems  that  don't
  13673. have a Kermit program available.  Note that there is no error checking or pack-
  13674. ets involved in this method of file transfer.
  13675.  
  13676. This command does a raw transmit of an ASCII file, one  character  at  a  time,
  13677. with carriage returns (no line-feeds) at the end of each line.  It is used with
  13678. Kermit-32 in local mode.  The user  must  first  prepare  the  remote  host  to
  13679. receive  the file by starting an edit session in input mode.  Then the user can
  13680. escape back to Kermit-32 and issue the TRANSMIT command.  After the transmit is
  13681. finished,  the  user  then  CONNECTs back to the remote host again and ends the
  13682. edit session.
  13683.  
  13684. During a file transmit, the following control characters can be used to  affect
  13685. the transfer in progress:
  13686.  
  13687. CTRL-C          Abort the transmit
  13688.  
  13689. CTRL-X          Abort the file currently being transmitted
  13690.  
  13691. CTRL-Z          Abort the file group currently being transmitted
  13692.  
  13693. See SET TRANSMIT for information about controlling echo and delays.
  13694.  
  13695.  
  13696.                             THE LOG SESSION COMMAND
  13697.  
  13698. Syntax: LOG SESSION file-spec
  13699.  
  13700. "Raw  Download"  is  the term commonly used to describe the capture of a remote
  13701. file on the local system, without any kind of error  detection  or  correction.
  13702. This  allows  you  to obtain files from remote systems that do not have Kermit,
  13703. but with the risk of loss or corruption of data.
  13704.  
  13705. Kermit-32 provides raw downloading via the LOG SESSION command  during  CONNECT
  13706. to  a  remote system.  The session log is described above.  To use session log-
  13707. ging to capture a file:
  13708.  
  13709.    1. Run Kermit on the VAX/VMS system.
  13710. 10.5. Raw Upload and Download                                          Page 245
  13711.  
  13712. -------------------------------------------------------------------------------
  13713.    2. SET LINE to the terminal line through which you will be connected to
  13714.       the remote system.
  13715.  
  13716.    3. Perform any required SET commands to condition Kermit for communica-
  13717.       tion with the remote system.
  13718.  
  13719.    4. CONNECT to the remote system and log in.
  13720.  
  13721.    5. Condition your job on the remote system not to pause at the end of a
  13722.       screenful  of  text,  and give whatever commands may be necessary to
  13723.       achieve a "clean" terminal listing -- for instance, disable messages
  13724.       from the system or other users.
  13725.  
  13726.    6. Type  the  appropriate command to have the desired file displayed at
  13727.       the terminal, but do not type the terminating carriage return.    On
  13728.       most systems, the command would be "type", on Unix it's "cat".
  13729.  
  13730.    7. Escape  back  to Kermit-32 and give the LOG SESSION command with the
  13731.       file specification where you wish to store the data.
  13732.  
  13733.    8. CONNECT back to the remote system and type a carriage return.    The
  13734.       file  will  be  displayed on your screen and recorded in the session
  13735.       log file.
  13736.  
  13737.    9. Escape back to Kermit-32 and give the LOG SESSION command without  a
  13738.       file specification.
  13739.  
  13740. The  file  you specified will contain everything that was typed on your screen.
  13741. You will probably  find  that  some  editing  necessary  to  remove  extraneous
  13742. prompts, messages, padding characters, or terminal escape sequences, or to fill
  13743. in lost or garbled characters.
  13744.  
  13745. Use the TRANSMIT command for raw uploading.
  13746.  
  13747.  
  13748. 10.6. Installation of Kermit-32
  13749.  
  13750. Kermit-32 may be installed either by rebuilding the  entire  program  from  the
  13751. sources,  or  by making use of the distributed copy of the program.  When being
  13752. built from sources, it may be built using either a BLISS-32  compiler  or  just
  13753. the MACRO-32 assembler.
  13754.  
  13755.  
  13756.                                      FILES
  13757.  
  13758. Kermit-32  is  built from a number of BLISS-32 sources and one MACRO-32 source.
  13759. In order to make it possible for sites  without  BLISS-32  to  build,  MACRO-32
  13760. sources  generated  by BLISS-32 are also included for all of the BLISS modules.
  13761. In the normal distribution of Kermit-32, all of the files start with the prefix
  13762. "VMS".    This  will  need to be changed to "KER" in order to build the program
  13763. properly.  The following files are distributed as part of Kermit-32:
  13764.  
  13765. VMSTT.BLI       Common BLISS source for the terminal text output support.
  13766.  
  13767. VMSGLB.BLI      Common BLISS source for the global storage for VMSMSG.BLI.
  13768. 10.6. Installation of Kermit-32                                        Page 246
  13769.  
  13770. -------------------------------------------------------------------------------
  13771. VMSMSG.BLI      Common BLISS source for the protocol handling module.
  13772.  
  13773. VMSCOM.REQ      Common  BLISS  require  file  which  defines   various   common
  13774.                 parameters.  This is required by VMSMSG.BLI.  This file must be
  13775.                 renamed to KERCOM.REQ.
  13776.  
  13777. VMSMIT.BWR      "Beware File" for Kermit-32 (read it!).
  13778.  
  13779. VMSMIT.BLI      BLISS-32 source for the command parser, and some basic  support
  13780.                 routines.
  13781.  
  13782. VMSFIL.BLI      BLISS-32 source for the file I/O.
  13783.  
  13784. VMSTRM.BLI      BLISS-32  source for the terminal processing.  This handles the
  13785.                 driving of the terminal line for the transfers and the  connect
  13786.                 command processing.
  13787.  
  13788. VMSSYS.BLI      System  interface  routines  for  the  Kermit  generic  command
  13789.                 processing.
  13790.  
  13791. VMSGEN.MAR      Macro-32 source file that contains the REMOTE command text that
  13792.                 is  given  to  VMS.  Sites desiring to change what DCL commands
  13793.                 are used to process the various  generic  server  commands  can
  13794.                 make those changes in this source.  This also contains the text
  13795.                 of the help message returned in response to the server  generic
  13796.                 help command.
  13797.  
  13798. VMSERR.MSG      MESSAGE source for error messages used by VAX/VMS Kermit.
  13799.  
  13800. VMSERR.REQ      BLISS-32  require  file  which defines the error codes. This is
  13801.                 REQUIREd by the BLISS-32 sources.
  13802.  
  13803. VMSMIT.MSS      SCRIBE source file for VMSMIT.DOC (this document).
  13804.  
  13805. VMSMIT.RNH      RUNOFF source for the help files for VAX/VMS Kermit.  When this
  13806.                 is  run through RUNOFF with /VARIANT=SYSTEM, it produces a .HLP
  13807.                 (VMSSYS.HLP) file suitable for inserting into the  system  help
  13808.                 library  (SYS$HELP:HELPLIB.HLB)  to  provide a KERMIT topic for
  13809.                 the system HELP command.  When run through RUNOFF  without  the
  13810.                 /VARIANT=SYSTEM,  it  produces  a  .HLP file (VMSUSR.HLP) to be
  13811.                 stored on SYS$HELP: for use by the Kermit HELP command.
  13812.  
  13813. VMSSYS.HLP      RUNOFF output file for system wide Kermit HELP.
  13814.  
  13815. VMSUSR.HLP      RUNOFF output file for Kermit's HELP command.
  13816.  
  13817. VMSINS.COM      Command file to build and install VAX/VMS Kermit.
  13818.  
  13819. VMSMIT.EXE      The executable (binary) file of VAX/VMS Kermit.  Note that this
  13820.                 is  only  included  when  it is possible.  This may be either a
  13821.                 copy of the .EXE file which was transferred  to  a  TOPS-10  or
  13822.                 TOPS-20  system using Kermit with Kermit-10 (or -20) using FILE
  13823.                 BYTE-SIZE 8-BIT, or a direct copy of the .EXE file (if the file
  13824.                 is  either on a native VAX/VMS tape or is residing on a VAX/VMS
  13825.                 system).
  13826. 10.6. Installation of Kermit-32                                        Page 247
  13827.  
  13828. -------------------------------------------------------------------------------
  13829. VMSMIT.HEX      A hexified version of .EXE file for VMS Kermit.  This file  can
  13830.                 be  dehexified  using  the  supplied  program.  In the hexified
  13831.                 form, the file should be transferable  over  any  medium  which
  13832.                 handles normal text.  This is the most reliable copy of the ex-
  13833.                 ecutable version of VMS Kermit.
  13834.  
  13835. VMSHEX.MAR      Source for the hexification program.  This is the program which
  13836.                 was used to produce VMSMIT.HEX.  It can also be used to produce
  13837.                 hexified version of any (or at least almost any) Files-11 file.
  13838.                 The  dehexification  program should then be able to reproduce a
  13839.                 copy of the original file with the  file  parameters  correctly
  13840.                 set.  Note that the format used for the hexified files is basi-
  13841.                 cally Intel hex format.  There are some additional records used
  13842.                 to  store the record format, etc.  Also, the file name as typed
  13843.                 to the prompt from VMSHEX is stored in the hexified version  of
  13844.                 the file for use by the dehexification program.  By doing this,
  13845.                 it is possible to store more than one binary file with a single
  13846.                 hexified file.
  13847.  
  13848. VMSDEH.MAR      Source for the dehexification program.
  13849.  
  13850. VMSV31.*Version 3.1 of VMS Kermit, the last version that will run under release
  13851.                 3.x of VMS.  Versions 3.2 and later require VMS release 4.0  or
  13852.                 later.
  13853.  
  13854. VMSV3x.MEM      Documentation  on the changes between releases 3.1 and 3.1, and
  13855.                 3.2 and 3.3 of Kermit-32, and  additional  installation  infor-
  13856.                 mation.
  13857.  
  13858. As  distributed,  Kermit-32  should work on any VAX/VMS system (version 4.0 and
  13859. later).  Customization  is  possible  with  or  without  a  BLISS-32  compiler.
  13860. Default parameter values may be changed by changing the appropriate LITERALs in
  13861. the BLISS-32 source for VMSMSG, or the actual values which are  stored  in  the
  13862. routine MSG_INIT in the MACRO-32 source for VMSMSG.
  13863.  
  13864. Sites  can  also  easily  change the commands which are used for processing the
  13865. generic server functions (REMOTE commands when running as a server).  The  text
  13866. which makes up these commands is in the file VMSGEN.MAR, along with the text of
  13867. the REMOTE HELP message.  This allows a site to make use of local programs  for
  13868. performing  some  of the commands (perhaps using FINGER to perform the WHO com-
  13869. mand, etc.).
  13870.  
  13871.  
  13872.                         BUILDING KERMIT-32 FROM SOURCES
  13873.  
  13874. A command file is included which will build Kermit-32 from either the  BLISS-32
  13875. or  MACRO-32 sources and optionally install Kermit-32 on the system.  This file
  13876. (VMSINS.COM) has not been extensively tested, however it should  work  on  most
  13877. systems.    It  is also a good example of what needs to be done to compile each
  13878. file and load the entire program.  It also contains the commands  necessary  to
  13879. install  a  version of Kermit-32 on the system once the .EXE and .HLP files are
  13880. generated.
  13881. 10.6. Installation of Kermit-32                                        Page 248
  13882.  
  13883. -------------------------------------------------------------------------------
  13884.               USING KERMIT-32 TO INSTALL A NEW VERSION OF ITSELF
  13885.  
  13886. If you already have a version of Kermit-32 running on a VAX/VMS system, you can
  13887. use it to transfer a new version of itself from another system.  If you have no
  13888. need to build Kermit-32 from sources (because you have no local modifications),
  13889. you can just transfer the new VMSMIT.EXE (or VMSMIT.HEX), and the new help file
  13890. VMSMIT.RNH.
  13891.  
  13892. If you have access to a system which has a copy of VMSMIT.EXE, you can transfer
  13893. it simply by setting the FILE TYPE to FIXED on the receiving Kermit.  Make sure
  13894. that the sending Kermit is willing to send the file as a binary file.   If  the
  13895. sending Kermit is another copy of Kermit-32, you don't need to do anything.  If
  13896. the sending Kermit is Kermit-10 or Kermit-20, make sure the file will  be  sent
  13897. as  an  eight-bit binary file by using SET FILE BYTE-SIZE EIGHT.  If some other
  13898. Kermit is sending the file, make sure to give it whatever command is  necessary
  13899. to  ensure  that  it  sends  eight-bit binary data from the file.  Also, if the
  13900. originating system is not a VAX/VMS, TOPS-10 or TOPS-20 system, make sure  that
  13901. the  file was stored on that system correctly to start out with.  Normally, the
  13902. file VMSMIT.EXE will only be available from a VAX/VMS, TOPS-10 or TOPS-20  sys-
  13903. tem.
  13904.  
  13905. If you have access to a copy of VMSMIT.HEX, you will need to transfer that file
  13906. (as a normal ASCII text file).  You will also need a copy of VMSDEH.MAR.  After
  13907. you  have  obtained both files, you can produce a copy of the .EXE file as fol-
  13908. lows.  First compile VMSDEH by using the command MACRO VMSDEH.  Then load it by
  13909. LINK VMSDEH.  Now run VMSDEH and when it asks for a file name, type VMSMIT.HEX.
  13910. The program will run for a short time and produce the .EXE file.
  13911.  
  13912. The system wide and user help files are produced from VMSMIT.RNH by RUNOFF.  To
  13913. produce the user help file (the one used by Kermit-32's HELP command), type:
  13914.  
  13915.   $ RUNOFF VMSMIT.RNH/OUTPUT=KERUSR.HLP
  13916.   $ LIBRARY/CREATE/HELP SYS$HELP:KERMIT.HLB KERUSR.HLP
  13917.  
  13918. To  produce the system wide help file and install it in the system help library
  13919. type:
  13920.  
  13921.   $ RUNOFF VMSMIT.RNH/OUTPUT=KERSYS.HLP/VARIANT=SYSTEM
  13922.   $ LIBRARY/REPLACE/HELP SYS$HELP:HELPLIB.HLB KERSYS.HLP
  13923.  
  13924. This allows the DCL HELP command to provide information on Kermit-32.
  13925.  
  13926. If you want to allow your users to assign external terminal lines for  connect-
  13927. ing  to remote systems from the VAX, e.g. by dialing out, you will have to con-
  13928. figure those lines to allow the desired access.  Otherwise, user's will  get  a
  13929. message  like  "No  privilege  for attempted operation" when they do a SET LINE
  13930. command.  Sample commands for terminal TXA0: might include:  
  13931.  
  13932.   $ SET PROTECTION=(W:R) TXA0:/DEVICE
  13933.  
  13934. or 
  13935.  
  13936.   $ SET PROTECTION=(W:RWLP)/DEVICE/OWNER=[1,4] TXA0:
  13937.  
  13938. or
  13939. 10.6. Installation of Kermit-32                                        Page 249
  13940.  
  13941. -------------------------------------------------------------------------------
  13942.   $ SET ACL/OBJECT=DEVICE/ACL=(IDENTIFIER=INTERACTIVE,OPTIONS=NONE,-
  13943.     ACCESS=READ+WRITE) TXA0:
  13944.  
  13945. Consult your VAX/VMS system manager's manual for the ramifications  (especially
  13946. on security) of each of these commands.
  13947. 11. DECSYSTEM-20 KERMIT                                                Page 250
  13948.  
  13949. -------------------------------------------------------------------------------
  13950. 11. DECSYSTEM-20 KERMIT
  13951.  
  13952. Authors:    Frank da Cruz, Bill Catchings, Columbia University
  13953. Language:   MACRO-20
  13954. Version:    4.2(262)
  13955. Date:       January 1988
  13956.  
  13957.  
  13958. Kermit-20 Capabilities At a Glance:
  13959.  
  13960.   Local operation:                   Yes
  13961.   Remote operation:                  Yes
  13962.   Transfers text files:              Yes
  13963.   Transfers binary files:            Yes
  13964.   Wildcard send:                     Yes
  13965.   ^X/^Y interruption:                Yes
  13966.   Filename collision avoidance:      Yes
  13967.   Timeouts:                          Yes
  13968.   8th-bit prefixing:                 Yes
  13969.   Repeat character compression:      Yes
  13970.   Alternate block check types:       Yes
  13971.   Communication settings:            Yes
  13972.   Transmit BREAK:                    Yes
  13973.   IBM mainframe communication:       Yes
  13974.   Transaction logging:               Yes
  13975.   Session logging:                   Yes
  13976.   Debug logging:                     Yes
  13977.   Raw transmit:                      Yes
  13978.   Login scripts:                     Yes
  13979.   Act as server:                     Yes
  13980.   Talk to server:                    Yes
  13981.   Advanced commands for servers:     Yes
  13982.   Local file management:             Yes
  13983.   Command/init files:                Yes
  13984.   Long packets:                      No
  13985.   Sliding windows:                   No
  13986.   Handle file attributes:            No
  13987.  
  13988. Kermit-20  is  a  program that implements the Kermit file transfer protocol for
  13989. the Digital Equipment Corporation DECSYSTEM-20 mainframe computer.  It is writ-
  13990. ten in MACRO-20 assembly language and should run on any DEC-20 system with ver-
  13991. sion 4 of TOPS-20 or later.
  13992.  
  13993. The Kermit-20 section will describe the things you should know about the DEC-20
  13994. file system in order to make effective use of Kermit, and then it will describe
  13995. the special features of the Kermit-20 program.
  13996.  
  13997.  
  13998. 11.1. The DEC-20 File System
  13999.  
  14000. The features of the DEC-20 file system of greatest interest to Kermit users are
  14001. the  form of the file specifications, and the distinctions between text and bi-
  14002. nary files.
  14003. 11.1. The DEC-20 File System                                           Page 251
  14004.  
  14005. -------------------------------------------------------------------------------
  14006. DEC-20 File Specifications
  14007.  
  14008. DEC-20 file specifications are of the form 
  14009.  
  14010.   DEVICE:<DIRECTORY>NAME.TYPE.GEN;ATTRIBUTES
  14011.  
  14012. where the DIRECTORY, NAME, and TYPE may each be up to 39 characters in  length,
  14013. GEN  is  a  generation  (version  number),  and various attributes are possible
  14014. (protection code, account, temporary, etc).  Generation and attributes are nor-
  14015. mally  omitted.   Device and directory, when omitted, default to the user's own
  14016. (or "connected") disk and directory.  Thus NAME.TYPE is normally sufficient  to
  14017. specify  a  file,  and only this information is sent along by Kermit-20 with an
  14018. outgoing file.
  14019.  
  14020. The device, directory, name, and type fields  may  contain  uppercase  letters,
  14021. digits,  and  the  special  characters  "-"  (dash),  "_" (underscore), and "$"
  14022. (dollar sign).  There are no imbedded or trailing spaces.  Other characters may
  14023. be  included by prefixing them (each) with a Control-V.  The fields of the file
  14024. specification are set off from one another by the punctuation indicated above.
  14025.  
  14026. The device field specifies a physical or "logical" device upon which  the  file
  14027. is  resident.    The  directory field indicates the area on the device, for in-
  14028. stance the area belonging to the owner of the file.  Kermit-20 does not  trans-
  14029. mit  the  device or directory fields to the target system, and does not attempt
  14030. to honor device or directory fields that may appear in incoming file names; for
  14031. instance, it will not create new directories.
  14032.  
  14033. The  name  is  the  primary identifier for the file.  The type, also called the
  14034. "extension", is an indicator which, by convention, tells what kind of  file  we
  14035. have.    For  instance  FOO.FOR  is  the source of a Fortran program named FOO;
  14036. FOO.REL might be the relocatable object module produced by  compiling  FOO.FOR;
  14037. FOO.EXE could an executable program produced by LOADing and SAVing FOO.REL, and
  14038. so forth.
  14039.  
  14040. The DEC-20 allows a group of files to be specified in a single file  specifica-
  14041. tion  by  including  the  special  "wildcard"  characters,  "*" and "%".  A "*"
  14042. matches any string of characters, including no characters at all; a "%" matches
  14043. any single character.  Here are some examples:
  14044.  
  14045. *.FOR   All  files  of  type  FOR  (all  Fortran source files) in the connected
  14046.         directory.
  14047.  
  14048. FOO.*   Files of all types with name FOO.
  14049.  
  14050. F*.*    All files whose names start with F.
  14051.  
  14052. F*X*.*  All files whose names start with F and contain at least one X.
  14053.  
  14054. %.*     All files whose names are exactly one character long.
  14055.  
  14056. *.%%%*  All files whose types are at least three characters long.
  14057.  
  14058. Wildcard notation is used on many computer systems in similar ways, and  it  is
  14059. the mechanism most commonly used to instruct Kermit to send a group of files.
  14060. 11.1. The DEC-20 File System                                           Page 252
  14061.  
  14062. -------------------------------------------------------------------------------
  14063.                           TEXT FILES AND BINARY FILES
  14064.  
  14065. The  DEC-20, like most computers, has a file system with its own peculiarities.
  14066. Like many other systems, the DEC-20 makes a distinction between text files  and
  14067. binary files.  Text files are generally those composed only of printing charac-
  14068. ters (letters, digits,  and  punctuation)  and  "carriage  control"  characters
  14069. (carriage  return,  line  feed, form feed, tab).  Text files are designed to be
  14070. read by people.  Binary files are designed to be read by  a  computer  program,
  14071. and  may  have any contents at all.  If you use the DEC-20 TYPE command to dis-
  14072. play a text file on your terminal, the result will be  intelligible.    If  you
  14073. type  a  binary  file on your terminal, you will probably see mainly gibberish.
  14074. You can not always tell a text file from a binary file by its name or directory
  14075. information,  though in general files with types like .TXT, .DOC, .HLP are tex-
  14076. tual (as are "source files" for computer programs like text formatters and pro-
  14077. gramming  language  compilers),  and files with types like .EXE, .REL, .BIN are
  14078. binary.
  14079.  
  14080. The DEC-20 has an unusual word size, 36 bits.  It differs from most other  sys-
  14081. tems by storing text in 7-bit, rather than 8-bit, bytes.  Since text is encoded
  14082. in the 7-bit ASCII character set, this allows more efficient  use  of  storage.
  14083. However,  the  word size is not a multiple of the normal byte size.  The DEC-20
  14084. therefore stores five 7-bit characters per word, with one bit left over.
  14085.  
  14086. It is also possible to store files with other byte sizes.  The  common  layouts
  14087. of bytes within a word are shown in Figure 11-1.
  14088.  
  14089. The  minimum unit of disk allocation on the DEC-20 is a page, 512 36-bit words,
  14090. or 2560 7-bit characters, or 2048 8-bit bytes.  Any file that contains at least
  14091. one  bit  of information occupies at least a full page on the disk.  The direc-
  14092. tory information for a file includes the number of pages occupied on the  disk,
  14093. the bytesize of the file, and the number of bytes of that size which are in the
  14094. file.  This information can be seen by using the DEC-20 VDIRECTORY command, for
  14095. instance
  14096.  
  14097.   @vdir foo.*
  14098.  
  14099.      PS:<MY-DIRECTORY>
  14100.    Name     Protection    Pages Bytes(Size) Creation
  14101.    FOO.COM.1;P774242          1 384(8)     27-Dec-83
  14102.       MAC.1;P774242           1 152(7)     27-Dec-83
  14103.      .REL.1;P774242           1 39(36)     27-Dec-83
  14104.      .EXE.1;P774242           2 1024(36)   27-Dec-83
  14105.  
  14106.    Total of 5 pages in 4 files
  14107.  
  14108. In  this  example, FOO.MAC occupies 1 page, and is composed of 152 7-bit bytes.
  14109. This file is textual (program source for the MACRO assembler),  152  characters
  14110. long.  Programs which read text files (such as text editors, program compilers,
  14111. the TYPE command, etc) determine  the  end  of  a  file  from  the  byte  count
  14112. specified  in  the directory.  Kermit-20 determines the end of file in the same
  14113. way, so although FOO.MAC occupies an entire 2560-byte page of storage, only the
  14114. first  152  characters  are transmitted.  Binary files, such as FOO.EXE (an ex-
  14115. ecutable DEC-20 program), tend to  occupy  full  pages.    In  this  case  too,
  14116. Kermit-20 uses the byte count to determine the end of file.
  14117.  
  14118. Why  do  you  need  to know all this?  In most cases, you don't.  It depends on
  14119. 11.1. The DEC-20 File System                                           Page 253
  14120.  
  14121. -------------------------------------------------------------------------------
  14122. -------------------------------------------------------------------------------
  14123.  
  14124.  
  14125.  
  14126.      7: Text Files: Five 7-bit bytes per word.
  14127.  
  14128.          +------+------+------+------+------++
  14129.          |      |      |      |      |      ||
  14130.          +------+------+------+------+------++
  14131.          0      7      14     21     28     35
  14132.  
  14133.         Normally,  bit 35 is unused and set to zero.  However, in EDIT (or SOS,
  14134.         or OTTO) line-numbered files, bit 35 is set to 1 when the word contains
  14135.         a line number.
  14136.  
  14137.  
  14138.      8: "Foreign" binary files:  Four 8-bit bytes per word.
  14139.  
  14140.          +-------+-------+-------+-------+---+
  14141.          |       |       |       |       |   |
  14142.          +-------+-------+-------+-------+---+
  14143.          0       8       16      24      32  35
  14144.  
  14145.         Bits 32-35 are unused.
  14146.  
  14147.  
  14148.     36: "Native" binary files:  One 36-bit byte per word.
  14149.  
  14150.          +-----------------------------------+
  14151.          |                                   |
  14152.          +-----------------------------------+
  14153.          0                                   35
  14154.  
  14155.         All bits are used.
  14156.  
  14157.               Figure 11-1:   DECSYSTEM-20 Word/Byte Organization
  14158.  
  14159. -------------------------------------------------------------------------------
  14160.  
  14161. whether you are using the DEC-20 as your "home base".
  14162.  
  14163.  
  14164.                  USING A MICROCOMPUTER TO ARCHIVE DEC-20 FILES
  14165.  
  14166. Most computers (other than the DEC-10 and DEC-20)  store  characters  in  8-bit
  14167. bytes.    Let's call any such system an 8-bit-byte system.  Microcomputers that
  14168. run CP/M or MS-DOS or PC-DOS, and any computers  than  run  Unix,  store  these
  14169. 8-bit  bytes in a linear sequence.  Certain other 8-bit-byte systems (PDP-11 or
  14170. VAX systems with FILES-11, IBM mainframes)  have  more  complex  file  formats.
  14171. This  discussion  applies  to  all  linear  8-bit-byte  systems, including most
  14172. popular microcomputers.
  14173.  
  14174. Kermit can send any "native" DEC-20 sequential file,  text  or  binary,  to  an
  14175. 8-bit-byte  system  and  bring  it  back to the DEC-20 restored to its original
  14176. form.  If you are using a microcomputer to archive your DEC-20 files, you  need
  14177. never  concern  yourself  with  details  of byte size or file format.  The same
  14178. 11.1. The DEC-20 File System                                           Page 254
  14179.  
  14180. -------------------------------------------------------------------------------
  14181. holds true between two DEC-20s, or a DEC-10 and a DEC-20.
  14182.  
  14183. There is, however, one special complication of which you should be aware.  Cer-
  14184. tain  microcomputer  operating  systems,  notably CP/M, do not have an entirely
  14185. satisfactory way of indicating the end of file.  The file length is recorded in
  14186. blocks  rather  than bytes.  For text files, the end of file is marked within a
  14187. block by inserting a Control-Z after the last data character.    Binary  files,
  14188. however,  might easily contain Control-Z characters as data.  Therefore, in or-
  14189. der not to lose data, these systems must  transmit  binary  files  in  complete
  14190. blocks.  If the binary file is of foreign origin (for instance, from a DEC-20),
  14191. and it did not happen to fill up the last block when it was transferred to  the
  14192. micro,  then  when  that  file  is sent back to the system of origin in "binary
  14193. mode," junk will appear at the end (if it is sent back in "text mode," it could
  14194. be  truncated at the first data byte that happened to correspond to Control-Z).
  14195. For DEC-20 programs in .EXE format, this generally has no effect  on  the  run-
  14196. nability  or behavior of the program.  But for other binary files, particularly
  14197. internal format numerical data or relocatable program object (.REL) files,  the
  14198. junk  could  have  bad  effects.  For instance, extraneous data at the end of a
  14199. .REL file will generally cause LINK to fail to load the file.
  14200.  
  14201. Most microcomputer Kermit programs have commands to control end-of-file  detec-
  14202. tion -- commands like SET FILE TEXT, SET FILE BINARY, SET EOF CTRLZ.
  14203.  
  14204.  
  14205.                 USING THE DEC-20 TO ARCHIVE MICROCOMPUTER FILES
  14206.  
  14207. You can use Kermit to send textual files from a microcomputer or any 8-bit sys-
  14208. tem to the DEC-20 with no special provisions, since Kermit-20  stores  incoming
  14209. characters  in 7-bit bytes as text unless you explicitly instruct it otherwise.
  14210. But Kermit-20 has no automatic way of distinguishing an  incoming  binary  file
  14211.                                2
  14212. from  an  incoming  text  file.  Binary files from 8-bit-byte systems generally
  14213. contain significant data in the 8th bit, which would be lost  if  the  incoming
  14214. characters  were  stored  in  7-bit bytes, rendering the file useless when sent
  14215. back to the original system.  Thus if you want to use Kermit to  store  foreign
  14216. 8-bit  binary  data  on the DEC-20, you must tell it to store such files with a
  14217. bytesize of 8 rather than 7.  This can be the source of much confusion and  in-
  14218. convenience.  In particular, you cannot use a "wildcard send" command to send a
  14219. mixture of text and binary files from  an  8-bit-byte  system  to  the  DEC-20;
  14220. rather,  you  must send all text files with Kermit-20's file bytesize set to 7,
  14221. and all 8-bit binary files with the bytesize set to 8.
  14222.  
  14223. Once you get the foreign binary file into the DEC-20, stored with  the  correct
  14224. bytesize  (as FOO.COM is stored in the example above), you need take no special
  14225. measures to send it back to its system of origin.  This  is  because  Kermit-20
  14226. honors  the  bytesize  and byte count from the directory.  For instance, if you
  14227. told Kermit-20 to SEND FOO.*, every file in the example above would  be  trans-
  14228. mitted in the correct manner, automatically.
  14229.  
  14230. The  previous discussion assumes you want to store text files in usable form on
  14231. the DEC-20.  However, if you are using the DEC-20 purely as  a  repository  for
  14232.  
  14233. _______________
  14234.  
  14235.   2
  14236.    Unless the incoming file has an "ITS Binary Header"; see below.
  14237. 11.1. The DEC-20 File System                                           Page 255
  14238.  
  14239. -------------------------------------------------------------------------------
  14240. your  microcomputer  files, and you have no desire to display or share the con-
  14241. tents of those files on the DEC-20, you can SET FILE BYTESIZE 8 for all  incom-
  14242. ing  files,  both text and binary.  When the files are sent back to a microcom-
  14243. puter, they will be stored correctly.
  14244.  
  14245.  
  14246.                          FILES KERMIT-20 CANNOT HANDLE
  14247.  
  14248. The Kermit protocol can only accommodate transfer of  sequential  files,  files
  14249. which are a linear sequence of bytes (or words).
  14250.  
  14251. Some files on the DEC-20 are not sequential, and cannot be successfully sent or
  14252. received by Kermit-20.    These  include  directory  files,  files  with  holes
  14253. (missing  pages),  ISAM files, and RMS files.  These files require external in-
  14254. formation (kept in the DEC-20's file descriptor block and/or  index  table)  in
  14255. order  to  be  reconstructed; when sending files, Kermit-20 presently transmits
  14256. only the file name and the contents of the file.  External control  information
  14257. and file attributes are not transmitted.
  14258.  
  14259.  
  14260. 11.2. Program Operation
  14261.  
  14262. Kermit-20's  prompt is "Kermit-20>".  Kermit-20 will accept a single command on
  14263. the Exec command line, like this:
  14264.  
  14265.   @
  14266.   @Kermit send foo.bar
  14267.  
  14268.     the file is sent
  14269.  
  14270.   @
  14271.  
  14272. or you can run the program interactively to issue several commands, like this:
  14273.  
  14274.   @
  14275.   @Kermit
  14276.  
  14277.   TOPS-20 Kermit version 4.2(262)
  14278.  
  14279.   Kermit-20>send foo.*
  14280.  
  14281.     files are sent
  14282.  
  14283.   Kermit-20>statistics
  14284.  
  14285.     performance statistics are printed
  14286.  
  14287.   Kermit-20>receive
  14288.  
  14289.     files are received
  14290.  
  14291.   Kermit-20>exit
  14292.   @
  14293.  
  14294. During  interactive  operation,  you  may  use  the  TOPS-20  help  ("?")   and
  14295. recognition (ESC) features freely while typing commands.  A question mark typed
  14296. 11.2. Program Operation                                                Page 256
  14297.  
  14298. -------------------------------------------------------------------------------
  14299. at any point in a command displays the options available at that point;  typing
  14300. an  ESC  character  causes  the current keyword or filename to be completed (or
  14301. default value to be supplied), and a "guide word" in parentheses to  be  typed,
  14302. prompting  you for the next field.  If you have not typed sufficient characters
  14303. to uniquely specify the keyword or filename (or if there is no  default  value)
  14304. then a beep will be sounded and you may continue typing.
  14305.  
  14306. Command  keywords  may  be  abbreviated to their shortest prefix that sets them
  14307. apart from any other keyword valid in that field.
  14308.  
  14309. If you have a file called KERMIT.INI in your login  directory,  Kermit-20  will
  14310. execute  an  automatic TAKE command on it upon initial startup.  KERMIT.INI may
  14311. contain any Kermit-20 commands, for instance SET commands, or DEFINEs  for  SET
  14312. macros to configure Kermit-20 to various systems or communications media.
  14313.  
  14314. Kermit-20 provides most of the commands possible for an "ideal" Kermit program,
  14315. as described in the main part of the Kermit User Guide.  The following sections
  14316. will concentrate on system-dependent aspects of Kermit-20.
  14317.  
  14318.  
  14319. 11.3. Remote and Local Operation
  14320.  
  14321. Kermit-20  normally  runs  in  remote mode, with the user sitting at a PC.  But
  14322. Kermit-20 can also run in local mode.  Local operation of Kermit-20  is  useful
  14323. if the DEC-20 has an autodialer, or a hardwired connection to another computer.
  14324. When in local mode, file transfer takes place over an assigned  TTY  line,  and
  14325. Kermit-20  is free to update your screen with status information, and to listen
  14326. to your keyboard for interrupt characters.
  14327.  
  14328. Kermit-20 enters local mode when you issue a SET LINE n command, where n is the
  14329. octal TTY number of any line other than your own controlling terminal.
  14330.  
  14331.  
  14332. 11.4. Conditioning Your Job for Kermit
  14333.  
  14334. Kermit-20  does as much as it can to condition your line for file transfer.  It
  14335. saves all your terminal  and  link  settings,  and  restores  them  after  use.
  14336. However,  there  are some sources of interference over which Kermit-20 can have
  14337. no control.  In particular, messages issued by superior or parellel forks could
  14338. become  mingled with Kermit packets and slow things down or stop them entirely.
  14339. For this reason, before using Kermit-20 for any extended period, you should:
  14340.  
  14341.    - Type the Exec commands SET NO MAIL-WATCH and SET NO ALERTS
  14342.  
  14343.    - Make sure you don't have any print or batch jobs  pending  that  were
  14344.      submitted with the /NOTIFY option.
  14345.  
  14346.    - Make sure you don't have any superior or parallel forks that have en-
  14347.      abled terminal interrupts on Control-A; these  could  prevent  Kermit
  14348.      packets (which start with Control-A) from getting through.
  14349.  
  14350. After  running Kermit, you can restore your mail-watch and alerts by hand.  Al-
  14351. ternatively, you could have an Exec command file for invoking Kermit like this:
  14352.  
  14353.   set no alerts
  14354.   set no mail-watch
  14355. 11.4. Conditioning Your Job for Kermit                                 Page 257
  14356.  
  14357. -------------------------------------------------------------------------------
  14358. -------------------------------------------------------------------------------
  14359.  
  14360.  
  14361.  
  14362.   Local Operation of Kermit-20:
  14363.  
  14364.    DECSYSTEM-20
  14365.   +---------------------------------------+
  14366.   |                                       |
  14367.   |   +--------------------+              |
  14368.   |   | Your Job           |              |
  14369.   |   |                    |              |
  14370.   |   |   +------------+   | <--Commands  | Your Job's
  14371.   |   |   | Kermit-20  +---+--------------+----------------- (-: You
  14372.   |   |   |            |   | Display--->  | Controlling TTY
  14373.   |   |   |            |   |              |
  14374.   |   |   |            |   |              |
  14375.   |   |   |            |   | <--Packets   | Kermit's
  14376.   |   |   |            +---+--------------+-----------------> Remote
  14377.   |   |   +------------+   | Packets-->   | Assigned TTY      System
  14378.   |   |                    |              |
  14379.   |   +--------------------+              |
  14380.   |                                       |
  14381.   +---------------------------------------+
  14382.  
  14383.                  Figure 11-2:   DEC-20 Kermit Local Operation
  14384.  
  14385. -------------------------------------------------------------------------------
  14386.  
  14387.   kermit
  14388.   set mail-watch
  14389.   set alert  1:00PM Go to lunch
  14390.   set alert  6:00PM Go to dinner
  14391.   set alert 11:30PM Go to sleep
  14392.  
  14393.  
  14394. 11.5. Kermit-20 Commands
  14395.  
  14396. This section describes the Kermit-20 commands -- in detail  where  they  differ
  14397. from  the  "ideal" Kermit, briefly where they coincide.  Kermit-20 has the fol-
  14398. lowing commands:
  14399.  
  14400.           BYE  to remote server.
  14401.         CLEAR  a stuck connection
  14402.         CLOSE  log file and stop logging remote session.
  14403.       CONNECT  as terminal to remote system.
  14404.           CWD  change local working directory.
  14405.        DEFINE  macros of Kermit-20 commands.
  14406.        DELETE  local files.
  14407.     DIRECTORY  listing of local files.
  14408.          ECHO  a line of text.
  14409.          EXIT  from Kermit-20.
  14410.        FINISH  Shut down remote server.
  14411.           GET  remote files from server.
  14412.          HELP  about Kermit-20.
  14413.         INPUT  characters from communication line.
  14414. 11.5. Kermit-20 Commands                                               Page 258
  14415.  
  14416. -------------------------------------------------------------------------------
  14417.         LOCAL  prefix for local file management commands.
  14418.           LOG  remote terminal session.
  14419.        OUTPUT  characters to communication line.
  14420.         PAUSE  between commands.
  14421.          PUSH  to TOPS-20 command level.
  14422.          QUIT  from Kermit-20
  14423.       RECEIVE  files from remote Kermit.
  14424.        REMOTE  prefix for remote file management commands.
  14425.           RUN  a DEC-20 program.
  14426.          SEND  files to remote Kermit.
  14427.        SERVER  mode of remote operation.
  14428.           SET  various parameters.
  14429.          SHOW  various parameters.
  14430.         SPACE  inquiry.
  14431.    STATISTICS  about most recent file transfer.
  14432.          TAKE  commands from a file.
  14433.      TRANSMIT  a file "raw".
  14434.          TYPE  a local file.
  14435.  
  14436.  
  14437. 11.5.1. Commands for File Transfer
  14438.  
  14439. Kermit-20 provides the standard SEND, RECEIVE, and GET commands  for  transfer-
  14440. ring files using the Kermit protocol.
  14441.  
  14442.  
  14443.                                THE SEND COMMAND
  14444.  
  14445. Syntax:
  14446.  
  14447. Sending a single file:  
  14448.  
  14449.     SEND nonwild-filespec1 (AS) [filespec2]
  14450.  
  14451. Sending multiple files:  
  14452.  
  14453.     SEND wild-filespec1 (INITIAL) [filespec2]
  14454.  
  14455. The  SEND command causes a file or file group to be sent from the DEC-20 to the
  14456. other system.  There are  two  forms  of  the  command,  depending  on  whether
  14457. filespec1  contains  wildcard characters ("*" or "%").  Kermit-20 automatically
  14458. recognizes the two cases  and  issues  the  appropriate  guide  word,  (AS)  or
  14459. (INITIAL), depending on the form of filespec1.
  14460.  
  14461.  
  14462.   Sending a File Group
  14463.  
  14464. If filespec1 contains wildcard characters then all matching files will be sent,
  14465. in alphabetical order (according to the ASCII collating sequence) by name.   If
  14466. a  file  can't be opened for read access, it will be skipped.  The initial file
  14467. in a wildcard group can be specified with the optional filespec2.  This  allows
  14468. a previously interrupted wildcard transfer from where it left off, or it can be
  14469. used to skip some files that would be transmitted first.
  14470. 11.5.1. Commands for File Transfer                                     Page 259
  14471.  
  14472. -------------------------------------------------------------------------------
  14473.   Sending a Single File
  14474.  
  14475. If filespec1 does not contain any wildcard characters,  then  the  single  file
  14476. specified  by  filespec1  will  be  sent.  Optionally, filespec2 may be used to
  14477. specify the name under which  the  file  will  arrive  at  the  target  system;
  14478. filespec2  is  not  parsed or validated in any way by Kermit-20, but lower case
  14479. letters are raised to upper case, and leading "whitespace"  (blanks  and  tabs)
  14480. are  discarded.    If  filespec2 is not specified, Kermit-20 will send the file
  14481.                   3
  14482. with its own name. 
  14483.  
  14484.  
  14485.   SEND Command General Operation:
  14486.  
  14487. Files  will  be  sent  with  their  DEC-20  filename and filetype (for instance
  14488. FOO.BAR, no device or directory field, no generation number or attributes).  If
  14489. you expect to be sending files whose names contain characters that would be il-
  14490. legal in filenames on the target system, and you know that the  Kermit  on  the
  14491. target  system does not have the ability to convert incoming filenames, you can
  14492. issue the SET FILE NAMING NORMAL-FORM command to have Kermit-20 replace suspect
  14493. characters by X's.
  14494.  
  14495. Each file will be sent according to its bytesize and byte count from the direc-
  14496. tory unless you specify otherwise using SET FILE BYTESIZE, or unless  the  file
  14497. has  an  "ITS Binary" header.  If the bytesize is 8, then four 8-bit bytes will
  14498. be sent from each DEC-20 36-bit word, and the  low  order  four  bits  will  be
  14499. skipped.    If other than 8, then five 7-bit bytes will be sent from each word,
  14500. with the 8th bit of the 5th character set to the value  of  the  remaining  bit
  14501.                          4
  14502. ("bit 35") from the word. 
  14503.  
  14504. If communication line parity is being used (see SET PARITY), Kermit-20 will re-
  14505. quest that the other Kermit accept a special kind of prefix notation for binary
  14506. files.  This is an advanced feature, and not all Kermits have it; if the  other
  14507. Kermit  does  not  agree  to use this feature, binary files cannot be sent cor-
  14508. rectly.  This includes executable programs (like DEC-20 .EXE files,  CP/M  .COM
  14509. files),  relocatable  object  modules  (.REL files), as well as text files with
  14510. line sequence numbers.
  14511.  
  14512. Kermit-20 will also ask the other Kermit whether it can handle a special prefix
  14513. encoding  for  repeated characters.  If it can, then files with long strings of
  14514. repeated characters will be  transmitted  very  efficiently.    Columnar  data,
  14515. highly  indented  text,  and  binary  files are the major beneficiaries of this
  14516. technique.
  14517.  
  14518. _______________
  14519.  
  14520.   3
  14521.    Control-V's, which are used to quote otherwise illegal characters in  DEC-20
  14522. file specifications, are stripped.
  14523.  
  14524.   4
  14525.    This  is  the  same  method  used  by  the  DEC-20  to encode 36-bit data on
  14526. "ANSI-ASCII" tapes.  It allows not only DEC-20 binary files, but also the line-
  14527. sequence-numbered  files  produced  by  EDIT, SOS, or OTTO, which use bit 35 to
  14528. distinguish line numbers from text, to be sent and retrieved correctly.
  14529. 11.5.1. Commands for File Transfer                                     Page 260
  14530.  
  14531. -------------------------------------------------------------------------------
  14532. If you're running Kermit-20 locally, for instance dialing out from  the  DEC-20
  14533. to  another  system  using an autodialer, you should have already run Kermit on
  14534. the remote system and issued either a RECEIVE or a SERVER command.    Once  you
  14535. give  Kermit-20  the  SEND  command, the name of each file will be displayed on
  14536. your screen as the transfer begins; a "." will be displayed for  every  5  data
  14537. packets  sucessfully  sent,  and a "%" for every retransmission or timeout that
  14538. occurs (you may also elect other typeout options with the SET  DEBUG  command).
  14539. If  the  file is successfully transferred, you will see "[OK]", otherwise there
  14540. will be an error message.   When  the  specified  operation  is  complete,  the
  14541. program  will  sound  a beep.  If you see many "%" characters, you are probably
  14542. suffering from a noisy connection.   You  may  be  able  to  cut  down  on  the
  14543. retransmissions  by using SET SEND PACKET-LENGTH to decrease the packet length;
  14544. this will reduce the probability that a  given  packet  will  be  corrupted  by
  14545. noise, and reduce the time required to retransmit a corrupted packet.
  14546.  
  14547. During local operation, you can type Control-A at any point during the transfer
  14548. to get a brief status report.   You may also type Control-X or Control-Z to in-
  14549. terrupt the current file or file group.
  14550.  
  14551.  
  14552.                               THE RECEIVE COMMAND
  14553.  
  14554. Syntax:  RECEIVE [filespec]
  14555.  
  14556. The  RECEIVE  command  tells Kermit-20 to receive a file or file group from the
  14557. other system.  If only one file is being received, you may include the optional
  14558. filespec  as  the name to store the incoming file under; otherwise, the name is
  14559. taken from the incoming file header.  Even if the name in the header is  not  a
  14560. legal TOPS-20 file name, Kermit-20 will store it under that name, in which case
  14561. you can refer to it later only by quoting each illegal character (spaces,  con-
  14562. trol  characters, etc) with Control-V.  If for some reason an incoming filename
  14563. simply  cannot  be  converted  to  legal  form,  the  file  will  be  saved  as
  14564. -UNTRANSLATABLE-FILENAME-.KERMIT  (new  generation).  You may also use SET FILE
  14565. NAMING NORMAL-FORM to have Kermit-20 choose more conventional names for  incom-
  14566. ing files.
  14567.  
  14568. If  an  incoming  file  has  the  same name as an existing file, Kermit-20 just
  14569. creates a new generation of the same name and  type,  for  instance  FOO.BAR.3,
  14570. FOO.BAR.4.    The  oldest generation will be automatically deleted, but you can
  14571. still UNDELETE it.
  14572.  
  14573. Incoming files will all be stored with the prevailing bytesize, 7  by  default,
  14574. which  is  appropriate for text files.   If you are asking Kermit-20 to receive
  14575. binary files from a microcomputer or other 8-bit system, you  must  first  type
  14576. SET  FILE BYTESIZE 8.  Otherwise, the 8th bit of each byte will be lost and the
  14577. file will be useless when sent back to the system of origin.
  14578.  
  14579. If you have SET PARITY, then 8th-bit prefixing will be requested.  If the other
  14580. side  cannot  do  this,  binary  files cannot be transferred correctly.  In all
  14581. cases, Kermit-20 will request the other Kermit to compress repeated characters;
  14582. if  the  other  side can do this (not all Kermits know how) there may be a sig-
  14583. nificant improvement in transmission speed.
  14584.  
  14585. If an incoming file does not arrive in its entirety,  Kermit-20  will  normally
  14586. discard it; it will not appear in your directory.  You may change this behavior
  14587. by using the command SET INCOMPLETE KEEP, which will cause as much of the  file
  14588. 11.5.1. Commands for File Transfer                                     Page 261
  14589.  
  14590. -------------------------------------------------------------------------------
  14591. as arrived to be saved in your directory.
  14592.  
  14593. If  you  are  running  Kermit-20 locally, you should already have issued a SEND
  14594.        5
  14595. command  to the remote Kermit, and then escaped back  to  DEC-20  Kermit.    As
  14596. files  arrive, their names will be displayed on your screen, along with "." and
  14597. "%" characters to indicate the packet traffic; you can  type  Control-A  during
  14598. the transfer for a brief status report.
  14599.  
  14600. If  a  file arrives that you don't really want, you can attempt to cancel it by
  14601. typing Control-X; this sends a cancellation request to the remote Kermit.    If
  14602. the  remote  Kermit understands this request (not all implementations of Kermit
  14603. support this feature), it will comply; otherwise it will continue to send.   If
  14604. a  file  group  is being sent, you can request the entire group be cancelled by
  14605. typing Control-Z.
  14606.  
  14607.  
  14608.                                 THE GET COMMAND
  14609.  
  14610. Syntax: GET [remote-filespec]
  14611.  
  14612. The GET command requests a remote Kermit server to send the file or file  group
  14613. specified  by  remote-filespec.   This command can be used only when there is a
  14614. Kermit server on the other end of the line.  This means that you must have CON-
  14615. NECTed to the other system, logged in, run Kermit there, issued the SERVER com-
  14616. mand, and escaped back to the DEC-20, or else you Kermit-20 is in remote  mode,
  14617. TAKEing commands from a file, and interacting with a local Kermit server.
  14618.  
  14619. The  remote  filespec  is any string that can be a legal file specification for
  14620. the remote system; it is not parsed or validated locally.  You should not put a
  14621. trailing  comment  on  the  GET command, since this will be sent as part of the
  14622. remote filespec.
  14623.  
  14624. If you need to include otherwise illegal characters such as  "!"  or  ";"  (the
  14625. normal  command comment delimeters), "?" (the command help character), "@" (the
  14626. indirect command file indicator),  or  certain  control  characters,  then  you
  14627. should  precede  each  such  character  by a Control-V.  Kermit-20 will discard
  14628. these Control-V quoting prefixes before sending the file specification  to  the
  14629. remote host.
  14630.  
  14631. If  you  want  to  store  the incoming file name with a different name than the
  14632. remote host sends it with, just type GET alone on a line; Kermit-20 will prompt
  14633. you  separately for the source (remote) and destination (local) file specifica-
  14634. tion.  If more than one file arrives, only the first one will be  stored  under
  14635. the  name  given;  the  rest will be stored under the names they are sent with.
  14636. Example:
  14637.  
  14638.   Kermit-20>get
  14639.    Remote Source File: profile exec a1
  14640.    Local Destination File: profile.exec
  14641.  
  14642.  
  14643. _______________
  14644.  
  14645.   5
  14646.    not SERVER -- use the GET command to receive files from a Kermit server.
  14647. 11.5.1. Commands for File Transfer                                     Page 262
  14648.  
  14649. -------------------------------------------------------------------------------
  14650. As files arrive, their names will be displayed on your screen, along  with  "."
  14651. and  "%" characters to indicate the packet traffic.  As in the RECEIVE command,
  14652. you may type Control-A to get a brief status report, ^X  to  request  that  the
  14653. current  incoming  file  be  cancelled,  ^Z to request that the entire incoming
  14654. batch be cancelled.
  14655.  
  14656. If the remote Kermit is not capable of server functions, then you will probably
  14657. get  an  error  message back from it like "Illegal packet type".  In this case,
  14658. you must connect to the other Kermit, give a SEND  command,  escape  back,  and
  14659. give a RECEIVE command.
  14660.  
  14661.  
  14662.                             THE STATISTICS COMMAND
  14663.  
  14664. Give statistics about the most recent file transfer.  For instance, here's what
  14665. Kermit-20 displayed after transmitting a short  binary  file,  using  repeated-
  14666. character compression:
  14667.  
  14668.    Maximum number of characters in packet:  80 received; 80 sent
  14669.    Number of characters transmitted in 2 seconds
  14670.           Sent:      34           Overhead:       34
  14671.           Received:  107          Overhead:       -408
  14672.     Total received:  141          Overhead:       -374
  14673.    Total characters transmitted per second:       70
  14674.    Effective data rate:   2570 baud
  14675.    Efficiency:            214.1667 per cent
  14676.    Interpacket pause in effect: 0 sec
  14677.  
  14678.    Timeouts: 0
  14679.    NAKs:     0
  14680.  
  14681. Note  that  the  data compression allowed the effective baud rate to exceed the
  14682. actual speed of the communication line, which in this case happened to be  1200
  14683. baud.  The efficiency is displayed only if the actual baud rate is known.
  14684.  
  14685.  
  14686. 11.5.2. Server Operation
  14687.  
  14688.  
  14689.                               THE SERVER COMMAND
  14690.  
  14691. The  SERVER  command  puts  a  remote  Kermit-20  in  "server mode", so that it
  14692. receives all further commands in packets from the local Kermit.  The  Kermit-20
  14693. server is capable (as of this writing) of executing the following remote server
  14694. commands:  SEND, GET, FINISH, BYE, REMOTE DIRECTORY, REMOTE CWD, REMOTE  SPACE,
  14695. REMOTE DELETE, REMOTE TYPE, REMOTE HELP.
  14696.  
  14697. Any  nonstandard parameters should be selected with SET commands before putting
  14698. Kermit-20 into server mode, in particular the file bytesize.  The DEC-20 Kermit
  14699. server  can send most files in the correct manner automatically, by recognizing
  14700. the DEC-20 file bytesize.  However, if you need to ask the DEC-20 Kermit server
  14701. to  receive  binary  files  from an 8-bit-byte system (that is, from almost any
  14702. system that's not a DEC-10 or DEC-20) you must issue the SET  FILE  BYTESIZE  8
  14703. command  before  putting it into server mode, and then you must only send 8-bit
  14704. binary files.  You cannot send a mixture of text files and 8-bit  binary  files
  14705. to a Kermit-20 server.
  14706. 11.5.2. Server Operation                                               Page 263
  14707.  
  14708. -------------------------------------------------------------------------------
  14709.                              COMMANDS FOR SERVERS
  14710.  
  14711. When  running  in local mode, Kermit-20 allows you to give a wide range of com-
  14712. mands to a remote Kermit server, with no guarantee the that the  remote  server
  14713. can  process  them, since they are all optional features of the protocol.  Com-
  14714. mands for servers include the standard SEND, GET, BYE, and FINISH commands,  as
  14715. well as the REMOTE command.
  14716.  
  14717. These  commands  are generally issued when Kermit-20 is in local mode, i.e. you
  14718. have already connected to another system, run Kermit  there  and  put  it  into
  14719. server mode, and escaped back to Kermit-20.  However, Kermit-20 also allows you
  14720. to operate in the opposite direction, i.e. Kermit-20 is the remote Kermit,  and
  14721. the local Kermit is in server mode.  This is handy when, for instance, you want
  14722. to transfer a disparate collection of files that can't be readily specified  by
  14723. a wildcard group, all in a single, unattended operation.  In this case, you can
  14724. create a TAKE command file for Kermit-20 that SENDs  and/or  GETs  the  desired
  14725. files, and then shuts down local server when done, e.g.:
  14726.  
  14727.   set delay 0             ; No need to pause before sending
  14728.   ; Connect to own directory, leave a blank line for password.
  14729.   cwd me:
  14730.  
  14731.   log transactions        ; Keep a log
  14732.   ; Change directories on the PC.
  14733.   remote cwd \kermit
  14734.  
  14735.   send ker:mskerm.doc     ; Send the MS-DOS Kermit manual
  14736.   send ker:mskerm.bwr     ; Send the MS-DOS Kermit "beware file"
  14737.   ; Now change to the MS-DOS binaries area
  14738.   remote cwd \bin
  14739.  
  14740.   send kb:msvibm.exe      ; Send the executable DOS Kermit program
  14741.   ; Put DOS back in default directory
  14742.   remote cwd \chris
  14743.  
  14744.   ; Connect back to default directory on the DEC-20
  14745.   cwd me:
  14746.  
  14747.   close transactions      ; Close transaction log
  14748.   send transaction.log    ; Send it
  14749.   finish                  ; Shut down DOS Kermit server
  14750.  
  14751. Commands  to  servers  (GET,  BYE,  FINISH, REMOTE) can be issued from a remote
  14752. Kermit-20 only by means of a TAKE file.  When Kermit-20 is  local  (i.e.  after
  14753. SET LINE), you can issue these commands interactively as well.
  14754.  
  14755.  
  14756. The REMOTE Command
  14757.  
  14758. Send the specified command to the remote server.  If the server does not under-
  14759. stand the command (all of these commands are optional features  of  the  Kermit
  14760. protocol),  it  will reply with a message like "Unknown Kermit server command".
  14761. If does understand, it will send the results back, and they will  be  displayed
  14762. on the screen.  The REMOTE commands are:
  14763.  
  14764. CWD [directory] Change  Working  Directory.   If no directory name is provided,
  14765. 11.5.2. Server Operation                                               Page 264
  14766.  
  14767. -------------------------------------------------------------------------------
  14768.                 the server will  change  to  the  default  or  home  directory.
  14769.                 Otherwise,  you will be prompted for a password, and the server
  14770.                 will attempt  to  change  to  the  specified  directory.    The
  14771.                 password  is  entered  on a separate line, and does not echo as
  14772.                 you type it.  If access is not granted, the server will provide
  14773.                 a message to that effect.  Do not put trailing comments after a
  14774.                 REMOTE CWD command, or after the password.
  14775.  
  14776. DELETE filespec Delete the specified file or files.  The  names  of  the  files
  14777.                 that are deleted will appear on your screen.
  14778.  
  14779. DIRECTORY [filespec]
  14780.                 The names of the files that match the given file  specification
  14781.                 will  be  displayed on your screen, perhaps along with size and
  14782.                 date information for each file.  If no  file  specification  is
  14783.                 given, all files from the current directory will be listed.
  14784.  
  14785. HELP            Provide  a  list  of  the functions that are available from the
  14786.                 server.
  14787.  
  14788. HOST [command]  Pass the given command to the server's host command  processor,
  14789.                 and display the resulting output on your screen.
  14790.  
  14791. SPACE           Provide  information about disk usage in the current directory,
  14792.                 such as the quota, the current storage, the amount of remaining
  14793.                 free space.
  14794.  
  14795. TYPE filespec   Display the contents of the specified file on your screen.
  14796.  
  14797.  
  14798. 11.5.3. Commands for Local File Management
  14799.  
  14800. Syntax: LOCAL [command]
  14801.  
  14802. Execute  the  specified  command  on  the  local  system -- on the DEC-20 where
  14803. Kermit-20 is running.   These  commands  provide  some  local  file  management
  14804. capability without having to leave the Kermit-20 program.
  14805.  
  14806. CWD [directory] Change working directory, or, in DEC-20 terminology, CONNECT to
  14807.                 the specified directory.  If a password is required,  you  will
  14808.                 be  prompted  for one.  Do not include a trailing comment after
  14809.                 the password.
  14810.  
  14811. DELETE filespec Delete the specified file or files, but  do  not  expunge  them
  14812.                 (unless you have SET EXPUNGE ON).
  14813.  
  14814. DIRECTORY [filespec]
  14815.                 Provide a directory listing of the specified files.
  14816.  
  14817. RUN [filespec]  Attempts to run the specified file, which  must  be  in  ".EXE"
  14818.                 format  (.EXE  is  the  default filetype), in an inferior fork.
  14819.                 Control returns to Kermit-20 when the program terminates.  Once
  14820.                 you have used this command, you can restart the same program by
  14821.                 issuing  a  RUN  command  with  no  arguments.    If  you   RUN
  14822.                 SYSTEM:EXEC,  then  you  will be able to issue TOPS-20 commands
  14823.                 without leaving Kermit; you can get back  to  Kermit  from  the
  14824. 11.5.3. Commands for Local File Management                             Page 265
  14825.  
  14826. -------------------------------------------------------------------------------
  14827.                 EXEC by typing the EXEC POP command.
  14828.  
  14829. SPACE           Show how much space is used and remaining in the current direc-
  14830.                 tory.
  14831.  
  14832. TYPE            Display the contents of the specified file  or  files  at  your
  14833.                 terminal.  This works like the DEC-20 TYPE command, except that
  14834.                 if a file has a bytesize of 8, Kermit-20 will  do  8-bit  input
  14835.                 from  it rather than 7-bit.  Also, the DEC-20 Control-O command
  14836.                 discards output only from the file currently  being  displayed;
  14837.                 if multiple files are being typed, then output will resume with
  14838.                 the next file.
  14839.  
  14840. The LOCAL commands may also be used without the "LOCAL" prefix.
  14841.  
  14842.  
  14843. 11.5.4. The CONNECT Command
  14844.  
  14845. Syntax: CONNECT [number]
  14846.  
  14847. Establish a terminal connection to the system connected to the octal TTY number
  14848. specified  here or in the most recent SET LINE command, using full duplex echo-
  14849. ing and no parity unless otherwise specified in previous  SET  commands.    Get
  14850. back  to Kermit-20 by typing the escape character followed by the letter C. The
  14851. escape character is Control-Backslash (^\) by default.  When you type  the  es-
  14852. cape character, several single-character commands are possible:
  14853.  
  14854.   C   Close the connection and return to Kermit-20.
  14855.   S   Show status of the connection; equivalent to SHOW LINE.
  14856.   P   Push to a new Exec.  POP from the Exec to get back to the connection.
  14857.   Q   If a session log is active, temporarily Quit logging.
  14858.   R   Resume logging to the session log.
  14859.   B   Send a simulated BREAK signal.
  14860.   ?   List all the possible single-character arguments.
  14861.   ^\ (or whatever you have set the escape character to be):
  14862.       Typing the escape character twice sends one copy of it to  the  connected
  14863.       host.
  14864.  
  14865. You  can use the SET ESCAPE command to define a different escape character, and
  14866. SET PARITY, SET DUPLEX, SET HANDSHAKE, SET FLOW, and SET SPEED to change  those
  14867. communication-line-oriented  parameters.  In order for the simulated BREAK sig-
  14868. nal to work, TOPS-20 must know the speed of the terminal.  If it does not,  you
  14869. may  use  the  SET  SPEED  command.  Type the SHOW LINE command for information
  14870. about your current communication settings.
  14871.  
  14872. Kermit-20 does not have any special autodialer interface.  It assumes that  the
  14873. connection has already been made and the line assigned.
  14874. 11.5.5. The SET, SHOW, and DEFINE Commands                             Page 266
  14875.  
  14876. -------------------------------------------------------------------------------
  14877. 11.5.5. The SET, SHOW, and DEFINE Commands
  14878.  
  14879. SET  is  used  for  establishing  or changing parameters, DEFINE lets you group
  14880. several SET commands together into a single "macro" command, and SHOW lets  you
  14881. examine current settings or macro definitions.
  14882.  
  14883.  
  14884.                                 THE SET COMMAND
  14885.  
  14886. Syntax: SET parameter [option [value]]
  14887.  
  14888. Establish  or  modify  various parameters for file transfer or terminal connec-
  14889. tion.  You can examine their values with  the  SHOW  command.    The  following
  14890. parameters may be SET:
  14891.  
  14892.                BREAK  Adjust the BREAK simulation parameter
  14893.          BLOCK-CHECK  Packet transmission error detection method
  14894.            DEBUGGING  Record or display state transitions or packets
  14895.                DELAY  How long to wait before starting to send
  14896.               DUPLEX  For terminal connection, FULL or HALF
  14897.               ESCAPE  Character for terminal connection
  14898.                 FILE  For setting file parameters like byte size
  14899.         FLOW-CONTROL  For enabling or disabling XON/XOFF flow control
  14900.            HANDSHAKE  For turning around half duplex communication line
  14901.                  IBM  For communicating with an IBM mainframe
  14902.           INCOMPLETE  What to do with an incomplete file
  14903.                INPUT  For specifying behavior of the INPUT command
  14904.           ITS-BINARY  For recognizing a special 8-bit binary file format
  14905.                 LINE  TTY line to use for file transfer or CONNECT
  14906.               PARITY  Character parity to use
  14907.               PROMPT  Change the program's command prompt
  14908.              RECEIVE  Various parameters for receiving files
  14909.                RETRY  How many times to retry a packet before giving up
  14910.                 SEND  Various parameters for sending files
  14911.                SPEED  Baud rate of communication line
  14912.           TVT-BINARY  For negotiating binary mode on ARPANET
  14913.  
  14914. The  DEFINE  command may be used to compose "macros" by combining SET commands.
  14915. Those SET commands which differ from the "ideal" Kermit are  now  described  in
  14916. detail.
  14917.  
  14918.  
  14919. SET BREAK
  14920.  
  14921. Syntax:  SET BREAK n Specify the number of nulls to be sent at 50 baud to simu-
  14922. late a BREAK signal when connected to a remote host via SET LINE and CONNECT.
  14923.  
  14924.  
  14925. SET DEBUG
  14926.  
  14927. Syntax: SET DEBUG options
  14928.  
  14929. Record the packet traffic, either on your terminal or in a file.  Some  reasons
  14930. for  doing  this would be to debug a version of Kermit that you are working on,
  14931. to record a transaction in which an error occurred for evidence when  reporting
  14932. bugs,  or  simply  to  vary the display you get when running Kermit-20 in local
  14933. 11.5.5. The SET, SHOW, and DEFINE Commands                             Page 267
  14934.  
  14935. -------------------------------------------------------------------------------
  14936. mode.  Options are:
  14937.  
  14938. STATES          Show Kermit state transitions and packet numbers (brief).
  14939.  
  14940. PACKETS         Display each incoming and outgoing packet (lengthy).
  14941.  
  14942. OFF             Don't display or record debugging information (this is the nor-
  14943.                 mal  mode).   If debugging was in effect, turn it off and close
  14944.                 any log file.
  14945.  
  14946. The debugging information is recorded in the file specified by the most  recent
  14947. LOG DEBUGGING command, DEBUGGING.LOG by default.
  14948.  
  14949.  
  14950. SET ESCAPE
  14951.  
  14952. SET ESCAPE octal-number
  14953.  
  14954. Specify  the  control character you want to use to "escape" from remote connec-
  14955. tions back to Kermit-20.  The default is 34 (Control-\).  The number is the oc-
  14956. tal  value  of the ASCII control character, 1 to 37 (or 177), for instance 2 is
  14957. Control-B.  After you type the escape character, you must follow it by a one of
  14958. the single-character "arguments" described under the CONNECT command, above.
  14959.  
  14960.  
  14961. SET EXPUNGE
  14962.  
  14963. SET EXPUNGE ON or OFF
  14964.  
  14965. Tell  whether  you  want a DELETE command (either the LOCAL DELETE command or a
  14966. REMOTE DELETE command sent to a  Kermit-20  server)  to  expunge  files  as  it
  14967. deletes  them.    On the DEC-20, a deleted file continues to take up space, and
  14968. may be "undeleted" at a later time in the same session.  To expunge  a  deleted
  14969. file  means to remove it completely and irrevocably, freeing its space for fur-
  14970. ther use.  EXPUNGE is OFF by default; deleted files are not  automatically  ex-
  14971. punged.    SET  EXPUNGE  applies  only  to files that are deleted explicitly by
  14972. Kermit-20, and not to files that are implicitly deleted when new generations of
  14973. existing files are created.
  14974.  
  14975.  
  14976. SET FILE
  14977.  
  14978. Syntax: SET FILE parameter keyword
  14979.  
  14980. Establish file-related parameters:
  14981.  
  14982. BYTESIZE keyword or number
  14983.         Byte size for DEC-20 file input/output.  The  choices  are  SEVEN  (7),
  14984.         EIGHT (8), and AUTO.
  14985.  
  14986.         SEVEN   (or  7)  Always  store  or  retrieve five 7-bit bytes per word.
  14987.                 When sending a file, ignore the file bytesize and do 7-bit  in-
  14988.                 put from the file.  There would be no reason to use this option
  14989.                 except to explicitly force an 8-bit file to  be  treated  as  a
  14990.                 7-bit file.
  14991. 11.5.5. The SET, SHOW, and DEFINE Commands                             Page 268
  14992.  
  14993. -------------------------------------------------------------------------------
  14994.         EIGHT   (or  8)  Always  store  or  retrieve four 8-bit bytes per word.
  14995.                 When sending a file, ignore the file bytesize and do 8-bit  in-
  14996.                 put  from  the  file.  This command is necessary when receiving
  14997.                 binary files from 8-bit-byte systems, such  as  most  microcom-
  14998.                 puters.
  14999.  
  15000.         AUTO    Equivalent  to SEVEN for incoming files, and for outgoing files
  15001.                 means to use EIGHT if the DEC-20 file bytesize (as shown by the
  15002.                 Exec  VDIR  command) is 8, otherwise use SEVEN.  The default is
  15003.                 AUTO.
  15004.  
  15005.         The DEC-20 can send any mixture  of  file  types  in  the  correct  way
  15006.         automatically, but you must set the file bytesize to 8 for any incoming
  15007.         8-bit binary files, and to AUTO (i.e. 7) for any incoming text files or
  15008.         DEC-20 binary files.
  15009.  
  15010. NAMING UNTRANSLATED or NORMAL-FORM
  15011.         If NORMAL-FORM the names of incoming or outgoing  files  will  be  con-
  15012.         verted  to  contain  only  uppercase  letters,  digits, and at most one
  15013.         period; any other characters will be translated to "X".    If  UNTRANS-
  15014.         LATED,  filenames will be sent and used literally.  UNTRANSLATED is the
  15015.         default.
  15016.  
  15017.  
  15018. SET IBM
  15019.  
  15020. Syntax: SET IBM ON or OFF
  15021.  
  15022. SET IBM is really a predefined SET macro rather than a "hardwired" SET command;
  15023. it  can  be  redefined or undefined (see DEFINE); as distributed from Columbia,
  15024. Kermit-20 defines IBM to be "parity mark, handshake XON, duplex half".
  15025.  
  15026. SET IBM should be used when running Kermit-20 in local mode,  connected  to  an
  15027. IBM  or  similar mainframe.  If you have redefined the SET IBM macro, then your
  15028. parameters will be used instead.
  15029.  
  15030.  
  15031. SET ITS-BINARY
  15032.  
  15033. Syntax: SET ITS-BINARY ON or OFF
  15034.  
  15035. Specify whether ITS-Binary file headers are to be recognized or  ignored.    By
  15036. default,  they  are recognized.  ITS binary format is a way (devised at MIT) of
  15037. storing foreign 8-bit binary data on a 36-bit machine to allow automatic recog-
  15038. nition  of  these  files when sending them out again, so that you don't have to
  15039. depend on the file byte size, or to issue explicit SET FILE  BYTESIZE  commands
  15040. to Kermit.
  15041.  
  15042. An  ITS  format binary file contains the sixbit characters "DSK8" left-adjusted
  15043. in the first 36-bit word.  If ITS-BINARY is ON, then Kermit-20  will  send  any
  15044. file  starting  with this "header word" using 8-bit input from the file even if
  15045. the file bytesize is  not  8,  and  will  not  send  the  header  word  itself.
  15046. Kermit-20  will  also store any incoming file that begins with that header word
  15047. using 8-bit bytesize, again discarding the header word itself.   If  ITS-BINARY
  15048. is OFF, then the header word, if any, will be sent or kept, and i/o will be ac-
  15049. cording to the setting of FILE BYTESIZE.
  15050. 11.5.5. The SET, SHOW, and DEFINE Commands                             Page 269
  15051.  
  15052. -------------------------------------------------------------------------------
  15053. This facility is provided for compatibility with the file formats used on  cer-
  15054. tain public-access CP/M libraries.
  15055.  
  15056.  
  15057. SET INPUT
  15058.  
  15059. Syntax: SET INPUT parameter value
  15060.  
  15061. The  INPUT  command is used in TAKE command files or DEC-20 Batch control files
  15062. as part of the login script facility, which  is  explained  in  greater  detail
  15063. later.    SET INPUT controls the behavior of the INPUT command.  The parameters
  15064. are as follows:
  15065.  
  15066. SET INPUT DEFAULT-TIMEOUT n
  15067.         n  is  the number of seconds for an INPUT command to time out after not
  15068.         receiving the requested input, when no interval is explicitly given  in
  15069.         the INPUT command.  For instance, if the default timeout interval is 10
  15070.         seconds, then the command 
  15071.  
  15072.           INPUT login:
  15073.  
  15074.         will look for the "login:" prompt for 10 seconds.  The default  may  be
  15075.         overriden by including an explicit interval in the INPUT command:  
  15076.  
  15077.           INPUT 15 login:
  15078.  
  15079.         The default timeout interval is 5 seconds.
  15080.  
  15081. SET INPUT TIMEOUT-ACTION PROCEED or QUIT
  15082.         If the INPUT command comes from a  Kermit-20  command  file  (see  TAKE
  15083.         command)  or  a  TOPS-20  Batch  control file, then use this command to
  15084.         specify whether processing of the command file should proceed  or  quit
  15085.         after  a  timeout  occurs.  For TAKE files, the current command file is
  15086.         terminated and control returns to the invoking level (Kermit-20  prompt
  15087.         level, or a superior TAKE file).  The default action is PROCEED.
  15088.  
  15089. SET INPUT CASE IGNORE or OBSERVE
  15090.         Specify whether alphabetic case should be ignored ("a" matches "A")  or
  15091.         observed  ("a"  does  not  match  "A")  when scanning the input for the
  15092.         specified search string.  By default, aphabetic case is ignored.
  15093.  
  15094. SET INPUT commands are "global"; the settings are  not  "pushed"  and  "popped"
  15095. when entering or leaving TAKE command files.
  15096.  
  15097.  
  15098. SET LINE
  15099.  
  15100. Syntax: SET LINE [octal-number]
  15101.  
  15102. Specify the octal TTY number to use for file transfer or CONNECT.  If you issue
  15103. this command, you will be running Kermit-20 locally, and you must log in to the
  15104. remote  system and run Kermit on that side in order to transfer a file.  If you
  15105. don't issue this command, Kermit-20 assumes it is running  remotely,  and  does
  15106. file  transfer  over  its job's controlling terminal line.  You can also select
  15107. the line directly in the CONNECT command; the command 
  15108. 11.5.5. The SET, SHOW, and DEFINE Commands                             Page 270
  15109.  
  15110. -------------------------------------------------------------------------------
  15111.   CONNECT 12
  15112.  
  15113. is equivalent to
  15114.  
  15115.   SET LINE 12
  15116.   CONNECT
  15117.  
  15118. If you type SET LINE with no number argument, you will  deassign  any  previous
  15119. assigned line and revert to remote mode.
  15120.  
  15121. The  SHOW  LINE  command will display the currently selected communication line
  15122. and its charactistics, including parity, duplex, handshake, flow  control,  the
  15123. speed  if known, whether carrier is present (if it is a modem-controlled line),
  15124. and whether Kermit-20 is in local or remote mode.
  15125.  
  15126.  
  15127. SET RECEIVE
  15128.  
  15129. In addition to the full complement of SET RECEIVE  commands  described  in  the
  15130. main  part of the Kermit User Guide, you may also SET RECEIVE SERVER-TIMEOUT to
  15131. a value between 0 and 94.    This  specifies  the  number  of  seconds  between
  15132. timeouts  during server command wait, 0 specifies that no timeouts should occur
  15133. during server command wait.  When a Kermit server times out,  it  sends  a  NAK
  15134. packet.    Some systems cannot clear piled-up NAKs from their input buffers; if
  15135. you're using such a system to communicate with a Kermit-20 server, and you  ex-
  15136. pect  to  be  leaving  the server idle for long periods of time, you should use
  15137. this command to turn off server command-wait timeouts.
  15138.  
  15139.  
  15140. SET SPEED
  15141.  
  15142. Syntax: SET SPEED n
  15143.  
  15144. Set the baud rate of the currently selected communication  to  n,  the  decimal
  15145. baud  rate, for instance 300, 1200, 4800.  When operating in local mode, it may
  15146. be necessary to issue this command in order to enable BREAK simulation.
  15147.  
  15148.  
  15149. SET TVT-BINARY
  15150.  
  15151. Syntax: SET TVT-BINARY ON or OFF
  15152.  
  15153. Only for users running Kermit-20 on an ARPANET DEC-20, signed on to an  ARPANET
  15154. virtual terminal (TVT) from another host or through an ARPANET TAC.  SET TVT ON
  15155. causes Kermit-20 to negotiate binary mode (8-bit) communication  with  the  AR-
  15156. PANET  during file transfer.  Without this command, file transfer through a TVT
  15157. would not work in most cases.
  15158.  
  15159. TVT-BINARY is OFF by default.  If you normally use Kermit-20  through  the  AR-
  15160. PAnet, you can put the command SET TVT-BINARY ON into your KERMIT.INI file.
  15161.  
  15162. CAUTION:  This  facility requires certain features in the Release 5 TOPS-20 AR-
  15163. PANET monitor, which may not be present in releases distributed by  DEC.    See
  15164. the Kermit-20 source code for details.
  15165. 11.5.5. The SET, SHOW, and DEFINE Commands                             Page 271
  15166.  
  15167. -------------------------------------------------------------------------------
  15168.                               THE DEFINE COMMAND
  15169.  
  15170. Syntax: DEFINE macroname [set-option [, set-option [...]]]
  15171.  
  15172. The  DEFINE command is available in Kermit-20 for building "macros" of SET com-
  15173. mands.  The macro name can be any keyword-style character string, and  the  set
  15174. options are anything you would type after SET in a SET command; several set op-
  15175. tions may be strung together, separated by commas.  Example:  
  15176.  
  15177.   define notimeout send timeout 0, receive timeout 0, receive server 0
  15178.  
  15179. Macro definitions may not include macro names.  You can list  all  your  macros
  15180. and  their definitions with the SHOW MACROS command.  You can list a particular
  15181. macro definition with HELP SET macroname.
  15182.  
  15183.  
  15184.                                THE SHOW COMMAND
  15185.  
  15186. Syntax: SHOW [option]
  15187.  
  15188. The SHOW command displays various information:
  15189.  
  15190. DAYTIME         Current date, time, phase of moon.
  15191.  
  15192. DEBUGGING       Debugging mode in effect, if any.
  15193.  
  15194. FILE-INFO       Byte size for DEC-20 file i/o, incomplete file disposition.
  15195.  
  15196. INPUT           INPUT command parameters.
  15197.  
  15198. LINE            TTY line,  parity,  duplex,  flow  control,  handshake,  escape
  15199.                 character,  speed  (if  known), and session loggin information.
  15200.                 Note that before release 6.0 of TOPS-20, the  DEC-20  does  not
  15201.                 keep  a record of the actual baud rate of a modem-controlled or
  15202.                 "remote" TTY line.
  15203.  
  15204. MACROS          Definitions for SET macros.
  15205.  
  15206. PACKET-INFO     For incoming and outbound packets.  Items under RECEIVE  column
  15207.                 show parameters for packets Kermit-20 expects to receive, under
  15208.                 SEND shows parameters for outgoing packets.
  15209.  
  15210. TIMING-INFO     Delays, retries, server NAK intervals.
  15211.  
  15212. VERSION         Program version of Kermit-20.   This  is  also  displayed  when
  15213.                 Kermit-20 is initially started.
  15214.  
  15215. ALL             (default) All of the above.
  15216. 11.5.6. Program Management Commands                                    Page 272
  15217.  
  15218. -------------------------------------------------------------------------------
  15219. 11.5.6. Program Management Commands
  15220.  
  15221.  
  15222.                                THE TAKE COMMAND
  15223.  
  15224. Syntax: TAKE filespec
  15225.  
  15226. Execute  Kermit-20 commands from the specified file.  The file may contain con-
  15227. tain any valid Kermit-20 commands, including other TAKE commands; command files
  15228. may  be  nested up to a depth of 20.  Default file type for the command file is
  15229. .CMD.  Most commands may have trailing comments, beginning  by  semicolon,  but
  15230. these  should  be  avoided  in REMOTE commands, GET commands, and the passwords
  15231. that are prompted for after CWD and REMOTE CWD commands.
  15232.  
  15233.  
  15234.                                THE ECHO COMMAND
  15235.  
  15236. Syntax: ECHO line of text
  15237.  
  15238. The line of text is echoed at the terminal.  This is useful  when  issued  from
  15239. within TAKE command files, to report progress or issue instructions.
  15240.  
  15241.  
  15242.                                THE HELP COMMAND
  15243.  
  15244. Syntax: HELP [topic [subtopic]]
  15245.  
  15246. Typing  HELP  alone  prints a brief summary of Kermit-20 and its commands.  You
  15247. can also type
  15248.  
  15249.   HELP command
  15250.  
  15251. for any Kermit-20 command, e.g. "help send" or "help set parity"  to  get  more
  15252. detailed information about a specific command.  Type
  15253.  
  15254.   HELP ?
  15255.  
  15256. to see a list of the available help commands.
  15257.  
  15258.  
  15259.                           THE EXIT AND QUIT COMMANDS
  15260.  
  15261. Syntax: EXIT
  15262.  
  15263. Exit  from  Kermit-20.    You  can  CONTINUE the program from the TOPS-20 Exec,
  15264. provided you haven't run another program on top of it.  You can also exit  from
  15265. Kermit-20  by  typing  one  or  more control-C's, even if it's in the middle of
  15266. transferring a file.  Kermit-20  will  always  restore  your  terminal  to  its
  15267. original condition, and you will be able to CONTINUE the program to get back to
  15268. "Kermit-20>" command level with current settings intact.
  15269.  
  15270. QUIT is a synonym for EXIT.
  15271. 11.5.6. Program Management Commands                                    Page 273
  15272.  
  15273. -------------------------------------------------------------------------------
  15274.                                 THE LOG COMMAND
  15275.  
  15276. Syntax: LOG [option [filespec]]
  15277.  
  15278. Log the specified option to the specified file:
  15279.  
  15280. SESSION         During CONNECT or execution of a login script, log all  charac-
  15281.                 ters  that  appear on the screen to the specified file.  During
  15282.                 CONNECT, the session log can be temporarily turned  off  during
  15283.                 the remote session by typing the escape character followed by Q
  15284.                 (for Quit logging), and turned on again by  typing  the  escape
  15285.                 character  followed  by R (for Resume logging).  Default log is
  15286.                 SESSION.LOG in the current directory.
  15287.  
  15288. TRANSACTIONS    During file transfer, log the  progress  of  each  file.    The
  15289.                 DEC-20 transaction log file looks like this:
  15290.  
  15291.                   Kermit-20 Transaction Log File, Monday 27-Feb-1984
  15292.  
  15293.                   18:40:13: Opened Log: PS:<TIMREK>SAMPLE.LOG.1
  15294.                   18:40:31: -- Send Begins --
  15295.                      8th bit prefixing: Off
  15296.                      Block check type: 1
  15297.                   18:40:31: Opened File: PS:<SY.FDC>LOGIN.CMD.6
  15298.                      Sending As "LOGIN.CMD"
  15299.                      Sent: 547 7-bit bytes
  15300.                   18:40:34: Closed PS:<SY.FDC>LOGIN.CMD.6
  15301.                   18:40:34: Send Complete
  15302.                   18:40:50: -- Receive Begins --
  15303.                      8th bit prefixing: Off
  15304.                      Block check type: 1
  15305.                   18:40:50: Opened: PS:<TIMREK>AUTOEXEC.BAT.1
  15306.                      Written: 186 7-bit bytes
  15307.                   18:40:51: Closed: PS:<TIMREK>AUTOEXEC.BAT.1
  15308.                   18:40:56: Closed Transaction Log
  15309.  
  15310.                 Transaction  logging is recommended for long or unattended file
  15311.                 transfers, so that you don't have to watch the screen.  The log
  15312.                 may  be  inspected  after  the transfer is complete to see what
  15313.                 files were transferred  and  what  errors  may  have  occurred.
  15314.                 Default log is TRANSACTION.LOG in the current directory.
  15315.  
  15316. DEBUGGING       Log  STATES  or  PACKETS,  as  specified in the most recent SET
  15317.                 DEBUGGING command, to the specified file.    If  log  file  not
  15318.                 specified,  then use TTY if local, or DEBUGGING.LOG in the cur-
  15319.                 rent directory if remote.  If  no  SET  DEBUGGING  command  was
  15320.                 previously  issued, log STATES to the specified file.  Also al-
  15321.                 low specification of bytesize for  the  log  file,  7  (normal,
  15322.                 default),  or 8 (for debugging binary transfers when the parity
  15323.                 bit is being used for data), for instance 
  15324.  
  15325.                   LOG DEBUGGING BINARY.LOG 8
  15326.  
  15327.                 A 7-bit log file can be typed, printed, or examined with a text
  15328.                 editor or searching program.  An 8-bit log file can only be ex-
  15329.                 amined with a system utility like FILDDT.  When  logging  pack-
  15330. 11.5.6. Program Management Commands                                    Page 274
  15331.  
  15332. -------------------------------------------------------------------------------
  15333.                 ets,  each  packet  is  preceded  by  a  timestamp, the current
  15334.                 timeout interval (preceded by a slash), and "R:" or "S:" to in-
  15335.                 dicate data being received and sent, respectively.  Packet for-
  15336.                 mat is described in the Kermit Protocol Manual.
  15337.  
  15338. SESSION is the default option.  Thus the command "LOG" alone will cause CONNECT
  15339. sessions  to  be logged in SESSION.LOG in the current directory.  Any log files
  15340. are closed when you EXIT or QUIT from Kermit, and are reactivated if  you  CON-
  15341. TINUE  the  program.  You may explicitly close a log file and terminate logging
  15342. with the CLOSE command.
  15343.  
  15344.  
  15345.                                THE CLOSE COMMAND
  15346.  
  15347. Syntax: CLOSE option
  15348.  
  15349. Close the specified log file, SESSION, TRANSACTION, or DEBUGGING, and terminate
  15350. logging to that file.
  15351.  
  15352.  
  15353. 11.6. Login Scripts: The INPUT, OUTPUT, CLEAR, and PAUSE Commands
  15354.  
  15355. When  running  Kermit-20  in  local mode, connecting from the DEC-20 to another
  15356. system via an external TTY line (for instance, through an autodialer), you  may
  15357. use the Kermit-20 INPUT, OUTPUT, CLEAR, and PAUSE commands to carry on a dialog
  15358. with the remote system.  When combined into a "script" in a Kermit-20 TAKE com-
  15359. mand  file,  or  included  in  a Batch control file, these commands provide the
  15360. ability to initially connect and log in to a remote system, and to  set  it  up
  15361. for  file  transfer.    During script execution, session logging may be used to
  15362. record the dialog.
  15363.  
  15364.  
  15365.                                THE CLEAR COMMAND
  15366.  
  15367. Syntax: CLEAR
  15368.  
  15369. Clear the input and output buffers of the currently selected line, and  attempt
  15370. to clear any XOFF deadlock.
  15371.  
  15372.  
  15373.                                THE PAUSE COMMAND
  15374.  
  15375. Syntax: PAUSE [interval]
  15376.  
  15377. Pause  the  specified number of seconds before executing the next command.  The
  15378. default interval is one second.
  15379.  
  15380.  
  15381.                                THE INPUT COMMAND
  15382.  
  15383. Syntax: INPUT [interval] [string]
  15384.  
  15385. On the currently selected communication line, look for the given string for the
  15386. specified  interval  of time, which is specified in seconds.  If no interval is
  15387. specified, then wait for the default interval, which may be  specified  by  SET
  15388. INPUT  DEFAULT-TIMEOUT, and is normally 5 seconds.  Specifying an interval of 0
  15389. 11.6. Login Scripts: The INPUT, OUTPUT, CLEAR, and PAUSE Commands      Page 275
  15390.  
  15391. -------------------------------------------------------------------------------
  15392. (or less) means no timeout -- wait forever for the specified string.  An  INPUT
  15393. command can by interrupted by typing one or more Control-C's, which will return
  15394. you to Kermit-20> prompt level.
  15395.  
  15396. Characters coming in from the line will be scanned for the search  string,  and
  15397. when  a  match is found, the command will terminate successfully; if the string
  15398. is not found within the given interval, the command will  terminate  unsuccess-
  15399. fully.   While the INPUT command is active, all incoming characters will appear
  15400. on your screen.
  15401.  
  15402. The search string may contain any printable characters.  Control or other  spe-
  15403. cial  characters  that  you could not normally type as part of a command may be
  15404. included by preceding their octal ASCII values with a backslash,  for  instance
  15405. foo\15  is  "foo" followed by a carriage return (ASCII 15, octal).  A backslash
  15406. alone will be taken as is, unless it is followed by an octal  digit  (0-7);  if
  15407. you  want to actually specify a backslash in this context, double the backslash
  15408. (\\5 will be taken as \5).
  15409.  
  15410. The behavior of the INPUT command is governed by the SET INPUT CASE, SET  INPUT
  15411. DEFAULT-TIMEOUT,  and  SET  INPUT  TIMEOUT-ACTION commands, as described in the
  15412. Kermit Commands section of the User Guide, or in the Kermit book.
  15413.  
  15414. In addition to normal use, Kermit-20 scripts can also be used in  DEC-20  batch
  15415. control  files.   Failure to match an input string in the timeout interval will
  15416. result in a message starting with "?", which signals the  Batch  controller  to
  15417. detect  an error.  If INPUT TIMEOUT-ACTION is SET to PROCEED, any timeout error
  15418. messages will be issued starting with a "%", which does not signal an error  to
  15419. Batch.
  15420.  
  15421. In addition to otherwise untypable control characters (like Control-C), certain
  15422. printable characters in the search string may need to  be  "quoted"  using  the
  15423. backslash mechanism:
  15424.  
  15425. @ (ASCII 100)   If  it  is  the  first  character  in  the string, atsign tells
  15426.                 TOPS-20 that the following characters will be the  name  of  an
  15427.                 indirect command file, for instance 
  15428.  
  15429.                   input 10 @foo.txt
  15430.  
  15431.                 tells  Kermit  to  spend  10 seconds scanning the communication
  15432.                 line input for the  string  which  is  contained  in  the  file
  15433.                 FOO.TXT.  If you need to specify a string that starts with "@",
  15434.                 use \100 instead.
  15435.  
  15436. ? (ASCII 77)    A question mark tells TOPS-20 to provide a brief  help  message
  15437.                 about this part of the command; use \77 instead.
  15438.  
  15439. ! (ASCII 41)    If  it  is  the  first  character in the string, an exclamation
  15440.                 point will cause TOPS-20 to ignore the rest of the string, i.e.
  15441.                 treat it as a comment, use \41.
  15442.  
  15443. ; (ASCII 73)    Same as exclamation mark, use \73.
  15444.  
  15445. ( (ASCII 50)    In  first position, TOPS-20 will think this marks the beginning
  15446.                 of a "guide word"; use \50.
  15447. 11.6. Login Scripts: The INPUT, OUTPUT, CLEAR, and PAUSE Commands      Page 276
  15448.  
  15449. -------------------------------------------------------------------------------
  15450. - (ASCII 55)    In final position, a dash tells TOPS-20 that the  command  line
  15451.                 is  to be continued, concatenated with the following line.  Use
  15452.                 \55 instead of a final dash.   For  instance,  to  specify  the
  15453.                 string "More?--", use "More\77-\55".
  15454.  
  15455.  
  15456.                               THE OUTPUT COMMAND
  15457.  
  15458. Syntax: OUTPUT string
  15459.  
  15460. The  given  string  is sent out the currently selected communication line.  The
  15461. string is in the same form as the INPUT string; control or  special  characters
  15462. may  be  included  by prefacing their octal ASCII value with a backslash.  Note
  15463. that any terminating carriage return must be included explicitly as \15.    The
  15464. string will also be echoed at your terminal.
  15465.  
  15466.  
  15467.                               LOGIN SCRIPT HINTS
  15468.  
  15469. It  is  not  a  good  idea  to  store  passwords  in plain text in a file.  The
  15470. facilities of the TOPS-20 command parser make this unnecessary, so long as  you
  15471. are  sitting  at  your  terminal.  Suppose you have a script that looks for the
  15472. string "Password: " and then outputs your password using a command like 
  15473.  
  15474.   out mypassword\15
  15475.  
  15476. If you change this line to 
  15477.  
  15478.   out @tty:
  15479.  
  15480. you may enter the password from your terminal as follows:
  15481.  
  15482.   login: myuserid
  15483.   Password: mypassword\15^Z
  15484.  
  15485. That is, you type the password, a backslash-encoded carriage return,  and  then
  15486. Control-Z.    This  may  be done even when executing commands from a TAKE file;
  15487. after the ^Z, control returns to the TAKE file.  In the OUTPUT command,  "@TTY:
  15488. designates  TTY:  (your  job's  controlling terminal) to be an indirect command
  15489. file; the ^Z is the "end of file" for a terminal.  This  same  technique  could
  15490. have been used in the first script example to allow you to supply from the ter-
  15491. minal the name of the file to be sent.  It might be a good idea to for  you  to
  15492. include  an  ECHO command in your script file to remind you to do this, for in-
  15493. stance:
  15494.  
  15495.   input password:
  15496.   echo ^GType your password, followed by "\15" and then a CTRL-Z
  15497.   output @tty:
  15498.  
  15499. The ^G is a Control-G, which should get your attention by sounding  a  beep  at
  15500. your terminal.
  15501.  
  15502. One  might  expect  to be able to use the same indirect file mechanism with the
  15503. OUTPUT command to provide a crude "raw upload" facility, as in 
  15504.  
  15505.   output @foo.bar
  15506. 11.6. Login Scripts: The INPUT, OUTPUT, CLEAR, and PAUSE Commands      Page 277
  15507.  
  15508. -------------------------------------------------------------------------------
  15509. to send the contents of  the  file  FOO.BAR  to  the  remote  system,  with  no
  15510. synchronization  or error checking.  Unfortunately, there are two problems with
  15511. this approach: first, TOPS-20 converts all carriage return /  linefeeds  in  an
  15512. indirect  command  file  to  spaces,  and  second, only very short files may be
  15513. treated this way, because they must fit within TOPS-20's command "atom" buffer.
  15514. The Kermit-20 TRANSMIT command provides a synchronized raw uploading of files.
  15515.  
  15516.  
  15517. 11.7. Raw Download and Upload
  15518.  
  15519. "Raw  Download"  is  the term commonly used to describe the capture of a remote
  15520. file on the local system, without any kind of error  detection  or  correction.
  15521. This  allows  you  to obtain files from remote systems that do not have Kermit,
  15522. but with the risk of loss or corruption of data.
  15523.  
  15524. Kermit-20 provides raw downloading via the LOG SESSION command  during  CONNECT
  15525. to  a  remote system.  The session log is described above.  To use session log-
  15526. ging to capture a file:
  15527.  
  15528.    1. Run Kermit on the DEC-20.
  15529.  
  15530.    2. SET LINE to the TTY number through which you will  be  connected  to
  15531.       the remote system.
  15532.  
  15533.    3. Perform any required SET commands to condition Kermit for communica-
  15534.       tion with the remote system.  You may need SET PARITY,  SET  DUPLEX,
  15535.       SET  FLOW,  SET HANDSHAKE, etc., depending on the characteristics of
  15536.       the remote system and the communication medium.
  15537.  
  15538.    4. CONNECT to the remote system and log in.
  15539.  
  15540.    5. Condition your job on the remote system not to pause at the end of a
  15541.       screenful  of  text,  and give whatever commands may be necessary to
  15542.       achieve a "clean" terminal listing -- for instance, disable messages
  15543.       from the system or other users.
  15544.  
  15545.    6. Type  the  appropriate command to have the desired file displayed at
  15546.       the terminal, but do not type the terminating carriage return.    On
  15547.       most systems, the command would be "type", on Unix it's "cat".
  15548.  
  15549.    7. Escape  back  to  Kermit to the DEC-20 and give the LOG SESSION com-
  15550.       mand.
  15551.  
  15552.    8. CONNECT back to the remote system and type a carriage return.    The
  15553.       file  will  be  displayed on your screen and recorded in the session
  15554.       log file.
  15555.  
  15556.    9. Escape back to Kermit on the DEC-20 and give the CLOSE SESSION  com-
  15557.       mand.
  15558.  
  15559. The  file  will  be in SESSION.LOG in your connected directory, unless you gave
  15560. another name for it in your LOG SESSION command.  You will probably  find  that
  15561. some  editing necessary to remove extraneous prompts, messages, padding charac-
  15562. ters, or terminal escape sequences, or to fill in lost or  garbled  characters.
  15563. Here's an example showing how to capture a file foo.bar from a remote Unix sys-
  15564. tem:
  15565. 11.7. Raw Download and Upload                                          Page 278
  15566.  
  15567. -------------------------------------------------------------------------------
  15568.   @kermit
  15569.   Kermit-20>set line 23
  15570.   Kermit-20>connect
  15571.   [KERMIT-20: Connecting to remote host over TTY23:,
  15572.    type <CTRL-\>C to return.]
  15573.   4.2 BSD UNIX
  15574.  
  15575.   login: myuserid
  15576.   Password: mypassword
  15577.   % cat foo.bar^\C
  15578.   [KERMIT-20: Connection Closed]
  15579.   Kermit-20>log session foo.bar
  15580.   Kermit-20>connect
  15581.   [KERMIT-20: Connecting to remote host over TTY23:,
  15582.    type <CTRL-\>C to return.]
  15583.   [KERMIT-20: Logging to File FOO.BAR.1]
  15584.   (Type carriage return now.)
  15585.   This is the file foo.bar.
  15586.   It has three lines.
  15587.   This is the last line.
  15588.   % ^\
  15589.   [KERMIT-20: Closing Log File FOO.BAR.1>
  15590.   [KERMIT-20: Connection Closed]
  15591.   Kermit-20>close session
  15592.  
  15593. Note that in this case, the Unix "% " prompt at the end of the text  will  have
  15594. to be edited out.
  15595.  
  15596.  
  15597.                                   RAW UPLOAD
  15598.  
  15599. "Raw  Upload" means sending a file from the local system to a remote one, again
  15600. without error detection or correction.  This allows you to send files from  the
  15601. DEC-20 to remote systems that don't have Kermit.  Kermit-20 provides the TRANS-
  15602. MIT command for this purpose.
  15603.  
  15604. Syntax: TRANSMIT filespec [prompt]
  15605.  
  15606. For use in local mode only.  Sends the specified text file a line  at  a  time,
  15607. "raw" (as is, without using Kermit protocol), to the remote system, waiting for
  15608. the specified prompt for each line.  Only a single file may be  sent  with  the
  15609. TRANSMIT  command;  wildcards are not allowed in the filespec.  The file should
  15610. be a text file, not a binary file.  Since protocol is not being  used,  no  as-
  15611. surance  can be given that the file will arrive at the destination correctly or
  15612. completely.
  15613.  
  15614. The prompt is any string, for instance the prompt of a line editor in text  in-
  15615. sertion  mode.    The prompt string may include special characters by preceding
  15616. their octal ASCII values with a backslash, e.g. \12 for linefeed, \21  for  XON
  15617. (^Q).    The  syntax of the prompt string is explained in greater detail above,
  15618. with the INPUT command.
  15619.  
  15620. If a prompt string is supplied, alphabetic case will be  ignored  in  searching
  15621. for  it unless you SET INPUT CASE OBSERVE.  If a prompt string is not supplied,
  15622. then linefeed will be used by default, unless you have performed  a  SET  HAND-
  15623. SHAKE  command, in which case the current handshake character will be used.  If
  15624. 11.7. Raw Download and Upload                                          Page 279
  15625.  
  15626. -------------------------------------------------------------------------------
  15627. you really want to send the  entire  file  without  waiting  for  any  prompts,
  15628. specify a prompt of "\0" (ASCII zero, null) (this is not advised).
  15629.  
  15630. The  file  will be sent using the current settings for duplex, parity, and flow
  15631. control.  There are no timeouts on input, as there are with the INPUT  command.
  15632. The  TRANSMIT  command waits forever for the prompt to appear.  However, if you
  15633. observe that the transfer is stuck, there are three things you can do:
  15634.  
  15635.    - Type a Carriage Return to transmit the next line.
  15636.  
  15637.    - Type a Control-P to retransmit the line that was just transmitted.
  15638.  
  15639.    - Type two Control-C's to cancel the TRANSMIT command and get  back  to
  15640.      Kermit-20> command level.
  15641.  
  15642. TRANSMIT  should  be  used as follows: CONNECT to the remote system, login, and
  15643. start up some kind of process on the remote system to store input from the ter-
  15644. minal into a file.  On a DEC-20 (that doesn't have Kermit), you could do 
  15645.  
  15646.   copy tty: foo.bar
  15647.  
  15648. or  you could start a line editor like EDIT or OTTO and put it into text inser-
  15649. tion mode.  On a Unix system, you could 
  15650.  
  15651.   cat /dev/tty > foo.bar
  15652.  
  15653. or you could run "ed" and give it the "a" command.
  15654.  
  15655. The Kermit-20 TRANSMIT command will  send  the  first  line  of  the  file  im-
  15656. mediately.    Then  it  will  wait for a "prompt" from the remote system before
  15657. sending the next line.  When performing a copy operation from the terminal to a
  15658. file,  the  "prompt"  will  probably  be a linefeed, "\12" which is the default
  15659. prompt -- most full duplex systems expect you to type a line of text terminated
  15660. by  a  carriage  return;  they  echo  the characters you type and then output a
  15661. linefeed.  Half duplex systems, on the other hand, use some kind of  line  tur-
  15662. naround  handshake  character,  like XON (Control-Q), to let you know when they
  15663. are ready for the next line of input.  Line editors like EDIT and  OTTO  prompt
  15664. you  with  a  line number followed by a tab; in that case your prompt character
  15665. would be "\11" (be careful -- if the remote DEC-20 doesn't think your  terminal
  15666. has  hardware  tabs, it will simulate them by outputting spaces).  In any case,
  15667. to assure synchronization, it is your responsibility to set up the target  sys-
  15668. tem  to  accept line-at-a-time textual input and to determine what the system's
  15669. prompt will be when it is ready for the next line.
  15670.  
  15671. Each line is sent with a terminating carriage return; linefeeds are  not  sent,
  15672. since  these are supplied by the receiving system if it needs them.  The TRANS-
  15673. MIT command continues to send all the lines of the file in this manner until it
  15674. reaches the end, or until you interrupt the operation by typing Control-C's.
  15675.  
  15676. If  you  cannot  make the TRANSMIT command work automatically, for instance be-
  15677. cause the remote system's prompt  changes  for  each  line,  you  may  TRANSMIT
  15678. manually  by specifying a prompt string that will not appear, and then typing a
  15679. carriage return at your keyboard for each line you want to send.
  15680.  
  15681. If the TRANSMIT command completes successfully (you'll get a message to the ef-
  15682. fect  that  the  transmission  is  complete), then you must connect back to the
  15683. 11.7. Raw Download and Upload                                          Page 280
  15684.  
  15685. -------------------------------------------------------------------------------
  15686. remote system and type whatever command it needs in orderto save  and/or  close
  15687. the file there.
  15688.  
  15689.  
  15690. 11.8. Kermit-20 Examples
  15691.  
  15692. Here  are  a few examples of the use of Kermit-20.  Text entered by the user is
  15693. underlined.
  15694.  
  15695.  
  15696.                                REMOTE OPERATION
  15697.  
  15698. The following example shows use of Kermit-20 as a server from an IBM  PC.    In
  15699. this  example,  the  user  runs  Kermit  on the PC, connects to the DEC-20, and
  15700. starts Kermit-20 in server mode.  From that point on, the user need never  con-
  15701. nect  to  the  DEC-20  again.    In this example, the user gets a file from the
  15702. DEC-20, works on it locally at the PC, and then sends the results back  to  the
  15703. DEC-20.   Note that the user can leave and restart Kermit on the PC as often as
  15704. desired.
  15705.  
  15706.  A>Kermit
  15707.  Kermit-MS>connect
  15708.  @
  15709.  @Kermit
  15710.  TOPS-20 Kermit version 4.2(262)
  15711.  
  15712.  Kermit-20>server
  15713.  
  15714.   Kermit Server running on DEC-20 host.  Please type your escape
  15715.   sequence to return to your local machine.  Shut down the server by
  15716.   typing the Kermit BYE command on your local machine.
  15717.  ^[C
  15718.  Kermit-MS>get foo.txt
  15719.      The transfer takes place.
  15720.  
  15721.  Kermit-MS>exit
  15722.  A>
  15723.  A>edit foo.txt ; (or whatever...)
  15724.  A>
  15725.  A>Kermit
  15726.  Kermit-MS>send foo.txt
  15727.      The transfer takes place.
  15728.  
  15729.  Kermit-MS>bye
  15730.  A>
  15731.  
  15732. The next example shows the special procedure you would have to use in order  to
  15733. send  a mixture of text and binary files from a PC (or an 8-bit-byte system) to
  15734. the DEC-20.  Note that in this case, it's more convenient to avoid server mode.
  15735.  
  15736.  Kermit-MS>connect
  15737.  @
  15738.  @Kermit
  15739.  TOPS-20 Kermit version 4.2(262)
  15740.  
  15741.  Kermit-20>receive
  15742. 11.8. Kermit-20 Examples                                               Page 281
  15743.  
  15744. -------------------------------------------------------------------------------
  15745.  ^]C
  15746.  Kermit-MS>send *.txt
  15747.      Textual files are sent.
  15748.  
  15749.  Kermit-MS>connect
  15750.  Kermit-20>set file bytesize 8
  15751.  Kermit-20>receive
  15752.  ^]C
  15753.  Kermit-MS>send *.exe
  15754.      Binary files are sent.
  15755.  
  15756.  Kermit-MS>connect
  15757.  Kermit-20>exit
  15758.  @logout
  15759.  ^]C
  15760.  Kermit-86>exit
  15761.  A>
  15762.  
  15763.  
  15764.                                 LOCAL OPERATION
  15765.  
  15766. In this example, a program DIAL is used to direct an autodialer to call another
  15767. computer (a DECsystem-10); once the connection is made, DIAL starts Kermit with
  15768. an implicit CONNECT command for the appropriate communication line.    DIAL  is
  15769. not  part of Kermit; if your system has an autodialer, there will be some site-
  15770. specific procedure for using it.
  15771.  
  15772.  @dial
  15773.  Dial>dial stevens
  15774.  STEVENS, 1-(201) 555-1234, baud:1200
  15775.  [confirm]
  15776.  Dialing your number, please hold...
  15777.  Your party is waiting on TTY11:.
  15778.  @
  15779.  @Kermit
  15780.  TOPS-20 Kermit version 4.2(262)
  15781.  
  15782.  Kermit-20>connect 11
  15783.  [Kermit-20: Connecting over TTY11:, type <CTRL-\>C to return]
  15784.  
  15785.  CONNECTING TO HOST SYSTEM.
  15786.  Stevens T/S 7.01A(10) 20:20:04 TTY41 system 1282
  15787.  Connected to Node DN87S1(101) Line # 57
  15788.  
  15789.  Please LOGIN or ATTACH
  15790.  
  15791.  .log 10,35
  15792.  JOB 51 Stevens T/S 7.01A(10) TTY41
  15793.  Password:
  15794.  20:20   15-Dec-83       Thur
  15795.  
  15796.  .r new:Kermit
  15797.  
  15798.  TOPS-10 Kermit version 2(106)
  15799.  
  15800.  Kermit-10>server
  15801. 11.8. Kermit-20 Examples                                               Page 282
  15802.  
  15803. -------------------------------------------------------------------------------
  15804.  [Kermit Server running on the DEC host.  Please type your escape
  15805.   sequence to return to your local machine.  Shut down the server by
  15806.   typing the Kermit BYE command on your local machine.]
  15807.  ^YC
  15808.  
  15809.  [Kermit-20: Connection Closed.  Back at DEC-20.]
  15810.  
  15811.  Kermit-20>set file bytesize 8
  15812.  Kermit-20>get setdtr.cmd
  15813.  ^A for status report, ^X to cancel file, ^Z to cancel batch.
  15814.  SETDTR.CMD.7 ^A
  15815.   Receiving SETDTR.CMD.7, file bytesize 8
  15816.   (repeated character compression)
  15817.   At page 1
  15818.   Files: 0, packets: 1, chars: 66
  15819.   NAKs: 0, timeouts: 0
  15820.  .[OK]
  15821.  Kermit-20>bye
  15822.  Job 51  User F DA CRUZ [10,35]
  15823.  Logged-off TTY41  at 20:22:58  on 15-Dec-83
  15824.  Runtime: 0:00:01, KCS:33, Connect time: 0:02:39
  15825.  Disk Reads:72, Writes:4, Blocks saved:160
  15826.  ....
  15827.  Hangup? y
  15828.  Click. Call duration was 193 seconds to area 201.
  15829.  Dial>exit
  15830.  
  15831. Note the use of Control-A to get a status report during the transfer.
  15832.  
  15833.  
  15834. 11.9. Installation of Kermit-20
  15835.  
  15836. Kermit-20 is built from a single MACRO-20 source file, K20MIT.MAC.  It requires
  15837. the standard DEC-distributed tools MONSYM, MACSYM, and CMD; the following files
  15838. should be in SYS: -- MONSYM.UNV, MACSYM.UNV, MACREL.REL, CMD.UNV, and  CMD.REL.
  15839. The  CMD  package is also included with the Kermit distribution as K20CMD.*, in
  15840. case you can't find it on your system.
  15841.  
  15842. The program should work on all TOPS-20 systems as distributed,  but  many  cus-
  15843. tomizations  are possible.  The site manager may wish to change various default
  15844. parameters on a site-wide basis; this  may  be  done  simply  by  changing  the
  15845. definitions  of  the  desired symbols, under "subttl Definitions", and reassem-
  15846. bling.
  15847.  
  15848. The most notable site dependency is the definition  of  "SET  IBM".    As  dis-
  15849. tributed  from  Columbia,  Kermit-20  defines "SET IBM" in a built-in SET macro
  15850. definition as "parity mark, duplex half, handshake xon".  This  definition  may
  15851. be  found  at  MACTAB+1,  near  the  end of the impure data section.  It may be
  15852. changed or deleted, and the program reassembled.
  15853.  
  15854. Sites that do not have ARPANET may wish to delete the TVT-BINARY  entries  from
  15855. SET command tables, SETABL and SETHLP.
  15856. 12. PDP-11 Kermit                                                      Page 283
  15857.  
  15858. -------------------------------------------------------------------------------
  15859. 12. PDP-11 Kermit
  15860.  
  15861. Author:             Brian Nelson, University of Toledo, Ohio
  15862. Documentation:      Brian Nelson
  15863. Language:           Macro-11
  15864. Version:            3.58
  15865. Date:               September, 1987
  15866. Systems Supported:  RSTS/E, RSX-11M/M+, P/OS, Micro-RSX, RT-11 and TSX+
  15867.  
  15868.  
  15869. Kermit-11 Capabilities At A Glance:
  15870.  
  15871.   Local operation:                   Yes
  15872.   Remote operation:                  Yes
  15873.   Transfer text files:               Yes
  15874.   Transfer binary files:             Yes
  15875.   Wildcard send:                     Yes
  15876.   File transfer interruption:        Yes
  15877.   Filename collision avoidance:      Yes
  15878.   Can time out:                      Yes
  15879.   8th-bit prefixing:                 Yes
  15880.   Repeat count prefixing:            Yes
  15881.   Alternate block checks:            Yes
  15882.   LONG Packet protocol support:      Yes
  15883.   Sliding Windows protocol support:  No
  15884.   Terminal emulation:                Yes
  15885.   Communication settings:            Yes
  15886.   Transmit BREAK:                    Yes (depends on system)
  15887.   IBM mainframe communication:       Yes
  15888.   Transaction logging:               Yes
  15889.   Session logging:                   Yes
  15890.   Debug logging:                     Yes
  15891.   Packet logging:                    Yes
  15892.   Act as server:                     Yes
  15893.   Talk to server:                    Yes
  15894.   Advanced server functions:         Yes
  15895.   Local file management:             Yes
  15896.   Command/Init files:                Yes
  15897.   File attributes packets:           Yes
  15898.   Command macros:                    No
  15899.   Raw file transmit:                 Yes
  15900. 12. PDP-11 Kermit                                                      Page 284
  15901.  
  15902. -------------------------------------------------------------------------------
  15903. 12.1. File Systems on the PDP-11
  15904.  
  15905.  
  15906. 12.1.1. File Specifications
  15907.  
  15908. The general format of a file name is:
  15909.  
  15910. NODE::DEVICE:[DIRECTORY]NAME.TYPE;VERSION
  15911.  
  15912. 'Node'  refers  to  the  DECNET node name, for example, FUBAR::, if applicable.
  15913. 'Device', if present, refers to the physical device or logical name  where  the
  15914. file resides.
  15915.  
  15916. For  RSTS/E, 'device' can be a physical device, such as DB0: or DU1:, or it can
  15917. be a user or system logical name which may include both a physical device  name
  15918. and  a directory name.  If the device name is a logical name, is it composed of
  15919. 1 to 9 alphanumeric characters, including '$', as in DISK$ONE:, LB: and so  on.
  15920. For instance, the DCL system command
  15921.  
  15922.   $ ASS/SYS DB1:[200,210] SRC$DIR
  15923.  
  15924. would  associate  both  the  device DB1: and directory [200,210] with SRC$DIR:.
  15925. Explicitly given directories override directory names  imbedded  in  a  logical
  15926. name.  Names longer than nine characters are truncated by the executive.
  15927.  
  15928. In  the  case of RSX-11M/M+ and RT-11, the device name can be either a physical
  15929. name, such as DU0:, or a logical name which will translate to a physical device
  15930. name, such as LB:.
  15931.  
  15932. On  RSTS/E  and RSX-11M/M+, the [directory] is a UIC (user identification code)
  15933. or PPN (project,programmer) number of the format [NNN,MMM].  All users are  as-
  15934. signed a UIC (or PPN) when accounts are created, this is the number you give to
  15935. LOGIN to log into the system.  It is also your default UIC (or PPN).  Micro-Rsx
  15936. and  P/OS  may have directories in either UIC format or named directory format,
  15937. such as [1,2] or [KERMIT].  For P/OS, the  default  directory  is  [USERFILES].
  15938. Directories are not used in RT-11.
  15939.  
  15940. The  NAME field is the primary identifier for the file.  The name can be one to
  15941. nine characters for RSX-11M/M+ and P/OS, and one to six characters for  RSTS/E,
  15942. RT-11  and  TSX+.    The TYPE field is usually used to group files according to
  15943. some convention.  For example, XXX.FTN refers  to  a  Fortran-77  source  file,
  15944. FOO.C to a 'C' source file, and K11POS.TSK refers to a task image.
  15945.  
  15946. The  version field is applicable ONLY to RSX type systems.  The default version
  15947. is always the highest version number.
  15948.  
  15949. All  systems  mentioned  support  some  sort  of  filename   wildcarding,   the
  15950. flexibility  of  which  varies  by  executive.    All support the use of '*' to
  15951. represent either a fully wildcarded NAME or TYPE.  RSTS/E supports the  use  of
  15952. '?'  to  match  any single character, whereas the others use a '%' to match any
  15953. single character.  The RSTS/E Kermit server will translate '%'  to  '?'  inter-
  15954. nally  for the GET and REMOTE DIR commands (see the section on Kermit-11 server
  15955. operation).
  15956.  
  15957. Examples of wildcarded filenames:
  15958. 12.1.1. File Specifications                                            Page 285
  15959.  
  15960. -------------------------------------------------------------------------------
  15961. *.B2S           Match any file with a TYPE of B2S.
  15962.  
  15963. K11%%%.MAC      match any file starting with K11,  followed  by  one  to  three
  15964.                 characters, with a TYPE of MAC.
  15965.  
  15966. K11???.MAC      Same as above, but for RSTS/E only.
  15967.  
  15968. XYZ.*;*         All  versions  of  files  with  a  NAME  of  XYZ  with any TYPE
  15969.                 (RSX-11M/M+ and P/OS only).
  15970.  
  15971.  
  15972. 12.1.2. File Formats (Binary and Text)
  15973.  
  15974.  
  15975. 12.1.2.1. RT-11 and TSX+
  15976.  
  15977. RT-11 treats all files as a contiguous stream of characters.  There is  no  in-
  15978. formation  stored  in the directory to tell the system (or program) that a file
  15979. is readable text (source program, runoff document,...)  or consists  of  binary
  15980. data  (executable program, object file, .SYS file,...).  An application program
  15981. like Kermit-11 needs to know what type of file to expect, thus the presence  of
  15982. the  SET FILE TYPE command (discussed later).  The only real convention is that
  15983. text files are streams of seven bit data with each record terminated by a  car-
  15984. riage return/line feed character sequence and that binary files normally follow
  15985. a filename TYPE convention.  The TYPE (.SAV, .SYS, ...) is what Kermit-11  will
  15986. look at to decide if a file should be sent as a text or binary file.
  15987.  
  15988.  
  15989. 12.1.2.2. RSTS/E, P/OS and RSX-11M/M+
  15990.  
  15991. These  systems  can provide for a large number of file attributes for each file
  15992. by using either FCS11 (RSX-11M/M+) or RMS11 (all).   Text  files  are  normally
  15993. considered  to  be  either STREAM format (FB$STM) or VARIABLE with implied car-
  15994. riage control (FB$VAR and FB$CR).  RSTS/E has historically defaulted to STREAM,
  15995. whereas  the  RSX based systems use VARIABLE.  Kermit-11 follows those defaults
  15996. when creating files unless told to do so otherwise by the presence of attribute
  15997. data.    The  conversion of the internal data representation to one that can be
  15998. transmitted to another Kermit is transparent for these types of  files.    Both
  15999. the  file  attributes and the filename TYPE are examined by Kermit-11 to deter-
  16000. mine if a file needs to be sent as a text file (default) or a binary file.  Ad-
  16001. ditionally,  on  RSTS/E  Kermit  checks the file protection code, as one of the
  16002. bits in it is used to flag an executable file (bit 6).
  16003.  
  16004. In all cases, unless (at this time) Kermit-11 is talking to another  Kermit-11,
  16005. or  if  Kermit-11  can't tell if a file is consists of binary data, the command
  16006. SET FILE TYPE FIXED must be used to force  Kermit  to  either  send  or  get  a
  16007. non-text file correctly.  When Kermit-11 is running in binary mode, all data is
  16008. read from (or written to) the file without any translation or  internal  record
  16009. control  information.   Any attribute information in the file's directory entry
  16010. is ignored and the data read (or written) in 512 byte unformatted blocks.  Thus
  16011. it  is indeed possible to transfer files like task images and object libraries.
  16012. Since Kermit-11 supports a subset of a protocol  feature  called  'attributes',
  16013. two Kermit-11's connected together can also correctly transfer files other than
  16014. simple text and unformatted binary files,  such  as  RMS  indexed  or  relative
  16015. files.
  16016. 12.1.3. Saving Files on the PDP-11 From Your Microcomputer             Page 286
  16017.  
  16018. -------------------------------------------------------------------------------
  16019. 12.1.3. Saving Files on the PDP-11 From Your Microcomputer
  16020.  
  16021. You  can  send textual files to Kermit-11 without any special considerations as
  16022. Kermit-11 defaults to creating normal text files.  However, if you are  sending
  16023. a  binary file (perhaps an .EXE) from say, your Rainbow under MS-DOS, you would
  16024. need to tell Kermit-11 to expect binary data.  This is done with the  Kermit-11
  16025. command  SET  FILE TYPE FIXED.  This will force Kermit-11 to write the data out
  16026. exactly as it comes, in 512 byte unformatted records.  Sending  the  same  file
  16027. back  to the Rainbow would not require any special action since the file, as it
  16028. sits on the PDP-11, has the proper information in the directory entry  to  tell
  16029. Kermit-11  that the file is binary.  As a note, for RT-11 you would need to use
  16030. a filetype that is normally considered 'binary' like .SAV or  .OBJ  (see  above
  16031. notes for RT-11).
  16032.  
  16033. Never  try  to  do  a wildcarded send with mixed binary and text files with the
  16034. file type set to FIXED.  The result could be unusable as not all systems  store
  16035. text  data  in  the  same internal format.  For example, if Kermit-11 is forced
  16036. into binary mode (via SET FIL TYP FIX) and is requested to send a file with im-
  16037. plied  carriage control (normal for RSX text files), it will actually send, for
  16038. each line, two bytes representing the record length, followed by the  data  and
  16039. then  followed by a ASCII NUL to pad the record to an even length.  That is not
  16040. incorrect, rather, it is EXACTLY how the data was stored on disk.
  16041.  
  16042. In general, avoid sending anything other than unformatted binary files and text
  16043. file  to  unlike  systems.  For example, requesting a RMS indexed file from the
  16044. PDP-11 to be sent to a PC would case Kermit-11 to send it as a binary file, but
  16045. the  file  attributes  would  be  lost.  Sending such a file back to the PDP-11
  16046. would result in an unusable file unless you could reconstruct the attribute in-
  16047. formation.
  16048.  
  16049.  
  16050. 12.1.4. Program Operation
  16051.  
  16052. Kermit-11's  prompt  is  normally "Kermit-11>".  This can be changed if need be
  16053. via the SET PROMPT command.  Invoking Kermit-11 is very site dependent.
  16054.  
  16055.  
  16056. 12.1.4.1. RSTS/E
  16057.  
  16058. If Kermit-11 has a ccl definition, it would  likely  be  invoked  as  "KER"  or
  16059. "KERMIT".  If not, try "RUN $KERMIT", as this is a likely place where Kermit-11
  16060. may have been put.  Otherwise consult your local support staff.
  16061.  
  16062.  
  16063. 12.1.4.2. RSX-11M/M+
  16064.  
  16065. If Kermit-11 has been installed, it most likely will have a task name of ...KER
  16066. which  means that typing "KER" should get things running.  If not, consult your
  16067. local support staff.
  16068. 12.1.4.3. RT-11/TSX+                                                   Page 287
  16069.  
  16070. -------------------------------------------------------------------------------
  16071. 12.1.4.3. RT-11/TSX+
  16072.  
  16073. On version 5 of RT-11, programs can be  run  simply  by  typing  the  filename.
  16074. Thus,  if  there is a file SY:KERMIT.SAV, simply type "KERMIT".  If this fails,
  16075. contact your local support staff for assistance.
  16076.  
  16077.  
  16078. 12.1.4.4. P/OS
  16079.  
  16080. Kermit-11 is generally run from DCL on P/OS.  The program is  invoked  via  the
  16081. DCL RUN command, as in RUN K11POS or RUN KERMIT, depending on what the task im-
  16082. age name is.
  16083.  
  16084. Note that for the case where Kermit is installed (for  RSTS/E  and  RSX-11M/M+)
  16085. that Kermit-11 can get command line arguments, as in:
  16086.  
  16087.   $ KER SERV               Kermit starts as a server.
  16088.   > KER send fubar.txt     Kermit sends the file.
  16089.  
  16090. Otherwise, the program is run interactively from the Kermit-11> prompt:
  16091.  
  16092.   $ KERMIT
  16093.   Kermit-11 V3.54
  16094.   Kermit-11>SET BLO 3      Changes checksum type.
  16095.   Kermit-11>SER            Enter Kermit server.
  16096.  
  16097. Note  that  whenever  Kermit-11  starts  up,  it will always try to find a file
  16098. called KERMIT.INI in your current directory.  This file can contain  any  valid
  16099. Kermit  command, though the usual use of this is to place various Kermit-11 SET
  16100. commands in it.  If this file does NOT  exist,  it  will  try  to  find  it  in
  16101. LB:[1,2]KERMIT.INI  (excluding  RT-11).  In addition to the .INI file, commands
  16102. may be placed in a file and then executed via the Kermit-11 TAKE  (or  @)  com-
  16103. mand.
  16104.  
  16105.  
  16106. 12.2. Local and Remote Operation
  16107.  
  16108. Kermit-11  by  default assumes that all file transfers will occur over the ter-
  16109. minal line that you are currently logged in on (TI:, TT:, KB:).  This is  known
  16110. as  REMOTE  mode  (the PDP-11 is the remote system).  This would be the desired
  16111. case if you are running Kermit on a microcomputer such as  a  Rainbow  and  are
  16112. currently  logged into the PDP-11 through the micro.  However, if you wanted to
  16113. dial out, say by an autodial modem, from the PDP-11 to another system, you need
  16114. to  tell Kermit-11 to use some other terminal line.  This would be called LOCAL
  16115. mode (the PDP-11 is the local system).  The line can be altered  with  the  SET
  16116. LINE  command (see section on SET and CONNECT).  A SET LINE command is done im-
  16117. plicitly if Kermit-11 finds itself running on a  PRO/350,  under  either  P/OS,
  16118. RT-11 or TSX+.
  16119.  
  16120. Since  support  of  parity  varies by both interface type (DL11 vs DZ11) and by
  16121. operating system, Kermit-11 makes NO attempt  to  find  out  what  the  current
  16122. parity  of it's line is.  Kermit-11 generates it's own parity which is set with
  16123. the SET PARITY command.
  16124.  
  16125. There are a couple of things to point out regarding Kermit-11  and  LOCAL  mode
  16126. (you did a SET LINE command):
  16127. 12.2. Local and Remote Operation                                       Page 288
  16128.  
  16129. -------------------------------------------------------------------------------
  16130.    - The  system  manager may have lines other than your own protected (or
  16131.      owned by the system).  On RSTS/E lines are  often  made  unaccessible
  16132.      unless   your   account   possesses  the  needed  privilege(s).    On
  16133.      RSX-11M/M+, privilege is required to alter settings on any other ter-
  16134.      minal  line.   You may have to talk to your system manager to get ac-
  16135.      cess to an outgoing terminal line.
  16136.  
  16137.    - Once connected to a modem through another line, a  means  must  exist
  16138.      for the connection to be broken (if the host you are calling won't do
  16139.      it).  Given that your line has full or partial modem control  (DZV11,
  16140.      DZ11,  DH11,  DHU/V11)  the RSX, RT-11/TSX+ and RSTS/E Kermits have a
  16141.      HANGUP (or DISCONNECT) command, which instructs the system to discon-
  16142.      nect  the modem.  Unless this is done, you never get disconnected and
  16143.      could run up a tidy phone bill.
  16144.  
  16145. Kermit-11 has, as of v3.53, a rudimentary command line editor.  You can  recall
  16146. previous commands with the UP-Arrow key, and exit the command with the LEFT and
  16147. RIGHT arrow keys.  The RUBOUT key, of course,  deletes  characters,  while  the
  16148. Control-R  key  retypes  the  line.  Control-E moves to the end of the line and
  16149. Control-H moves to the start of the line.
  16150.  
  16151.  
  16152. 12.3. Kermit-11 Commands
  16153.  
  16154. Kermit-11 has the following commands available:
  16155.  
  16156.  @             Synonym for TAKE
  16157.  BYE           Logout a remote server
  16158.  CONNECT       Connect to a remote system
  16159.  COPY          Local copy of a file(s)
  16160.  CWD           Set new working directory
  16161.  DELETE        Local delete of a file(s)
  16162.  DIAL          Have a connected modem dial a number
  16163.  DIRECT        Local directory display
  16164.  DISCONNECT    Hangup a remote line
  16165.  DISPLAY       Internal debugging
  16166.  ERASE         Local delete of a file(s)
  16167.  EXIT          Exit to system
  16168.  FINISH        Stop a remote server without logging out
  16169.  GET           Get a file(s) from a remote server
  16170.  HANGUP        Hangup a remote line
  16171.  HOST          Execute system command locally (where applicable)
  16172.  LOCAL         Force interpretation of command to the local system
  16173.  LOGFILE       Create a log file
  16174.  QUIT          Same as EXIT
  16175.  PRINT         Print a file locally (where applicable)
  16176.  RECEIVE       Receive a file(s) from a remote kermit
  16177.  REMOTE        Prefix for file management commands to a server
  16178.  RENAME        Local rename of filename(s)
  16179.  SEND          Send a file(s) to a remote Kermit
  16180.  SERVER        start a Kermit server
  16181.  SET           Change Kermit parameters
  16182.  SHOW          Display Kermit parameters
  16183.  TAKE          Execute indirect command file
  16184.  TYPE          Local display of file on terminal
  16185.  WHO           Local display of logged in users (RSTS/E only)
  16186. 12.4. Commands for File Transfer                                       Page 289
  16187.  
  16188. -------------------------------------------------------------------------------
  16189. 12.4. Commands for File Transfer
  16190.  
  16191. Kermit-11 includes the standard repertoire of Kermit  file  transfer  commands,
  16192. including SEND, RECEIVE, and GET.
  16193.  
  16194.  
  16195.                                THE SEND COMMAND
  16196.  
  16197. Syntax:  SEND filespec
  16198.  
  16199. The  SEND command causes a file or file group to be sent from the PDP-11 to the
  16200. other system.  If filespec contains wildcard characters then all matching files
  16201. will be sent, in alphabetical order (according to the ASCII collating sequence)
  16202. by name.  If filespec does not contain any wildcard characters, then the single
  16203. file specified by filespec will be sent.
  16204.  
  16205.  
  16206.     SEND Command General Operation
  16207.  
  16208. :
  16209.  
  16210. Files will be sent with their PDP-11 file name and type (for instance FOO.BAR).
  16211. Each file will be sent according to the record type and attributes recorded  in
  16212. its  file descriptor.  Kermit-11 attempts to translate all formats of text file
  16213. to a format usable on any system.  Note that there is no need to set  the  FILE
  16214. TYPE  parameter  for sending files, since Kermit-11 always uses the information
  16215. from the file directory entry and the filetype (extension) to determine how  to
  16216. send the file.
  16217.  
  16218. If communication line parity is being used (see SET PARITY), Kermit-11 will re-
  16219. quest that the other Kermit use a special kind of prefix  notation  for  binary
  16220. files.   This is an advanced feature, and not all Kermits have it; if the other
  16221. Kermit does not agree to use this feature, binary files  cannot  be  sent  cor-
  16222. rectly.   This includes executable programs (like .EXE files, CP/M .COM files),
  16223. relocatable object modules (.OBJ files), as well as any  text  file  containing
  16224. characters with the eighth bit on.
  16225.  
  16226. Kermit-11 will also ask the other Kermit whether it can handle a special prefix
  16227. encoding for repeated characters.  If it can, then files with long  strings  of
  16228. repeated  characters  will  be  transmitted  very  efficiently.  Columnar data,
  16229. highly indented text, and binary files are  the  major  beneficiaries  of  this
  16230. technique.
  16231.  
  16232. If  you're running Kermit-11 locally, for instance dialing out from a PDP-11 to
  16233. another system using an autodialer, you should have already run Kermit  on  the
  16234. remote  system  and issued either a RECEIVE or a SERVER command.  Once you give
  16235. Kermit-11 the SEND command, the name of each file will  be  displayed  on  your
  16236. screen as the transfer begins.  As the transfer continues, you will get a small
  16237. display of the packet count along with the number of packets rejected.  See the
  16238. SET  TERMINAL  and SET UPDATE commands for more information.  You may also type
  16239. Control-X or Control-Z to interrupt the current file or file group.   Control-E
  16240. will also abort the transfer by sending an 'error' packet to the other Kermit.
  16241. 12.4. Commands for File Transfer                                       Page 290
  16242.  
  16243. -------------------------------------------------------------------------------
  16244.                               THE RECEIVE COMMAND
  16245.  
  16246. Syntax:  RECEIVE [filespec]
  16247.  
  16248. The  RECEIVE  command  tells Kermit-11 to receive a file or file group from the
  16249. other system.  The name is taken from the incoming file header.  If an incoming
  16250. file  has the same name as an existing file, Kermit-11 will by default create a
  16251. new file.  On RT-11 and RSTS/E, the old file will be deleted by the  executive.
  16252. On  RSX-11M/M+  and  P/OS,  a  new  file  with  a higher version number will be
  16253. created.  To avoid files being superceded, see the SET FILE [NO]SUPERCEDE  com-
  16254. mand.
  16255.  
  16256. Incoming  files  will  all  be  stored  with the prevailing file type, ASCII by
  16257. default, which is appropriate for text files.  If you are asking  Kermit-11  to
  16258. receive binary files from a microcomputer or other 8-bit system, you must first
  16259. type SET FILE TYPE FIXED.  Otherwise, an error may  occur  when  receiving  the
  16260. file.  Please note that this does NOT apply to two Kermit-11 programs connected
  16261. to each other.  In that case the sending  Kermit-11  will  tell  the  receiving
  16262. Kermit-11 to switch to binary mode if need be.
  16263.  
  16264. If parity is being used on the communications line, then 8th-bit prefixing will
  16265. be requested.  If the other side cannot do this, binary files cannot be  trans-
  16266. ferred correctly.
  16267.  
  16268. If  you  are  running  Kermit-11 locally, you should already have issued a SEND
  16269. command to the remote Kermit, and then escaped back to Kermit-11.  As files ar-
  16270. rive, their names will be displayed on your screen.
  16271.  
  16272. If  a  file arrives that you don't really want, you can attempt to cancel it by
  16273. typing Control-X; this sends a cancellation request to the remote Kermit.    If
  16274. the  remote  Kermit understands this request (not all implementations of Kermit
  16275. support this feature), it will comply; otherwise it will continue to send.   If
  16276. a  file  group  is being sent, you can request the entire group be cancelled by
  16277. typing Control-Z.
  16278.  
  16279. Normally, one runs the remote Kermit as a SERVER, thus the RECEIVE  command  is
  16280. never used, rather, the GET command, described next, is used.
  16281.  
  16282.  
  16283.                                 THE GET COMMAND
  16284.  
  16285. Syntax:  GET [remote-filespec]
  16286.  
  16287. The  GET command requests a remote Kermit server to send the file or file group
  16288. specified by remote-filespec.  This command can be used only when Kermit-11  is
  16289. local, with a Kermit server on the other end of the line specified by SET LINE.
  16290. This means that you must have CONNECTed to the other  system,  logged  in,  run
  16291. Kermit there, issued the SERVER command, and escaped back to the PDP-11.
  16292.  
  16293. The  remote  filespec  is any string that can be a legal file specification for
  16294. the remote system; it is not parsed or validated locally.  Any  leading  spaces
  16295. before  the  remote filespec are stripped, and lower case characters are raised
  16296. to upper case.
  16297.  
  16298. As files arrive, their names will be displayed on  your  screen.    As  in  the
  16299. RECEIVE  command,  Control-X  (^X) to request that the current incoming file be
  16300. 12.4. Commands for File Transfer                                       Page 291
  16301.  
  16302. -------------------------------------------------------------------------------
  16303. ancelled, ^Z to request that the entire incoming batch be cancelled.
  16304.  
  16305. If the remote Kermit is not capable of server functions, then you will probably
  16306. get  an  error  message back from it like "Illegal packet type".  In this case,
  16307. you must connect to the other Kermit, give a SEND  command,  escape  back,  and
  16308. give a RECEIVE command.
  16309.  
  16310.  
  16311. 12.4.1. Server Operation
  16312.  
  16313. The  SERVER  command  puts  a  remote  Kermit-11  in  "server mode", so that it
  16314. receives all further commands in packets from the local Kermit.  The  Kermit-11
  16315. server is capable (as of this writing) of executing the following remote server
  16316. commands: SEND, GET, FINISH, BYE, REMOTE DIRECTORY, REMOTE CWD,  REMOTE  SPACE,
  16317. REMOTE  DELETE,  REMOTE  TYPE,  REMOTE HELP, REMOTE COPY, REMOTE RENAME, REMOTE
  16318. WHO, REMOTE LOGIN and REMOTE HOST.
  16319.  
  16320. Any nonstandard parameters should be selected with SET commands before  putting
  16321. Kermit-11  into server mode, in particular the file type.  The Kermit-11 server
  16322. can send all files in the correct manner automatically.  As noted before, if  a
  16323. Kermit-11  is  talking  to  another Kermit-11, they will negotiate any 'binary'
  16324. parameters automatically.  However, if this is NOT the case and you need to ask
  16325. Kermit-11  to receive binary files you must issue the SET FILE TYPE FIX command
  16326. before putting it into server mode, and then you must only send  binary  files.
  16327. You  cannot  send a mixture of text files and 8-bit binary files to a Kermit-11
  16328. server unless the files are not for use on the PDP-11.
  16329.  
  16330.  
  16331. 12.4.2. Commands for Servers
  16332.  
  16333. When running in local mode, Kermit-11 allows you to give a wide range  of  com-
  16334. mands  to  a remote Kermit server, with no guarantee the that the remote server
  16335. can process them, since they are all optional features of the protocol.    Com-
  16336. mands for servers include the standard SEND, GET, BYE, FINISH commands, as well
  16337. as the REMOTE command.
  16338.  
  16339.  
  16340.                                 THE BYE COMMAND
  16341.  
  16342. The BYE command tells a remote server to log out of the remote system.  In  ad-
  16343. dition,  some remote systems will also disconnect the line for you.  If this is
  16344. not the case, the DISCONNECT command will (depending on your  interface)  cause
  16345. the line to be dropped.  See DISCONNECT.
  16346.  
  16347.  
  16348.                               THE FINISH COMMAND
  16349.  
  16350. The  FINISH  command tells the remote Kermit server to exit without logging out
  16351. of the remote system.  You can then CONNECT back to the Server  operation  sys-
  16352. tem.
  16353. 12.4.2. Commands for Servers                                           Page 292
  16354.  
  16355. -------------------------------------------------------------------------------
  16356.                               THE REMOTE COMMAND
  16357.  
  16358. Send the specified command to the remote server.  If the server does not under-
  16359. stand the command (all of these commands are optional features  of  the  Kermit
  16360. protocol),  it  will reply with a message like "Unknown Kermit server command".
  16361. If does understand, it will send the results back, and they will  be  displayed
  16362. on the screen.  The REMOTE commands are:
  16363.  
  16364. REMOTE COPY filespec newfilespec
  16365.                 Copy file.  The server is asked to make a copy of the specified
  16366.                 file.    Both  filespecs  must be in the correct format for the
  16367.                 remote system.  Kermit-11 does not parse or validate  the  file
  16368.                 specifications.   Any leading spaces will be stripped and lower
  16369.                 case characters converted to upper case.  Note that  this  com-
  16370.                 mand  simply  provides  for  copying a file within the server's
  16371.                 system - it does not cause a file to be transferred.
  16372.  
  16373. REMOTE CWD directory
  16374.                 Change  Working  Directory.   If no directory name is provided,
  16375.                 the server will  change  to  the  default  or  home  directory.
  16376.                 Kermit-11 currently does not ask for a password.
  16377.  
  16378. REMOTE DELETE filespec
  16379.                 Delete the specified file or files.  The  names  of  the  files
  16380.                 that are deleted will appear on your screen.
  16381.  
  16382. REMOTE DIRECTORY [filespec]
  16383.                 The names of the files that match the given file  specification
  16384.                 will  be  displayed on your screen, perhaps along with size and
  16385.                 date information for each file.  If no  file  specification  is
  16386.                 given, all files from the current directory will be listed.
  16387.  
  16388. REMOTE HELP     The remote server will send back a list of server commands that
  16389.                 it can execute.
  16390.  
  16391. REMOTE HOST command
  16392.                 Pass  the given command to the server's host command processor,
  16393.                 and display the resulting output on your screen.  Not all  Ker-
  16394.                 mit  servers  can  do this function.  In the case of Kermit-11,
  16395.                 only the RSTS/E Kermit-11 server can execute  the  REMOTE  HOST
  16396.                 command.
  16397.  
  16398. REMOTE LOGIN user password
  16399.                 Ask a remote server to log into a different  account  or  user-
  16400.                 name.    The  support for this command is rarely implemented as
  16401.                 many systems layer login/logout support over the executive.   A
  16402.                 Kermit-11  server  can only support this on RSTS/E, and at that
  16403.                 only for version 9.0 or later.    Of  the  various  DEC  PDP-11
  16404.                 operating  systems,  only RSTS/E has the support for logging in
  16405.                 and out built into the executive  and  accessible  with  direc-
  16406.                 tives.
  16407.  
  16408. REMOTE RENAME oldfile newfile
  16409.                 Change the name on the specified file (or files).    Both  file
  16410.                 specifications must be valid for the server's system.
  16411. 12.4.2. Commands for Servers                                           Page 293
  16412.  
  16413. -------------------------------------------------------------------------------
  16414. REMOTE SPACE    Display information about disk usage in the current directory.
  16415.  
  16416. REMOTE TYPE filespec
  16417.                 Display the contents of the specified file on your screen.
  16418.  
  16419. REMOTE WHO      Display current status of user's logged in.
  16420.  
  16421.  
  16422. 12.5. Commands for Local File Management
  16423.  
  16424. These commands provide some local file management capability without having  to
  16425. leave  the  Kermit-11  program.   These commands are very similar to the REMOTE
  16426. commands in function and syntax.  They are all executed locally, and are avail-
  16427. able when Kermit-11 is either local or remote.  The arguments to these commands
  16428. are the same as the arguments expected from the user Kermit when  Kermit-11  is
  16429. processing  a  command  in  server  mode.   Additionally, these commands can be
  16430. prefixed by the LOCAL keyword.
  16431.  
  16432. COPY filespec newfilespec
  16433. CWD directory
  16434. DELETE filespec
  16435. DIRECTORY [filespec]
  16436. HELP
  16437. HOST command
  16438. RENAME oldfile newfile
  16439. SPACE
  16440. TYPE filespec
  16441. WHO
  16442.  
  16443.  
  16444. 12.5.1. The CONNECT Command
  16445.  
  16446. The CONNECT command will allow you to connect in as a terminal  over  the  line
  16447. that  was specified by the SET LINE command.  (Using the CONNECT command before
  16448. using the SET LINE command will result in an error message.)  The terminal line
  16449. must be one which is accessible to the user.
  16450.  
  16451. The  distributed RSX-11M/M+ task has been built with the /PR:0 switch to enable
  16452. the task to change other terminal settings.  Additionally, for RSX-11M/M+,  the
  16453. MCR command SET /SLAVE=TTnn: should be done before entering Kermit-11.
  16454.  
  16455. If  you  are  running K11POS.TSK on a PRO/350, Kermit will set the line to XK0:
  16456. and the speed to 9600 by default.
  16457.  
  16458. Please note that Kermit-11 CAN NOT change the speed of a DL11  type  interface,
  16459. nor can it change the speed of a PDT-150 modem port (use SPEED.SAV).
  16460.  
  16461. The  following  is an example of using a Racal-Vadic VA212 autodialing modem to
  16462. log into a remote TOPS-20 system.  There is one point  at  which  there  is  no
  16463. echoing  of  the  user input, this is following the typing of the local 'escape
  16464. sequence', which by default is Control-\ followed by a 'c'.  The  control-back-
  16465. slash  informs  the terminal emulator that the next character is a command.  In
  16466. this case, the command was 'C', which means to return to the local PDP-11  sys-
  16467. tem.    Control-\  followed  by ? would print a help message.  All the commands
  16468. prior to the DIAL command were contained in the INI file, KERMIT.INI.
  16469. 12.5.1. The CONNECT Command                                            Page 294
  16470.  
  16471. -------------------------------------------------------------------------------
  16472.   $ kermit
  16473.   Kermit-11 V3.46 Last edit: 21-Feb-1986
  16474.   Kermit-11>set modem vadic
  16475.   Kermit-11>set pho num cu 9K12121234567
  16476.   Kermit-11>set logfile 20.log
  16477.   Kermit-11>set deb console
  16478.   Kermit-11>set lin tt58:
  16479.   Link: TT58: Speed: 9600, DTR not present
  16480.   Kermit-11>set dtr
  16481.   Kermit-11>set spe 1200
  16482.   Kermit-11>dial cu
  16483.   Using: 9K12121234567
  16484.   Connection established, type CONNECT to access remote
  16485.   Kermit-11>connect
  16486.  
  16487.   enter class 4
  16488.   class 004 start
  16489.  
  16490.   CU20B
  16491.   @log xx.abcdef
  16492.    CU20B, TOPS-20 Monitor 5.1(5101)-2
  16493.    Job 28, TTY32, 2-Apr-84 4:15:24PM
  16494.    Previous login was 2-Apr-84 4:10:16PM
  16495.           .
  16496.           .
  16497.   @logout
  16498.   [Confirm]
  16499.   Logged out Job 28, User XX.ABCDEF , TTY 32,
  16500.     at  2-Apr-84 16:19:34,  Used 0:00:11 in 0:04:10
  16501.  
  16502.   Kermit-11>disc
  16503.   KERMIT link TT58: disconnected
  16504.   Kermit-11>exit
  16505.  
  16506.   $ logout
  16507.  
  16508.  
  16509. 12.6. The SET Command
  16510.  
  16511. Syntax: SET parameter keyword
  16512.  
  16513. The SET command is used to set various parameters in Kermit.  The format of the
  16514. SET command is:
  16515.  
  16516.  
  16517. SET ATTRIBUTES
  16518.  
  16519. Syntax: SET ATTRIBUTES {ON, OFF}
  16520.  
  16521. Part  of the Kermit protocol is the support of file attributes.  Connected Ker-
  16522. mits that support this can send information to  each  other  about  file  size,
  16523. time/date of creation, RMS file headers and other useful things.  Due to poten-
  16524. tial problems with incompatible implementations this feature can  be  disabled.
  16525. In  this  case,  the  sending Kermit-11 will never try to send file attributes,
  16526. even though the receiver may have indicated that it supports this.
  16527. 12.6. The SET Command                                                  Page 295
  16528.  
  16529. -------------------------------------------------------------------------------
  16530. SET BAUD
  16531.  
  16532. This is the same as SET SPEED.  See HELP SET SPEED
  16533.  
  16534.  
  16535. SET BINARY-TYPE
  16536.  
  16537. Kermit-11 has a default list of filetypes that are scanned to decide if a  file
  16538. should  be sent in binary mode in addition to checking file attributes for RSX,
  16539. P/OS and RSTS/E.  The user can, however, override this list with the this  com-
  16540. mand.    The default list is fairly inclusive, with types such as .SAV and .TSK
  16541. forcing Kermit-11 into binary transmission.  See HELP SET FIL for  the  default
  16542. list.  Examples:
  16543.  
  16544.   Kermit-11> set binary-type .sav
  16545.   Kermit-11> set bin .exe
  16546.  
  16547.  
  16548. SET BLOCK-CHECK
  16549.  
  16550. Syntax: SET BLOCK_CHECK {1, 2, 3}
  16551.  
  16552. The  SET BLOCKCHECK command is used to determine the block check sequence which
  16553. will be used during transmission.  The block check sequence is used  to  detect
  16554. transmission  errors.    There are three types of block check available.  These
  16555. are the single character checksum (default), the two  character  checksum,  and
  16556. the  three  character CRC (cyclic redundancy check).  This command does not en-
  16557. sure that the desired type of block check will be used, since both Kermit's in-
  16558. volved  in the transfer must agree on the block check type.  Kermit-11 will re-
  16559. quest that the type of block check set by this command be used for a  transfer.
  16560. If  the other Kermit has also had the same block check type requested, then the
  16561. desired block check type will be used.  Otherwise, the single character  check-
  16562. sum will be used.  The command should be given to BOTH Kermits since Kermit-11,
  16563. when in server mode, has no say about what kind of checksum it  wants  to  use.
  16564. (See Kermit protocol manual for more information.)
  16565.  
  16566.  
  16567. SET CONSOLE
  16568.  
  16569. Syntax: SET CONSOLE {7, 8}
  16570.  
  16571. The SET CONSOLE command is used under P/OS to control the passing of 8 bit data
  16572. to the terminal during the connect command.  If you are  getting  multinational
  16573. characters  being  printed, this is a very useful thing to set.  The default is
  16574. SET CON 7.
  16575.  
  16576.  
  16577. SET DEBUG
  16578.  
  16579. Syntax: SET DEBUG {ALL, CONSOLE, CONNECT, FILE, PACKET, STATE}
  16580.  
  16581. The SET DEBUG command is used to specify the type and level of debugging  to  a
  16582. disk file .  This disk file must have been created by the SET LOGFILE command.
  16583. 12.6. The SET Command                                                  Page 296
  16584.  
  16585. -------------------------------------------------------------------------------
  16586.     SET DEBUG ALL
  16587.  
  16588. SET DEBUG ALL will turn on logging for CONSOLE,CONNECT,FILE,PACKET and STATE to
  16589. the disk file specified by SET LOGFILE.  This command is the same as SET  DEBUG
  16590. ON.  The command format is:
  16591.  
  16592.  
  16593.     SET DEBUG CONSOLE
  16594.  
  16595. SET  DEBUG  CONSOLE will turn on logging for all i/o during a remote connect to
  16596. the disk file specified by SET LOGFILE.  This command is the same as SET  DEBUG
  16597. CONNECT.
  16598.  
  16599.  
  16600.     SET DEBUG CONNECT
  16601.  
  16602. SET  DEBUG  CONNECT will turn on logging for all i/o during a remote connect to
  16603. the disk file specified by SET LOGFILE.  This command is the same as SET  DEBUG
  16604. CONSOLE.
  16605.  
  16606.  
  16607.     SET DEBUG FILE
  16608.  
  16609. SET DEBUG FILE will log all file 'opens' and 'creates' to the file specified by
  16610. SET LOGFILE.
  16611.  
  16612.  
  16613.     SET DEBUG HELP
  16614.  
  16615. SET DEBUG HELP gives the user a list of all qualifiers which can be  used  with
  16616. SET DEBUG.
  16617.  
  16618.  
  16619.     SET DEBUG NONE
  16620.  
  16621. SET  DEBUG  NONE  'turns off' all debugging.  This is the same as the SET DEBUG
  16622. OFF command.
  16623.  
  16624.  
  16625.     SET DEBUG OFF
  16626.  
  16627. SET DEBUG OFF 'turns off' all debugging.  This is the same  as  the  SET  DEBUG
  16628. NONE command.
  16629.  
  16630.  
  16631.     SET DEBUG ON
  16632.  
  16633. SET  DEBUG  ON will 'turn on' logging for CONSOLE,CONNECT,FILE,PACKET and STATE
  16634. to the disk file specified by SET LOGFILE.  This command is  the  same  as  SET
  16635. DEBUG ALL.
  16636. 12.6. The SET Command                                                  Page 297
  16637.  
  16638. -------------------------------------------------------------------------------
  16639.     SET DEBUG PACKET
  16640.  
  16641. SET  DEBUG PACKET will 'turn on' logging of all receive and transmit packets to
  16642. the disk file specified by SET LOGFILE.
  16643.  
  16644.  
  16645.     SET DEBUG STATE
  16646.  
  16647. SET DEBUG STATE will turn on logging of  all  internal  Kermit-11  state  tran-
  16648. sitions.
  16649.  
  16650.  
  16651.                                    SET DELAY
  16652.  
  16653. Syntax: SET DELAY seconds
  16654.  
  16655. The  DELAY parameter is the number of seconds to wait before sending data after
  16656. a SEND command is given.  This is used when Kermit-11 is running in remote mode
  16657. to  allow  the  user time to escape back to the other Kermit and give a RECEIVE
  16658. command.
  16659.  
  16660.  
  16661.                                   SET DEFAULT
  16662.  
  16663. Syntax: SET DEFAULT device
  16664.  
  16665. The DEFAULT parameter allows you to specify a device and UIC (or PPN)  for  all
  16666. subsequent  file  opens  (for SENDING) and file creates (for RECEIVING).  It is
  16667. disabled by typing SET HOME.  Example:
  16668.  
  16669.   Kermit-11>set default db2:[200,201]
  16670.  
  16671. This is quite useful for Kermit-11 running on a DECNET link, as you can set the
  16672. default for file operations to include node names and passwords as in:
  16673.  
  16674.   Kermit-11>set def orion::sys$system:[fubar]
  16675.  
  16676.  
  16677.                                    SET DIAL
  16678.  
  16679. Kermit-11  has  knowledge built in to it of a number of the more common 'smart'
  16680. autodial modems.  To find out if your modem is directly supported try the  com-
  16681. mand SET MODEM ?.  If your modem is not in this list then you need the SET DIAL
  16682. command to generate the data base used by Kermit to control the modem.   Kermit
  16683. uses  this  information  to implement the DIAL command.  A command such as DIAL
  16684. can only be done when Kermit knows both how to format commands  to  the  modem,
  16685. and  what  kind  of text the modem will send back to it in response.  As an ex-
  16686. ample, the VADIC VA212PA modem is awakened from an idle state by the  character
  16687. sequence 05 015 (in octal), which is a Control-E followed by a carriage return.
  16688. In response to this two-character string, the modem responds with:
  16689.  
  16690.   HELLO: I'M READY
  16691.   *
  16692.  
  16693. Thus Kermit has to know that when it sends the wakeup sequence it needs to wait
  16694. for  the asterisk to be sent back by the modem.  At this point Kermit will know
  16695. 12.6. The SET Command                                                  Page 298
  16696.  
  16697. -------------------------------------------------------------------------------
  16698. that the modem is in a state awaiting further commands, such as that to dial  a
  16699. phone number.
  16700.  
  16701. It  is  not  possible for Kermit to have knowledge of all makes of modems.  In-
  16702. stead Kermit supports a command, SET MODEM USER_DEFINED, which then allows  you
  16703. to  use the SET DIAL command to inform Kermit how the modem works.  Once Kermit
  16704. knows how to control the modem, you can use the DIAL command to initiate a call
  16705. from Kermit.
  16706.  
  16707. The SET DIAL commands are:
  16708.  
  16709. SET DIAL WAKEUP               Define the wakeup string
  16710. SET DIAL PROMPT               Define the prompt the modem uses
  16711. SET DIAL INITIATE             Define a string to start dialing
  16712. SET DIAL CONFIRM              Define the string to confirm number
  16713. SET DIAL FORMAT               Define the number formatting string
  16714. SET DIAL SUCCESS              Define string(s) for call complete
  16715. SET DIAL INFO                 Define string(s) for informative text
  16716. SET DIAL FAILURE              Define string(s) for call failure
  16717. SET DIAL CONFIRM              Define string for number confirmation
  16718. SET DIAL WAKE_RATE            Set pause time between wakeup characters
  16719. SET DIAL DIAL_RATE            Set pause time between number digits
  16720. SET DIAL DIAL_PAUSE           Define string for dial tone pause
  16721.  
  16722. Suppose  we  had  to tell Kermit about the Racal Vadic VA212PA modem (though in
  16723. reality Kermit already knows about that kind).  In checking the  owners  manual
  16724. for it, we find that:
  16725.  
  16726.    - To  wake  the  modem  up,  we type a control E followed by a carriage
  16727.      return.
  16728.  
  16729.    - To dial a number, we type the letter D followed by a carriage return.
  16730.      At  this  point, the modem prints a NUMBER?  prompt, we then type the
  16731.      desired number in.  It reprints the number and then waits for a  car-
  16732.      riage  return  from  us  to confirm that its really the correct phone
  16733.      number.
  16734.  
  16735.    - When it completes dialing, it will print 'ON LINE' or 'ONLINE' for  a
  16736.      successful  call,  otherwise  it  may display on the terminal 'BUSY',
  16737.      'FAILED CALL', 'NO DIAL', 'VOICE' or 'TIME OUT'.  While it is waiting
  16738.      for  its call to be answered, it may print the line 'RINGING' several
  16739.      times in order to tell you that it is working on it.
  16740.  
  16741. The Kermit commands required would be:
  16742.  
  16743.   Kermit-11>SET MODEM USER_DEFINED
  16744.   Kermit-11>SET DIAL WAKEUP \05\015
  16745.   Kermit-11>SET DIAL PROMPT *
  16746.   Kermit-11>SET DIAL INITIATE D\015
  16747.   Kermit-11>SET DIAL FORMAT %P%S\015
  16748.   Kermit-11>SET DIAL CONFIRM \015
  16749.   Kermit-11>SET DIAL SUCCESS ONLINE
  16750.   Kermit-11>SET DIAL SUCCESS ON LINE
  16751.   Kermit-11>SET DIAL INFO RINGING
  16752.   Kermit-11>SET DIAL FAILURE BUSY
  16753.   Kermit-11>SET DIAL FAILURE FAILED CALL
  16754. 12.6. The SET Command                                                  Page 299
  16755.  
  16756. -------------------------------------------------------------------------------
  16757.   Kermit-11>SET DIAL FAILURE NO DIAL
  16758.   Kermit-11>SET DIAL FAILURE VOICE
  16759.   Kermit-11>SET DIAL FAILURE TIME OUT
  16760.   Kermit-11>SET DIAL DIAL_PAUSE 9K
  16761.   Kermit-11>DIAL 14195551212
  16762.  
  16763. The notation "\05\015" indicates the Control E followed by a  carriage  return;
  16764. 05  is  octal  for  control  E, 015 is octal for carriage return.  An alternate
  16765. notation for octal numbers can be used by  placing  the  value  inside  of  in-
  16766. equality  characters,  as  in  SET  DIAL  WAKE  <05><015>  though the former is
  16767. preferred.
  16768.  
  16769. The notation "%P%S\015" indicates to Kermit that the phone number from the dial
  16770. command  is to be followed by a carriage return; the %S is simply a placeholder
  16771. for the phone number.  The presence of the %P is to indicate  where  to  insert
  16772. the  dial  pause  string,  in this case we need to dial 9 and wait for a second
  16773. dial tone.  The "K" is the Racal Vadic code to get the modem to pause.  If  you
  16774. are  dialing  on a direct line, the DIAL_PAUSE command is unneeded.  If for any
  16775. reason you need to pass a "\" or "<" to your modem, simply prefix the character
  16776. with another "\", as in "\\".
  16777.  
  16778. Many  modems  require  only the WAKEUP, PROMPT, FORMAT and result strings.  The
  16779. Digital DF112 is an example of this; its definition would look like:
  16780.  
  16781.   Kermit-11>SET MODEM USER_DEFINED
  16782.   Kermit-11>SET DIAL WAKEUP \02
  16783.   Kermit-11>SET DIAL PROMPT READY
  16784.   Kermit-11>SET DIAL FORMAT %S#
  16785.   Kermit-11>SET DIAL SUCCESS ATTACHED
  16786.   Kermit-11>SET DIAL FAILURE BUSY
  16787.   Kermit-11>SET DIAL FAILURE DISCONNECTED
  16788.   Kermit-11>SET DIAL FAILURE ERROR
  16789.   Kermit-11>SET DIAL FAILURE NO ANSWER
  16790.  
  16791. Some modems may be unable to accept data at the line speed;  in  this  case  we
  16792. would  need  to  use  the SET DIAL WAKE_RATE and SET DIAL DIAL_RATE.  These two
  16793. commands accept a delay time in milliseconds; the  actual  delay  will  not  be
  16794. precise  as  the PDP-11 line clock interrupts sixty times per second.  Further-
  16795. more, on RSTS/E the finest granularity for timing is one second;  thus  setting
  16796. delays would result in delays of one second increments.
  16797.  
  16798. In  general, not all of the result fields need be specified except for the call
  16799. completed strings; Kermit will time out after a  while  if  it  can't  match  a
  16800. response with any definitions.
  16801.  
  16802. Further information can be found in the sections on SET MODEM, DIAL, REDIAL and
  16803. SET PHONE.
  16804. 12.6. The SET Command                                                  Page 300
  16805.  
  16806. -------------------------------------------------------------------------------
  16807.                                     SET DTR
  16808.  
  16809. The SET DTR command is very similar to the DISCONNECT (or HANGUP) command.  SET
  16810. DTR,  where  supported,  raises DTR for a predetermined amount of time, whereas
  16811. the DISCONNECT (or HANGUP) command drops DTR.  The SET DTR is  only  functional
  16812. on  RSTS/E,  which by default keeps DTR low until either RING INDICATOR or CAR-
  16813. RIER DETECT goes high.  This is opposite of the behavior on RT11 and RSX11M/M+,
  16814. both of which normally assert DTR.  The SET DTR command raises DTR for at least
  16815. 30 seconds (depending on the version of RSTS/E) and is useful for  making  con-
  16816. nections  to  front end switches (such as MICOM and GANDALF).  On RT11, SET DTR
  16817. is identical to the HANGUP command; it simply drops DTR for two  seconds.    In
  16818. this  case  (RT11 and TSX+) this command is only supported on RT11 5.2 and TSX+
  16819. 6.0 with the XL/XC and CL drivers, respectively.  This command is  a  no-op  on
  16820. RSX11M/M+  and  P/OS.   For further information on modem support, see the later
  16821. section regarding such.
  16822.  
  16823.  
  16824.                                   SET DUPLEX
  16825.  
  16826. Syntax: SET DUPLEX {FULL, HALF}
  16827.  
  16828. The DUPLEX parameter controls whether an outgoing link (set via  the  SET  LINE
  16829. command)  is  a  full  duplex link (the default) or a half duplex link.  All it
  16830. does for half duplex is to cause all characters typed after the CONNECT command
  16831. to be echoed locally.
  16832.  
  16833.  
  16834.                                 SET END-OF-LINE
  16835.  
  16836. Syntax: SET END-OF-LINE <octal ASCII value>
  16837.  
  16838. The END-OF-LINE parameter sets the ASCII character which will be used as a line
  16839. terminator for all packets SENT to the other KERMIT.    This  is  normally  not
  16840. needed for most versions of KERMIT.
  16841.  
  16842.  
  16843.                                   SET ESCAPE
  16844.  
  16845. Syntax SET ESCAPE <octal ASCII value>)
  16846.  
  16847. This  command  will  set  the escape character for the CONNECT processing.  The
  16848. command will take the octal value of the character to use as the escape charac-
  16849. ter.    This is the character which is used to "escape" back to Kermit-11 after
  16850. using the CONNECT command.  It defaults to control (octal 34).  It is usually a
  16851. good idea to set this character to something which is not used (or at least not
  16852. used very much) on the system being to which Kermit-11 is CONNECTing.
  16853.  
  16854.  
  16855.                                    SET FILE
  16856.  
  16857. Syntax: SET FILE {NOSUPERCEDE, SUPERCEDE, TYPE file-type}
  16858.  
  16859. The SET FILE command allows you to set various file related parameters.
  16860. 12.6. The SET Command                                                  Page 301
  16861.  
  16862. -------------------------------------------------------------------------------
  16863.                               SET FILE TYPE ASCII
  16864.  
  16865. File type ASCII is for text files.  SET FILE TYPE TEXT is the same.
  16866.  
  16867.  
  16868.     SET FILE TYPE AUTO
  16869.  
  16870. Kermit-11 will normally try to decide if a file must be  sent  in  binary  mode
  16871. based  on  the  file  attributes and filetype.  If, for instance, the directory
  16872. entry for FUBAR.TXT showed  it  to  be  RMS  (or  FCS)  fixed  length  records,
  16873. Kermit-11  will  switch  to binary mode and send it verbatim.  If the receiving
  16874. Kermit is Kermit-11, then the sending Kermit  will  send  attribute  data  over
  16875. also.   The file types shown in Table 12-1 also will normally be sent as binary
  16876. files unless you use the SET FILE TYPE NOAUTO command.
  16877.  
  16878. -------------------------------------------------------------------------------
  16879.  
  16880.  
  16881.  
  16882. *.TSK    RSX, IAS, and RSTS tasks
  16883. *.SAV    RT11 and RSTS save images
  16884. *.OBJ    Compiler and macro-11 output
  16885. *.STB    TKB and LINK symbol tables
  16886. *.CRF    TKB and LINK cross reference files
  16887. *.TSD    'Time shared DIBOL' for RT11
  16888. *.BAC    RSTS Basic-plus 'compiled' files
  16889. *.OLB    RSX, IAS, and RSTS object libraries
  16890. *.MLB    RSX, IAS, and RSTS macro libraries
  16891. *.RTS    RSTS/E run time systems
  16892. *.EXE    VMS executable
  16893.  
  16894.                       Table 12-1:   Kermit-11 File Types
  16895.  
  16896. -------------------------------------------------------------------------------
  16897.  
  16898.  
  16899.     SET FILE TYPE BINARY
  16900.  
  16901. File type BINARY is for non-text files.   Note  that  binary  files  which  are
  16902. generated on a PDP-11 system cannot be transferred to another (non PDP-11) sys-
  16903. tem without losing file attributes.  This means that (for  example),  an  RSM11
  16904. indexed  file  cannot  be transmitted with Kermit-11 at this time.  You can not
  16905. have parity set to anything but NONE to use binary file transfer (see HELP  SET
  16906. PARITY) unless the other Kermit can process eight bit quoting.  Two Kermit-11's
  16907. connected to each other will use binary transmission automatically via the Ker-
  16908. mit  attribute  packets,  preserving file attributes where it makes sense (i.e.
  16909. RSTS/E and RSX only).
  16910.  
  16911.  
  16912.     SET FILE TYPE DECMULTINATIONAL
  16913.  
  16914. PDP-11 Kermit normally strips the high bit of every character on both transmis-
  16915. sion and reception of files (unless the SET FILE TYPE FIXED command was given).
  16916. The SET FIL DEC command will cause Kermit-11 to leave all data intact but still
  16917. obey  the host file system when reading or writing files.  In other words, Ker-
  16918. mit will write sequential implied carriage control files with eight bit data if
  16919. 12.6. The SET Command                                                  Page 302
  16920.  
  16921. -------------------------------------------------------------------------------
  16922. this command is used.
  16923.  
  16924.  
  16925. SET FILE TYPE FIXED
  16926.  
  16927. This is the same as SET FILE TYPE BINARY.
  16928.  
  16929.  
  16930.     SET FILE TYPE NOAUTO
  16931.  
  16932. SET FILE NOAUTO disables Kermit-11 from trying to base binary transmission mode
  16933. on file attributes or filetype.
  16934.  
  16935.  
  16936.     SET FILE SUPERCEDE
  16937.  
  16938. Syntax: SET FILE {SUPERCEDE, NOSUPERCEDE}
  16939.  
  16940. SET FILE [NO]SUPERCEDE allows Kermit-11 to  accept  or  reject  files  received
  16941. (from  either the RECEIVE or GET commands) on a per file basis.  The default is
  16942. SUPERCEDE.  By doing SET FILE NOSUPERCEDE Kermit-11 will always check to see if
  16943. the  file  to  be  created is already there (independent of version number) and
  16944. reject it to the sending server if it exists.  This presumes  that  the  Kermit
  16945. sending  the  file  understands the protocol to reject one file of a (possibly)
  16946. wildcarded group of files.  The main use of this is to resume getting  a  group
  16947. of  files,  as in GET KER:K11*.* or GET KER:MS????.* having lost the connection
  16948. after transferring some of the files.  If this is set, then any  files  already
  16949. transferred will not be transferred again.
  16950.  
  16951.  
  16952.                                    SET HOME
  16953.  
  16954. SET  HOME  resets  the default device and UIC (or PPN) to nothing, ie, all file
  16955. opens and creates use your default disk (SY:) and your UIC (or PPN).
  16956.  
  16957.  
  16958.                                  SET IBM-MODE
  16959.  
  16960. Syntax: SET IBM {ON, OFF}
  16961.  
  16962. The SET IBM ON (or OFF) will instruct Kermit-11 to wait for  an  XON  following
  16963. each  packet  sent  to an IBM host in linemode.  Since the default for IBM mode
  16964. may not always be appropriate for your IBM compatible system,  you  can  always
  16965. use  the  SET HANDSHAKE XON and SET DUPLEX HALF to avoid the parity setting im-
  16966. plied by using IBM mode.
  16967.  
  16968.  
  16969.                                    SET LINE
  16970.  
  16971. Syntax: SET LINE device-designator
  16972.  
  16973. The SET LINE command sets the terminal name up for use with  the  connect  com-
  16974. mand.    To use this you must have access to that device.  On many systems ter-
  16975. minal lines other than your own are protected from access, and may require spe-
  16976. cial  procedures  to access them.  The form of the device name is TTnnn:, where
  16977. 'nnn' is a decimal number for RSTS and an octal number  for  RSX-11M/M+.    For
  16978. 12.6. The SET Command                                                  Page 303
  16979.  
  16980. -------------------------------------------------------------------------------
  16981. RT-11,  the  device name is simply the MT unit number shown by the SHO TER com-
  16982. mand, as in '5' for DZ11 unit 0 line 4.  If the system is running RT-11 version
  16983. 5  you can do a SET LIN XL:.  At worst case, Kermit-11 can use the console port
  16984. on RT-11.  For more information see the notes later on for  RT-11  If  you  are
  16985. running K11POS.TSK for P/OS on the PRO/350, Kermit-11 will set the line to XK0:
  16986. and the speed to 9600 baud when Kermit starts.  To override the line or  speed,
  16987. set HELP SET LINE and HELP SET SPEED.  Examples:
  16988.  
  16989.   Kermit-11>SET LINE TT55:        (for RSTS and RSX-11M/M+)
  16990.   Kermit-11>SET LINE 5            (for RT-11 and MT service)
  16991.   Kermit-11>SET LINE XK0:         (for P/OS, done implicitly)
  16992.   Kermit-11>SET LINE XL:          (for RT-11 and XL handler)
  16993.  
  16994. See  HELP  CONNECT,  HELP  SET  DUPLEX and HELP SET SPEED for more information.
  16995. Also, for TSX+, see notes regarding TSX later in these notes.    The  RT-11  XL
  16996. handler has notes later on also.
  16997.  
  16998.  
  16999.                                   SET LOGFILE
  17000.  
  17001. Syntax: SET LOGFILE filespec
  17002.  
  17003. The SET LOGFILE command creates a debug dump file for you.  It must be used BE-
  17004. FORE any SET DEBUG commands can be used.  See HELP  DEBUG  for  further  infor-
  17005. mation about debugging modes.
  17006.  
  17007.  
  17008.                                    SET MODEM
  17009.  
  17010. The SET MODEM command defines the type of MODEM use for dialing out on the line
  17011. set with the SET LINE command, or, in the case of the PRO/350,  the  XC  or  XK
  17012. port.  There are only a few modems defined at this time, they are:
  17013.  
  17014. VADIC           Generic RACAL-VADIC autodial
  17015. VA212PA         Stand alone VADIC VA212
  17016. VA212PAR        Rack mounted VADIC VA212
  17017. VA4224          Rack mounted VADIC VA4224 .v22bis
  17018. HAYES           Hayes smartmodem
  17019. DF100           DEC DF112
  17020. DF200           DEC DF224
  17021. DF03            DEC DF03
  17022. MICROCOM
  17023.  
  17024. The  DIAL  command is then used after the SET MODEM command.  For example, on a
  17025. PRO/350 running P/OS:
  17026.  
  17027.   Kermit-11>set prompt PRO>
  17028.   PRO>set modem va212pa
  17029.   PRO>dial 5374411
  17030.   Modem in command mode
  17031.   Modem dialing
  17032.   Connection made, type CONNECT to access remote
  17033.   PRO>con
  17034.   Enter class ? VX785A
  17035.   Class start
  17036.   Username: BRIAN
  17037. 12.6. The SET Command                                                  Page 304
  17038.  
  17039. -------------------------------------------------------------------------------
  17040.   Password:      
  17041.  
  17042.   ...and so on
  17043.  
  17044.  
  17045.                                SET PACKET-LENGTH
  17046.  
  17047. Syntax: SET PACKET-LENGTH length
  17048.  
  17049. You can alter the default transmitted packet length with the SET  PACKET-LENGTH
  17050. command.   This should not normally be needed unless the line is very noisy, at
  17051. which time you should probably give up anyway.
  17052.  
  17053.  
  17054.                                   SET PARITY
  17055.  
  17056. Syntax: SET PARITY {EVEN, ODD, MARK, NONE, SPACE}
  17057.  
  17058. This is used with the SET LINE and CONNECT commands  to  specify  the  type  of
  17059. parity  for  the remote link.  It defaults to NONE and can be any of ODD, EVEN,
  17060. MARK or SPACE.
  17061.  
  17062. All parity generation is done via software, no special hardware is used.    The
  17063. use  of  software  parity  generation  is  restricted to 8 bit links only.  The
  17064. character format, if parity is set to anything but NONE, will be 7 bits of data
  17065. followed  with  high  bit  set  or  cleared to indicate the parity.  If you set
  17066. parity to anything but NONE (the default), Kermit-11 will be forced to  request
  17067. 8bit  prefixing from the other Kermit-11, which is a method by which Kermit can
  17068. 'prefix' eight bit characters with a shift code.  You MUST use parity (even  if
  17069. MARK  or  SPACE)  when  using  Kermit-11 with the IBM CMS Series/1 or 7171 3270
  17070. emulator, or in linemode through a 3705 front end.
  17071.  
  17072.  
  17073.                                    SET PAUSE
  17074.  
  17075. Syntax: SET PAUSE seconds
  17076.  
  17077. PAUSE tells Kermit to wait the specified number of seconds between each  packet
  17078. being  sent  to the other Kermit.  This may be useful under situations of heavy
  17079. system load.  This may be automatically  computer  by  Kermit-11  in  a  future
  17080. release as a function of line speed.
  17081.  
  17082.  
  17083.                                    SET PHONE
  17084.  
  17085. Syntax: SET PHONE {NUMBER, TONE, PULSE, BLIND}
  17086.  
  17087. The SET PHONE NUMBER command allows you to associate a phone number with a sym-
  17088. bolic name for later use with the DIAL command.   These  definitions  could  be
  17089. placed in your KERMIT.INI file, and then referenced later.  Example:
  17090.  
  17091.   Kermit-11>set pho num work 5374411
  17092.   Kermit-11>set pho num market 16174671234
  17093.   Kermit-11>dial work
  17094.  
  17095. The  other  two  SET PHONE options, SET PHONE [TONE][PULSE] and SET PHONE BLIND
  17096. 12.6. The SET Command                                                  Page 305
  17097.  
  17098. -------------------------------------------------------------------------------
  17099. are not useful unless the appropiate dial formatting string and  character  se-
  17100. quences for selecting PULSE or TONE, and BLIND dialing are present in the modem
  17101. definition macros in K11DIA.MAC.  The format effector for TONE/PULSE is %M  and
  17102. the  effector for BLIND is %B.  Currently (in 3.54) only the VA4224 has entries
  17103. for these options.
  17104.  
  17105.  
  17106.                                     SET POS
  17107.  
  17108. Syntax: SET POS {DTE, NODTE}
  17109.  
  17110. The SET POS command allows options SPECIFIC to P/OS to be altered.    The  most
  17111. useful  option  is  the  SET POS [NO]DTE command.  This allows Kermit-11 to use
  17112. PRO/Communications version 2 for terminal emulation, if this product  has  been
  17113. installed  on  the  PRO/350.    Of course, if this option is chosen, control is
  17114. returned to the PRO with the EXIT key (F10) rather than with Control \C.
  17115.  
  17116.  
  17117.                                   SET PROMPT
  17118.  
  17119. Syntax: SET PROMPT prompt
  17120.  
  17121. The SET PROMPT command is useful if you are using two Kermit-11's  to  talk  to
  17122. each  other.    By using the SET PROMPT command, you can change the prompt from
  17123. 'Kermit-11>' on either (or both) Kermit to something that would indicate  which
  17124. system you are currently connected to.  Examples:
  17125.  
  17126.   Kermit-11>set prompt Kermit-11/1170>
  17127.   Kermit-11>set prompt Fubar>
  17128.   Kermit-11>set prompt ProKermit-11>
  17129.  
  17130.  
  17131.                                   SET RECEIVE
  17132.  
  17133. Currently  the  SET  RECEIVE  and SET SEND basically work the same in that they
  17134. only alter the END-OF-LINE character and the START-OF-PACKET value, as in:
  17135.  
  17136.   Kermit-11>set rec start 2
  17137.   Kermit-11>set rec end 12
  17138.  
  17139. The command SET RECEIVE PACKET-LENGTH command is discussed below.
  17140.  
  17141.  
  17142.     SET RECEIVE END-OF-LINE
  17143.  
  17144. This instructs Kermit-11 to expect something other than  the  default  carriage
  17145. return  (octal  15)  at the end of a packet.  Kermit-11 will ignore packet ter-
  17146. minators.  The SET SEND END command is of more  use  in  conditioning  outgoing
  17147. packets.
  17148. 12.6. The SET Command                                                  Page 306
  17149.  
  17150. -------------------------------------------------------------------------------
  17151.     SET RECEIVE START-OF-PACKET
  17152.  
  17153. The  normal  Kermit  packet prefix is Control-A (ASCII 1); this command changes
  17154. the prefix Kermit-11 expects on incoming packets.  The only reasons this should
  17155. ever  be  changed  would  be: Some piece of equipment somewhere between the two
  17156. Kermit programs will not pass through a Control-A; or, some piece of of  equip-
  17157. ment  similarly placed is echoing its input.  In the latter case, the recipient
  17158. of such an echo can change the packet prefix for outbound packets  to  be  dif-
  17159. ferent  from  that  of  arriving packets so that the echoed packets will be ig-
  17160. nored.  The opposite Kermit must also be told to change the prefix for its  in-
  17161. bound packets and the prefix it uses on outgoing packets.
  17162.  
  17163.  
  17164.                            SET RECEIVE PACKET-LENGTH
  17165.  
  17166. Syntax: SET RECEIVE PACKET-LENGTH length
  17167.  
  17168. This command has two functions.  The first, and normal one, is to reduce incom-
  17169. ing packet lengths in the event that normal sized Kermit  packets  can  not  be
  17170. passed  through  the  communications  circuit.    There could be, perhaps, some
  17171. 'black box' somewhere in the link that has a very small buffer size; this  com-
  17172. mand could be used to reduce the size that the SENDING Kermit will use.
  17173.  
  17174. The  other  use  is  to  enable  a  protocol  extension  to Kermit called 'Long
  17175. Packets'.  The actual protocol is documented elsewhere,  let's  just  say  that
  17176. this  is a way for two Kermit's to use packet sizes far greater than the normal
  17177. ('Classic') packet size if 90 characters or so.  The main use of  this  feature
  17178. is in file transfer over links that introduce considerable delay, it is not un-
  17179. common for packets to incur an one to two second delay.  The net  result  is  a
  17180. VERY  slow  running  Kermit  with an effective speed of perhaps 300 to 600 baud
  17181. rather than 1200 or 2400 baud.  By making the packets longer, we raise the  ef-
  17182. fective  speed  of  such  a  circuit.   The main restriction on the packet size
  17183. chosen is the link, a given circuit may not pass 500 character packets.   Also,
  17184. BOTH  Kermits  must  support  this  extension to the protocol, they will always
  17185. negotiate it before any file transfer.  See the notes at the end of this  docu-
  17186. ment for more information.
  17187.  
  17188. It  is HIGHLY recommended that you use the CRC block check, as the default type
  17189. one checksum could be inadequate for such long packets, as in:
  17190.  
  17191.   Kermit-11>SET BLO 3
  17192.  
  17193.  
  17194.                                SET RECORD-FORMAT
  17195.  
  17196. Syntax: SET RECORD-FORMAT {STREAM, VARIABLE}
  17197.  
  17198. Kermit will, by default, create RMS11 variable length implied carriage  control
  17199. records  for  text files.  You can override this and change it to create stream
  17200. ascii records with the SET RECORD-FORMAT STREAM command.  This  is  useful  for
  17201. RSTS/E  systems  if  you need file compatability with BASIC Plus.  This command
  17202. would be most useful in a KERMIT.INI file, which is  executed  by  KERMIT  when
  17203. Kermit starts.
  17204. 12.6. The SET Command                                                  Page 307
  17205.  
  17206. -------------------------------------------------------------------------------
  17207.                                    SET RETRY
  17208.  
  17209. Syntax: (SET RETRY )number
  17210.  
  17211. SET  RETRY  value tells Kermit to try that many times on a NAK'ed packet before
  17212. giving up.  This should only be needed if the line is extremely  noisy  or  the
  17213. PDP-11 host is running very slowly due to the system load.
  17214.  
  17215.  
  17216.                                     SET RSX
  17217.  
  17218. The SET RSX command is intended to deal with the peculiarities often found with
  17219. RSX systems.  There are currently three SET RSX commands, as in:
  17220.  
  17221.   Kermit-11>SET RSX FASTIO        Default for packet reading,
  17222.                                   waits for <CR>.
  17223.   Kermit-11>SET RSX CHARIO        Read one char at a time for
  17224.                                   packet reading.
  17225.   Kermit-11>SET RSX TC.DLU n      Alters  the TC.DLU setting.
  17226.   Kermit-11>SET RSX CONNECT ALT   Uses a new  (v2.33) connect
  17227.                                   driver which bypasses TTDRV
  17228.                                   flow control.
  17229.   Kermit-11>SET RSX CONNECT DEF   Use old connect code (2.32)
  17230.  
  17231. The SET RSX command is subject to change and the above options may  be  removed
  17232. in  the  future.    Note  the the SET RSX CHARIO may be needed when transfering
  17233. files with parity enabled.  This command alters the method by which a packet is
  17234. read; instead of waiting for a carriage return, Kermit reads the typeahead byte
  17235. count and then issues a read for that many characters.  This is the same method
  17236. Kermit-11 ALWAYS uses under P/OS.
  17237.  
  17238.  
  17239.                              SET RT-11 CREATE-SIZE
  17240.  
  17241. Syntax: (SET RT-11 CREATE-SIZE )number
  17242.  
  17243. The  SET  RT-11 CREATE value command was added to assist those RT-11 users with
  17244. very small disks to be able to get files with sizes greater that  half  of  the
  17245. available  contiguous  space available.  While this is NOT a problem going from
  17246. one Kermit-11 to another Kermit-11 since the PDP-11 Kermit supports a subset of
  17247. the  protocol known as 'ATTRIBUTES', other Kermits may not support the exchange
  17248. of file sizes (most do not).  Thus if your  largest  contiguous  space  is  300
  17249. blocks and you want to get a 250 block file, the command:
  17250.  
  17251.   Kermit-11>set rt-11 cre 250
  17252.  
  17253. would be needed, as RT-11 by default only allocates 50 percent of the available
  17254. space.
  17255. 12.6. The SET Command                                                  Page 308
  17256.  
  17257. -------------------------------------------------------------------------------
  17258.                             SET RT-11 FLOW-CONTROL
  17259.  
  17260. Syntax: SET RT-11 {FLOW-CONTROL, NOFLOW}
  17261.  
  17262. Note that for the connect command under RT-11 you will most likely need xon/off
  17263. flow  control to be generated by Kermit-11.  This is enabled with the SET RT-11
  17264. FLOW command.  This is by default NOFLOW since the modem  the  author  uses,  a
  17265. Vadic  212PA,  can't handle XONs and XOFFs while in command mode.  The solution
  17266. here is to escape back to Kermit command mode after the remote system has  been
  17267. logged into, and then type SET RT-11 FLOW.
  17268.  
  17269. The effect of SET RT-11 FLOW is for Kermit-11, when in connect mode, to send an
  17270. XOFF to the host every eight characters.  When the loop in the  connect  module
  17271. finds  no  more  data  in the input buffer, it sends up to 2 XON characters (in
  17272. case the first XON got lost) to tell the remote system to start sending  again.
  17273. The  reason  for  doing  so is that the RT-11 multiple terminal service is very
  17274. slow about handling input interrupts and does not do any of it's own flow  con-
  17275. trol  when  it's  internal ring buffer gets full.  This has been tested at line
  17276. speeds up to 4800 baud without losing data.  This setting should not be  needed
  17277. for use with the XC/XL handlers.
  17278.  
  17279. SET  RT-11  FLOW  has NO effect on packet transmission, since the Kermit packet
  17280. size is never mode than 96 characters,  and  the  RT-11  input  buffer  is  134
  17281. characters in size.
  17282.  
  17283. The SET RT-11 [NO]FLOW command replaces the older SET RTFLOW [ON][OFF].
  17284.  
  17285.  
  17286.                             SET RT-11 VOLUME-VERIFY
  17287.  
  17288. Syntax: SET RT-11 {VOLUME-VERIFY, NOVOLUME}
  17289.  
  17290. Normally  RT-11  Kermit-11  will check the directory header of a disk to verify
  17291. that it most likely contains a valid RT-11 file structure before trying to read
  17292. the directory.  If for some reason your disk does not contain the standard data
  17293. at offset 760 in the header, Kermit-11 will reject the disk.    The  SET  RT-11
  17294. NOVOL command will instruct Kermit-11 to bypass that check.
  17295.  
  17296.  
  17297.                                    SET SEND
  17298.  
  17299. The SET SEND command controls what Kermit-11 will be doing for outgoing packets
  17300. in that you may want to alter the packet terminator and/or the start of  packet
  17301. character (by default, 15 octal and 1 octal respectively.  See HELP SET RECEIVE
  17302. for more information.
  17303.  
  17304. The only extra option for SET SEND is SET SEND [NO]XON.   If  the  command  SET
  17305. SEND  XON  is give, then every packet sent will be prefixed with an XON charac-
  17306. ter.  This could be useful in situations where flow control is  erratic.    The
  17307. actual  intent  of  this  option was to try to circumvent a firmware bug in the
  17308. DHV11 when used under RSTS/E.
  17309. 12.6. The SET Command                                                  Page 309
  17310.  
  17311. -------------------------------------------------------------------------------
  17312.                                    SET SPEED
  17313.  
  17314. Syntax: SET SPEED speed
  17315.  
  17316. SET SPEED value sets the line speed for the device specified via the  SET  LINE
  17317. command,  and  used  for the CONNECT command.  Changing the speed of a terminal
  17318. line requires privilege for RSTS and RSX-11M/M+.  The SET  SPEED  command  will
  17319. only function with a DH11, DHV11, DZ11 or DZV11 multiline interface.  Example:
  17320.  
  17321.   Kermit-11>set speed 1200
  17322.  
  17323. 1200 Baud would be a normal speed to use with a VA212PA or a DF03.
  17324.  
  17325. Please  note  that Kermit-11 CAN NOT change the speed of a DL11 type interface,
  17326. nor can it change the speed of a PDT-150 modem port.  For a PDT-150 modem port,
  17327. use  a  command  of  /M/S:nnnn  to  change  the speed to nnnn for the SPEED.SAV
  17328. program.
  17329.  
  17330.  
  17331.                                   SET TIMEOUT
  17332.  
  17333. Syntax: SET TIMEOUT seconds
  17334.  
  17335. The timeout value tells Kermit how long to wait to get a packet from the  other
  17336. Kermit.   If system loads are high, it may be desirable to increase this beyond
  17337. the default of 10 seconds.
  17338.  
  17339.  
  17340.                                  SET TERMINAL
  17341.  
  17342. Syntax: SET TERMINAL {TTY, VT100}
  17343.  
  17344. The SET TERMINAL command simply controls the way which Kermit-11 prints  packet
  17345. counts while send or receiving a file (or group of files).  The simplest way is
  17346. the default, SET TER TTY.  Using SET TER VT100 will  cause  Kermit  to  display
  17347. headers  for  the  numbers  printed,  at a possible cost in packet speed due to
  17348. screen control overhead.  On the PRO/350, VT100 is assumed.  On RSTS/E v9.0 and
  17349. later, the executive is queried for the terminal type.
  17350.  
  17351.  
  17352.                                   SET UPDATE
  17353.  
  17354. Syntax: SET {UPDATE number, NOUPDATE}
  17355.  
  17356. The SET UPDATE command controls the frequency at which the packet count display
  17357. is updated.  The default is 1, displaying each packet.  A SET UPD 0  will  dis-
  17358. able all packet count logs, whereas a SET UPD N will update the display every N
  17359. packets.  The SET NOUPDATE command is the same as SET UPDATE 0.
  17360. 12.6.1. The DIAL Command                                               Page 310
  17361.  
  17362. -------------------------------------------------------------------------------
  17363. 12.6.1. The DIAL Command
  17364.  
  17365. The DIAL command is new for version 3.29 of Kermit-11.   The  DIAL  command  is
  17366. used  to  dial a number on an attached modem of known type (see SET MODEM).  To
  17367. find out the current known modems, use the SET MODEM ?  command.  The following
  17368. example  shows  a  RACAL-VADIC VA212 modem connect to the XK: port on a PRO/350
  17369. running P/OS version 2.
  17370.  
  17371.   Kermit-11>set prompt PRO>
  17372.   PRO>set modem va212pa
  17373.   PRO>dial 5374401
  17374.   Modem in command modem
  17375.   Modem dialing
  17376.   Connection failed, !BUSY
  17377.   PRO>dial 5374411
  17378.   Modem in command modem
  17379.   Modem dialing
  17380.   Connection made, type CONNECT to access remote
  17381.   PRO>con
  17382.   Enter class ? VX785A
  17383.   Class start
  17384.   Username: BRIAN
  17385.   Password: ......................
  17386.  
  17387. See SET MODEM for more information.
  17388.  
  17389.  
  17390. 12.7. System Manager's Notes
  17391.  
  17392.  
  17393. 12.7.1. Odds and Ends
  17394.  
  17395. There are a few odds and ends that should be made aware to the  system  manager
  17396. of  any  PDP-11  system  regarding  Kermit-11.  They are as follows, grouped by
  17397. operating system.  Please note that installation instructions are in K11INS.DOC
  17398. and that additional information may be in Kermit-11's online help command.
  17399.  
  17400.  
  17401.                                  RESTRICTIONS
  17402.  
  17403. Prior  to  version  2.21,  Kermit-11 did not support 8-bit prefixing.  Prior to
  17404. version 2.23, Kermit-11 did not support repeat character encoding.
  17405.  
  17406. The PRO/RT-11 version of Kermit-11 will request 8-bit prefixing due to the fact
  17407. that  the  XC handler does not support 8BIT data.  For most Kermits this should
  17408. not be a problem.  The XC handler always strips bit 7 from the character  being
  17409. sent,  so  the  PRO/RT-11 version of Kermit will request prefixing of such.  It
  17410. does so internally by setting PARITY to SPACE (always clear the high  bit,  bit
  17411. seven).
  17412.  
  17413. Note  that this implies that a SET PARITY SPACE command will force Kermit-11 to
  17414. request '8bit' prefixing in order to transfer binary files across a  seven  bit
  17415. link.
  17416. 12.7.1. Odds and Ends                                                  Page 311
  17417.  
  17418. -------------------------------------------------------------------------------
  17419.                                      P/OS
  17420.  
  17421. Kermit-11  will run on under P/OS on the Pro/350, the executable file is called
  17422. K11POS.TSK.  It does NOT run from a menu, the normal way to run it is  via  the
  17423. RUN  command  in  DCL.  It will support the Kermit-11 attribute packets, thus a
  17424. PRO/350 connected to a PDP-11 host can transparently handle  binary  and  other
  17425. types  of  files.   The P/OS Kermit-11 can be run either as a local Kermit or a
  17426. Kermit server.  This has been tested under P/OS version 2 connected to  both  a
  17427. PDP-11/23+ and PDP-11/70 RSTS/E host.
  17428.  
  17429. When  Kermit-11 is started on the PRO, it will automatically do a SET LINE XK0:
  17430. and a SET SPEED 9600.  You can, of course, change the  speed  to  whatever  you
  17431. need with the SET SPEED command.  The line should be left as XK0:.
  17432.  
  17433. The  top  row  function  keys are mapped internally.  Kermit-11 maps F5 (break)
  17434. into a true BREAK (a space of 275 ms), F6  (interrupt)  to  Control-C,  F10  to
  17435. Control-Z,  F11  to escape (octal 33) and F12 to backspace (octal 10).  The in-
  17436. coming escape sequence DECID is intercepted to allow Kermit-11 to send  back  a
  17437. device response of VT100.
  17438.  
  17439.  
  17440.                                     RSTS/E
  17441.  
  17442. Kermit-11  runs  on  version 7.2 or later of RSTS/E.  Due to options present in
  17443. version 8, binary file transfers will not be  possible  under  version  7.2  of
  17444. RSTS/E.    This  is due to the use of 8 bit mode for the terminal link to allow
  17445. all characters to be passed.  The so called '8BIT' terminal setting was new  as
  17446. of version 8.0-06 of RSTS/E.
  17447.  
  17448. Any  RSTS/E  system  running Kermit-11 will need the sysgen option for multiple
  17449. private delimiters in the terminal driver.  This special mode is  needed  since
  17450. the  'normal'  RSTS/E binary terminal mode has a 'feature' that disables binary
  17451. mode whenever the terminal times out on a read.  Since timeouts  are  essential
  17452. to Kermit error recovery, binary mode can not be used for i/o.
  17453.  
  17454. Certain  functions  of Kermit-11 require that the system manager install Kermit
  17455. with temporary privileges, these commands are the SYSTEM, WHO and  REMOTE  HOST
  17456. commands.  Kermit-11 does NOT need these to operate correctly.
  17457.  
  17458. Kermit-11 can only be built (from source, not from HEX files) under RSTS/E ver-
  17459. sion 8.0 or later due to the use of RMS11 v2.0 and new assembler directives.
  17460.  
  17461. Support for the server remote login is  only  available  under  RSTS/E  9.0  or
  17462. later.    Also,  a REMOTE LOGIN command to a RSTS/E server will fail unless the
  17463. user has the WACNT privilege.  While the LOGIN program will skip  the  password
  17464. lookup if WACNT is present, Kermit will require a password.
  17465.  
  17466.  
  17467.                                   RSX-11M/M+
  17468.  
  17469. Kermit-11 can not be installed non-checkpointable due to an apparent RMS11 bug.
  17470. In other words, don't try to install the task '/CKP=NO'.
  17471.  
  17472. To use the connect command effectively, typeahead support is needed in the ter-
  17473. minal  driver.    For  RSX-11M+,  set the typeahead buffer size high, as in SET
  17474. /TYPEAHEAD=TT22:200.  Also, if your connect line is TT22: (as above),  use  the
  17475. 12.7.1. Odds and Ends                                                  Page 312
  17476.  
  17477. -------------------------------------------------------------------------------
  17478. mcr command SET/SLAVE=TT22:
  17479.  
  17480. Kermit-11  can  only  be  built  under  RSX-11M  version 4.1 or later, or under
  17481. RSX-11M Plus version 2.1 or later due to the use of  RMS11  v2.0  and  new  as-
  17482. sembler directives.
  17483.  
  17484. There is a SET RSX command, see HELP SET RSX for further information.
  17485.  
  17486. As  a  side  issue,  please note that the file K11POS.TSK is quite usable under
  17487. RSX, the difference being that K11RSX.TSK has DECNET support and  RMS-11  over-
  17488. layed  in  the task image (besides which, due to the lack author's systems run-
  17489. ning RSX may not be up to date) linked into it, whereas K11POS  has  NO  Decnet
  17490. support  but IS linked to the RMS11 library RMSRES (v2), thus K11POS saves disk
  17491. space as well as supporting named directories, ala VMS style.
  17492.  
  17493.  
  17494.                                      RT-11
  17495.  
  17496. Kermit-11, as of version 2.20, has been tested under RT-11  version  5.0  under
  17497. the  FB  and  XM monitors using a DZ11 line for the link, and also on a PDT-150
  17498. using the modem port for  the  link.    It  has  additionally  been  run  under
  17499. Micro-11's and the PRO/350 using the XL and XC handlers respectively.
  17500.  
  17501. Kermit-11  requires .TWAIT support as well as multiple terminal support (unless
  17502. the XL/XC handler is used).   The  use  of  multiple  terminal  support  allows
  17503. Kermit-11  to use any type of interface sysgened, including the DZ11 and DZV11.
  17504. It is possible under version 5 of RT-11 to use the XL: handler instead  of  the
  17505. multiple  terminal  support.    The  use  of the XL: driver will result in much
  17506. faster file transfer at high baud rates.  Note that XL: must be set up at  sys-
  17507. tem startup or at some time later to set the proper speed, CSR and vector.
  17508.  
  17509. For  those  users who do not have multiple terminal support and do not have the
  17510. XL handler, Kermit-11 will force the use of the  console  for  data  transfers.
  17511. This  will  require  that  Kermit-11 request eight bit prefixing from any other
  17512. Kermit wishing to send binary data files.  Additionally, you can force  console
  17513. mode by doing a SET LINE TT:
  17514.  
  17515. Please  note that the device name syntax for terminal lines follows the MT unit
  17516. numbers, thus if a SHO TER gave unit 5 for DZ11 line  0  the  the  device  name
  17517. would  be  SET  LINE 5.  If you use the XL handler, you would say SET LINE XL:.
  17518. To force the console to be used, you would SET LINE TT:.
  17519.  
  17520. Additionally, Kermit-11 for RT-11 looks for its help file, K11HLP.HLP,  on  DK:
  17521. first and then on SY: if the first one fails.
  17522.  
  17523. Full  wildcarding  is  supported for RT-11, in the form *.type, name.*, *.* and
  17524. the % character to match any single character.
  17525.  
  17526. Kermit-11 can only be built on RT-11 version 5.0 or later due to the use of new
  17527. assembler directives.
  17528.  
  17529. Please note that for the connect command under RT-11 and the use of the MT ser-
  17530. vice, you will most likely  need  xon/off  flow  control  to  be  generated  by
  17531. Kermit-11.  This is enabled with the SET RTFLOW ON command.  This is by default
  17532. OFF since the modem the author uses, a Vadic 212P, can't handle XONs and  XOFFs
  17533. while  in  command mode.  The solution here is to escape back to Kermit command
  17534. 12.7.1. Odds and Ends                                                  Page 313
  17535.  
  17536. -------------------------------------------------------------------------------
  17537. mode after the remote system has been logged into, and then type SET RTFLOW ON.
  17538.  
  17539. Due to overlaying constraints, the RT-11 Kermit-11 will  not  accept  wildcards
  17540. for the RENAME and DELETE commands and the REMOTE server equivalents.
  17541.  
  17542. The  executable  files  are K11XM.SAV for the XM system and PRO/350, and K11RT4
  17543. for the FB system.
  17544.  
  17545. As a final (I hope) RT-11 note, see the RT-11 v5.1 Release Notes page  9-2  and
  17546. chapter  12.    The discussion relevant here regards the use of the XL/XC hand-
  17547. lers.
  17548.  
  17549. Note that the default XL: handler vector (DL-11, DLV-11) is 300 and the CSR  is
  17550. 176500.   For the Micro-11, PDP-11 and LSI-11, when the DL11/DLV11 interface is
  17551. installed the field service representative will inform you  what  the  CSR  and
  17552. VECTOR  are.    If they are NOT 176500 and 300, then to use the XL: handler you
  17553. will need, prior to running Kermit-11, to set them.  Suppose the DL  vector  is
  17554. 400  and  the CSR is 176510.  Then the following DCL commands would set the ad-
  17555. dresses for RT-11:
  17556.  
  17557.   .SET XL CSR=176510
  17558.   .SET XL VECTOR=400
  17559.  
  17560. You SHOULD NOT ever alter these settings for XC: on the PRO/3xx.  The ONLY set-
  17561. tings  you  can  alter  for  the PRO/3xx is the speed, as in DCL command SET XC
  17562. SPEED=nnnn.  Kermit-11 CAN NOT alter the XC: speed itself.  As noted previously
  17563. in  this  document,  Kermit-11  executes  the Kermit-11 command SET LIN XC: im-
  17564. plicitly if it finds itself running on a PRO/3xx system.
  17565.  
  17566. Note that if your modem requires DTR to be present, you must use either an  in-
  17567. terface that asserts it (as does the PDT and PRO communications port), force it
  17568. high internally to the modem, or build a cable to force  it  high.    See  HELP
  17569. MODEM for more information.
  17570.  
  17571.  
  17572.                                      TSX+
  17573.  
  17574. While  most  of  the above notes for RT-11 apply for TSX+, there are a few dif-
  17575. ferences of note.  The first, in that TSX+ is a timesharing system, allows  the
  17576. Kermit  user  to  log  in  normally from another system running Kermit (as in a
  17577. Rainbow) and give the TSX+ Kermit the SERVER command and commence file transfer
  17578. operations  from the other system (ie, the Rainbow).  If you are dialing INTO a
  17579. TSX+ system, you need to give the TSX command:
  17580.  
  17581.   .SET TT 8BIT
  17582.  
  17583. to be able to transfer data to your local (PC, other PDP-11,...)  system  with-
  17584. out incurring the overhead of the Kermit protocol known as eight bit prefixing.
  17585. If this is not possible, due to your local system  requiring  parity,  or  some
  17586. other  intervening  device adds parity, then you should give Kermit the command
  17587. SET PARITY SPACE, to let Kermit know that it can't send binary data as-is.
  17588.  
  17589. To use Kermit-11 to dial out from the TSX+ system, the following  commands  are
  17590. needed.   Note that TSX+ commands will be preceeded by the normal RT-11 prompt,
  17591. the ever present DOT ('.'), whereas Kermit-11 commands will be prefixed by  the
  17592. default Kermit-11 prompt, 'Kermit-11>':
  17593. 12.7.1. Odds and Ends                                                  Page 314
  17594.  
  17595. -------------------------------------------------------------------------------
  17596.   .SET CL LINE=n          Where 'n' is the unit number
  17597.   .SET CL NOLFOUT
  17598.   .SET CL SPEED=n         Where 'n' is the speed for that unit
  17599.   .ASS CL XL
  17600.   Kermit-11>SET LIN XL:
  17601.   Kermit-11>CONNECT
  17602.  
  17603. As  of Kermit-11 version 3.44, you may use CL directly in the SET LINE command,
  17604. as in:
  17605.  
  17606.   .SET CL3 LINE=3
  17607.   .R K11XM
  17608.   Kermit-11>SET LIN CL3
  17609.   Kermit-11>SET SPEED 1200
  17610.   Kermit-11>CONNECT
  17611.  
  17612. A sample command file in actual use is:
  17613.  
  17614.   SET CL3 LINE=3
  17615.   SET CL3 NOLFOUT
  17616.   SET CL3 TAB
  17617.   SET CL3 FORM
  17618.   SET CL3 SPEED=2400
  17619.   ALLOCATE CL3:
  17620.   R K11XM
  17621.   DEALLOC CL3
  17622.   SET CL3 LFOUT
  17623.   SET CL3 LINE=0
  17624.   SH CL
  17625.  
  17626. If you are running PRO/TSX+, then Kermit will make the assignment of LINE 3  to
  17627. either  CL0 or CL1 if you are running Kermit from the console, ie, LINE 1.  The
  17628. speed will default to the last SET SPEED or the speed set at system boot.
  17629.  
  17630. Lastly, TSX+ needs PLAS support to use K11XM.SAV, see  the  installation  notes
  17631. for further data.
  17632.  
  17633.  
  17634.                               RSTS/E VERSION 9.X
  17635.  
  17636. RSTS/E does not control modems signals in the manner that RSX or VMS does.  VMS
  17637. always asserts DTR whereas RSTS/E will not assert DTR until the terminal driver
  17638. can  see  RCD  (also known as DCD) which is pin 8 (eight) for the RS232 connec-
  17639. tion.  To connect directly to a modem (like a VADIC 212, sorry, no  DEC  modems
  17640. here) we must do one of two things:
  17641.  
  17642.    1. Force  the  modem  (via strapping options or whatever) to assert RCD
  17643.       (DCD) pin 8, thus RSTS/E will see carrier and raise DTR (pin 20  for
  17644.       RS232)
  17645.  
  17646.    2. Set   the   terminal   to   LOCAL   (RSTS/E   V9   syntax  'SET  TER
  17647.       TTxx:/NODIAL/PERM') and break pin 20 (DTR) and connect pin 20  to  8
  17648.       on the modem side.  This will cause the modem to be able to dial out
  17649.       and allow RSTS/E to connect to it.  You will also need to  have  the
  17650.       modem  assert  RCD,  pin 8.  Keep in mind that the Kermit-11 command
  17651.       DISCONNECT (or HANGUP) will not function if a line is set to  NODIAL
  17652. 12.7.1. Odds and Ends                                                  Page 315
  17653.  
  17654. -------------------------------------------------------------------------------
  17655.       (INIT  SET  syntax  'LOCAL').  This has been tested on a Racal Vadic
  17656.       VA212.
  17657.  
  17658.    3. Break pin 8 (RCD) and loop DTR (pin 20) on the CPU side to RCD  (pin
  17659.       8)  on  the  CPU side.  Then use the command SET DTR in Kermit-11 to
  17660.       get RSTS to raise DTR and thus loop it's DTR  signal  back  to  RCD.
  17661.       See the next note regarding this.
  17662.  
  17663. For  those of you who have port switches such as the Gandalf type, there is one
  17664. additional problem.  For Gandalf, suppose you want to connect a DZ11 line to to
  17665. an  AMTB2.  You will have a problem, in that the Gandalf AMTB2 wants to see RCD
  17666. (DCD) asserted to make a connection.  What you may need to do is this:
  17667.  
  17668. Make a cable for the DZ11 to AMTB2 port as follows:
  17669.  
  17670.           CPU side                        AMTB2 side
  17671.                           20--|
  17672.                           8---|-----------8
  17673.                           7---------------7
  17674.                           3---------------2
  17675.                           2---------------3
  17676.  
  17677. Note that 20 is tied to 8 on the CPU side.  Also, 2 is swapped for 3.
  17678.  
  17679. Then, the Kermit-11 command SET DTR, which forces RSTS  to  raise  DTR  for  30
  17680. seconds,  will  cause  the  DTR signal to loop back to the RCD (DCD) signal and
  17681. thus tell RSTS that there is carrier detect which will raise DTR  (the  chicken
  17682. or  egg question) and get things rolling.  The Kermit-11 HANGUP (or DISCONNECT)
  17683. command will drop DTR and force the modem to break the connection.
  17684.  
  17685.  
  17686.                                 RSX AND MODEMS
  17687.  
  17688. While the author's experience on RSX is limited, the following notes may be  of
  17689. use.   Dialing out on a LOCAL line will often require that the modem assert in-
  17690. ternally DTR.  If a line is set REMOTE on RSX, the driver will assert  DTR  and
  17691. RTS.   For a modem, like a VA212PAR strapped at the factory defaults, this will
  17692. cause the modem to assert DSR and RCD.  On the VADIC in particular,  the  modem
  17693. will  drop  RCD  during a DIAL command unless the modem is configured to assert
  17694. RCD continuously.  For dialing out, ideally the modem should be able to  assert
  17695. RCD  via an option or internally settable strap or switch.  If this is not pos-
  17696. sible, an alternative is to break line 8 (RCD) and jumper DTR (20) to  RCD  (8)
  17697. on  the CPU side.  This will force RSX to always see carrier detect and allow a
  17698. dial sequence to complete.  The Kermit-11 command DISCONNECT (or  HANGUP)  will
  17699. still  disconnect  the  modem as the modem will drop from the line when it sees
  17700. DTR go low (assuming the modem is not strapped to assert DTR internally).
  17701.  
  17702.  
  17703. 12.8. Typical Kermit-11 Transfer Rates
  17704.  
  17705. Some sample timings for Kermit-11 and long packet support.  The packet size  in
  17706. the RSTS/E to P/OS was 500 bytes, the size from RSTS/E to RSTS/E was 700 bytes.
  17707. These sizes are somewhat arbitrary, they depend more on the system's  buffering
  17708. capabilities than anything else.
  17709.  
  17710. Host buffering capabilities:
  17711. 12.8. Typical Kermit-11 Transfer Rates                                 Page 316
  17712.  
  17713. -------------------------------------------------------------------------------
  17714. P/OS                          500 (estimated)
  17715. RSTS/E 9.0 or later           up to 7000, given sufficient system pool
  17716. RSX-11M+                      255 (I/D space CPU only)
  17717. RSX-11M                       34
  17718. RT-11                         134 (could be larger with mod to XC/XL)
  17719.  
  17720. As  it can be seen, large packets make sense only for RSTS/E, P/OS and RSX-11M+
  17721. if one wishes to avoid XON/XOFF overhead at high speeds.  It should be possible
  17722. to run larger packets on M+ and RT-11 at lower speeds.
  17723.  
  17724. File  transferred:  K11POS.TSK,  size  102,400 bytes (200 disk blocks).  Actual
  17725. data packet characters AFTER prefixing was 120,857.
  17726.  
  17727. Time    Speed   Data rate       Comments
  17728. seconds baud
  17729.  
  17730. 1436    1200    84/sec          11/44 to PRO/350, 'Classic' Kermit
  17731.                                 local phone call
  17732. 1237    1200    97/sec          11/44 to PRO/350, 500 Char packets
  17733.                                 local phone call
  17734.  
  17735. 2915    1200    41/sen          11/44 to PRO/350, 'Classic' Kermit
  17736.                                 local call, 1 second ACK delay.
  17737. 1492    1200    81/sec          11/44 to PRO/350, 500 Char packets
  17738.                                 local call, 1 second ACK delay.
  17739.  
  17740. 304     9600    397/sec         11/44 to 11/44, 'Classic' Kermit,
  17741.                                 connected locally via Gandalf switch.
  17742. 245     9600    493/sec         11/44 to 11/44, 700 char packets,
  17743.                                 connected locally via Gandalf switch.
  17744.  
  17745. The last two timings are much lower than the line speed due to the fact the the
  17746. PDP  11/44  is  running  100%  busy trying to keep up with character interrupts
  17747. using a normal terminal driver.  A special  purpose  driver,  such  as  the  XK
  17748. driver  found on P/OS, would have lower overhead and allow somewhat faster data
  17749. rates.
  17750.  
  17751. Long packets were chosen for Kermit-11 due to the lack  of  suitable  interrupt
  17752. driven  i/o  (at  this  time)  under one of the operating systems, RSTS/E.  The
  17753. Sliding Windows would likely function better in those situations where the cir-
  17754. cuit delay is much higher, or when the circuit can not accommodate large packet
  17755. sizes.
  17756.  
  17757.  
  17758. 12.9. Common Problems
  17759.  
  17760.  
  17761.                                CONNECTION FAILS
  17762.  
  17763. Check modem control signals.  RSX needs TC.DLU set to two to talk to a dial out
  17764. modem,  otherwise you will need to strap or jumper signals in the modem to have
  17765. carrier detect set high.  RSTS/E also should  have  the  modem  assert  carrier
  17766. detect.  If not, see the previous notes about modems.  If all else fails, put a
  17767. breakout box in the line and observe what signals are present.
  17768. 12.9. Common Problems                                                  Page 317
  17769.  
  17770. -------------------------------------------------------------------------------
  17771.                              FILE TRANSFER FAILS.
  17772.  
  17773. If the file transfer aborts on retries  immediately,  there  may  be  a  parity
  17774. problem.   If the problem shows up on binary files, try a SET PAR SPACE command
  17775. to Kermit; that will force eight bit data to be prefixed into seven bits.    If
  17776. you  instead  get  a retry about once every 10 seconds, the other Kermit is not
  17777. responding and your Kermit is timing out.  Check to see if your  connection  is
  17778. still present, and try the SET PARITY command.
  17779.  
  17780. If  you  are  sending  binary data between unlike Kermits, you will most likely
  17781. have to give the proper command to each to prepare them for  the  binary  data;
  17782. this  is  the  SET FILE command; for Kermit-11 it's SET FIL BIN (or SET FIL TYP
  17783. FIX); for VMS Kermit it's SET FIL TYP FIX.
  17784.  
  17785. If your Kermit's packets are being echoed back, try a SET SEND START value com-
  17786. mand for your Kermit, and a SET REC START samevalue for the other Kermit.  This
  17787. will force Kermit to ignore any echoed packets as they won't have  the  default
  17788. start of packet character (a CONTROL A, octal 1).
  17789. 13. Apple II Kermit                                                    Page 318
  17790.  
  17791. -------------------------------------------------------------------------------
  17792. 13. Apple II Kermit
  17793.  
  17794. Authors:    Antonino N. J. Mione (Stevens Institute of Technology),
  17795.             Peter Trei (Columbia University),
  17796.             Ted Medin (NOSC)
  17797.  
  17798. Version:    3.81
  17799.  
  17800. Date:       December 1987
  17801.  
  17802. Kermit-65 Capabilities At A Glance:
  17803.  
  17804.   Local operation:                   Yes
  17805.   Remote operation:                  Yes
  17806.   Transfers text files:              Yes
  17807.   Transfers binary files:            Yes
  17808.   Wildcard send:                     Yes
  17809.   ^X/^Y interruption:                Yes
  17810.   Filename collision avoidance:      Yes
  17811.   Can time out:                      Yes
  17812.   8th-bit prefixing:                 Yes
  17813.   Repeat count prefixing:            No
  17814.   Alternate block checks:            No
  17815.   Terminal emulation:                Yes (VT52, VT100)
  17816.   Communication settings:            Yes
  17817.   Transmit BREAK:                    Yes
  17818.   IBM communication:                 Yes
  17819.   Transaction logging:               No
  17820.   Session logging (raw download):    Yes
  17821.   Raw upload:                        No
  17822.   Act as server:                     Yes
  17823.   Talk to server:                    Yes
  17824.   Advanced commands for servers:     Yes
  17825.   Long packets:                      Yes
  17826.   Sliding windows:                   No
  17827.   Local file management:             Yes
  17828.   Handle file attributes:            No
  17829.   Command/init files:                Yes
  17830.   Printer control:                   Yes
  17831.  
  17832. Kermit-65  is  a  program that implements the Kermit file transfer protocol for
  17833. the Motorola 6502 processor family (hence the name, Kermit-65) on the Apple  II
  17834. microcomputer  system.   It is written in 6502 assembly language and should run
  17835. on any Apple II or compatible running DOS 3.3 or PRODOS 8.  This  section  will
  17836. describe  the things you should know about the file system in order to make ef-
  17837. fective use of Kermit, and then it will describe the special  features  of  the
  17838. Kermit-65 program.
  17839. 13.1. Supported Systems and Devices                                    Page 319
  17840.  
  17841. -------------------------------------------------------------------------------
  17842. 13.1. Supported Systems and Devices
  17843.  
  17844. There  are  several  different Apple II's which can run Kermit-65.  Kermit will
  17845. have no problems running on an Apple II, II+, //e or //c system.  Of  the  dif-
  17846. ferent communication devices available for the Apple II, Kermit-65 supports the
  17847. ones shown in Table 13-1.
  17848.  
  17849. -------------------------------------------------------------------------------
  17850.  
  17851.  
  17852.  
  17853.                Apple Com Serial Card
  17854.                Apple Super Serial Card & //c Serial Port
  17855.                Apple//gs Serial Port
  17856.                CCS 7710 Serial Card
  17857.                CPS Serial Card
  17858.                D.C. Hayes Micromodem.
  17859.                Microtek sv-622 Card
  17860.                Prometheus Versacard (Uses the Apple Com Card driver)
  17861.  
  17862.        Table 13-1:   Apple II Communication Cards Supported by Kermit-65
  17863.  
  17864. -------------------------------------------------------------------------------
  17865.  
  17866. It is possible that other  cards  may  have  operational  characteristics  very
  17867. similar  or  identical to one of the devices above. If this is the case, it may
  17868. work using one of the currently available device drivers.  The user may want to
  17869. try  each  of  the above options to see if any of them work.  Kermit-65 must be
  17870. told in which slot the card resides.  This may be done with the  'SET'  command
  17871. (documented below).
  17872.  
  17873.  
  17874. 13.2. The DOS 3.3 File System
  17875.  
  17876. Items  of  importance which will be discussed in this section include filenames
  17877. and file characteristics.
  17878.  
  17879.  
  17880.     Apple DOS Filenames
  17881.  
  17882. Filenames under Apple DOS may contain almost  any  ASCII  character  (including
  17883. space). It is not recommended that special characters, (i.e. control characters
  17884. or spaces) be used in a filename to be transferred by Kermit-65 since they  may
  17885. cause problems when parsing the filename.  Filenames may be up to 40 characters
  17886. in length.
  17887.  
  17888.  
  17889.     Apple DOS File Characteristics
  17890.  
  17891. All files in Apple DOS have a file type associated with them which is contained
  17892. in  the  directory  entry  for the file but is not part of the filename itself.
  17893. There are four types of files in DOS 3.3. They are:
  17894.  
  17895.    1. APPLESOFT BASIC
  17896.    2. INTEGER BASIC
  17897.    3. BINARY
  17898. 13.2. The DOS 3.3 File System                                          Page 320
  17899.  
  17900. -------------------------------------------------------------------------------
  17901.    4. TEXT
  17902.  
  17903. All file types have their data stored in eight-bit bytes although  not  all  of
  17904. them need the eighth bit. The two file types containing basic programs required
  17905. the eighth bit due to the nature of the data being  stored.  BINARY  files  are
  17906. images  of  memory  copied into a file. Often, these are machine code programs.
  17907. These files require all eight bits. TEXT files normally contain only  printable
  17908. or  carriage control characters. They are stored in the form of seven-bit ASCII
  17909. characters but the eighth bit should always be set since Apples manipulate  all
  17910. text internally as 'Negative ASCII'.  When transmitting non-text files the user
  17911. must insure that both Kermits are handling eight-bit data  so  that  no  infor-
  17912. mation  is  lost.  If  an eight-bit data path is not available (i.e. the remote
  17913. Kermit needs to do parity checking with the eigth bit), then eight-bit  quoting
  17914. should  be used.  Of course, BINARY files as well as Apple BASIC files will not
  17915. have much meaning on a different system.  If the user desires to edit  a  BASIC
  17916. file  on  a mainframe, for instance, s/he must convert it to a TEXT file before
  17917. sending it over. After receiving the file back on the Apple, the user may  con-
  17918. vert  it back to BASIC once again.  The reason BASIC files would be meaningless
  17919. to a different machine is that  the  Apple  stores  BASIC  keywords  as  single
  17920. character tokens to save space and processing time.  To convert a BASIC program
  17921. to and from a TEXT file, consult the Apple DOS 3.3 Manual.    File  information
  17922. can be obtained by issuing the CATALOG command.  For example:
  17923.  
  17924.     ]CATALOG
  17925.  
  17926.      DISK VOLUME 010
  17927.  
  17928.        *A 002 HELLO
  17929.         B 078 KERMIT
  17930.         A 002 READER
  17931.         T 005 TESTFILE
  17932.  
  17933.     ]
  17934.  
  17935. When  Kermit-65 is receiving a file, the file it creates on diskette will be of
  17936. the type indicated by the FILE-TYPE parameter.  The file will always be left in
  17937. an  unlocked  state  after  it  is  closed  by Kermit-65.  When sending a file,
  17938. Kermit-65 will use the FILE-TYPE  parameter  to  determine  how  to  detect  an
  17939. End-of-file  condition.  Thus, it is important to have this set properly in all
  17940. cases.
  17941.  
  17942.  
  17943.     Recommendations for Archiving Files
  17944.  
  17945. When using a large system for archiving purposes, there is no reason to convert
  17946. Apple Basic programs into text files before sending them if there is no need to
  17947. edit them on the mainframe.  The FILE-TYPE parameter must always  be  set  cor-
  17948. rectly when sending and receiving files.  The procedure for archiving files is:
  17949.  
  17950.    1. Run Kermit on remote system.
  17951.  
  17952.    2. SET FILE-TYPE TEXT (or APPLESOFT or ...) on Kermit-65.
  17953.  
  17954.    3. Send the files.
  17955. 13.3. The PRODOS File System                                           Page 321
  17956.  
  17957. -------------------------------------------------------------------------------
  17958. 13.3. The PRODOS File System
  17959.  
  17960. The  PRODOS  system is essentialy the same as the DOS system with the exception
  17961. that performance has been improved, hardware usage has been expanded  and  file
  17962. names have different syntax.  File names are the major importance to the Kermit
  17963. system.  File names have the following syntax:  
  17964.  
  17965.   /volname/subdirectory1/.../subdirectoryn/filename
  17966.  
  17967. where "volname" is the volume name where the file is located.   Subdirectory(n)
  17968. is  a  subdirectory  on the volume and may be omitted.  Filenames are much more
  17969. restrictive than DOS filenames.  PRODOS filenames are limited to 15  characters
  17970. with  no imbedded spaces and few special characters, and must begin with an al-
  17971. phabetic character.  Volname may be omited from the  filename  by  use  of  the
  17972. PREFIX command.
  17973.  
  17974. Binary  file  transfer  using  PRODOS  has its dangers when creating new files.
  17975. PRODOS keeps the file's size and starting location in the directory which is of
  17976. course  not  transferred.    Therefore a new binary file will have its starting
  17977. location 0 which can cause some interesting problems if you try  and  BRUN  the
  17978. file.  Basic files all start at $801 (it says here) so Kermit creates new basic
  17979. files with a starting address of $801.
  17980.  
  17981.  
  17982. 13.4. Program Operation
  17983.  
  17984. Prior to using Kermit-65 for transferring files, the modem  interface  must  be
  17985. set  to  handle  data  in a certain manner.  First, the data format should be 8
  17986. data bits and 1 stop bit.  Second, the card should be set to no  parity.    The
  17987. baud  rate  (if  adjustable) must be set to whatever rate the modem can handle.
  17988. For the D.C. Hayes Micromodem, these parameters are set correctly  by  default,
  17989. so  very  little has to be done.  For the Apple Super Serial Card these are set
  17990. from within Kermit-65 except the interrupt switch (sw6-2) which must be set for
  17991. interupts  on.    For the Microtek SV-622, all applicable parameters are set by
  17992. Kermit-65.  Some mainframes may need parity checking (i.e. most IBM  machines).
  17993. In  this  case  some  parity  setting (other than none) will be required.  When
  17994. talking with such mainframes, binary and basic files on  the  Apple  cannot  be
  17995. transferred  unless  Eighth-bit-quoting is acceptable to the host.  If you have
  17996. the parameters set correctly then the "connect" command will start Kermit talk-
  17997. ing out the communication port.
  17998.  
  17999. File  transfer  is  very  dependent  upon  parity. Make sure the host and local
  18000. parity are the same. Following is one IBM site's method for file transfer.
  18001.  
  18002. We have an IBM 3033 and 4381 and use both 3705/3725 and 7171 or Series/1  front
  18003. ends.  The differences in front ends as far as any microcomputer Kermit is con-
  18004. cerned duplex (local-echo on for the 3705,  local-echo  off  for  the  7171  or
  18005. Series/1), parity (the two front ends might use different parity, e.g. Mark for
  18006. the 3705 and Even for the 7171), and flow control (None for the 3705,  XON/XOFF
  18007. for the 7171).
  18008.  
  18009. In Kermit-65, IBM mainframe users need to set the following parameters:
  18010.  
  18011.     BAUD            Whatever is supported.
  18012.  
  18013.     PARITY          EVEN, ODD, or MARK, whatever your front end requires.
  18014. 13.4. Program Operation                                                Page 322
  18015.  
  18016. -------------------------------------------------------------------------------
  18017.     FLOW            XON for the 7171, NONE for the 3705.
  18018.  
  18019.     FLOW DELAY      00
  18020.  
  18021.     LOCAL-ECHO      OFF for 7171, ON for 3705
  18022.  
  18023.  
  18024.     Conversing With Kermit-65
  18025.  
  18026. Kermit-65  reads  file  KERMIT.INIT  from  the default drive when started.  The
  18027. lines of this file are executed one at a time starting at the begining.    This
  18028. file  should  be  an  ASCII  text  file and contain commands to set up Kermit's
  18029. parameters as desired.  It will also execute Kermit's other commands.  However,
  18030. any command which reads a file (like MODEM) or leaves local mode (like CONNECT)
  18031. will terminate reading of this file and continue with  the  command  specified.
  18032. Use your favorite editor to produce this file.  Here's a sample:
  18033.  
  18034.   set display 80 3
  18035.   set keyboard 2e
  18036.   set baud 4800
  18037.   modem
  18038.  
  18039. Kermit-65's prompt is "Kermit-65>".  To run Kermit-65 and issue commands to it,
  18040. type "brun kermit".  Example:
  18041.  
  18042.   ]BRUN KERMIT
  18043.  
  18044.   NOSC/STEVENS/CU - APPLE ][ KERMIT-65 - VER 3.81
  18045.  
  18046.   Kermit-65>send testfile
  18047.  
  18048.       (file is sent...)
  18049.  
  18050.   Kermit-65>status
  18051.  
  18052.       (performance statistics are printed...)
  18053.  
  18054.   Kermit-65>(other commands...)
  18055.             .
  18056.             .
  18057.             .
  18058.   Kermit-65>exit
  18059.   ]
  18060.  
  18061. Like many Kermit programs,  Kermit-65  uses  a  DEC-20  style  command  parser.
  18062. During  interactive  operation,  you may use the ?-prompting help feature ("?")
  18063. and recognition (ESC) features while typing commands.  A question mark typed at
  18064. any  point in a command displays the options available at that point; typing an
  18065. ESC character causes the current keyword to be completed (or default  value  to
  18066. be  supplied).  If you have not typed sufficient characters to uniquely specify
  18067. the keyword or filename (or if there is no default value) then a beep  will  be
  18068. sounded and you may continue typing.  Keywords may be abbreviated to any prefix
  18069. that is unique.
  18070. 13.4. Program Operation                                                Page 323
  18071.  
  18072. -------------------------------------------------------------------------------
  18073.     Remote and Local Operation
  18074.  
  18075. Kermit-65 is normally run in local mode. It may be run as a  remote  Kermit  as
  18076. well  although  there  is no advantage to doing things that way. Kermit-65 sup-
  18077. ports User-mode commands for talking to a Server, and it does support a limited
  18078. server mode.
  18079.  
  18080.  
  18081. 13.5. Kermit-65 Commands
  18082.  
  18083.  
  18084.                                THE SEND COMMAND
  18085.  
  18086. Syntax: SEND filespec
  18087.  
  18088. The  SEND command causes a file to be sent from the Apple to the remote system.
  18089. The Filespec is the name of the file on the Apple diskette to  be  sent.    The
  18090. parser  will  not accept control characters and certain special characters in a
  18091. filename (like comma), so the user may have to rename the  file  before  it  is
  18092. sent.    The  user may also have problems in filename compatibility with remote
  18093. Kermits. If the remote Kermit does not have the facilities to beat the filename
  18094. into  a  format that its system likes, the user may have to rename the file be-
  18095. fore sending it.  Thanks to Dick Atlee, wildcards are now acceptable when send-
  18096. ing files (they have always been acceptable when receiving files). The "*" is a
  18097. multiple character wildcard and the "=" is a single character wildcard.
  18098.  
  18099. The default disk drive is used for file transfers this can be changed with  the
  18100. 'SET  DEFAULT-DISK'(DOS) or 'SET PREFIX'(PRODOS) command (explained below).  As
  18101. a file is being sent, the screen displays 'SENDING  PACKET...'    and  'WAITING
  18102. PACKET...'  followed by the absolute packet number since start of transmission.
  18103. If a packet must be transmitted several times and it reaches the maximum  retry
  18104. count,  the  transfer will fail and the 'Kermit-65>' prompt will return. If the
  18105. remote Kermit sends an error packet, the text of the packet will  be  displayed
  18106. on  the screen, the transfer will fail, and the prompt will return.  Currently,
  18107. a packet can be retransmitted manually by typing anything on the keyboard. If a
  18108. 'Q' is typed, the entire transmission will be aborted.
  18109.  
  18110.  
  18111.                               THE RECEIVE COMMAND
  18112.  
  18113. Syntax: RECEIVE [filespec]
  18114.  
  18115. The  RECEIVE  command  tells Kermit-65 to receive a file or file group from the
  18116. other system.  If only one file is being received, you may include the optional
  18117. filespec  as  the name to store the incoming file under; otherwise, the name is
  18118. taken from the incoming file header.  If the name in the header is not a  legal
  18119. filename,  Kermit-65  will  attempt  to  change  it  into  something legal.  If
  18120. FILE-WARNING is on and an incoming file has a name identical to a file  already
  18121. existing  on  the  diskette, Kermit-65 will issue a warning to the user and at-
  18122. tempt to modify the filename to make it unique.  Currently,  a  packet  can  be
  18123. retransmitted  manually by typing anything on the keyboard.  If a 'Q' is typed,
  18124. the entire transmission will be aborted.
  18125. 13.5. Kermit-65 Commands                                               Page 324
  18126.  
  18127. -------------------------------------------------------------------------------
  18128.                                 THE GET COMMAND
  18129.  
  18130. Syntax: GET remote-filespec
  18131.  
  18132. The GET command requests a remote Kermit server to send the file or file  group
  18133. specified by remote-filespec.  This command can be used with a Kermit server on
  18134. the other end.  The remote filespec is any string that  can  be  a  legal  file
  18135. specification for the remote system; it is not parsed or validated locally.  So
  18136. if  the  remote  Kermit  supports  wildcards  you  can  specify  them  in   the
  18137. remote-filespec.  If the remote Kermit is not capable of server functions, then
  18138. you will probably get an error message back from it like "Illegal packet type".
  18139. In this case, you must connect to the other Kermit, give a SEND command, escape
  18140. back, and give a RECEIVE command.  Currently, a  packet  can  be  retransmitted
  18141. manually  by  typing  anything  on  the keyboard. If a 'Q' is typed, the entire
  18142. transmission will be cancelled.
  18143.  
  18144.  
  18145.                               THE CONNECT COMMAND
  18146.  
  18147. Syntax:  CONNECT
  18148.  
  18149. Establish a terminal connection to the remote system using all the current  SET
  18150. paramaters  for  terminal  type,  speed, parity, etc.  Get back to Kermit-65 by
  18151. typing the escape character followed by the letter C. The escape  character  is
  18152. Control-@   by   default.     When  you  type  the  escape  character,  several
  18153. single-character commands are possible.  These are shown in Table 13-2.
  18154.  
  18155. -------------------------------------------------------------------------------
  18156.  
  18157.  
  18158.  
  18159.     ?     List all the possible single-character arguments.
  18160.     B     Send a BREAK signal.
  18161.     C     Close the connection and return to Kermit-65.
  18162.     D     Drop the phone line to the remote and return to Kermit-65.
  18163.     K     TOGGLE Keypad application-mode on/off.
  18164.     P     Toggle the Printer on/off.
  18165.     R     pRint the screen, >= //e required
  18166.     S     Show Status of the connection.
  18167.     W     sWap the del and backspace key.
  18168.     0     Send a null (ASCII 0).
  18169.     ^@    (or whatever the Connect-Escape character is):  Send the
  18170.           Connect-Escape character itself.
  18171.  
  18172.        Table 13-2:   Kermit-65 Single-Character CONNECT Escape Commands
  18173.  
  18174. -------------------------------------------------------------------------------
  18175.  
  18176. You can use the SET ESCAPE command to  define  a  different  escape  character.
  18177. When CONNECTed, Kermit-65 will be passing characters entered on the keyboard to
  18178. the remote system, and passing characters from the remote system to  the  Apple
  18179. screen.    Incoming  characters are interpreted according the selected terminal
  18180. type (see SET TERMINAL).
  18181.  
  18182. On an Apple II+ with an incomplete keyboard, special characters can be typed by
  18183. prefixing  regular  characters  with a right-arrow.  On uppercase-only screens,
  18184. 13.5. Kermit-65 Commands                                               Page 325
  18185.  
  18186. -------------------------------------------------------------------------------
  18187. uppercase characters are shown in inverse and  lowercase  characters  are  dis-
  18188. played as normal uppercase characters.
  18189.  
  18190. Here are the rules for using the special 2/2+ input, to get all printable ASCII
  18191. characters, and how they appear on the screen.  Special meanings are applied in
  18192. various  contexts to certain characters.  The left and right arrow keys do spe-
  18193. cial things, and sometimes the escape key does  as  well.    For  letters,  the
  18194. keyboard  is always in either default UPPERCASE mode or default lowercase mode.
  18195. When in UPPERCASE, all letters typed are sent out as uppercase.  In  lowercase,
  18196. all  letters  are sent as lowercase. To reverse the case for the next character
  18197. only, hit the right-arrow ("prefix") key.  To switch the default case, hit  the
  18198. prefix-key  twice  in a row.  For funny characters, the prefix key is also used
  18199. to get the unusual punctuation characters which are not on the Apple  keyboard.
  18200. Table  13-3  shows the Apple II/II+ keyboard escapes; the letter "p" represents
  18201. the prefix character.
  18202.  
  18203. -------------------------------------------------------------------------------
  18204.  
  18205.  
  18206.  
  18207.     To Get                        Type      Appearence
  18208.     Left Square Bracket            p(          [
  18209.     Right Square Bracket           p)          ]
  18210.     Left Curly Bracket             p<          {
  18211.     Right Curly Bracket            p>          }
  18212.     Underline                      p-          _
  18213.     Backslash                      p/          \
  18214.     Tilde (wiggle)                 p^          ~
  18215.     Vertical Line                  p.          |
  18216.  
  18217.                   Table 13-3:   Apple II/II+ Keyboard Escapes
  18218.  
  18219. -------------------------------------------------------------------------------
  18220.  
  18221. The left-arrow key sends a rubout (ASCII 127).  With left-arrow and right arrow
  18222. doing  special  things, it's a little hard to enter their characters (^H and ^U
  18223. respectively).  There is therefore an escape from prefix mode sequence.  If you
  18224. type prefix-ESC, the next character is sent without any interpretation.  If you
  18225. have the capability for upper/lower case, etc, then use the 'SET KEYBOARD'  and
  18226. 'SET DISPLAY' commands to specify complete keyboards.
  18227.  
  18228.  
  18229.                                THE HELP COMMAND
  18230.  
  18231. Syntax: HELP
  18232.  
  18233. Typing HELP alone prints a brief summary of the Kermit-65 commands.
  18234. 13.5. Kermit-65 Commands                                               Page 326
  18235.  
  18236. -------------------------------------------------------------------------------
  18237.                                THE MODEM COMMAND
  18238.  
  18239. Syntax: MODEM
  18240.  
  18241. Typing  MODEM causes the file KERMIT.MODEM in the default drive to be used as a
  18242. menu.  You will be able to select any line in the file to be sent to the modem.
  18243. Sorry,  you can't back up to a previous menu, you will have to Quit and execute
  18244. MODEM again.  A "connect" response from the modem will cause  Kermit  to  leave
  18245. the  modem  command  and  execute the CONNECT command.  For a Hayes modem, this
  18246. file should have commands using text status responses (not numbers).  One  com-
  18247. mand  per  line  with  comments allowed after the first space (blank). Use your
  18248. favorite editor to produce this ASCII text file.   Since  the  attention  Hayes
  18249. command  (AT)  requires a delay the "&" character takes one time delay for Ker-
  18250. mit.  Each "&" causes a delay of one second on a 6502 chip. If you have a  //gs
  18251. or  an  accelerator  board the timing may change and you may require several to
  18252. produce a one second delay.  Normally Kermit will wait for 27 seconds (again on
  18253. a  6502 chip) for the modem to respond, but any character typed on the keyboard
  18254. will terminate this wait.  You may hear the busy signal and there is  no  sense
  18255. waiting any longer, so hit (crash-not so hard) any key on the keyboard.
  18256.  
  18257. Following is an example of the KERMIT.MODEM file:
  18258.  
  18259.   +++&&ATH This should get the Hayes modem's attention and then hang up.
  18260.   ATDP1234567 Call your local BBS with pulse dialing.
  18261.   ATDT8901234 Call your work dialup phone with touch tone dialing.
  18262.  
  18263.  
  18264.                               THE CATALOG COMMAND
  18265.  
  18266. Syntax: CATALOG
  18267.  
  18268. Typing CATALOG produces a catalog (directory) listing of your default drive.
  18269.  
  18270.  
  18271.                               THE DELETE COMMAND
  18272.  
  18273. Syntax: DELETE filespec
  18274.  
  18275. Typing DELETE causes the file specified to be deleted.
  18276.  
  18277.  
  18278.                               THE SERVER COMMAND
  18279.  
  18280. Syntax: SERVER
  18281.  
  18282. Typing  SERVER  alone turns Kermit into a file server to a remote Kermit.  Cur-
  18283. rently server mode will handle remote "send", "get", "remote"  and  "fin"  com-
  18284. mands.    Variants of the above commands will probably work but file serving is
  18285. very limited at present.  Because the Apple requires knowledge  of  file  types
  18286. you  can  use  the  "remote Kermit" (or whatever the remote Kermit's syntax is)
  18287. command to set the file-type on the server.  Yes, the server will  execute  any
  18288. command so you can really get the server into trouble (this is not a BBS).  You
  18289. must have the appropiate file type set before transfering files.  You can  exit
  18290. server  mode  by  typing  Control-C  (^C)  when not doing file transfers or the
  18291. remote can of course terminate via the "fin" command.
  18292. 13.5. Kermit-65 Commands                                               Page 327
  18293.  
  18294. -------------------------------------------------------------------------------
  18295.                               THE REMOTE COMMAND
  18296.  
  18297. Syntax: REMOTE [option character-string]
  18298.  
  18299. The only option  currently  is  "kermit".  This  command  submits  the  command
  18300. "character-string"  to  the  remote Kermit's command processor.  Currently only
  18301. short replys are supported so returned messages about the size of the  "receive
  18302. packet  size"  are  the  limit.    The obvious usage is for setting and showing
  18303. parameters on the remote Kermit.
  18304.  
  18305.  
  18306.                           THE EXIT AND QUIT COMMANDS
  18307.  
  18308. Syntax: EXIT or QUIT
  18309.  
  18310. Exit from Kermit-65.  You can restart the program,  provided  you  haven't  run
  18311. anything else, by typing 'CALL 4096'.
  18312.  
  18313.  
  18314.                                 THE SET COMMAND
  18315.  
  18316. Syntax: SET parameter [option [value]]
  18317.  
  18318. Establish  or  modify  various parameters for file transfer or terminal connec-
  18319. tion.  You can examine their values with  the  SHOW  command.    The  following
  18320. parameters may be SET:
  18321.  
  18322.  
  18323.     APPLICATION-MODE   Set VT100 gs keypad in/out of application mode.
  18324.                 BAUD   Which baud rate should the com card use?
  18325.    CURSOR-KEYS-VT100   In VT100 mode cursor keys give VT100 sequences.
  18326.            DEBUGGING   TERSE or VERBOSE packet information.
  18327.         DEFAULT-DISK   Which Diskette drive is used for DOS 3.3 file transfer?
  18328.              DISPLAY   Which type of screen display is being used?
  18329.               ESCAPE   Character for terminal connection.
  18330.            FILE-TYPE   Type of Apple DOS file being sent/received.
  18331.         FILE-WARNING   Warn users if incoming file exists?
  18332.                 FLOW   Should xon/xoff flow control be used to the remote?
  18333.             KEYBOARD   II+ or //e keyboard.
  18334.               KEYPAD   Is there a gs style keypad?
  18335.           LOCAL-ECHO   Full or half duplex switch.
  18336.               PARITY   Character parity to use
  18337.               PREFIX   Which default prefix to use with PRODOS?
  18338.              PRINTER   Should the printer be used for the display?
  18339.              RECEIVE   Various parameters for receiving files
  18340.                 SEND   Various parameters for sending files
  18341.                 SLOT   Which slot # is communication device in?
  18342.                TIMER   Should Kermit observe the receive timeout value?
  18343.             TERMINAL   Which type of terminal should Kermit emulate?
  18344. 13.5. Kermit-65 Commands                                               Page 328
  18345.  
  18346. -------------------------------------------------------------------------------
  18347.     SET APPLICATION-MODE
  18348.  
  18349. Syntax: SET APPLICATION-MODE {ON, OFF}
  18350.  
  18351. For  VT100 emulation with a gs-style keypad you can set the keypad in or out of
  18352. application mode. Some computer systems set this via escape sequences so it may
  18353. not be necessary to use this command.
  18354.  
  18355.  
  18356.     SET BAUD
  18357.  
  18358. Syntax: SET BAUD value
  18359.  
  18360. Value  is  the baud rate for your communication card.  For the super serial and
  18361. the microtek it can be 300 to 19200.  The actual values will  depend  upon  the
  18362. com card you are running with.
  18363.  
  18364.  
  18365.     SET CURSOR-KEYS-VT100
  18366.  
  18367. Syntax: SET CURSOR-KEYS-VT100 {ON, OFF}
  18368.  
  18369. In VT100 emulation the cursor keys can also emulate the VT100 cursor keys.
  18370.  
  18371.  
  18372.     SET DEBUGGING
  18373.  
  18374. Syntax: SET DEBUGGING {TERSE, VERBOSE, OFF}
  18375.  
  18376. Record  the  packet  traffic on your terminal.  Options are: TERSE, Show packet
  18377. info only (brief).  VERBOSE displays packet field descriptions with packet info
  18378. (lengthy).    OFF  disables  display  of  debugging  information  (this  is the
  18379. default).
  18380.  
  18381.  
  18382.     SET DEFAULT-DISK
  18383.  
  18384. Syntax: SET DEFAULT-DISK {SLOT, VOLUME, DRIVE} value
  18385.  
  18386. This DOS command will tell Kermit-65 which disk drive should be used  for  file
  18387. transfers.    The three parameters which may be set separately are SLOT, VOLUME
  18388. and DRIVE.  The value for SLOT ranges from 1 to 7. The value for DRIVE  is  ei-
  18389. ther 1 or 2.  The value for VOLUME ranges from 0 to 255.
  18390.  
  18391.  
  18392.     SET ESCAPE
  18393.  
  18394. Syntax: SET ESCAPE hexidecimal-number
  18395.  
  18396. Specify  the  control character you want to use to "escape" from remote connec-
  18397. tions back to Kermit-65.  The default is 0 (Control-@).  The number is the  hex
  18398. value  of  the ASCII control character, 1 to 37, for instance 2 is Control-B, B
  18399. is Control-K.
  18400. 13.5. Kermit-65 Commands                                               Page 329
  18401.  
  18402. -------------------------------------------------------------------------------
  18403.     SET FILE-TYPE
  18404.  
  18405. Syntax: SET FILE-TYPE {APPLESOFT, INTEGER, TEXT, BINARY, OTHER hex-value}
  18406.  
  18407. This will inform Kermit-65 what type of file is being sent or received.  It  is
  18408. important  that this is set correctly since Kermit-65 must create a file of the
  18409. appropriate type when receiving (and it has no way of knowing what kind of file
  18410. it  is).    When Kermit-65 is sending, it must also know the type of file since
  18411. that tells it how to detect the actual end-of-file.    The  keywords  for  this
  18412. parameter are listed below.  OTHER includes an added hex-value so that the user
  18413. may specify the hex value of the file-type.  This has meaning  only  in  PRODOS
  18414. and  allows  the  user  to specify any of the many different file types used in
  18415. PRODOS. I would list the hex values vs file type if I had them.  So if you have
  18416. them send them along and I will include them here.
  18417.  
  18418.     APPLESOFT       The file being transfered is an Applesoft Basic program.
  18419.  
  18420.     INTEGER         The file being sent/received is an Integer Basic program.
  18421.  
  18422.     TEXT            The file being sent/received is an ASCII Text file.
  18423.  
  18424.     BINARY          The file being sent/received is a Binary image.
  18425.  
  18426.     OTHER           The  type  of  file being sent/received is specified by the
  18427.                     hex-value.
  18428.  
  18429.  
  18430.     SET FILE-WARNING
  18431.  
  18432. Syntax: SET FILE-WARNING {ON, OFF}
  18433.  
  18434. This tells Kermit-65 whether to warn the user  about  incoming  filenames  con-
  18435. flicting with existing files or not.  If there is a conflict Kermit-65 will at-
  18436. tempt to change the file name to something unique.
  18437.  
  18438.  
  18439.     SET FLOW
  18440.  
  18441. Syntax: SET FLOW {OFF, XON, DELAY number}
  18442.  
  18443. SET FLOW allows one to use the XON/XOFF protocol when  connected  to  a  remote
  18444. site.  Delay timings are part of this command.  Using delay times is probably a
  18445. desperation move to keep the screen/printer from losing  characters.    Setting
  18446. the timings will have to be set by experience.  Perhaps the best way to set the
  18447. timings is to bring the values down until you get failures and then double  the
  18448. timing figure.  Both LOG and SET PRINTER will probably depend on flow control.
  18449.  
  18450.     OFF             Turn off flow control
  18451.  
  18452.     XON             Turn on xon/xoff flow control with the remote
  18453.  
  18454.     DELAY number    Delay the micro until XOFF takes effect
  18455.  
  18456. Delay  followed by a number (including 0) delays the program for that many mil-
  18457. liseconds after the XOFF is given to the remote.  This delay allows the XOFF to
  18458. take effect before the program continues.
  18459. 13.5. Kermit-65 Commands                                               Page 330
  18460.  
  18461. -------------------------------------------------------------------------------
  18462.     SET KEYBOARD
  18463.  
  18464. Syntax: SET KEYBOARD {2P, 2E}
  18465.  
  18466. SET  KEYBOARD tells Kermit-65 if the user has a full keyboard (2E) or not (2P).
  18467. If the user is on an Apple II+,  this  should  be  set  to  2P  (which  is  the
  18468. default).   When set to that, character translations are available by using the
  18469. right-arrow key as a prefix character, as shown in Table 13-3.
  18470.  
  18471.  
  18472.     SET KEYPAD
  18473.  
  18474. Syntax: SET KEYPAD {ON, OFF}
  18475.  
  18476. SET KEYPAD tells Kermit-65 if the user has an Apple//gs-style keypad available.
  18477. This  is  automatically set on a gs but must be set manually on other machines.
  18478. With keypad set ON then "VT100 keypad on an Apple keyboard"  (see  below)  will
  18479. not be used but the actual keypad will be.
  18480.  
  18481.  
  18482.     SET PRINTER
  18483.  
  18484. Syntax: SET PRINTER {ON, SLOT} number
  18485.     or SET PRINTER OFF
  18486.  
  18487. This  allows  one  to turn the printer on for printing what is displayed on the
  18488. screen.  With all the different printers and printer cards there will be a  lot
  18489. of  variability  here but flow control (XON/XOFF) is probably required when you
  18490. are connected to a remote site. The printer can also be toggled on/off via  the
  18491. ESCAPE character followed by the command "P".
  18492.  
  18493. Remember  when you use your printer there are a lot of variables here. What was
  18494. being sent to the screen now is being sent  to  your  printer.    If  you  were
  18495. emulating  the  VT52  your  printer  may  not know how to handle the escape se-
  18496. quences, tabs, etc. It may be you can tell the host you are a tty or some  such
  18497. device that will give produce control codes that your printer can handle.  Some
  18498. printers may require the flow control and delay to get readable printing.
  18499.  
  18500.     ON              Turn the printer on, slot number is required.
  18501.  
  18502.     OFF             Turn the printer off.
  18503.  
  18504.     SLOT number     Printer card is in slot "number".
  18505.  
  18506.  
  18507.     SET SLOT
  18508.  
  18509. Syntax: SET SLOT number
  18510.  
  18511. This option tells Kermit-65 in which slot the communication device is  located.
  18512. The range for the number parameter is 1-7.
  18513. 13.5. Kermit-65 Commands                                               Page 331
  18514.  
  18515. -------------------------------------------------------------------------------
  18516.     SET TIMER
  18517.  
  18518. Syntax: SET TIMER {ON, OFF}
  18519.  
  18520. SET  TIMER will turn on or off the timeout checking for receive file transfers.
  18521. Since there is no clock for exact timing a loop of instructions has been set up
  18522. assuming a 1 megacycle CPU.  CPUs which run faster will have to make allowances
  18523. via the SET RECEIVE TIMEOUT command.
  18524.  
  18525.  
  18526.     SET TERMINAL
  18527.  
  18528. Syntax: SET TERMINAL {MONITOR, NONE, VT100, VT52}
  18529.  
  18530. When TERMINAL is NONE, then all incoming characters (except nulls)  are  passed
  18531. directly to the display.
  18532.  
  18533. MONITOR  emulation  simply displays all the characters received from the remote
  18534. (except nulls) without any formating of the screen (40  or  80  characters  per
  18535. line).  Control characters are displayed inverse.
  18536.  
  18537.  
  18538. VT100 Emulation
  18539.  
  18540. The  Kermit-65  VT100  emulator is a small but working set of a true VT100 ter-
  18541. minal.  It appears to work with most of the standard full  screen  editors  and
  18542. processors  on  BSD  UNIX  and  VAX/VMS machines.  Ah Apple//e, //c, or //gs is
  18543. probably required with the Apple 80 column text card.  Sorry, but  the  II  and
  18544. II+  will  probably  have  to use one of the other terminal options.  The VT100
  18545. keypad has also been defined for the application mode via the  OA/CA/game  but-
  18546. ton.    Figure  13-1  shows the Apple keypad looks like to ED (VMS), and Figure
  18547. 13-2 shows the layout on an Apple//gs keyboard.  When using EVE (VMS) the mean-
  18548. ing of the keys will of course change.
  18549.  
  18550. As  you  can see the keypad is physically laid out like the VT100 keypad except
  18551. for the lower right corner.  Notice that above the keys are  the  VT100  labels
  18552. while within the box (key) is the Apple key label.  Also the arrow keys work as
  18553. VT100 arrow keys with the OA/CA/game button.
  18554.  
  18555.  
  18556. VT52 Emulation
  18557.  
  18558. SET TERMINAL VT52 will turn on the VT52 terminal emulation.  One thing that  is
  18559. required  is  your  80-column  card  must  handle  the $16 command in order for
  18560. reverse scrolling to work.  The Apple//e 80 column card handles this fine.  The
  18561. VT52  keypad  has  been defined using the open/closed Apple.  For II or II+ one
  18562. will have to have a game paddle or joy stick (key shift mod too????)   and  use
  18563. the  buttons.  When a button/open/closed Apple is pushed then the keys starting
  18564. with 6,7,8 & 9 form the top of the keypad. Key 6 is the blue key key 7  is  the
  18565. red  key etc. The keys directly below the 6,7,8 & 9 and shifted one-half key to
  18566. the right form the second row of the keypad etc. Every thing is fine until  you
  18567. get to the last row on the keypad. There the sp bar is 0 and the other two keys
  18568. are moved to the upper right as the 0 & - keys.  This way the  arrow  keys  are
  18569. available  as  VT52 keys with the OA/CA/game button combination (thanks to Dick
  18570. Atlee for this idea).  With those  two  exceptions  the  keypad  is  physically
  18571. similar  to  a  VT52 keypad.  Remember the open/closed Apple or the game button
  18572. 13.5. Kermit-65 Commands                                               Page 332
  18573.  
  18574. -------------------------------------------------------------------------------
  18575. -------------------------------------------------------------------------------
  18576.  
  18577.  
  18578.  
  18579.                        PF1     PF2     PF3     PF4     .(period)
  18580.                      ------- ------- ------- ------- -------
  18581.                     |       |       |findnxt|delline|select |
  18582.                     |   6   |   7   |   8   |   9   |   0   |
  18583.                     | gold  | help  | find  |undelln| reset |
  18584.                      ------- ------- ------- ------- -------
  18585.                           7       8       9       -
  18586.                         ------- ------- ------- -------
  18587.                        | page  |section|append |delword|
  18588.                        |   Y   |   U   |   I   |   O   |
  18589.                        |command| fill  |replace|undelwd|
  18590.                         ------- ------- ------- -------
  18591.                              4       5       6       ,
  18592.                            ------- ------- ------- -------
  18593.                            |advanc|backup |  cut  |delchar|
  18594.                            |  H   |   J   |   K   |   L   |
  18595.                            |bottom|  top  | paste |undelch|
  18596.                            ------- ------- ------- -------
  18597.                                 1       2       3       ENTER
  18598.                               ------- ------- ------- -------
  18599.                              | word  |  eol  | char  | enter |
  18600.                              |   N   |   M   |   ,   |   .   |
  18601.                              |chgcase|deleol |specins|  sub  |
  18602.                               ------- ------- ------- -------
  18603.                                     0
  18604.         ---------------------------------------
  18605.                                     bline      |
  18606.              space bar                         |
  18607.                                    openline    |
  18608.         ---------------------------------------
  18609.  
  18610.                Figure 13-1:   VT100 Keypad on an Apple Keyboard
  18611.  
  18612. -------------------------------------------------------------------------------
  18613.  
  18614. must be pushed (like the cntl key) to get the keypad emulation.    Figure  13-3
  18615. should clear up the questions.
  18616.  
  18617. The arrow keys work as VT52 arrow keys with the OA/CA/game button.
  18618.  
  18619.  
  18620.                                THE SHOW COMMAND
  18621.  
  18622. Syntax: SHOW [option]
  18623.  
  18624. The SHOW command displays various information:
  18625.  
  18626.     ALL                     All parameter settings (this is quite long).
  18627.  
  18628.     BAUD                    Baud rate of the com card.
  18629.  
  18630.     CURSOR-KEYS-VT100       Are  the  cursor  keys  emulating  the VT100 cursor
  18631. 13.5. Kermit-65 Commands                                               Page 333
  18632.  
  18633. -------------------------------------------------------------------------------
  18634. -------------------------------------------------------------------------------
  18635.  
  18636.  
  18637.  
  18638.                        PF1     PF2     PF3     PF4
  18639.                      ------- ------- ------- -------
  18640.                     |       |       |findnxt|delline|
  18641.                     | CLEAR |   =   |   /   |   *   |
  18642.                     | gold  | help  | find  |undelln|
  18643.                      ------- ------- ------- -------
  18644.                        7       8       9       -
  18645.                      ------- ------- ------- -------
  18646.                     | page  |section|append |delword|
  18647.                     |   7   |   8   |   9   |   +   |
  18648.                     |command| fill  |replace|undelwd|
  18649.                      ------- ------- ------- -------
  18650.                        4       5       6       ,
  18651.                      ------- ------- ------- -------
  18652.                     | advanc|backup |  cut  |delchar|
  18653.                     |   4   |   5   |   6   |   -   |
  18654.                     | bottom|  top  | paste |undelch|
  18655.                      ------- ------- ------- -------
  18656.                        1       2       3       ENTER
  18657.                      ------- ------- ------- -------
  18658.                     | word  |  eol  | char  |       |
  18659.                     |   1   |   2   |   3   |       |
  18660.                     |chgcase|deleol |specins|       |
  18661.                      ------- ------- -------| enter |
  18662.                             0          .    | ENTER |
  18663.                      -----------------------|  sub  |
  18664.                     |    bline      |select |       |
  18665.                     |      0        |   .   |       |
  18666.                     |  openline     | reset |       |
  18667.                      -------------------------------
  18668.  
  18669.        Figure 13-2:   VT100 Keypad on an Apple//gs or Equivalent Keypad
  18670.  
  18671. -------------------------------------------------------------------------------
  18672.  
  18673.                             keys?
  18674.  
  18675.     DEBUGGING               Debugging mode.
  18676.  
  18677.     DEFAULT-DISK            Which Diskette drive is used for file transfer?
  18678.  
  18679.     DEVICE-DRIVER           Which communication device is being used?
  18680.  
  18681.     DISPLAY                 Which screen display is being used?
  18682.  
  18683.     ESCAPE                  Character for terminal connection.
  18684.  
  18685.     FILE-TYPE               Of Apple DOS/PRODOS file being sent/received.
  18686.  
  18687.     FILE-WARNING            Warn users if incoming file exists?
  18688.  
  18689.     FLOW                    Should XON/XOFF flow control be used to the remote?
  18690. 13.5. Kermit-65 Commands                                               Page 334
  18691.  
  18692. -------------------------------------------------------------------------------
  18693. -------------------------------------------------------------------------------
  18694.  
  18695.  
  18696.  
  18697.     ^ is up arrow    BLUE     RED     GRAY     ^    .(period) ENTER
  18698.                      ------- ------- ------- ------- ------- -------
  18699.                     |       |       |delline|  up   |select | enter |
  18700.                     |   6   |   7   |   8   |   9   |   0   |   -   |
  18701.                     | gold  | help  |undelln|replace| reset |  sub  |
  18702.                      ------- ------- ------- ------- ------- -------
  18703.       v is down arrow     7       8       9       v
  18704.                         ------- ------- ------- -------
  18705.                        | page  |findnxt|delword| down  |
  18706.                        |   Y   |   U   |   I   |   O   |
  18707.                        |command| find  |undelwd|section|
  18708.                         ------- ------- ------- -------
  18709.                              4       5       6       ->
  18710.                            ------- ------- ------- -------
  18711.                            |advanc|backup |delchar| right |
  18712.                            |  H   |   J   |   K   |   L   |
  18713.                            |bottom|  top  |undelch|specins|
  18714.                            ------- ------- ------- -------
  18715.                                 1       2       3      <-
  18716.                               ------- ------- ------- -------
  18717.                              | word  |  eol  |  cut  | left  |
  18718.                              |   N   |   M   |   ,   |   .   |
  18719.                              |chgcase|deleol | paste |append |
  18720.                               ------- ------- ------- -------
  18721.                                    0
  18722.         ---------------------------------------
  18723.                                     bline      |
  18724.              space bar                         |
  18725.                                    openline    |
  18726.         ---------------------------------------
  18727.  
  18728.                 Figure 13-3:   VT52 Keypad on an Apple Keyboard
  18729.  
  18730. -------------------------------------------------------------------------------
  18731.  
  18732.     KEYBOARD                II+ or //e keyboard.
  18733.  
  18734.     KEYPAD                  Does a gs-style keypad exist?
  18735.  
  18736.     LOCAL-ECHO              Full or half duplex switch.
  18737.  
  18738.     PARITY                  Character parity to use
  18739.  
  18740.     PREFIX                  Which default prefix to use with PRODOS?
  18741.  
  18742.     PRINTER                 Should the printer be used for the display?
  18743.  
  18744.     RECEIVE                 Various parameters for receiving files
  18745.  
  18746.     SEND                    Various parameters for sending files
  18747.  
  18748.     SLOT                    Which slot # is communication device in?
  18749. 13.5. Kermit-65 Commands                                               Page 335
  18750.  
  18751. -------------------------------------------------------------------------------
  18752.     TIMER                   Is the receive timeout on or off?
  18753.  
  18754.     TERMINAL                Which terminal (if any) should Kermit emulate?
  18755.  
  18756. The above options are analogous to the equivalent SET commands.
  18757.  
  18758.  
  18759.                               THE STATUS COMMAND
  18760.  
  18761. Syntax: STATUS
  18762.  
  18763. Give statistics about the most recent file transfer. This includes  information
  18764. such   as  number  of  characters  sent/received,  number  of  data  characters
  18765. sent/received, and last error encountered.
  18766.  
  18767.  
  18768.                                 THE LOG COMMAND
  18769.  
  18770. Syntax: LOG filespec
  18771.  
  18772. When connected to a remote  site,  log  the  remote  session's  output  to  the
  18773. specified  file.    The file type and file warning protocols are observed. This
  18774. command is dependent upon the flow control (XON/XOFF) working.    Without  flow
  18775. control  there  is little possibility of getting a correct copy of the terminal
  18776. session.  The logging begins when you connect to the remote and  is  terminated
  18777. when  you escape back to the local Kermit with the ESCAPE character followed by
  18778. the "C" command.
  18779.  
  18780.  
  18781. 13.6. Standard Installation
  18782.  
  18783. To bootstrap Kermit to the Apple, get the files APP3xx.1 thru APP3xx.2 on a DOS
  18784. 3.3  diskette,  where  xx  is the current version.  Make sure the diskette is a
  18785. master diskette and empty.  Rename the files to ker3xx.1 thru ker3xx.2.   Then:
  18786.  
  18787.   EXEC KER3xx.1,R25
  18788.  
  18789. You  will be asked several questions about your hardware and the program should
  18790. execute and produce a binary and kermit.init with some  starting  instructions.
  18791. If  you  want to run Kermit on PRODOS simply use the PRODOS conversion routines
  18792. to move the binary and kermit.init to PRODOS.  If you want other options  as  a
  18793. regular  thing then change file "kermit.init" with your changes. Then make sure
  18794. the file is on the same disk as the binary.
  18795.  
  18796.  
  18797.     Files Supplied for Kermit-65
  18798.  
  18799. The following files should be supplied on the distribution tape:
  18800.  
  18801.     APPAAA.HLP     List of files (like this one)
  18802.     APP381.1       Easy install file 1 (an exec file for DOS 3.3)
  18803.     APP381.2       Easy install file 2 (an exec file for DOS 3.3)
  18804.     APPACC.HEX     Apple com card hex
  18805.     APPACC.M65     Apple com card source
  18806.     APPCCS.HEX     CCS 7710 com card hex
  18807.     APPCCS.M65     CCS 7710 com card source
  18808. 13.6. Standard Installation                                            Page 336
  18809.  
  18810. -------------------------------------------------------------------------------
  18811.     APPCPS.HEX     CPS com card hex
  18812.     APPCPS.M65     CPS com card source
  18813.     APPGS.HEX      GS serial port hex
  18814.     APPGS.M65      GS serial port source
  18815.     APPHMM.HEX     Hayes micro modem card hex
  18816.     APPHMM.M65     Hayes micro modem card source
  18817.     APPLE.DOC      Complete documentation (it says here)
  18818.     APPLE.MSS      Scribe text formatter source for documentation
  18819.     APPMAI.HEX     Main kermit pgm hex
  18820.     APPMAI.M65     Main kermit pgm source
  18821.     APPMAK.UNX     Make file for UNIX cross assembly (to assemble Kermit)
  18822.     APPMSV.HEX     Microtec com card hex
  18823.     APPMSV.M65     Microtec com card source
  18824.     APPSSC.HEX     Super serial com card hex
  18825.     APPSSC.M65     Super serial com card source
  18826.     APPXAS.1       65c02 cross assembler for UNIX system part 1
  18827.     APPXAS.2       65c02 cross assembler for UNIX system part 2
  18828.     APPXAS.3       65c02 cross assembler for UNIX system part 3
  18829.  
  18830. The syntax of the filenames may vary.  On UNIX systems, the filenames  will  be
  18831. in lowercase.  On VM/CMS systems, the period will be replaced by a space.
  18832.  
  18833.  
  18834.     Alternate Installation
  18835.  
  18836. The  main  problem exists in getting the hex files onto your diskette as a text
  18837. file.  But again that is a test of your creativity. If you have  a  version  of
  18838. Kermit running then GET or RECIEVE the file as a text file and you are in busi-
  18839. ness.  Since Kermit has been separated into two assemblies then two  hex  files
  18840. will  have  to be present on the diskette. Get the main hex file APPMAI.HEX and
  18841. select which com card hex you will need. First "exec APPMAI.HEX".   Your  Apple
  18842. (or  compatable)  will  go  into  monitor and show you *'s for several minutes.
  18843. This is the monitor loading the hex into binary.  If you  get  beeps  from  the
  18844. monitor  its  probably because you didnt get a good copy of the text file.  Now
  18845. EXEC the com card driver you are going to use.  You will have to get back  into
  18846. basic(aha  another  test  for you,try "3d0G") to do this.  And you will see the
  18847. monitor loading the com driver. The order of EXEC's is important.  The com card
  18848. should   be   loaded  last.    Next  get  back  into  basic  and  do  a  "bsave
  18849. kermit,A$1000,L$6e00".  You may have to specify the drive  to  do  this  binary
  18850. save, with a slot or drive on the end of the BSAVE (aha another test).  You now
  18851. run Kermit via "brun kermit".
  18852.  
  18853. If you want to customize Kermit for your equipment, the recommended  method  is
  18854. to use file "kermit.init" or do all your SETs, etc, and then do an "exit".  Now
  18855. you should be back in BASIC.  At this point do a "bsave name,A$1000,L$6e00" and
  18856. when  you  do  a  "brun name" all your setups will be remembered.  NOTE: If you
  18857. save your current settings via "bsave kermit ..." you may find that moving that
  18858. binary  to  another type of Apple (e.g. from a //e to an //e+) will not be pos-
  18859. sible.  So make sure you keep the  original  binary  to  move  between  machine
  18860. types.
  18861.  
  18862. Since  the org is now $1000 if you have been using Kermit and then went back to
  18863. basic for some trivial thing a "CALL  4096"  should  start  up  Kermit  without
  18864. having to reload it.
  18865.  
  18866. In summary:
  18867. 13.6. Standard Installation                                            Page 337
  18868.  
  18869. -------------------------------------------------------------------------------
  18870.    1. EXEC APPMAI.HEX
  18871.  
  18872.    2. Choose the com card driver you will use.  For example APPSSC.HEX.
  18873.  
  18874.    3. 3D0G
  18875.  
  18876.    4. EXEC APPSSC.HEX
  18877.  
  18878.    5. BSAVE kermit,A$1000,L$6e00
  18879.  
  18880. And you should be in business.  Remember there is the command HELP and whenever
  18881. you are into a command a "?" will give you the  posible  options  available  at
  18882. that  point of a command.  The escape key will finish typing an option if it is
  18883. possible. The syntax of all the  commands  and  options  only  requires  enough
  18884. characters to make that command or option unique.
  18885.  
  18886.  
  18887. 13.7. Problems
  18888.  
  18889.  
  18890.     Installation
  18891.  
  18892. NOTE:  When  using  the  super  serial driver you must have the cards sw6-2 on.
  18893. This allows the card to use interupts. The rest of the switches  are  set  from
  18894. within  Kermit.  It  appears that you can run your Apple 2 with sw6-2 on and in
  18895. 99% of the cases will cause no problems.  This is because DOS runs with  inter-
  18896. upts  locked  out  ("sei" in assembly language) and the program must explicitly
  18897. give a "cli" for interupts to work (the super serial driver does).
  18898.  
  18899. The Microtek driver is a super serial look alike which does not run with inter-
  18900. upts.    If you have trouble with the super serial driver you might try the MSV
  18901. driver.  For you people with the MSV-622c card, you might try running a  jumper
  18902. from  the UART 6551 pin 26 to the card edge pin 30.  This will enable interupts
  18903. just like the SSC sw2-6, and then you can use the super serial driver.
  18904.  
  18905. The Prometheus card will work with the Apple com driver.  However you will have
  18906. to  set  the switches on the card for baud etc.  Evidently this card can not be
  18907. programed by the software. If that is not true then here is an  oportunity  for
  18908. you  to write a better driver. If you do please pass it on for other Prometheus
  18909. users.
  18910.  
  18911. Unconfirmed reports have it that the Apple Cat will work  with  the  Apple  com
  18912. driver.  Would appreciate a confirmation.
  18913.  
  18914. Some  have  noted  the Apple com card must be initialized via the "IN#x" before
  18915. starting Kermit. Ike has now updated this driver and the initialization is  now
  18916. done within the Apple com driver.  Thanks Ike.
  18917.  
  18918.  
  18919.     Usage
  18920.  
  18921. There  is the command HELP and whenever you are into a command a "?"  will give
  18922. you the posible options available at that point of a command.  The  escape  key
  18923. will  finish typing an option if it is possible. The syntax of all the commands
  18924. and options only requires enough characters to  make  that  command  or  option
  18925. unique.
  18926. 13.7. Problems                                                         Page 338
  18927.  
  18928. -------------------------------------------------------------------------------
  18929. When  using flow control you may appear to hang. Type a ^Q (Control-Q) and that
  18930. may free you up.
  18931.  
  18932. Remember when you use your printer there are a lot of variables here.  What was
  18933. being  sent  to  the  screen  now  is  being sent to your printer.  If you were
  18934. emulating the VT52 your printer may not know  how  to  handle  the  escape  se-
  18935. quences,  tabs  etc. It may be you can tell the host you are a tty or some such
  18936. device that will give carrage returns etc that your printer can handle.    Some
  18937. printers may require the flow control and delay to get readable printing.
  18938.  
  18939. File  transfer  is  very  dependent  upon  parity. Make sure the host and local
  18940. parity are the same.
  18941.  
  18942.  
  18943. 13.8. Customizing Kermit-65
  18944.  
  18945. The source code to Kermit-65 is in 6502 Assembler. It has been formatted for  a
  18946. cross  assembler  which  runs on a unix 2's complement machine.  Files appxas.1
  18947. thru appxas.3 are the cross assembler for UNIX.  Get the files on a UNIX system
  18948. and  then  look  at the documentation at the start. They will easily make you a
  18949. xasm for Kermit.  The file appmak.unx is the makefile to use with the  xasm  to
  18950. reassemble all of Kermit's parts.
  18951.  
  18952. Kermit-65 3.x has been separated into two assemblies, the main routines and the
  18953. com card routines for the devices shown in Table 13-1.  A vector has  been  set
  18954. up in low memory for the two assemblies to communicate. Look at the working com
  18955. drivers for tips on how to incorporate your version of  the  com  driver.  some
  18956. things  to note: It is probably best to buffer the input from the remote and to
  18957. get input characters from the remote every chance you get.  Note  the  Microtek
  18958. SV-622  driver, whenever the input is checked for a character and has a charac-
  18959. ter the character is put into the buffer immeadiatly.  Also when the output  is
  18960. checked  for  ready  to  output,  if the card is not ready to output then it is
  18961. checked for a character to input.  All this should help prevent losing  charac-
  18962. ters.
  18963.  
  18964. Communications card vector area:
  18965.  
  18966. address size  module   function
  18967. 1003    byte   main     This is the baud rate index as follows:
  18968.                          3 - 110
  18969.                          4 - 135.4
  18970.                          5 - 150
  18971.                          6 - 300
  18972.                          7 - 600
  18973.                          8 - 1200
  18974.                          9 - 1800
  18975.                         10 - 2400
  18976.                         11 - 3600
  18977.                         12 - 4800
  18978.                         13 - 7200
  18979.                         14 - 9600
  18980.                         15 - 19200
  18981.                         for example:
  18982.                         if index is 6 then line should be 300 baud
  18983. 1004    byte            unused
  18984. 1005    word   driver   Address of a null terminated string.
  18985. 13.8. Customizing Kermit-65                                            Page 339
  18986.  
  18987. -------------------------------------------------------------------------------
  18988.                         address should point to a capitalized
  18989.                         string of the drivers id
  18990. 1007    byte   main     Com slot in the form $n0 where n is slot #.
  18991. 1008    byte   main     Force initialization flag when 0.
  18992.                         init routine should always initialize when
  18993.                         this flag is 0 & then set flag non-zero.
  18994. 1009    word   main     Address of the end of Kermit main routine.
  18995. 100b    byte   main     Flow control is on when high bit is set.
  18996. 100c    word   driver   Address of the end of the com driver.
  18997. 1020  3 bytes  driver   Jump to initialization routine.
  18998. 1023  3 bytes  driver   Jump to command routine.  A reg has command
  18999.                           0 - hang up the line
  19000.                         $0b - set baud rate
  19001.                         $0c - set break on the line
  19002.                         $91 - do xon on the line
  19003.                         $93 - do xoff on the line
  19004.                         routine returns false (P reg zero flag)
  19005.                         if unable to do command.
  19006. 1026  3 bytes  driver   Jump to check for input from the line.
  19007.                         routine returns false (P reg zero flag)
  19008.                         if no character on line
  19009. 1029  3 bytes  driver   Jump to get input character from line.
  19010.                         routine returns character in A reg
  19011. 102c  3 bytes  driver   Jump to put character in A reg on line.
  19012. 102f  3 bytes  driver   Jump to reset com driver.
  19013. 1040  3 bytes  main     Jump to Apple ROM wait rtn. microsecs delay
  19014.                         =1/2(26+27A+5A*A) where A is the accumulator
  19015. 1043  3 bytes  main     Jump to routine to print null-terminated string.
  19016.                         X reg contains least significant byte of address
  19017.                         Y reg contains most significant byte of address
  19018.                         routine does not issue a carriage return.
  19019. 1046  3 bytes  main     Jump to routine to read the keyboard.
  19020.                         A reg contains the character read
  19021. 1049  3 bytes  main     Jump to routine to print carrage rtn & line feed.
  19022. 104f  3 bytes  main     Jump to routine to set characters parity.
  19023.                         A reg contains the character before and after.
  19024.  
  19025. All  the routines should return with the "rts" instruction.  Routines which can
  19026. return a true/false indication should return with the P reg zero flag  set  ap-
  19027. propiately.  That is: a "beq" instruction will branch on a false indication and
  19028. the "bne" will branch on a true indication.  The com driver  should  start  its
  19029. routines  above  the  main routines and tell where the end of the com driver is
  19030. via location $100c.  If your com driver gets too large then the  bsave  address
  19031. would have to be changed when you are saving the binary to diskette.
  19032. 14. MACINTOSH KERMIT                                                   Page 340
  19033.  
  19034. -------------------------------------------------------------------------------
  19035. 14. MACINTOSH KERMIT
  19036.  
  19037. Program:        Bill   Catchings,   Bill   Schilit,  Frank  da  Cruz  (Columbia
  19038.                 University),
  19039.                 Davide Cervone (University of Rochester),
  19040.                 Matthias Aebi (ECOFIN Research and Consulting, Ltd., Zuerich),
  19041.                 Paul Placeway (Ohio State University).
  19042. Language:       C (MPW)
  19043. Documentation:  Christine Gianone, Frank da Cruz, Paul Placeway
  19044. Version:        0.9(40)
  19045. Date:           May 26, 1988
  19046.  
  19047.  
  19048. MacKermit Capabilities At A Glance:
  19049.  
  19050.   Local operation:                   Yes
  19051.   Remote operation:                  Yes (server mode only)
  19052.   Login scripts:                     No
  19053.   Transfer text files:               Yes
  19054.   Transfer binary files:             Yes
  19055.   MacBinary transfers:               No
  19056.   Wildcard send:                     Yes (whole HFS folders)
  19057.   File transfer interruption:        Yes
  19058.   Filename collision avoidance:      Yes
  19059.   Can time out:                      Yes
  19060.   8th-bit prefixing:                 Yes
  19061.   Repeat count prefixing:            Yes
  19062.   Alternate block checks:            Yes
  19063.   Terminal emulation:                Yes (VT100,VT102)
  19064.   Communication settings:            Yes (Speed, Parity, Echo)
  19065.   XON/XOFF:                          Yes
  19066.   Transmit BREAK:                    Yes
  19067.   IBM mainframe communication:       Yes
  19068.   Transaction logging:               Yes
  19069.   Session logging:                   Yes
  19070.   Debug logging:                     No
  19071.   Packet logging:                    No
  19072.   Act as server:                     Yes
  19073.   Talk to server:                    Yes
  19074.   Advanced server functions:         Yes
  19075.   Local file management:             Yes
  19076.   Command/Init files:                No
  19077.   Key redefinition/macros:           Yes
  19078.   File attributes packets:           No
  19079.   Command macros:                    No
  19080.   Raw file transmit:                 No
  19081.   Long packets:                      Yes
  19082.   Sliding windows:                   No
  19083. 14.1. Introduction                                                     Page 341
  19084.  
  19085. -------------------------------------------------------------------------------
  19086. 14.1. Introduction
  19087.  
  19088. Macintosh Kermit, or "MacKermit", is  an  implementation  of  the  Kermit  file
  19089. transfer protocol for the Apple Macintosh family of computers. It was developed
  19090. at Columbia University, based on C-Kermit (which also forms the nucleus of Unix
  19091. Kermit  and  many other Kermit programs).  Version 0.9 of MacKermit runs on the
  19092. Macintosh 512, XL (Apple Lisa running MacWorks), 512e, Plus, SE, and II,  under
  19093. the regular Finder and the Multifinder, with which it can transfer files in the
  19094. background.  MacKermit 0.9 probably does not run on a 128k (original,  classic)
  19095. Macintosh,  due  to lack of sufficient memory, but should run OK on a "fat Mac"
  19096. (a 128K Mac upgraded to 512K).  Version 0.8 should be retained for 128K Macs.
  19097.  
  19098. This manual assumes you are acquainted with your Macintosh, and  that  you  are
  19099. familiar with the general ideas of data communication and Kermit file transfer.
  19100. A very brief overview is given here, but for details consult the early chapters
  19101. of  the  Kermit  User  Guide (of which this document is a chapter), or the book
  19102. Kermit, A File Transfer Protocol, by Frank da Cruz, Digital Press (1987).   For
  19103. further  information  about  Kermit  documentation,  updates,  lists of current
  19104. available versions, and ordering information, write to:
  19105.  
  19106.   Kermit Distribution
  19107.   Columbia University Center for Computing Activities
  19108.   612 West 115th Street
  19109.   New York, NY  10025  (USA)
  19110.  
  19111.  
  19112. 14.2. Installation
  19113.  
  19114. Before you can use Macintosh Kermit or any other communication program on  your
  19115. Mac,  you must have a way to connect it to the other computers you wish to com-
  19116. municate with.  This means either a direct cable connection  (usually  using  a
  19117. "null  modem" cable), or a modem connected to your Mac and to a telephone.  The
  19118. Macintosh poses two special problems at this level.  First, its connectors  are
  19119. not the standard 25-pin RS-232 style, but either 9-pin or 8-pin special connec-
  19120. tors which you need special adapters for.    Second,  the  Macintosh  does  not
  19121. supply a Data Terminal Ready (DTR) signal, which is required by most modems be-
  19122. fore they will operate.  To use your Mac with a  modem  that  is  not  designed
  19123. specifically  for the Mac, you have to either (a) configure the modem to ignore
  19124. the DTR signal, or (b) feed some other active signal into the modem's  DTR  in-
  19125. put.  The former is usually done with DIP switches on the modem, the latter can
  19126. be done in the connector that plugs into the modem by installing a jumper  wire
  19127. between  DTR  (pin  20) and DSR (pin 6), or by connecting the Mac's +12V output
  19128. (pin 6 on the Mac's 9-pin connector) to DTR (pin 20) on the modem end.
  19129.  
  19130. If you have received a Macintosh  Kermit  diskette  from  Columbia  University,
  19131. there's no special software installation procedure -- just insert the diskette,
  19132. double-click on the appropriate start-up file, or on MacKermit itself, and  go.
  19133. If  all  the  communication  and  other  settings agree with your requirements,
  19134. there's nothing else you need to do.  This process is illustrated in  the  next
  19135. section, just below.
  19136.  
  19137. MacKermit is not copy-protected, and nothing out of the ordinary is required to
  19138. make copies onto other diskettes, or onto your hard disk if you have one.  Just
  19139. use the ordinary Macintosh methods of copying files, folders, etc.
  19140.  
  19141. Later, you may wish to create settings files tailored to your communication en-
  19142. 14.2. Installation                                                     Page 342
  19143.  
  19144. -------------------------------------------------------------------------------
  19145. vironment, and you might also want to  customize  the  keyboard  configuration.
  19146. Use  the  various Settings options for this, and then select Save Settings from
  19147. the File menu.  Settings and settings files are explained in Sections 14.10 and
  19148. 14.11.
  19149.  
  19150.  
  19151. 14.3. Getting Started
  19152.  
  19153. Kermit programs perform two major functions, terminal emulation and file trans-
  19154. fer.  Before transferring files between two systems you must establish  a  ter-
  19155. minal  connection  from  your  system  to  the other one, either direct or else
  19156. dialed up using a modem.  Then to transfer files, login to the remote system if
  19157. necessary,  start  up  a  Kermit  program  there,  and then tell the two Kermit
  19158. programs which files to transfer, and in what direction.
  19159.  
  19160. Most Kermit programs present you with a prompt, in response to which you type a
  19161. command, repeating the process until you exit from the program.  If you want to
  19162. establish a terminal connection to another system, you must  give  the  CONNECT
  19163. command.    Unlike  these programs, MacKermit is always connected, and whatever
  19164. keystrokes you type are sent to the other system.  To give  commands  to  MacK-
  19165. ermit  itself, you must use the mouse to pull down menus from the menu bar that
  19166. overlays your terminal session, or type special Command-key equivalents.
  19167.  
  19168. The following example shows how to transfer a file with MacKermit.  The  remote
  19169. computer is a Unix system, but the method is the same with most others.
  19170.  
  19171.    - First  insert the MacKermit diskette.  It should appear on the screen
  19172.      as a diskette icon titled Kermit 0.9(40).  Click on it twice to  open
  19173.      if it did not open automatically when you inserted it in the drive.
  19174.  
  19175.    - Once  the  disk  is opened, you will see three MacKermit icons across
  19176.      the top of the screen.  For the Unix system and most others  you  can
  19177.      use  the  "Normal Settings" icon -- to start the Kermit program click
  19178.      twice on it.  For linemode connections to IBM mainframes,  you  would
  19179.      click twice on the "IBM Mainframe Linemode Settings" icon.
  19180.  
  19181.    - You  will  see a white backround with menus stored under the headings
  19182.      File, Edit, Settings, Remote, and Log.
  19183.  
  19184.    - Move  the  mouse  pointer   to   the   Settings   menu   and   select
  19185.      Communications... by clicking on it once.
  19186.  
  19187.    - MacKermit  normally  sets  the  communication  speed to 9600 bits per
  19188.      second.  Click on the circle in front of 1200 (or whatever speed  you
  19189.      need  to  match  the  baud  rate of your modem and/or remote system).
  19190.      Check to see that the other communication settings like parity are as
  19191.      required, and make any necessary changes.
  19192.  
  19193.    - Click on the "OK" box to accept the settings.
  19194.  
  19195.    - If you have a Hayes-like dialout modem, follow the next two steps:
  19196.  
  19197.         1. Type  AT  (uppercase)  and then press the Enter key.  The modem
  19198.            should respond with "OK" or  the  digit  "0"  (zero).    If  it
  19199.            doesn't,  check  the  cable, the modem, etc (consult your modem
  19200.            manual for details).
  19201. 14.3. Getting Started                                                  Page 343
  19202.  
  19203. -------------------------------------------------------------------------------
  19204.         2. Now type ATDT 7654321 followed by Enter (replace 7654321 by the
  19205.            actual phone number).  If the connection succeeds, you'll get a
  19206.            message like CONNECT (or the digit "1"), otherwise  you'll  see
  19207.            an error message like NO CARRIER, ERROR, etc, or a digit like 3
  19208.            or 4 (see your modem manual).
  19209.  
  19210.      For non-Hayes-compatible modems,  follow  the  instructions  in  your
  19211.      modem manual.  For direct connections, skip this step altogether.
  19212.  
  19213. Now  you  should  be talking to the Unix system.  Type a carriage return to get
  19214. its attention, and it will issue its login prompt.  In the examples below,  un-
  19215. derlining is used to show the parts that you would type.
  19216.  
  19217.   Login: christin          Login to the host.
  19218.   password:                (Passwords normally don't echo.)
  19219.  
  19220.   % kermit                 Run Kermit on the host.
  19221.  
  19222.   C-Kermit>receive         Tell it to receive a file.
  19223.  
  19224. Now tell MacKermit what file to send:
  19225.  
  19226.    - Use  the  mouse to point to the File menu and select the Send File...
  19227.      option.  You can either type in the name of the file (if you know the
  19228.      name)  or  select  the  alternate  drive to see what files are on the
  19229.      disk.  Once you see the file you want to send, click on the  filename
  19230.      and then click on the SEND option (or you can just click twice on the
  19231.      filename).
  19232.  
  19233.    - A "File Transfer Status" box will appear to report  the  progress  of
  19234.      the  transer.    NOTE: If the number of retries is increasing but not
  19235.      the number of packets, you should check your  Communications...  set-
  19236.      tings under the Settings menu.
  19237.  
  19238.    - When  the  file transfer is completed, the "File Transfer Status" box
  19239.      should disappear and the C-Kermit prompt should reappear.
  19240.  
  19241. You have just transferred a file from the Macintosh to the  Unix  system.    To
  19242. transfer a file in the other direction, use the "send filename" command on Unix
  19243. instead of "receive", and click on "Receive File..."  from the Mac's File menu,
  19244. instead of "Send File...".
  19245.  
  19246. After  the  file  is  transferred,  your  terminal  connection is automatically
  19247. resumed.  Once your Unix session is complete, you can log out,  and  then  exit
  19248. from MacKermit:
  19249.  
  19250.   C-Kermit>exit
  19251.  
  19252.   % ^D                     Logout from Unix by typing Ctrl-D.
  19253.  
  19254.    1. Select the Quit option in the File menu by clicking on it.
  19255.  
  19256.    2. Select the Close option in the File menu by clicking on it (assuming
  19257.       you want to close the current folder).
  19258.  
  19259.    3. Select the Eject option in the File menu by clicking on it (assuming
  19260. 14.3. Getting Started                                                  Page 344
  19261.  
  19262. -------------------------------------------------------------------------------
  19263.       you ran Kermit from a diskette that you want to eject).
  19264.  
  19265. That's  the  easiest  and  quickest way to use Kermit.  If this simple scenario
  19266. does not work for you, look for any obvious incorrect settings (speed, parity),
  19267. fix them, and try again.  Otherwise, read on.
  19268.  
  19269.  
  19270. 14.4. The Macintosh File System
  19271.  
  19272. The  Macintosh  file system consists of one or more disks, each disk containing
  19273. files.  There are actually two Macintosh file systems, which work slightly dif-
  19274. ferently.
  19275.  
  19276. Disks  formatted  for  the  older  Macintosh  File System (MFS) are essentially
  19277. "flat".  All files on one of these disks must have a unique name.  Files may be
  19278. collected together into "folders", but folders are not analogous to directories
  19279. on other file systems, and no two folders on the same disk may contain files of
  19280. the  same name; the folders exist only to make things look nicer in the Finder.
  19281. All Macintoshes have support for MFS.
  19282.  
  19283. Disks formatted with the newer Hierarchical File System (HFS) are  not  "flat";
  19284. each  folder is a directory.  There may not be more than one file with the same
  19285. name in a single folder, but there may be identically named files in  different
  19286. folders.
  19287.  
  19288. Macintosh  file names may contain practically any printable characters, includ-
  19289. ing space and punctuation -- but colon (":") may not be used;  it  is  used  in
  19290. device names and as the HFS path element separator.
  19291.  
  19292.  
  19293. 14.5. Menus
  19294.  
  19295. The  major  menus  are Apple, File, Edit, Settings, Remote, and Log.  The Apple
  19296. menu gives some information about the program, including the MacKermit  version
  19297. number  and  the  C-Kermit  protocol mudule version number (useful in reporting
  19298. bugs).  It also shows statistics about the most recent file transfer.
  19299.  
  19300. The File menu invokes Kermit's file transfer functions, Send, Get, and Receive.
  19301. It  also  allows settings to be saved and restored, and like most Macintosh ap-
  19302. plications, includes a "quit" entry for leaving the program, and  a  "transfer"
  19303. entry for transferring to another program without going through the Finder.
  19304.  
  19305. The Edit menu provides support for Macintosh desk accessories that need to have
  19306. this menu to do cut and paste.  This menu does not  currently  do  anything  in
  19307. MacKermit.
  19308.  
  19309. The  Settings menu provides dialog boxes for file, communications, and protocol
  19310. settings; these will be discussed below.
  19311.  
  19312. The Remote menu has the commands that can be sent to Kermit servers, as well as
  19313. an option to turn Macintosh Kermit itself into a server (also discussed below).
  19314.  
  19315. The  Log  menu contains commands to start and stop session and transaction log-
  19316. ging.  It also has an entry to dump the current screen  image  to  the  session
  19317. log, which is only enabled when the session log is open.
  19318. 14.6. Terminal Emulation                                               Page 345
  19319.  
  19320. -------------------------------------------------------------------------------
  19321. 14.6. Terminal Emulation
  19322.  
  19323. Before you can transfer files, you have to establish a terminal connection with
  19324. the other computer.  You don't have to give MacKermit any special command to do
  19325. this,  just  start  the program.  Assuming you have a physical connection, then
  19326. the software will use it.  If you think you have  a  physical  connection,  but
  19327. don't  see any results, click on the Settings menu and select Communications to
  19328. make sure you have the right speed and parity.  If you have to dial out to make
  19329. the  connection,  you  must do this yourself -- Mac Kermit won't do it for you.
  19330. Depending on the type of modem, you must either type  dialing  commands  to  it
  19331. directly  (like the Hayes ATDT command in the example in section 14.3), or else
  19332. dial the phone manually, wait for an answer and a carrier tone,  and  then  put
  19333. the modem in data mode.
  19334.  
  19335. Once  you've  made  the  connection, you can use MacKermit's terminal emulator,
  19336. which conforms to ANSI standard X3.64, providing a subset of  the  features  of
  19337. the DEC VT102 terminal (a VT100 with line and character insert and delete func-
  19338. tions added).  The functions provided are sufficient to allow MacKermit to  act
  19339. as a terminal for the EMACS full-screen editor as it exists on most timesharing
  19340. systems, and for most host-resident display-oriented applications  that  expect
  19341. to  do cursor positioning and editing on the VT100 or VT102 screen, such as VAX
  19342. TPU.  MacKermit does not currently support the following VT100/102 functions:
  19343.  
  19344.    - Double height or double width lines
  19345.    - Blinking
  19346.    - 132 columns
  19347.    - DEC-style line wrapping
  19348.    - Control characters embedded in escape sequences
  19349.    - VT52 mode
  19350.  
  19351. (this is not an exhaustive list)
  19352.  
  19353. The keyboard is set up by default as follows: If your Macintosh has  a  Control
  19354. key  (ie.  an  SE or II), Kermit uses it, and the Command (Fan, Cloverleaf) key
  19355. can be used for keyboard equivalents for menus.  If your Mac does  not  have  a
  19356. Control  key,  then  the Command key is used as the Control key.  The CAPS LOCK
  19357. key forces all alphabetic characters to upper  case.    The  terminal  emulator
  19358. sends  ESC  (escape) when the "`" (accent grave) key is pressed unshifted (even
  19359. if your keyboard has an ESC key).  The character "`" can be sent by typing Con-
  19360. trol  (or Command) and the same key.  The Backspace key sends a Delete (Rubout)
  19361. and Control-Backspace sends a Backspace.  On the original  Mac  keyboards,  the
  19362. main  keypad Enter key sends a "short" (250ms) BREAK signal.  The Mac+, Mac SE,
  19363. and Mac II do not have a main keypad Enter key, so the BREAK function  must  be
  19364. reassigned to another key.
  19365.  
  19366. You  can modify the keyboard layout any way you like, defining keyboard macros,
  19367. defining or moving  the  Control  and  Escape  keys,  etc.,  using  MacKermit's
  19368. built-in  key  configuration  features.    Older  MacKermits  (version  0.8 and
  19369. earlier) came with a separate key configuration program called  CKMKEY.    This
  19370. should  not  be  used, because it does not understand the format of the 0.9 and
  19371. later keyboard configuration software.
  19372.  
  19373. MacKermit includes a mouse-controlled cursor positioning feature for use during
  19374. terminal emulation.  If the "Mouse -> Arrow Keys" feature is turned on (via the
  19375. Terminal entry of the Settings menu), then when the mouse  button  is  pressed,
  19376. the  program  acts as if you typed the VT100 keypad arrow keys to move the ter-
  19377. 14.6. Terminal Emulation                                               Page 346
  19378.  
  19379. -------------------------------------------------------------------------------
  19380. minal cursor to where the mouse cursor is.  MacKermit does this by sending  the
  19381. absolute strings for arrow keys, independant of what is bound to the actual ar-
  19382. row keys of the keyboard.
  19383.  
  19384. MacKermit sets the Mac hardware to do 8-bit data communication with no  parity,
  19385. and then correctly sets the parity bit of each character itself in software, as
  19386. requested in the Communication settings menu.  This has the benefit of avoiding
  19387. the  problem of a machine which requires a different input parity than it sends
  19388. back.  MacKermit will correctly receive all of the characters sent  to  it,  no
  19389. matter which parity they are.
  19390.  
  19391. To allow useful coexistence of desk accessories and Kermit, the terminal emula-
  19392. tion window may be dragged using the drag bar.  If a  desk  accessory  overlays
  19393. the  emulation  window,  the emulation window can be clicked upon to move it in
  19394. front of the DA, and later dragged to reveal the hidden desk accessory so  that
  19395. it can be restored to the foreground.  The same thing can be done with Kermit's
  19396. own remote response window as well.  Note that Kermit's terminal emulation win-
  19397. dow does not accept input when any other window is in the foreground.
  19398.  
  19399. MacKermit  uses XON/XOFF (control-Q and control-S) flow control during terminal
  19400. emulation and file transfer.  If the other system does not understand XON/XOFF,
  19401. problems may result at high speeds.  The terminal emulator can normally keep up
  19402. at 9600 baud, and has a very large input buffer, but after  several  continuous
  19403. scrolling  screens at this speed, some characters may be lost.  When running at
  19404. high baud rates on a system that does not understand XON/XOFF flow control, ei-
  19405. ther  keep  your  terminal in page mode, use a text paging program such as Unix
  19406. "more", or view text with a non-scrolling screen editor.  Also, don't drag  the
  19407. terminal emulation window while characters are arriving; if you do, the charac-
  19408. ters may be lost and the display may become confused.
  19409.  
  19410. During terminal emulation, the characters displayed on the screen may  also  be
  19411. saved on the disk.  This allows you to record interactions with the remote sys-
  19412. tem, or to "capture" files that you can't transfer with  Kermit  protocol,  for
  19413. example  when  the  remote  system does not have a Kermit program.  Use the Log
  19414. menu, and choose session logging to activate this feature.    The  result  goes
  19415. into  a file called "Kermit Session" in the current folder, which is always ap-
  19416. pended to, rather than overwritten.  To create a new  session  log,  delete  or
  19417. rename the old one first.
  19418.  
  19419. The  following  features  are missing from the MacKermit terminal emulator, and
  19420. may be added in subsequent releases:
  19421.  
  19422.    - Restoration of character attributes such as underlining or highlight-
  19423.      ing.
  19424.    - Cutting text from screen to clipboard.
  19425.    - Transmission of raw text to host (e.g. pasting to screen).
  19426.    - Screen rollback.
  19427.    - Screen resizing.
  19428.    - Explicit modem or dialer control.
  19429.    - Login scripts.
  19430.    - Printer support.
  19431.    - Ability to use the printer port for terminal emulation.
  19432.    - A  way  to  disable  XON/XOFF flow control, or select other flow con-
  19433.      trols.
  19434. 14.7. File Transfer                                                    Page 347
  19435.  
  19436. -------------------------------------------------------------------------------
  19437. 14.7. File Transfer
  19438.  
  19439. Like most Kermit programs, MacKermit allows you to send and receive text or bi-
  19440. nary  files singly or in groups.  It will interact with a remote Kermit server,
  19441. and it can act as a server itself.  However, due to the unique  nature  of  the
  19442. Macintosh file system, there are some special considerations:
  19443.  
  19444.    - Mode - Text or Binary.  Binary means the data is sent or stored with-
  19445.      out modification.  Text means that every  carriage  return  character
  19446.      (CR)  in a Macintosh file is translated to a carriage-return-linefeed
  19447.      (CRLF) sequence when sending, and every CRLF in an incoming  file  is
  19448.      turned  into  a  CR  when  stored  on  the  Mac disk.  A text file is
  19449.      produced when you save a file from  MacWrite  or  other  applications
  19450.      using  the "text only" option; text files are not associated with any
  19451.      particular Macintosh application and can be sent in a useful  fashion
  19452.      to other kinds of computers.
  19453.  
  19454.      A  word of caution about Macintosh text files: The Macintosh supports
  19455.      an extended version of ASCII, with characters like accented  and  um-
  19456.      lauted vowels in the 128-255 range.  These characters allow represen-
  19457.      tation of Roman-based languages other than English, but they  do  not
  19458.      follow any of the ISO standards for extended character sets, and thus
  19459.      are only useful on a Mac.  When transferring text files,  you  should
  19460.      ensure  that  either there are no extended characters in the file, or
  19461.      that the other system can understand the Mac's 8-bit characters.
  19462.  
  19463.    - Fork - Data or Resource.  Macintosh files may have two "forks".   The
  19464.      data  fork  contains  data for an application; the resource fork con-
  19465.      tains icons, strings, dialog boxes, and so forth.   For  instance,  a
  19466.      MacWrite  document  contains  text  and formatting information in the
  19467.      data fork, and fonts in the resource fork.  For applications, the ex-
  19468.      ecutable code is stored in the resource fork.
  19469.  
  19470. File  transfer  is  initiated when you select Send file..., Receive File..., or
  19471. Get file from server... from MacKermit's File menu.
  19472.  
  19473. File transfers can be canceled by clicking on the Cancel File or  Cancel  Group
  19474. buttons.   These will always work when sending.  When receiving, they will work
  19475. if the opposite Kermit honors this (optional) feature of the protocol.    There
  19476. is  also an "emergency exit" from any protocol operation, which can be taken at
  19477. any time by typing  "Command-."  --  that  is,  hold  down  the  Command  (Fan,
  19478. Cloverleaf) key and type period.
  19479.  
  19480. The  progress  of  file transfer operations can be logged into a Macintosh file
  19481. called a "transaction log".  This log will show the names of the  files  trans-
  19482. ferred,  the  date and time, and the completion status.  This feature is useful
  19483. with long unattended transfers -- you can come back later and read  the  trans-
  19484. action  log  to  find out what happened.  The transaction log is called "Kermit
  19485. Log".
  19486.  
  19487. The current version of Mac Kermit can only send one fork of a file at  a  time.
  19488. When  a  file  has  two  forks,  there  is  no provision for sending both forks
  19489. together.  This restriction may be lifted in future releases of MacKermit,  for
  19490. example by converting applications to MacBinary format during transmission.
  19491. 14.7.1. Sending Files                                                  Page 348
  19492.  
  19493. -------------------------------------------------------------------------------
  19494. 14.7.1. Sending Files
  19495.  
  19496. To  send files, first put the remote Kermit in server mode, or else give it the
  19497. RECEIVE command.  Then use the mouse to select Send file... from the File menu.
  19498. This  will  give  you  a  MacKermit  file-open box, which includes the standard
  19499. Macintosh dialog items -- a file list, Disk and Eject buttons, etc.    You  can
  19500. either  send  one  file at a time, by clicking on its name in the file list, or
  19501. send the entire contents of the current HFS folder  (for  HFS  disks  only,  of
  19502. course).   Clicking the Disk button will switch the file list to another physi-
  19503. cal disk.  If desired, you can type an alternate name to send the  file  under.
  19504. When  you select a file, MacKermit examines its type; if the type is APPL, then
  19505. MacKermit expects to send the resource fork in binary mode, otherwise the  data
  19506. fork in text mode.  The Mode and Fork radio buttons will display these choices;
  19507. you may change them before clicking the Send button.
  19508.  
  19509.  
  19510. 14.7.2. Receiving Files
  19511.  
  19512. You can receive or get multiple files, providing the opposite Kermit is capable
  19513. of  sending  multiple  files  in  a  single transaction (most are).  To receive
  19514. files, first give the remote Kermit a SEND  command  and  then  select  Receive
  19515. file...  from  the File menu.  To get files from a server, first put the remote
  19516. Kermit into server mode, then select the Get file from  server...  option  from
  19517. the  File menu, and type in the name of the file you want to get, or a wildcard
  19518. designator for multiple files, in the remote system's filename syntax.
  19519.  
  19520. As each file arrives at the Mac, it will be decoded according  to  the  current
  19521. mode  (text or binary), and stored in the default fork (data or resource).  The
  19522. file names will be either the names the files arrive with (overwriting existing
  19523. files  of  the same names) or new unique names (when name conflicts occur), ac-
  19524. cording to the current default for name collisions.  You may also elect to per-
  19525. form  an  "attended" receive, in which you have an opportunity to override file
  19526. defaults on a per-file basis (do this in the Protocol section of  the  Settings
  19527. menu).    But  attended  operation must be used with caution -- if you take too
  19528. long (more than about a minute) to execute an incoming file's dialog  box,  the
  19529. opposite Kermit could time out and terminate the transaction.  If this happens,
  19530. tell the opposite Kermit to send again and try again with the receive dialog.
  19531.  
  19532. The folder for new files is the same as the location of the settings  file,  or
  19533. if  no settings file was used then the new files appear on the desktop.  If you
  19534. are transferring a lot of files and  want  to  keep  them  together,  create  a
  19535. folder,  drag the settings file into it, and double click on the settings file;
  19536. all created files will appear in that folder.
  19537.  
  19538.  
  19539. 14.8. Remote Commands
  19540.  
  19541. When connected to a Kermit server, MacKermit is capable of issuing special file
  19542. management  and other commands to it.  The Remote menu contains these commands.
  19543. You may request directory listings, you can delete files,  change  directories,
  19544. etc,  on  server's  machine.  The response from these commands (if any) is dis-
  19545. played in a special pop-up window.  Responses to multiple Remote  commands  are
  19546. separated  by  a  dashed line.  The response window can be scrolled, sized, and
  19547. positioned, and can be hidden by clicking the menu item "Hide Response" or  the
  19548. window's  go-away box; all text remains intact and will be appended to the next
  19549. time you do a Remote command; it can also  be  brought  to  the  foreground  by
  19550. 14.8. Remote Commands                                                  Page 349
  19551.  
  19552. -------------------------------------------------------------------------------
  19553. clicking  the  Show  Response  menu  item.    Note  that typein to the terminal
  19554. emulator will not take effect when the response window -- or any  other  window
  19555. (such as a desk accessory) -- is up front.  This is not a bug, but a feature of
  19556. the Macintosh user interface guidelines.
  19557.  
  19558. If the response buffer gets too full (greater than  30,000  characters),  MacK-
  19559. ermit  will  remove  enough  text from the beginning of the buffer, in 512 byte
  19560. chunks, to make it less than 30,000 characters again.
  19561.  
  19562. A Remote command can be canceled by taking the Emergency Exit (Command-.).   To
  19563. disengage  from  the remote Kermit server, click on Bye or Finish in the Remote
  19564. menu.
  19565.  
  19566.  
  19567. 14.9. Server Operation
  19568.  
  19569. MacKermit may itself act as a Kermit server.  Just set the  desired  parameters
  19570. in  the Settings menu, then click on Be a Server in the Remote menu.  The MacK-
  19571. ermit server can respond to SEND, GET, REMOTE DIRECTORY, FINISH, and  BYE  com-
  19572. mands.    You  can send single or multiple files to a MacKermit server, and you
  19573. can get a single file from it by name.  You can also get all the files  in  the
  19574. current folder by using a colon (":") as the file specification in the GET com-
  19575. mand:  
  19576.  
  19577.   GET :
  19578.  
  19579. If you give the FINISH command, MacKermit will return to terminal mode.  If you
  19580. give the BYE command, the Macintosh will reboot itself.
  19581.  
  19582. You  can  take MacKermit out of server mode from the Mac keyboard by typing the
  19583. emergency exit sequence, Command-dot.
  19584.  
  19585.  
  19586. 14.10. Settings
  19587.  
  19588. You can change File, Communications, Protocol, Terminal, Keyboard  macros,  and
  19589. Keyboard  modifier settings by using the Settings pull-down menu.  You can save
  19590. and load these settings by invoking the appropriate selection in the File menu.
  19591. If  the  "bundle  bit"  has been correctly set on your version of MacKermit (it
  19592. should be), then you can double-click on the resulting document to start  MacK-
  19593. ermit with those settings.
  19594.  
  19595. The File settings establish the defaults for file transfer:
  19596.  
  19597.    - Attended versus Unattended operation for incoming files.
  19598.  
  19599.    - Naming:  When doing unattended file reception, whether incoming files
  19600.      should supersede existing files of the same name,  or  a  new  unique
  19601.      name  should  be  assigned  to  them.  If the latter, the new name is
  19602.      formed by adding a dot and a number to the end.  For instance,  if  a
  19603.      file  called FOO exists and a file called FOO arrives, MacKermit will
  19604.      store the arriving file as FOO.1; if FOO.1 exists, then FOO.2, etc.
  19605.  
  19606.    - Mode: text or binary.  Used for received files only.   When  sending,
  19607.      MacKermit  tries to figure out an appropriate mode for the file being
  19608.      sent (but then lets you override it the Send File dialog).
  19609. 14.10. Settings                                                        Page 350
  19610.  
  19611. -------------------------------------------------------------------------------
  19612.    - Fork: which fork -- data or resource -- to send, or to store  an  in-
  19613.      coming file into.
  19614.  
  19615. The  Communications  settings  allow you to set the baud rate (anywhere between
  19616. 300 baud and 57.6K baud, except 38.4K  baud),  and  parity  (odd,  even,  mark,
  19617. space,  or  none).    When  the  parity  is  set  to none the Macintosh uses an
  19618. 8-bit-wide connection.  All other parity settings tell the Macintosh to  use  a
  19619. 7-bit-wide connection, and to request 8th-bit prefixing when transferring 8-bit
  19620. data.  If the remote host or the communication path uses any  kind  of  parity,
  19621. then you won't be able to transfer files successfully unless you tell MacKermit
  19622. (and in most cases also the Kermit on the other  end)  about  it.    Duplex  is
  19623. selected in the Terminal settings.
  19624.  
  19625. The  Protocol settings allow you to set packet parameters for both incoming and
  19626. outbound packets.  These include the block check type (1 or 2 character  check-
  19627. sum,  3-character  16-bit  CRC-CCITT), line turnaround handshake character (for
  19628. file transfer with half duplex systems), packet start and end characters,  pad-
  19629. ding,  packet  length,  timeout  interval,  and  packet length.  Characters are
  19630. specified by entering their ASCII value in decimal, e.g. 1  for  Control-A,  13
  19631. for  Control-M  (Carriage Return), etc.  The RECEIVE parameters are conveyed by
  19632. MacKermit  to  the  other   Kermit.      For   instance,   if   you   set   the
  19633. receive-packet-length  to  500,  MacKermit  will  tell the other Kermit to send
  19634. 500-character packets.  The SEND parameters are  used  to  override  negotiated
  19635. values, and need rarely be used.
  19636.  
  19637. Long packets are selected by setting the RECEIVING packet length between 95 and
  19638. 1000.  Normally, you should not change the sending  length  because  MacKermit,
  19639. and  most  other  Kermits, will configure themselves correctly.  Note also that
  19640. the fastest file transfers will happen  with  long  packets  in  the  range  of
  19641. 300-500.    Very  long  packets  actually end up being much slower, because the
  19642. operating systems in both the Mac and the other machine have to do more work to
  19643. cope  with  such  long  inputs, and, under noisy conditions, the probability is
  19644. higher that a longer packet will be struck by noise, and will  take  longer  to
  19645. retransmit.
  19646.  
  19647. The Terminal settings let you modify the characteristics of the VT102 emulator,
  19648. such as auto-linefeed, autowrap, autorepeat keys, block  vs  underline  cursor,
  19649. blinking  vs steady cursor, inverted screen (reverse video), and smooth scroll-
  19650. ing.  There is also a "visible bell" for those who can't hear the audible  bell
  19651. produced  upon receipt of a Control-G, and an option to display control charac-
  19652. ters visibly by showing their numeric ASCII values (in  decimal)  in  a  single
  19653. character  cell.   If local echo is needed, as in half-duplex connections, that
  19654. must be specified here also.
  19655.  
  19656.  
  19657. 14.11. Settings Files
  19658.  
  19659. You can start MacKermit with all its "factory settings" by double  clicking  on
  19660. the  MacKermit  icon.    Factory settings are designed for direct communication
  19661. with most other microcomputers, DEC minis and mainframes,  etc:  9600  bps,  no
  19662. parity,  XON/XOFF,  remote  echo,  etc.    You  can  change  the communication,
  19663. protocol, file, keyboard, and terminal settings by going through the options in
  19664. the  Settings  menu.  Once you have set all parameters as desired, you can save
  19665. your settings in a "MacKermit settings file"  by  selected  "Save  Settings..."
  19666. from the File menu.  A settings file is, in Macintosh terminology, a "MacKermit
  19667. document".  You'll recognize it because it looks  like  a  dog-eared  piece  of
  19668. 14.11. Settings Files                                                  Page 351
  19669.  
  19670. -------------------------------------------------------------------------------
  19671. paper  with  the  MacKermit icon superimposed.  You can have more than one set-
  19672. tings file.
  19673.  
  19674. There are two ways to use a settings file.  First, you can double-click on  it,
  19675. just  as  you  can  double-click on a MacWrite document to start up MacWrite to
  19676. edit a particular file.  This method starts up MacKermit  with  all  the  saved
  19677. settings.  The other method is to click on the "Load Settings..." option in the
  19678. File menu from inside MacKermit.  This lets you change settings without leaving
  19679. and  restarting  the  program.   Load Settings...  shows all MacKermit settings
  19680. files in the selected folder.  Opening one of  them  loads  all  its  settings,
  19681. removing all current settings.
  19682.  
  19683. You  can "edit" a MacKermit settings file by loading it, going through the Set-
  19684. tings menu, and then saving the settings either in a new file,  or  overwriting
  19685. the same file.
  19686.  
  19687. As  distributed  by Columbia, Mac Kermit comes with two settings files.  One is
  19688. called "Normal Settings", and is pretty much identical to Mac Kermit's  factory
  19689. settings.    The  other  is "IBM Mainframe Linemode Settings".  It selects mark
  19690. parity, local echo, XON half-duplex line turnaround handshake.    You  can  use
  19691. these  files as-is, customize them for your own environment, or create new set-
  19692. tings files for all the different kinds of systems that you use.
  19693.  
  19694.  
  19695. 14.12. Reconfiguring the Keyboard
  19696.  
  19697. Beginning with version 0.9,  MacKermit  has  keyboard  configuration  functions
  19698. built  in.  These are accessed through the Set Key Macros and the Set Modifiers
  19699. entries in the Settings menu.
  19700.  
  19701. The Macintosh keyboard is composed of normal keys and modifier keys.   Modifier
  19702. keys are those keys that, when held down, change the meaning of other keys.  On
  19703. the Mac these are: SHIFT, CAPS LOCK, OPTION, CONTROL (only on the  Mac  II  and
  19704. SE),  and  COMMAND  (also known as APPLE, CLOVER, or FAN).  Normal keys are the
  19705. letters, numbers, special symbols, arrow keys, space bar,  and  function  keys.
  19706. Only  one  normal key can be typed at a time, but one or more modifier keys can
  19707. be pressed down along with it.
  19708.  
  19709. When  you  type  a  key,  Kermit  reads  both  the   ASCII   value,   and   the
  19710. keyboard-independent  scan code for that key.  Kermit looks in its table of key
  19711. macros to see if there is a macro for this combination of  key  and  modifiers,
  19712. and  if  so  sends  the  macro.  If there is no macro, Kermit then looks in its
  19713. modifier table to see if any of the modifiers do special things to the  charac-
  19714. ter;  if so, it does these to the character.  Finally, Kermit sends the charac-
  19715. ter.  In the normal case when there is no macro and  no  modifiers  apply,  the
  19716. character sent is simply the ASCII value for that character.
  19717.  
  19718. It  is  important to keep in mind that if the parity setting is something other
  19719. than none, the high (8th) bit will be stripped off of the characters when  they
  19720. are  transmitted.  Since most systems do not understand characters in the range
  19721. 128 -- 255 (decimal), you should avoid  using  the  Apple  extended  characters
  19722. (accented vowels, for example) during terminal connection.
  19723. 14.12.1. Defining Key Macros                                           Page 352
  19724.  
  19725. -------------------------------------------------------------------------------
  19726. 14.12.1. Defining Key Macros
  19727.  
  19728. To  define  a new key macro, select the Key Macros entry.  A dialog window will
  19729. appear, asking you to press the key to define.  Type the key (including any  of
  19730. the  modifiers).   A new dialog will appear, with an editable text field in it.
  19731. Enter the definition for the key here.   Your  definition  may  be  up  to  255
  19732. characters long, and can include all of the control characters (including NUL).
  19733. Special characters can be included in the macro by entering a "\"  (backslash),
  19734. followed  by  up  to  3 octal (base 8) digits for the value (just like in the C
  19735. programming language).  For example, an ASCII NUL (value 0) would be written as
  19736. "\000",  carriage  return  (ASCII 13) would be written "\015" (1 x 8 + 5 = 13).
  19737. Also, control characters may be entered with a backslash, followed by  a  caret
  19738. (or  circumflex,  "^"), followed by the corresponding letter.  Thus a Control-G
  19739. (value 7) could be entered as "\007", "\^G", or "\^g".  To  include  a  literal
  19740. backslash in a definition, type in two of them: "\\".
  19741.  
  19742. BREAK  conditions  are  also  programmable  as macros.  If the entire macro the
  19743. string is "\break", then typing the defined key will send a short (1/4  second)
  19744. break.    A  long (3.5 second) BREAK is defined with "\longbreak".  Note that a
  19745. macro can define either a BREAK, or a string  of  normal  characters,  but  not
  19746. both.
  19747.  
  19748.  
  19749. 14.12.2. Defining Key Modifiers
  19750.  
  19751. Skip  ahead  to  the  next section if you already know about things like SHIFT,
  19752. CAPS LOCK, CONTROL, and META.
  19753.  
  19754. On a typewriter the only modifier key is SHIFT.  Typing  a  character  with  no
  19755. modifier  key  depressed selects a lowercase letter or the character printed on
  19756. the lower face of the keytop (say, the digit "4").   Typing  a  character  with
  19757. SHIFT depressed selects an uppercase letter or the character printed on the up-
  19758. per face of the keytop (say, a dollar sign).  Some keyboards also have a  SHIFT
  19759. LOCK key, which stays down once pressed and pops up the next time it's pressed;
  19760. its operation is equivalent to holding down SHIFT.  And some keyboards  have  a
  19761. CAPS LOCK key which operates like SHIFT LOCK, but only upon letters.
  19762.  
  19763. Computer  terminals  also  have  a  modifier key called CONTROL (or CTRL).  Its
  19764. function is a little less obvious: it is intended to  produce  one  of  the  33
  19765. characters  in  the  "control range" of the ASCII alphabet.  Control characters
  19766. are not graphic -- they are intended for use as format effectors (like carriage
  19767. return, formfeed, tab, backspace), for transmission control, or for device con-
  19768. trol.  The remaining 95 characters -- letters, digits, punctuation,  and  space
  19769. --  are  the  graphic  characters.   When a character is typed with the CONTROL
  19770. modifier pressed, its "control equivalent" (if any) is transmitted.  By conven-
  19771. tion,  the control equivalent of A is Control-A, B is Control-B, etc, and there
  19772. are also seven special control characters generally associated with punctuation
  19773. characters  or special keys.  For the "alphabetic" control characters Control-A
  19774. through Control-Z, SHIFT or CAPS LOCK modifiers are ignored;  for  the  others,
  19775. operation varies from terminal to terminal.
  19776.  
  19777. The  SHIFT and CONTROL modifiers allow all 128 ASCII characters to be sent from
  19778. a normal typewriter-like keyboard that has about 50  keys.    However,  certain
  19779. host-resident  computer  applications  --  notably  the full screen text editor
  19780. EMACS and its descendents -- can be  used  to  greater  advantage  with  a  256
  19781. character  8-bit alphabet (EMACS responds to single-character commands, and the
  19782. 14.12.2. Defining Key Modifiers                                        Page 353
  19783.  
  19784. -------------------------------------------------------------------------------
  19785. more characters a terminal can send, the more commands are directly available).
  19786.  
  19787. For this purpose, some terminals also provide a META modifier key.    This  key
  19788. simply  causes  the high-order ("8th") bit of the selected 7-bit ASCII value to
  19789. be set to 1 upon transmission.  This can  only  work  when  the  connection  is
  19790. 8-data-bits-no-parity.    When parity is in use, EMACS allows a sequence of two
  19791. 7-bit ASCII characters to represent a single meta character.  The advantage  of
  19792. having  a  real  META modifier key is that it can be held down while the actual
  19793. key is struck repeatedly or even autorepeats, whereas a use of a "meta  prefix"
  19794. such  as  <escape> requires much more typing.  To illustrate, suppose META-F is
  19795. the command to go forward one word.  If you  want  to  execute  this  operation
  19796. repeatedly, just hold down META and F and let it autorepeat.  If you don't have
  19797. a META key, then you'd have to type <escape>F<escape>F<escape>F..., etc.
  19798.  
  19799. A common problem faced by computer users who switch from one terminal or PC  to
  19800. another  is  the  placement of the modifiers and other special keys.  DEC, IBM,
  19801. Apple, and other manufacturers consistently  move  these  keys  around  on  new
  19802. models of their keyboards.  MacKermit allows you to assign any of various func-
  19803. tions to any of the Mac's modifier keys, and to assign any desired character or
  19804. character  sequence  to  the regular keys, so that you can tailor the layout of
  19805. your Mac's keyboard to suit your taste.
  19806.  
  19807.  
  19808. 14.12.3. Modifiers Dialog
  19809.  
  19810. To change the action of any of the modifier keys,  select  Modifiers  from  the
  19811. Settings  menu.  A dialog will appear that looks roughly like the one in Figure
  19812. 14-1 (the "%" represents the Apple or Clover key).
  19813.  
  19814. -------------------------------------------------------------------------------
  19815.  
  19816.  
  19817.  
  19818.        Modifier Pattern:  -->   Modification:
  19819.  
  19820.     Ctrl Opt Lock Shift  %      Unmodify Caps Ctrl Meta Prefix string:
  19821.                                                          ____________
  19822.     [X]  [ ] [ ]  [ ]   [ ]   |   [ ]    [ ]  [X]  [ ]  [____________]
  19823.     [ ]  [ ] [ ]  [ ]   [X]   |   [ ]    [ ]  [X]  [ ]  [____________]
  19824.     [ ]  [X] [ ]  [ ]   [ ]   |   [x]    [ ]  [ ]  [ ]  [\033        ]
  19825.     [ ]  [ ] [ ]  [ ]   [ ]   |   [ ]    [ ]  [ ]  [ ]  [____________]
  19826.  
  19827.                   (Cancel)   (Help)   ( OK )
  19828.  
  19829.                  Figure 14-1:   MacKermit Key Modifier Dialog
  19830.  
  19831. -------------------------------------------------------------------------------
  19832.  
  19833. The check boxes are divided into rows, each one describing a modification.  The
  19834. left half of each row describes the modifier combination to look for; a checked
  19835. box means that this key is down, and an unchecked box means "don't care".  Note
  19836. that  there is no way to specify a key being up, and lines with nothing checked
  19837. on the left side will be ignored; the character will be modified in the  normal
  19838. Macintosh way.
  19839.  
  19840. The  right  half  describes what modification to do to the characters.  The Un-
  19841. 14.12.3. Modifiers Dialog                                              Page 354
  19842.  
  19843. -------------------------------------------------------------------------------
  19844. modify modification says "make this the character that would be sent  from  the
  19845. same  key  with  no modifer keys pressed".  In other words, un-Option, un-Caps,
  19846. un-Control, and un-Shift this character.  The Caps modification translates  all
  19847. letters  to upper case, Ctrl makes the letter a contol character, Meta sets the
  19848. high (8th) bit on the character, and if a Prefix string is present, it is  sent
  19849. before the character is.
  19850.  
  19851. Hints about modifiers:
  19852.  
  19853.    - Beware of the Option key.  It changes the value of any characters you
  19854.      use with it.  If you type Option-F, the Mac will send  a  D,  if  you
  19855.      type  Option-B, the Mac will send a ":", etc.  If you want to use the
  19856.      option key as a modifier, be sure to check the "Unmodify" box.
  19857.  
  19858.    - To use MacKermit with a version of EMACS that does not  accept  8-bit
  19859.      Meta  characters, define a key, like Option, to be unmodified, with a
  19860.      prefix string of \033 (ASCII Escape), as in Figure 14-1.    Then  you
  19861.      can hold down Option and type F (or any other key) repeatedly, or let
  19862.      it autorepeat, and MacKermit will send the  correct  prefix-Meta  se-
  19863.      quence.
  19864.  
  19865.    - When  interpreting a keystoke, MacKermit checks the list of modifiers
  19866.      from top to bottom, applying the first one that matches.  This  means
  19867.      that  if  you  want  a different modifier for Command-Option and just
  19868.      plain Command, you must put the definition for  Command-Option  first
  19869.      in the list.
  19870.  
  19871.  
  19872. 14.13. Bootstrapping
  19873.  
  19874. This  section applies if you do not have a MacKermit diskette, but MacKermit is
  19875. available for downloading from some other computer.
  19876.  
  19877. MacKermit is distributed in source form for building on  a  Macintosh,  running
  19878. Apple's  Macintosh  Programmers Workbench (in MPW C), in  .HQX "BinHex 4" form,
  19879. and sometimes also as a binary resource file.  Those who want to work from  the
  19880. source are referred to the file CKMKER.BLD for instructions.
  19881.  
  19882. If you're downloading, it's best to work with CKMKER.HQX, a textual encoding of
  19883. the MacKermit application.  Download this using any technique available to  you
  19884. -- an old release of Kermit, an Xmodem implementation, even raw screen capture.
  19885. Then run  BinHex (version 4) to convert it into a working  application  (select
  19886. Upload  -> Application from the File menu).  Eveything will be set up correctly
  19887. -- icons, forks, etc.
  19888.  
  19889. If you don't have the .HQX file available, but you do have access to the binary
  19890. resource   file   (its  name  will  be  CKMKER.RSRC,  ckmker.rsrc,  CKMKER.RSR,
  19891. ckmker.rsr, %ckmker or some variation on these, depending on what  system  it's
  19892. stored  on  and  how it got there), AND if you have "MacPut" on your system and
  19893. MacTerminal on your Mac, AND if you have an 8-bit-wide (no  parity)  data  path
  19894. between  your  Mac and your system, then you can use MacPut to download the bi-
  19895. nary resource file to  your  Mac  using  MacTerminal's  "MacBinary"  format  (a
  19896. variant  of  XMODEM).  After doing this you must use a program such as  SetFile
  19897. or  ResEdit on the Mac to set the author to KR09, the type to APPL, and turn on
  19898. the  bundle bit.  Do not bother with the CKMKEY program, as it is not used with
  19899. newer MacKermits.  If you have an earlier release of MacKermit, you may use  it
  19900. 14.13. Bootstrapping                                                   Page 355
  19901.  
  19902. -------------------------------------------------------------------------------
  19903. in place of MacTerminal and MacPut.
  19904.  
  19905.  
  19906. 14.14. Differences Between Versions 0.8 and 0.9
  19907.  
  19908. MacKermit 0.8(34) runs on the 128K Mac, the 512K Mac, and the Mac Plus, but not
  19909. on the Macintosh II or SE.  MacKermit 0.9(40) runs on all Macs except the  128K
  19910. original.  You should use version 0.9 unless you have a 128K Mac.
  19911.  
  19912. The second major difference is that the program is has been translated into Ap-
  19913. ple MPW C, so that it can be edited, compiled, and built on the  Macintosh  it-
  19914. self.   This was done originally by Jim Noble of Planning Research Corporation,
  19915. who converted MacKermit from SUMACC C (which had to be cross compiled on a UNIX
  19916. system)  to  Megamax  C. Jim's version was converted to MPW C by Matthias Aebi,
  19917. who also added most of the new features listed below.  Paul Placeway integrated
  19918. the  program  with  the current (long packet) version of C-Kermit and added ad-
  19919. ditional new features.
  19920.  
  19921. Besides these important differences, there were many other changes from version
  19922. 0.8 to version 0.9, including:
  19923.  
  19924.    - The Cursor with open desk accessories now works correctly
  19925.    - Long packet support
  19926.    - New program icon
  19927.    - New settings files are no longer TEXT
  19928.    - Settings can now be written back to an already existing settings file
  19929.    - Key redefinition function built in to Kermit, no more CKMKEY
  19930.    - Server mode directory listing feature
  19931.    - Multifile (folder) send
  19932.    - Server "Delete" file command
  19933.    - Server "Space" command
  19934.    - Get whole folder content from the server with filename ":"
  19935.    - Recognition of all the different Mac keyboards
  19936.    - Support of menu command keys (key macros)
  19937.    - Terminal settings dialog separated from communication settings
  19938.    - Non-transparent terminal mode
  19939.    - Display of statistics and protocol version to "About Kermit" dialog.
  19940.    - Parity problems fixed
  19941.    - Session logging
  19942.    - Transaction logging
  19943.    - Multifinder support
  19944.    - Additions to the VT102 emulator (smooth scrolling, etc)
  19945.    - Rearrangement of menus and displays
  19946.    - Program no longer hangs if remote response window gets too full
  19947.    - Program now works correctly on 64K ROM machines
  19948.    - A new manual
  19949.  
  19950. This  manual  applies  in  large part to version 0.8(34), except that the older
  19951. version is missing the new features listed above, and it comes in  two  pieces:
  19952. CKMKER  and  CKMKEY.   The CKMKEY program is used to program the keys, like the
  19953. Set Key Macros... and Set Modifiers described in this  manual,  and  creates  a
  19954. settings  file  which Kermit itself uses.  The old version only works well with
  19955. early Macintosh keyboards.
  19956. 15. CP/M-80 KERMIT                                                     Page 356
  19957.  
  19958. -------------------------------------------------------------------------------
  19959. 15. CP/M-80 KERMIT
  19960.  
  19961. Program:    Bill  Catchings,  Columbia  University,  with  contributions   from
  19962.             Charles  Carvalho  (ACC),  Bernie Eiben (DEC), Nick Bush (Stevens),
  19963.             John  Bray  (University  of  Tennessee),  Bruce  Tanner   (Cerritos
  19964.             College),  Greg Small (University of California at Berkeley), Kimmo
  19965.             Laaksonen (Helskini  University  of  Technology),  Brian  Robertson
  19966.             (Aberdeen University), A.J. Cole (Leeds University), John Shearwood
  19967.             (Birmingham University), Tony Addyman (Salford University), Godfrey
  19968.             Nix and Martin Carter (Nottingham University), Ian Young (Edinburgh
  19969.             University), Chris Miles (Manchester University), Richard  Russell,
  19970.             Dave Roberts, and many, many others.
  19971.  
  19972. Language:   8080 Assembler, M80, or MAC80
  19973.  
  19974. Version:    4.09
  19975.  
  19976. Date:       11th January, 1988
  19977.  
  19978. Documentation:
  19979.             Charles Carvalho, ACC;  Frank  da  Cruz,  Columbia,  Bertil  Schou,
  19980.             Loughborough  University  (with  lots  of help from Jon Warbrick of
  19981.             Plymouth Polytechnic), and many others.
  19982.  
  19983. KERMIT-80 Capabilities At A Glance:
  19984.  
  19985.   Local operation:                   Yes
  19986.   Remote operation:                  Partial, Auto-receive only
  19987.   Login scipts:                      No
  19988.   Transfer text files:               Yes
  19989.   Transfer binary files:             Yes
  19990.   Wildcard send:                     Yes
  19991.   File transfer interruption:        Yes
  19992.   Filename collision avoidance:      Yes, poor
  19993.   Can time out:                      Yes
  19994.   8th-bit prefixing:                 Yes
  19995.   Repeat count prefixing:            No
  19996.   Alternate block checks:            Yes
  19997.   Terminal emulation:                Yes, VT52 and others
  19998.   Communication settings:            Yes; duplex, parity
  19999.   Support for dial-out modems:       No
  20000.   Transmit BREAK:                    Yes; most versions
  20001.   IBM communication:                 Yes
  20002.   Transaction logging:               No
  20003.   Debug logging:                     No
  20004.   Session logging:                   Yes
  20005.   Raw file transmit:                 Yes
  20006.   Act as server:                     No
  20007.   Talk to server:                    Yes; SEND, GET, FIN, BYE
  20008.   Advanced commands for servers:     No
  20009.   Command/init files:                Yes
  20010.   Command macros:                    No
  20011.   Local file management:             Yes; DIR, ERA, TYPE, PRINT, COPY
  20012.   Handle file attributes:            No
  20013.   Extended packets:                  No
  20014.   Sliding Windows:                   No
  20015. 15. CP/M-80 KERMIT                                                     Page 357
  20016.  
  20017. -------------------------------------------------------------------------------
  20018.   Printer control:                   Yes, better, but not perfect
  20019.  
  20020.  
  20021. 15.1. Summary of CP/M
  20022.  
  20023. There are essentially two versions of CP/M - Versions 2.2  and  3.0  (sometimes
  20024. also called CP/M PLUS.)
  20025.  
  20026. CP/M-80  Version  2.2  is  run in a single 64 Kbyte "page", usually the largest
  20027. amount of memory on Z80 or 8080 systems.  The BIOS (Basic input/output system),
  20028. BDOS  (Basic  Disk  Operating  System)  and CCP (Command console processor) all
  20029. share memory with any transient program the user may wish to run.   Some  basic
  20030. commands  are  available  through  the  CCP, like DIR, ERA etc,while others are
  20031. loaded from disk into the transient program area and run as a program, like PIP
  20032. or STAT.
  20033.  
  20034. CP/M  Version  3.0 (or CP/M PLUS) effectively removes the requirement of having
  20035. the CCP and BDOS along with a chunk of the BIOS  code  being  resident  in  the
  20036. single  64k  byte  page of memory.  This allows even more space for programs in
  20037. the TPA, but still a little less than the maximum of 64k.  It is  substantially
  20038. different  from  CP/M version 2.2, with lots of added features.  Kermit-80 uses
  20039. very few additional version 3.0 features, and only where absolutely necessary.
  20040.  
  20041. CP/M file specifications are of the form DEV:XXXXXXXX.YYY, where
  20042.  
  20043. DEV:            is a device name, normally the A: or B: floppy.    If  omitted,
  20044.                 the device name defaults to your connected diskette.
  20045.  
  20046. XXXXXXXX        is a filename of up to 8 characters.
  20047.  
  20048. YYY             is the file type, up to 3 characters.
  20049.  
  20050. File names and file types may contain letters, digits, and some special charac-
  20051. ters, including dash, dollar sign, and underscore, but no imbedded spaces.  Up-
  20052. per and lower case letters are equivalent.
  20053.  
  20054. "Wildcard" file-group specifications are permitted in file names and file types
  20055. (but not device names) within certain contexts; a "*" matches a whole field,  a
  20056. "?"   matches a single character, including space.  Examples: "*.F??" specifies
  20057. all files whose types start with F and are 1, 2, or 3 characters  long;  "F?.*"
  20058. specifies  all  files whose names start with F and are no more than two charac-
  20059. ters long (before the trailing spaces).
  20060.  
  20061. The five CP/M commands are:
  20062.  
  20063. DIR file        Lists the the names of the specified files.  The  default  file
  20064.                 specification is "*.*".  Example: "DIR B:*.FOR".
  20065.  
  20066. ERA file        Erases (deletes) the specified file(s); wildcards allowed.
  20067.  
  20068. REN new old     Changes the name of a file from old to new, e.g.
  20069.                 "REN NEW.FOR=OLD.FOR".
  20070.  
  20071. SAVE            Saves  the specified number of memory blocks into a file.  (Not
  20072.                 on CP/M Plus systems)
  20073. 15.1. Summary of CP/M                                                  Page 358
  20074.  
  20075. -------------------------------------------------------------------------------
  20076. TYPE file       Types the specified file on the screen, e.g.  "TYPE FOO.TXT".
  20077.  
  20078. The most important programs are:
  20079.  
  20080. STAT            Gives statistics on disk usage; sets and displays IOBYTE.  (Not
  20081.                 on CP/M Plus systems)
  20082.  
  20083. PIP             Peripheral  Interchange Program.  Copies files.  In response to
  20084.                 the "*" prompt, give a command of the form 
  20085.  
  20086.                   disk:outfile=disk:infile
  20087.  
  20088.                 Wildcards ("*" for a whole field or "?"  for a letter)  can  be
  20089.                 used.   Examples: "A:=B:*.*" to copy a whole disk, "A:=B:*.FOR"
  20090.                 to copy all the Fortran programs from disk B to disk A. If  the
  20091.                 disk  specification  is  omitted,  your "connected" disk is as-
  20092.                 sumed.  Command line arguments are  also  accepted,  e.g.  "PIP
  20093.                 A:=B:*.*".
  20094.  
  20095. There  are  equivalent  commands  for CP/M Version 3.0, but are not loaded into
  20096. memory in the same way as for CP/M Version 2.2.   For  further  information  on
  20097. CP/M, consult your microcomputer manual or a CP/M handbook.
  20098.  
  20099.  
  20100. 15.2. Kermit-80 Description
  20101.  
  20102. Since  Kermit-80  runs  on  a  standalone micro, it is always in control of the
  20103. screen -- it is always local.  Thus, it always keeps the  screen  updated  with
  20104. the file name and the packet number, whether sending or receiving.
  20105.  
  20106. Kermit-80  is  capable  of an imprecise or "fuzzy" timeout on an input request,
  20107. and can break deadlocks automatically.  In most cases, this is  not  important,
  20108. because  the  KERMIT  on  the  other  side  is  most  likely able to handle the
  20109. timeouts.  The timeouts done by Kermit-80 are fuzzy because they depend on  the
  20110. speed of the processor and other factors that can vary from system to system.
  20111.  
  20112. If,  despite  the timeout capability, the transmission appears to be stuck (and
  20113. you can tell that this has happened if the screen fails to change for a  while)
  20114. you  can type carriage return to have the micro do what it would have done on a
  20115. timeout, namely NAK the expected packet to cause theforeign  host  to  send  it
  20116. again  (or,  if  the  micro is sending, to retransmit the last packet).  Micro/
  20117. micro or micro/IBM-mainframe transfers could require this kind of manual inter-
  20118. vention.
  20119.  
  20120. File transfers may be interrupted in several ways.
  20121.  
  20122. Control-C       This will return you to Kermit-80 command level immediately, so
  20123.                 that you can connect back to the remote  system,  or  take  any
  20124.                 other desired action.
  20125.  
  20126. Control-X       When  sending  a  file,  this will terminate the sending of the
  20127.                 current file with a signal to the KERMIT on the other  side  to
  20128.                 discard  what  it  got  so  far.  If there are more files to be
  20129.                 sent, KERMIT-80 will go on to the next one.  When  receiving  a
  20130.                 file, KERMIT-80 will send a signal to the remote KERMIT to stop
  20131.                 sending this file.  If the remote KERMIT understands this  sig-
  20132. 15.2. Kermit-80 Description                                            Page 359
  20133.  
  20134. -------------------------------------------------------------------------------
  20135.                 nal  (not  all  implementations  of KERMIT do), it will comply,
  20136.                 otherwise the file will keep coming.  In any case,  the  remote
  20137.                 KERMIT will go on to the next file in the group, if any.
  20138.  
  20139. Control-Z       Like  Control-X,  except  if a file group is being transmitted,
  20140.                 this will stop the transmission of the entire group.  If only a
  20141.                 single  file  is  being  transmitted,  it  works  exactly  like
  20142.                 Control-X.
  20143.  
  20144. Carriage Return If you type a carriage return Kermit-80 will resend the current
  20145.                 packet.    You  may  do this repeatedly, up to the packet retry
  20146.                 limit (somewhere between 5  and  16  times)  for  a  particular
  20147.                 packet.
  20148.  
  20149.  
  20150.                               KERMIT-80 COMMANDS
  20151.  
  20152. KERMIT-80  uses  the DECSYSTEM-20 keyword style command language.  Each keyword
  20153. may be abbreviated to its minumum unique length.  "?" may be typed to request a
  20154. menu  of the available options for the current field at any point in a command.
  20155. ESC may be typed at any point in a command to fill out the current  keyword  or
  20156. filename;  if sufficient characters have not been typed to identify the current
  20157. field uniquely, KERMIT-80 will sound a beep and allow you to continue from that
  20158. point.
  20159.  
  20160. BREAK   Send  a  Break condition to the remote computer.  This is only possible
  20161.         if your system is capable of sending breaks.  It is intended to be used
  20162.         with  PAUSE,  STRING etc and the TAKE command to do weird and wonderful
  20163.         things, like automatic logging on to a remote host.
  20164.  
  20165. BYE     When talking to a remote Kermit Server, this  command  shuts  down  the
  20166.         server  and  logs it out, and also exits from Kermit-80 to CP/M command
  20167.         level.
  20168.  
  20169. CONNECT Establish a "virtual terminal" connection to any host that may be  con-
  20170.         nected  to the serial port, i.e. pass all typein to the serial port and
  20171.         display all input from the serial port on the screen.  Also, emulate  a
  20172.         DEC   VT52   to   allow  cursor  control,  screen  clearing,  etc.,  if
  20173.         VT52-EMULATION is ON (see below), in which case  you  should  also  set
  20174.         your  terminal type on the remote host to VT52.  (Some versions emulate
  20175.         other terminals.)
  20176.  
  20177.         Warning: VT52 emulation is only successful if your system  or  its  at-
  20178.         tached  terminal  can  do the same sort of functions as a genuine VT52.
  20179.         Things to beware of are cursor addressing, clear to end of page and end
  20180.         of  line, clear screen, home cursor, and clear-and-home functions.  The
  20181.         useability of VT52 emulation depends entirely on how many of  the  VT52
  20182.         functions can be emulated by your terminal.
  20183.  
  20184.         The  escape  character  differs from micro to micro; when you issue the
  20185.         CONNECT command, the micro will print a message telling you how to  get
  20186.         back.    The  escape  sequence  is generally an uncommonly-used control
  20187.         character, like CTRL-backslash  or  CTRL-rightbracket,  followed  by  a
  20188.         single letter "command":
  20189.  
  20190.         C   Close Connection, return to Kermit-80> command level.
  20191. 15.2. Kermit-80 Description                                            Page 360
  20192.  
  20193. -------------------------------------------------------------------------------
  20194.         S   Display Status of connection, but maintain remote connection.
  20195.         ?   List available single-character commands.
  20196.         0   (zero) Send a null (0) character.
  20197.         B   Send a BREAK signal.  Most systems provide this function.
  20198.         D   Drop the line.  Used on the Apple with modem.  Automatically closes
  20199.             the connection after dropping the line.  The TORCH system  acknowl-
  20200.             edges this command but does nothing.
  20201.         P   Toggle  printer on or off.  Allows you to copy whatever goes to the
  20202.             screen to the printer.
  20203.         S   Temporarily suspend logging to the log file.
  20204.         Q   Restart logging to the log file
  20205.         ^]  (or whatever - a second copy of the escape character) Send the  es-
  20206.             cape character itself to the remote host.
  20207.  
  20208. DIRECTORY
  20209.         This provides a directory listing of the specified files.  If no  files
  20210.         are  specified,  all files on the default disk are listed.  File sizes,
  20211.         in K, are included.  You may interrupt  the  listing  at  any  time  by
  20212.         typing any character.  The listing (even if interrupted) concludes with
  20213.         a display of the amount of free storage left on the disk.  You can  in-
  20214.         hibit the display of file sizes by SET DIRECTORY OFF.
  20215.  
  20216. ERASE filespec
  20217.         This executes the CP/M ERA command on the specified file(s).  The names
  20218.         of the files being erased are not displayed.
  20219.  
  20220. EXIT    Quit back to CP/M.  The return is made by a JMP 0 (Warmstart)
  20221.  
  20222. FCOPY source destination 
  20223.         Copy a named file to another file, either on the same drive or  another
  20224.         drive.
  20225.  
  20226. FINISH  Like  LOGOUT,  but shuts down the remote server without logging it out.
  20227.         Leaves you at Kermit-80 command level; subsequent CONNECT commands will
  20228.         put you back at host system command level.
  20229.  
  20230. GET filespec (local_filespec) 
  20231.         When Kermit-80 is talking to a Kermit Server on the  host,  you  should
  20232.         use the GET command to request the server to send files to you, for ex-
  20233.         ample:  
  20234.  
  20235.           get hlp:k*.hlp
  20236.  
  20237.         You may specify a local filename if you want to save  the  remote  file
  20238.         under  a  different  filename.  Limitation: If you request an alternate
  20239.         block check type using the SET BLOCK command, the GET command will  not
  20240.         communicate  it  to the remote server.  If you want to have type 2 or 3
  20241.         block checks done when getting files from the server, you have to issue
  20242.         the  appropriate  SET BLOCK command to the remote KERMIT before putting
  20243.         it in server mode.
  20244.  
  20245. HELP    List all these commands, with a short description on what the  commands
  20246.         do.    A  question  mark will do the same.  If you have already typed a
  20247.         command but do not know what the parameters are, type a space  (to  in-
  20248.         dicate  the  end  of the command) and a question mark.  You will be in-
  20249.         formed of what Kermit can expect at that stage.
  20250. 15.2. Kermit-80 Description                                            Page 361
  20251.  
  20252. -------------------------------------------------------------------------------
  20253. INPUT time_delay string
  20254.         Setup  a  string and time delay for your CP/M system to expect from the
  20255.         host, then wait for that sting to be sent to your CP/M-80 system.
  20256.  
  20257. LOG filespec
  20258.         When  CONNECTed  to a foreign host as a terminal, log the terminal ses-
  20259.         sion to the specified diskette file.   This  functionality  depends  to
  20260.         some  extent  on the remote host's ability to do XON/XOFF flow control,
  20261.         and does not guarantee a complete transcript (after  all,  that's  what
  20262.         the  KERMIT  protocol is for).  The log file is closed when the connec-
  20263.         tion is closed by typing the escape character followed by  the  single-
  20264.         character command "C".
  20265.  
  20266. LOG (append) 
  20267.         It is possible to temporarily suspend  logging  during  connect  state.
  20268.         Typing  an escape sequence can turn file logging on (<escape-character>
  20269.         R for Resume) or off (<escape-character> Q for quiet).
  20270.  
  20271.         Re-entering connect state will re-open the previously opened  log  file
  20272.         and append to that file.
  20273.  
  20274. LOGOUT  Like BYE, but leaves you at Kermit-80 command level.
  20275.  
  20276. PAUSE delay_period
  20277.         If this command is issued your CP/M system will  wait  a  while  before
  20278.         proceeding with another command.  This is intended for use in TAKE com-
  20279.         mands, where you may want to pause for a while before  proceeding  with
  20280.         the  rest  of the TAKE file.  The actula delay is very variable between
  20281.         systems, and values should be determined on a trial and error basis.
  20282.  
  20283. PRINT   Print a file to the console and printer.  Output to the printer is buf-
  20284.         fered by the Kermit maintained printer buffer This routine is identical
  20285.         to TYPE but characters are echoed to the printer  as  well  as  to  the
  20286.         screen.  Suspending and aborting output is as described in TYPE.
  20287.  
  20288. RECEIVE filespec
  20289.         Receive file(s) from the remote Kermit, and save them under  the  names
  20290.         provided  in  the file headers supplied by the remote host.  If a local
  20291.         filespec is given, the file is saved under the given filename.  If  the
  20292.         names  aren't legal, use as many legal characters from the name as pos-
  20293.         sible (see the description of SET FILE-WARNING below).   If  there's  a
  20294.         conflict,  and  FILE-WARNING  is  ON,  warn the user and try to build a
  20295.         unique name for the file by adding "&" characters to the name.
  20296.  
  20297. SEND filespec
  20298.         Send  file(s) specified by filespec to the remote Kermit.  The filespec
  20299.         may contain CP/M wildcards.
  20300.  
  20301. SET parameter [value]
  20302.         Set the specified parameter to the specified value.  Possible parameter
  20303.         settings:
  20304.  
  20305.         AUTORECEIVE
  20306.                 ON  (or  OFF).    Allows  several  files to be received without
  20307.                 having to type RECEIVE on the receiving machine.   The  routine
  20308.                 simply  looks for activity on the serial line, and if so fudges
  20309. 15.2. Kermit-80 Description                                            Page 362
  20310.  
  20311. -------------------------------------------------------------------------------
  20312.                 a RECEIVE command.  The packet sent by the sender will be lost.
  20313.  
  20314.         BAUD-RATE value 
  20315.                 Change  the baud rate of the communications port.  This command
  20316.                 only works on some systems.  value is  the  numeric  baud  rate
  20317.                 (300,  9600,  etc.) desired.  Type SET BAUD followed by a ques-
  20318.                 tion mark for a list of supported baud rates.  On systems  that
  20319.                 do  not  support  this command, you must set the port baud rate
  20320.                 from CP/M or other setup mechanism outside of KERMIT-80.
  20321.  
  20322.         BLOCK-CHECK-TYPE option 
  20323.                 The options are:
  20324.  
  20325.                 1-CHARACTER-CHECKSUM
  20326.                         Normal, default, standard 6-bit checksum.
  20327.                 2-CHARACTER-CHECKSUM
  20328.                         A 12-bit checksum encoded as two characters.
  20329.                 3-CHARACTER-CRC-CCITT
  20330.                         A 16-bit CCITT-format Cyclic Redundancy Check,  encoded
  20331.                         as 3 characters.
  20332.  
  20333.         BUFFER-SIZE value
  20334.                 This allows you to set a buffer size during transfer  of  data.
  20335.                 On  some systems it takes so long that the remote end times out
  20336.                 while the local system is reading or writing to disk.  The size
  20337.                 is  the  number of 128 disk sectors (nominal) and can be from 1
  20338.                 (128 bytes) to 64 (8 kbytes).
  20339.  
  20340.         CASE-SENSITIVITY ON (or OFF) 
  20341.                 Kermit-80  usually  maps  lower  case  characters to upper case
  20342.                 character, but there may be times when  lower  case  should  be
  20343.                 left  alone.  SET CASE-SENSITIVITY ON will do this-but only for
  20344.                 some functions.
  20345.  
  20346.                 CP/M-80 filenames will still be mapped to uppercase characters.
  20347.  
  20348.         DEBUG   ON (or OFF).  Enables/disables displaying  of  packets  on  the
  20349.                 screen during file transfer.  Not performed if the QUIET option
  20350.                 has been set for the terminal (ie SET TERMINAL QUIET)
  20351.  
  20352.         DEFAULT-DISK drive letter 
  20353.                 This  allows you to set the default disk as source and destina-
  20354.                 tion of file transfers.   In  addition,  issuing  this  command
  20355.                 causes  you  to  switch  to  the  specified disk and log it in,
  20356.                 write-enabled.  The colon must be included  in  the  disk  name
  20357.                 (A:).   The selected disk appears in your KERMIT-80 prompt, for
  20358.                 instance 
  20359.  
  20360.                   Kermit-80 14A:>
  20361.  
  20362.         DIRECTORY-FILE-SIZE ON (or OFF).
  20363.  
  20364.                 By setting DIRECTORY-FILE-SIZE OFF you can  get  an  abreviated
  20365.                 listing of your disk drive.  File sizes are not calculated, and
  20366.                 five files are shown on a line.  Setting this  option  ON  will
  20367.                 show file sizes of each file.
  20368. 15.2. Kermit-80 Description                                            Page 363
  20369.  
  20370. -------------------------------------------------------------------------------
  20371.                 Both options will list the free space remaining.
  20372.  
  20373.         ESCAPE  Change  the  escape character for virtual terminal connections.
  20374.                 Kermit-80 will prompt you for the new escape  character,  which
  20375.                 you enter literally.
  20376.  
  20377.         FILE-MODE option 
  20378.                 Tells KERMIT-80 what kind of file it is sending, so that KERMIT
  20379.                 can  correctly  determine the end of the file.  SET FILE BINARY
  20380.                 means to send all the 128-byte blocks (ie logical CP/M sectors)
  20381.                 of the file, including the last block in its entirety; SET FILE
  20382.                 ASCII is used for text files, and transmission stops  when  the
  20383.                 first  Control-Z  is  encountered anywhere in the file (this is
  20384.                 the CP/M convention for marking the end of a text file).
  20385.  
  20386.                 SET FILE-MODE DEFAULT tells Kermit to attempt to determine  the
  20387.                 file  type  by  examining  the  file  being  transmitted.  If a
  20388.                 Control-Z appears before the last block of the file, it is  as-
  20389.                 sumed  to  be  BINARY;  if, when the first Control-Z is encoun-
  20390.                 tered, the remainder of the file contains only control-Z's,  it
  20391.                 is  assumed to be a text file.  Unfortunately, not all programs
  20392.                 fill the remainder of the last  record  of  a  text  file  with
  20393.                 Control-Z's, so this algorithm is not always successful.
  20394.  
  20395.                 If  binary transmission is used on a text file, or a compressed
  20396.                 file (eg a .DQC file) some extraneous characters (up to 127  of
  20397.                 them) may appear at the end of the file on the target system.
  20398.  
  20399.                 If  ASCII  transmission  is used on a binary file, any 8th bits
  20400.                 set will be stripped and a warning sent to the console.    When
  20401.                 the  first  control-Z is encountered, the file is assumed to be
  20402.                 at the end, even if it is not.
  20403.  
  20404.         FLOW-CONTROL ON (or OFF) 
  20405.                 Sets  XON/XOFF  flow  control on or off.  If set ON the host is
  20406.                 expected to respond to an XOFF or XON sent by  Kermit-80.    If
  20407.                 set  off,  no  flow  control is assumed and any XON/XOFF is ig-
  20408.                 nored.
  20409.  
  20410.         IBM ON (or OFF)
  20411.                 Allow  the  transfer of files to and from an IBM mainframe com-
  20412.                 puter.  This  makes  Kermit-80  wait  for  the  IBM  turnaround
  20413.                 character (XON), ignore parity on input, add appropriate parity
  20414.                 to output, and use local  echoing  during  CONNECT.    As  dis-
  20415.                 tributed, KERMIT-80 uses MARK parity for IBM communication.  If
  20416.                 you don't give this command, IBM mode is OFF.  Since IBM VM/CMS
  20417.                 KERMIT  does not have timeout capability, SET IBM ON also turns
  20418.                 on the "fuzzy timer" automatically.
  20419.  
  20420.         LOCAL-ECHO ON (or OFF)
  20421.                 When  you  CONNECT to a remote host, you must set LOCAL-ECHO ON
  20422.                 if the host is half  duplex,  OFF  if  full  duplex.    OFF  by
  20423.                 default.
  20424.  
  20425.         LOGGING ON (or OFF)
  20426.                 Cease or resume logging whenever connect mode is entered.  This
  20427. 15.2. Kermit-80 Description                                            Page 364
  20428.  
  20429. -------------------------------------------------------------------------------
  20430.                 is  really only applicable after a LOG command is no longer re-
  20431.                 quired.
  20432.  
  20433.         NO-EXIT This command is applicable only for  Kermit  initiated  with  a
  20434.                 command tail.  For example, if Kermit was initiated by:
  20435.  
  20436.                 KERMIT ;SEND HELLO;NO-EXIT
  20437.  
  20438.                 Kermit would first seek out and execute the KERMIT.INI file (if
  20439.                 present), then send file HELLO to a  remote  system.    Usually
  20440.                 Kermit would exit back to CP/M, but NO-EXIT over-rides this.
  20441.  
  20442.                 Note  the  leading  semicolon.  This clears leading spaces from
  20443.                 the first command.
  20444.  
  20445.         PORT port name 
  20446.                 Allows  you  to  switch  between different communication ports.
  20447.                 This command is not available on all systems.  Type SET PORT  ?
  20448.                 for  a  list  of valid options for your system. (Note:  If your
  20449.                 system does not support several ports, this command will return
  20450.                 a "Not implemented" error if you try to set a port.)
  20451.  
  20452.         PRINTER ON (or OFF) 
  20453.                 Turns copying of CONNECT session to printer on and off.  It  is
  20454.                 also  possible  to  toggle  the printer on/off from the connect
  20455.                 state, by typing <escape character> followed by P.
  20456.  
  20457.         PARITY option 
  20458.                 Sets  parity  for  outgoing characters to one of the following:
  20459.                 NONE, SPACE, MARK, EVEN, or ODD.  On input, if parity is  NONE,
  20460.                 then  the  8th  bit is kept (as data), otherwise it is stripped
  20461.                 and ignored.  The parity setting applies to both terminal  con-
  20462.                 nection and file transfer.  If you set parity to anything other
  20463.                 than none, KERMIT-80 will attempt to use "8th bit prefixing" to
  20464.                 transfer  binary files.  If the other KERMIT is also capable of
  20465.                 8th bit prefixing, then binary files can  be  transferred  suc-
  20466.                 cessfully;  if  not, the 8th bit of each data byte will be lost
  20467.                 (you will see a warning on your screen if this happens).
  20468.  
  20469.         RECEIVE parameter [value] 
  20470.                 Set a RECEIVE parameter.
  20471.  
  20472.                 PAD-CHAR
  20473.                         Set the PAD character to  use  while  receiving  files.
  20474.                         Currently a dummy, as for SET SEND PAD-CHAR.
  20475.                 PADDING [value] 
  20476.                         Set the number of PAD characters to use while receiving
  20477.                         files.  Same as SET SEND PADDING.
  20478.                 START-OF-PACKET [value] 
  20479.                         Set the default start of Packet character for receiving
  20480.                         files.   Apply the same rules and considerations as for
  20481.                         SET SEND START-OF-PACKET.
  20482.  
  20483.         SEND parameter [value] 
  20484.                 Set a SEND parameter.
  20485. 15.2. Kermit-80 Description                                            Page 365
  20486.  
  20487. -------------------------------------------------------------------------------
  20488.                 PAD-CHAR
  20489.                         Set the Pad character to be used while  sending  files.
  20490.                         It  is  currently  a  dummy entry, and does not do any-
  20491.                         thing.
  20492.                 PADDING [value] 
  20493.                         Set  the  number  of PAD-CHARS to be used while sending
  20494.                         files.  This too does nothing.
  20495.                 START-OF-PACKET
  20496.                         Set  the  default  start of packet character to another
  20497.                         character than control-A.  This  may  be  necessary  on
  20498.                         systems  (including  intervening  networks)  that  trap
  20499.                         control-A characters.  Choose a control  character  not
  20500.                         otherwise used, ie not carriage return (13D, ODH), line
  20501.                         feed (10D, OAN), tabs (09D, 09H), backspace (08H),  and
  20502.                         bell  (07H)  or  any  other  used  between you and your
  20503.                         remote system.
  20504.  
  20505.         TACTRAP set the TAC intercept character.  If you are attached to a  TAC
  20506.                 it  will swallow the intercept character (commercial AT sign by
  20507.                 default) so Kermit sends it twice.  With this command  you  can
  20508.                 set  the  intercept  character  (ie  the  one to send twice) to
  20509.                 another character.
  20510.  
  20511.         TERMINAL option 
  20512.                 Select one of the following terminal characteristics:
  20513.  
  20514.                 OFF     sets emulation off, and its up to the attached terminal
  20515.                         to respond to escape sequences  sent  from  the  remote
  20516.                         host system.
  20517.  
  20518.                 DUMB    Like  off, but carriage return and line feed characters
  20519.                         are the only control characters accepted.    All  other
  20520.                         control characters are simply ignored. (Really a "Glass
  20521.                         TTY").
  20522.  
  20523.                 EXTERNAL
  20524.                         Emulation  is  provided  for by a routine in the system
  20525.                         dependent part of Kermit.  Attempting to set  this  op-
  20526.                         tion  without  having  and  externally supplied routine
  20527.                         will returna "Not Implemented" error.
  20528.  
  20529.                 VT52    When connected as a terminal to  a  foreign  host,  the
  20530.                         micro  emulates  a  VT52.    VT52  emulation  is set by
  20531.                         default, except on micros that  already  have  terminal
  20532.                         functionality  built in, such as the DEC VT180 and DEC-
  20533.                         mate (these act as VT100-series terminals).  Some  sys-
  20534.                         tems emulate other terminals, like the ADM3A; see table
  20535.                         15-5.
  20536.  
  20537.                 QUIET   Do not display any file transfer information  onto  the
  20538.                         console.    This  mode is useful if you console takes a
  20539.                         long time to update the display.  Only the file name is
  20540.                         displayed.  DEBUGging information is not displayed even
  20541.                         if selected.
  20542.  
  20543.                 REGULAR Inverse of  QUIET.    All  packets  etc  displayed,  as
  20544. 15.2. Kermit-80 Description                                            Page 366
  20545.  
  20546. -------------------------------------------------------------------------------
  20547.                         ususal.
  20548.  
  20549.         TIMER ON (or OFF)
  20550.                 Enable or disable the "fuzzy timer".    The  timer  is  off  by
  20551.                 default,  because in the normal case KERMIT-80 is communicating
  20552.                 with a mainframe KERMIT that has its own timer.  Mainframe KER-
  20553.                 MIT  timers  tend  to  be more precise or adaptable to changing
  20554.                 conditions.  You should SET TIMER ON if you  are  communicating
  20555.                 with a KERMIT that does not have a timer.  You should SET TIMER
  20556.                 OFF if you are communicating over a network with long delays.
  20557.  
  20558.         USER new user number 
  20559.                 Sets another user number to be active.  Acceptable user numbers
  20560.                 are 0 to 31, though it is recommended to use user numbers 0  to
  20561.                 15  only.    This  is really only useful for Winchester Systems
  20562.                 with high disk capacities.
  20563.  
  20564.         WARNING ON (or OFF)
  20565.                 Warn  user  of  filename  conflicts  when  receiving files from
  20566.                 remote host, and attempt to generate a unique  name  by  adding
  20567.                 "&" characters to the given name.  ON by default.
  20568.  
  20569. SHOW    Display  all  setable  parameters.    You  will get a page or so of the
  20570.         status af all parameters that can be set using the SET command.
  20571.  
  20572. STATUS  The same function as Show.
  20573.  
  20574. STRING line of text 
  20575.         Send  a character string to the host.  This simply copies the string to
  20576.         the correct line, and assumes all appropriate parameters have been  set
  20577.         to  be  used  eg baudrate, parity etc.  It is intended as an option for
  20578.         the TAKE command.
  20579.  
  20580. TAKE filespec
  20581.         Take  characters  and  commands from the specified file as if they were
  20582.         entered from the keyboard.  This is useful if you  want  to  set  up  a
  20583.         batch  job.    A command file can send, get, receive, set functions etc
  20584.         automatically.
  20585.  
  20586.         An automatic "TAKE KERMIT.INI" is executed from the default drive  when
  20587.         Kermit-80  is  loaded.   This can be used to set defaults of band rate,
  20588.         parity, filetype, default drive etc.
  20589.  
  20590.         If KERMIT.INI does not exist, control is given directly to the user.
  20591.  
  20592. TRANSMIT filespec wait character string 
  20593.         Send  the  specified file to the system on the other end of the connec-
  20594.         tion as though it were being typed at the terminal, one line at a time.
  20595.         Each line sent is terminated with a carriage return, and any line feeds
  20596.         are stripped from the file sent.  After each line has been sent  Kermit
  20597.         waits  for a character string from the host (eg a acrriage return).  If
  20598.         not specified, a carriage return is assumed.  No KERMIT protocol is in-
  20599.         volved.   An asterix (star) is sent to the console for every line sent,
  20600.         to indicate how the transfer is progressing.  This is useful for  send-
  20601.         ing  files  to systems that don't have a KERMIT program.  During trans-
  20602.         mission, you may type one of these single-character commands:
  20603. 15.2. Kermit-80 Description                                            Page 367
  20604.  
  20605. -------------------------------------------------------------------------------
  20606.         Control-C
  20607.             Cease transmission, and drop into terminal emulation mode.
  20608.         <CR>
  20609.             Re-transmit the previous line.
  20610.  
  20611. TYPE    Type a file to the console.  Typing any character other than  Control-C
  20612.         while  the  file  is  being displayed will suspend the output.  Another
  20613.         character will resume output.  A Control-C will abort the rest  of  the
  20614.         output.
  20615.  
  20616. VERSION Show  the  name,  edit  number, and edit date of several of the modules
  20617.         that make up Kermit-80.
  20618.  
  20619.  
  20620. 15.3. Kermit-80 Flavors
  20621.  
  20622. Many of the systems supported use an external terminal, rather than a  built-in
  20623. console.    Kermit  may be further customized for these systems by defining (at
  20624. assembly time) the terminal type to be used.  If the terminal type  is  unknown
  20625. or  does  not match any of the existing terminal options, the generic "CRT" op-
  20626. tion may be selected.  In this case, Kermit  cannot  do  fancy  screen  control
  20627. during  file transfer; it simply types the file names, packet numbers, and mes-
  20628. sages in sequence across and down the screen.  This works best if you  can  put
  20629. your  micro  or  terminal in "autowrap" mode; otherwise the packet numbers will
  20630. pile up in the rightmost column; the filenames and messages will always  appear
  20631. on a new line, however.  If no specific terminal has been selected, Kermit can-
  20632. not do VT52 emulation; it can act as a  "dumb  terminal"  (sometimes  called  a
  20633. "glass  TTY"),  or else its own built in terminal firmware provides cursor con-
  20634. trol functions independent of the Kermit program.
  20635.  
  20636.  
  20637. 15.3.1. Generic Kermit-80
  20638.  
  20639. "Generic Kermit-80" is an implementation of Kermit that should run on any 8080-
  20640. compatible CP/M 2.2 system with no modification at all, or perhaps only a minor
  20641. one.  Unlike other Kermit-80 implementations, it contains  no  system-dependent
  20642. manipulation  of  the  serial  port.    All I/O is done with standard CP/M BIOS
  20643. calls, and I/O redirection is done using the CP/M IOBYTE function,  which,  ac-
  20644. cording  to  the  Digital Research CP/M Operating System Manual, is an optional
  20645. feature of any particular CP/M implementation.  If your system does not provide
  20646. the IOBYTE function, Generic Kermit-80 will not work; furthermore, not all sys-
  20647. tems that implement IOBYTE do so in the same way.  The SET PORT command may  be
  20648. used  to  select the devices to be used for input and output.  Table 15-1 lists
  20649. the options to the SET PORT command and their effects.
  20650.  
  20651.   -------------------------------------------------------------------------
  20652.  
  20653.  
  20654.                   SET PORT xxx    input from      output to
  20655.                        CRT            CRT:            CRT:
  20656.                        PTR            PTR:            PTP:
  20657.                        TTY            TTY:            TTY:
  20658.                        UC1            UC1:            UC1:
  20659.                        UR1            UR1:            UP1:
  20660.                        UR2            UR2:            UP2:
  20661. 15.3.1. Generic Kermit-80                                              Page 368
  20662.  
  20663. -------------------------------------------------------------------------------
  20664.                    Table 15-1:   Kermit-80 SET PORT Options
  20665.  
  20666.   -------------------------------------------------------------------------
  20667.  
  20668. The default is SET PORT PTR.  In all cases, the console (CON:) and list  (LST:)
  20669. devices used are those selected when Kermit is started.
  20670.  
  20671. The  reason all Kermit-80 implementations aren't generic is that a good deal of
  20672. speed is sacrificed by getting all services from the operating system.  While a
  20673. specific  implementation  of Kermit-80 may be able to operate at 4800, 9600, or
  20674. even 56 Kilo baud, generic Kermit will fail to work on some systems  at  speeds
  20675. in  excess  of  1200  baud.   In addition, many features of Kermit require more
  20676. specific knowledge of the hardware involved.   Generic  Kermit  cannot  send  a
  20677. BREAK signal, or change the baud rate, for example.
  20678.  
  20679.  
  20680. 15.3.2. CP/M 3 Kermit
  20681.  
  20682. CP/M-3  Kermit  (also  known  as  CP/M-Plus  Kermit)  is  a  version of generic
  20683. Kermit-80, and should run on most CP/M-3 (CP/M-Plus)  systems.    It  uses  the
  20684. auxilliary  port  (AUX:) to communicate to the remote Kermit.  The SET BAUD and
  20685. SET PORT commands are not supported; nor can a BREAK be  sent.    Like  generic
  20686. Kermit-80, a terminal may be selected at assembly time.
  20687.  
  20688.  
  20689. 15.3.3. System-Specific Versions
  20690.  
  20691. There  are  also many versions of Kermit-80 tailored to specific systems.  Most
  20692. of these operate  uniformly,  but  some  of  them  take  advantage  (or  suffer
  20693. limitations) of the specific system.  Here are some of the special features for
  20694. particular systems:
  20695.  
  20696. Amstrad: -- Two versions:
  20697.  
  20698.     PCW 8256
  20699.         The PCW 8256/8512 with the serial inerafce attached.
  20700.  
  20701.     CPC 6128
  20702.         The 664 with add on memory and 6128 are both supported.   Both  systems
  20703.         must  run  CP/M  Plus, so the 664 will need an add on RAM pack and CP/M
  20704.         upgrade.  A high speed transfer rate of 38k baud can  be  used  between
  20705.         Amstrad computers.
  20706.  
  20707. ACCESS:
  20708.     Access Matrix computer using port J5.  Supports SET BAUD-RATE for rates  of
  20709.     300-9600 baud.
  20710.  
  20711. Apple II -- four variations:
  20712.  
  20713.     APMMDM:
  20714.         Apple with Z80 Softcard and Micromodem II in slot 2 Dialout  capability
  20715.         provided  in connect command; user is prompted for phone number if car-
  20716.         rier is not present.  During connect mode, ^]D drops carrier.  BYE com-
  20717.         mand also causes carrier to be dropped.
  20718.  
  20719.     AP6551:
  20720. 15.3.3. System-Specific Versions                                       Page 369
  20721.  
  20722. -------------------------------------------------------------------------------
  20723.         Apple with Z80 Softcard, and one of  several  6551-based  communication
  20724.         cards; the slot number is a compile-time parameter (default is slot 2).
  20725.         SET BAUD-RATE supported; speeds are 110-19200 baud.
  20726.  
  20727.     APCPS:
  20728.         Apple with Z80 Softcard and CP Multi-Function Card.  The slot number is
  20729.         again a compile-time parameter.  SET BAUD-RATE is  supported  for  baud
  20730.         rates from 50 baud to 19200 baud.
  20731.  
  20732.     AP6850:
  20733.         Apple II with Z80 Softcard and a 6850-based USART in  slot  2-the  slot
  20734.         being a compile-time parameter.  SET BAUD-RATE is not supported.
  20735.  
  20736. BBC:
  20737.     Acorn Computers BBC  Computer  with  Acorn  Z80  second  processor  running
  20738.     CP/M-80.  Supports SET BAUD-RATE and can send breaks.
  20739.  
  20740. BigBoard II:
  20741.     Uses serial port A. To use port B, change mnport, mnprts,  and  baudrt  and
  20742.     reassemble.    Can  generate  BREAK.    SET BAUD-RATE supported; speeds are
  20743.     300-38400 baud.
  20744.  
  20745. Cifer:
  20746.     Originally  coded  for Cifer 1886 using the VL: port set as TTYI: and TTYO:
  20747.     but works successfully on 18xx and 28xx series machines.
  20748.  
  20749.     There are now two versions, each with two variations: Either  running  CP/M
  20750.     Version  2.2 or 3.0, and either using the VL: or AUX: ports.  The VL:  port
  20751.     version can only use seven bits of data, so parity  prefixing  is  required
  20752.     for  binary  file transfers.  This restriction is removed by using the AUX:
  20753.     port.  For those interested, the problem is due to the interprocessor  link
  20754.     between  the video and CPU (!) boards.  The VL: port is on the video board,
  20755.     and the AUX: port on the CPU board, and the inter processor link  can  only
  20756.     transfer seven bits of data.
  20757.  
  20758.     Supports SET BAUD-RATE, and can generate breaks on some models with a BREAK
  20759.     key.
  20760.  
  20761. Comart:
  20762.     Comart Communicator-Similar to Northstar equipment.  Can generate BREAK.
  20763.  
  20764. Compupro:
  20765.     Based on Kermit 3.x, and has been merged into V4.09
  20766.  
  20767. CPT-85xx word processors:
  20768.     Can generate BREAK.  SET BAUD-RATE supported; speeds are 50-9600 baud.
  20769.  
  20770. Cromemco:
  20771.     Cromemco computers with TU-ART card.    Supports  SET  BAUD-RATE  (110-9600
  20772.     baud).
  20773.  
  20774. DEC DECmate II word processor (with Z80 card):
  20775.     Can generate BREAK.
  20776.  
  20777. DEC VT180 (Robin):
  20778.     Three  output  ports,  referred to as COMMUNICATIONS, GENERAL, and PRINTER.
  20779. 15.3.3. System-Specific Versions                                       Page 370
  20780.  
  20781. -------------------------------------------------------------------------------
  20782.     Can generate BREAK.
  20783.  
  20784. Digicomp Delphi 100:
  20785.     SET BAUD-RATE supported; speeds are 50-19200 baud.
  20786.  
  20787. Discovery:
  20788.     Action Computer Enterprises "Discovery" Multi-user Computer.  Uses  Port  B
  20789.     on  an  83U  user  board.    Supports SET BAUD-RATE for 50-19200 baud.  Can
  20790.     generate BREAK.
  20791.  
  20792. Epson:
  20793.     Epson  PX-8 with LCD display.  Although it is quite different in displaying
  20794.     of Packet Information, it works as any other CP/M-80 Kermit.  Supports  SET
  20795.     BAUD-RATE and can generate BREAK.
  20796.  
  20797. Generic Kermit:
  20798.     Two versions, one for CP/M version 2.2 and version 3.   These  systems  use
  20799.     IOBYTE  flipping  (V2.2)  and the AUX:  device to communicate to the serial
  20800.     line.  You may have to SET PORT xxx before the version 2.2  will  work,  as
  20801.     Kermit needs to know what device is the serial line.
  20802.  
  20803. Genie:
  20804.     Eaca Video Genie.
  20805.  
  20806. Heath: Three Versions:
  20807.  
  20808.     H8QUAD
  20809.         for  Heath-8  systems  with  the  quad  io board.  This system has been
  20810.         derived from V3.x code.  Note that this version will not run "as is" on
  20811.         H89 systems.
  20812.  
  20813.     H89 For Heath-89 machines suports baud rates from 50 to 56,000 baud.
  20814.  
  20815.     Z100
  20816.         For Z-100 running CP/M-85.  This version does not  support  setting  of
  20817.         baud rates.
  20818.  
  20819. Intertec Superbrain: Two Versions:
  20820.  
  20821.     BRAINA
  20822.         For superbrain using AUX port.  Breaks and SET BAUD both supported
  20823.  
  20824.     BRAINM
  20825.         As above, but using the MAIN port.
  20826.  
  20827. Ithaca:
  20828.     Ithaca Intersystems based computer using the VIO card for  all  IO  to  the
  20829.     outside  world.  The system is strictly speaking a home-brew variant of the
  20830.     Ithaca machine, using an S100 cardcage without a front panel.  It uses  the
  20831.     Extended  BIOS  by  EuroMicro of London.  However, I see no reason for this
  20832.     version not running on a genuine Ithaca Intersystems machine.    There  are
  20833.     patches needed to the EuroMicro BIOS to make this version work.
  20834.  
  20835. Kaypro:
  20836.     Should work on  most  Kaypro  models,  as  well  as  some  related  systems
  20837.     (Ferguson  BigBoard  I,  Xerox  820).   For the newer Kaypros with multiple
  20838. 15.3.3. System-Specific Versions                                       Page 371
  20839.  
  20840. -------------------------------------------------------------------------------
  20841.     ports, Kermit uses the one labeled "serial data"; it cannot use the  serial
  20842.     printer  or  internal  modem ports (but it should be possible to modify the
  20843.     values for mnport, mnprts, and baudrt to do this).    Can  generate  BREAK.
  20844.     SET BAUD-RATE supported; speeds are 50-19200 baud.
  20845.  
  20846. Lobo:
  20847.     Lobo MAX-80.  Supports SET BAUD-RATE and can generate BREAKS.
  20848.  
  20849. Merlin:
  20850.     British  Telecom  Merlin  M2215 (also Rair Black Box, possibly also the ICL
  20851.     PC?).  Requires a terminal.
  20852.  
  20853. Micromate:
  20854.     PMC 101 Micromate.  Supports SET BAUD-RATE and can generate BREAK.
  20855.  
  20856. Micromint: Two versions
  20857.  
  20858.     S6  The  Ciarcia/Micromint sb-180 board with a 6Mhz procoessor.  System re-
  20859.         quires a terminal.
  20860.  
  20861.     S9  As above, but with a 9Mhz processor.
  20862.  
  20863. NCR:
  20864.     Decisionmate 5.  Uses the 2651 and is largely the same as the Ithaca Inter-
  20865.     systems machine implementation.
  20866.  
  20867. Northstar: -- There are four versions available:
  20868.  
  20869.     NORTHS:
  20870.         Northstar  Horizon  with  HS10-4 board.  Supports SET BAUD-RATE and SET
  20871.         PORT.
  20872.  
  20873.     HORIZON:
  20874.         Northstar  Horizon  using  the  serial  ports on the Mother board.  Can
  20875.         generate BREAK.
  20876.  
  20877.     BASICNS:
  20878.         Basic Northstar Horizon using the printer port.  Can generate BREAK.
  20879.  
  20880.     ADVANT:
  20881.         Northstar Advantage.  Supports SET BAUD-RATE and  can  generate  BREAK.
  20882.         Traps Control-0 in the system filter.
  20883.  
  20884. Morrow Decision I:
  20885.     Uses the Multi-I/O board.  Port 1 is the console, port 3 is the  communica-
  20886.     tions line.  SET BAUD-RATE supported; speeds are 75-56000 baud.
  20887.  
  20888. Morrow Micro Decision I:
  20889.  
  20890. Nokia MicroMikko:
  20891.     Will not echo control-O (which locks keyboard).  SET  BAUD-RATE  supported;
  20892.     speeds are 75-9600 baud.
  20893.  
  20894. Ohio Scientific:
  20895.     Doesn't have screen control.
  20896. 15.3.3. System-Specific Versions                                       Page 372
  20897.  
  20898. -------------------------------------------------------------------------------
  20899. Osborne 1:
  20900.     Uses  serial  line,  not  internal  modem.   Left-arrow key generates <DEL>
  20901.     ("delete" or "rubout" character) during connect mode.  SET  BAUD-RATE  sup-
  20902.     ported; speeds are 300 and 1200 baud.  Now supports multi-sector buffering.
  20903.  
  20904. Research Machines: Two Versions:
  20905.  
  20906.     RM380ZM:
  20907.         380Z and 5.25" disks supports SET BAUD.RATE
  20908.  
  20909.     RM380ZF:
  20910.         380Z and 8" disks, otherwise as above.
  20911.  
  20912. Sanyo:
  20913.     Sanyo MBC-1100.  This version derived from Kermit V3.x
  20914.  
  20915. ScreenTyper:
  20916.     Details unkown.
  20917.  
  20918. TRS-80: Three versions:
  20919.  
  20920.     TRS80LB:
  20921.         TRS-80 with Lifeboat CP/M
  20922.  
  20923.     TRS80PT:
  20924.         TRS-80 with Pickles and Trout CP/M
  20925.  
  20926.     TRSM4:
  20927.         TRS-80 Model 4 with Montezuma CP/M
  20928.  
  20929. Teletek:
  20930.     Teletek Systemaster. Supports SET BAUD.
  20931.  
  20932. Telcon:
  20933.     TELCON ZOBRA portable computer.
  20934.  
  20935. Torch:
  20936.     Torch Unicorn 5 initially, but the code runs on other Z80 based CP/N (as in
  20937.     Nut!) systems.  It uses the BBC Computer as  a  "Base  processor",  and  is
  20938.     similar  to the BBC version.  The base processors RS423 port is used rather
  20939.     than any built in Modem.  (UK telecoms legislation effectively makes  modem
  20940.     control  software  tricky  business...).   Two potential versions exist-one
  20941.     using cursor positioning codes for a MCP and CCCP ROM combination of  revi-
  20942.     sion  less  than  1.00,  the  other  version  uses  the additional facility
  20943.     MCP/CCCP versions greater than 1.  Supports SET BAUD-RATE and can  generate
  20944.     BREAKs.
  20945.  
  20946.     Note  that  binary  files  must be transferred using SET PARITY to anything
  20947.     other than NONE!  Parity is neither generated nor checked.
  20948.  
  20949. US Micro Sales:
  20950.     S-100-8 based computer.
  20951.  
  20952. Vector Graphics:
  20953.     Vector
  20954. 15.3.3. System-Specific Versions                                       Page 373
  20955.  
  20956. -------------------------------------------------------------------------------
  20957. Xerox:
  20958.     Xerox 820.
  20959.  
  20960. Z80MU:
  20961.     Development Kermit on a PC running the Z80MU Z80 and CP/M  2.2  development
  20962.     system.  Allows development of the system independent modules to be done on
  20963.     an IBM PC or clone.  Also allows the generation of new .HEX files, that may
  20964.     then  be  KERMITed  to  the target system.  Note:  Not all the BDOS or BIOS
  20965.     routines are supported, so avoid "unusual" BIOS/BDOS calls.  (For  example,
  20966.     DIR from within Kermit will fail as one of the BIOS routines returning disk
  20967.     parameters is not supported.)
  20968.  
  20969.  
  20970. 15.4. Installation of Kermit-80
  20971.  
  20972. Kermit-80 was written originally for the Intertec SuperBrain in  lowest-common-
  20973. denominator   8080 code with the standard assembler, ASM (single source module,
  20974. no macros, no advanced instructions), so that it  could  be  assembled  on  any
  20975. CP/M-80  system  (the  8080  assembler  is  distributed  as  a standard part of
  20976. CP/M-80, whereas the fancier Z80 or macro assemblers  are  normally  commercial
  20977. products).    It  has since been modified to run on many other systems as well.
  20978. Kermit-80 should be able to run on any 8080-, 8085- or Z80-based  microcomputer
  20979. under    CP/M with appropriate minor changes to reflect the port I/O and screen
  20980. control for the system (see below).
  20981.  
  20982. The proliferation of new systems supported by Kermit-80 made the  program  grow
  20983. so  large  and  complicated that it had to be broken up into system-independent
  20984. and system-dependent modules, as of version 4 (this was done  by  Charles  Car-
  20985. valho  of  ACC).   Each module is composed of multiple files.  This has reduced
  20986. the time and disk space necessary for assembly; Kermit-80 may once again be as-
  20987. sembled  on a CP/M system with roughly 250Kbytes of space.  The majority of the
  20988. code does not need to be reassembled to support a new system.    Unfortunately,
  20989. it can no longer be assembled with ASM, since ASM does not support multiple in-
  20990. put files.  To allow it to be assembled on any CP/M system,  the  public-domain
  20991. assembler  LASM  is included in the distribution kit. Kermit-80 may also be as-
  20992. sembled with Microsoft's M80 (not supplied).  In  theory,  any  8080  assembler
  20993. supporting the INCLUDE directive ought to work, as well.
  20994.  
  20995. All versions of Kermit-80 are assembled from the same set of sources, with sys-
  20996. tem dependencies taken care of by assembly-time conditionals within the system-
  20997. dependent module (eventually, the system-dependent module will itself be broken
  20998. up into multiple files, one for each system).  The most important system depen-
  20999. dencies  are  terminal emulation (when CONNECTed to the remote host) and screen
  21000. handling, which are dependent on the individual  micro's  escape  codes  (these
  21001. features  are table driven and easily modified for other CP/M systems), and the
  21002. lowest level I/O routines  for  the  serial  communications  port.    The  port
  21003. routines  are  best  done  only  with BDOS calls, but some systems do not allow
  21004. this, primarily because the BDOS routines strip the parity bit during port I/O,
  21005. and the parity bit is used for data when transmitting binary files.
  21006.  
  21007. Kermit-80's  I/O routines must check the port status and go elsewhere if no in-
  21008. put is available; this allows for virtual terminal connection, keyboard  inter-
  21009. ruption  of  stuck  transmissions,  etc.    On systems that fully implement I/O
  21010. redirection via the optional CP/M IOBYTE facility, this may be done by  switch-
  21011. ing  the IOBYTE definition.  On others, however, IN/OUT instructions explicitly
  21012. referencing the port device registers must be used.
  21013. 15.4. Installation of Kermit-80                                        Page 374
  21014.  
  21015. -------------------------------------------------------------------------------
  21016. CP/M-80 KERMIT versions 3.8 and later include a "fuzzy  timer"  that  allows  a
  21017. timeout to occur after an interval ranging from 5 to 20 seconds (depending upon
  21018. the speed of the processor and the operating system routines) during which  ex-
  21019. pected  input does not appear at the port.  In this case, retransmission occurs
  21020. automatically.  In any case, you may type a carriage return during transmission
  21021. to simulate a timeout when the transfer appears to be stuck.
  21022.  
  21023.  
  21024. 15.4.1. Organization of Kermit-80
  21025.  
  21026. Kermit-80  consists  of  two  modules, each of which is generated from multiple
  21027. source files.  The first  module  contains  the  system-independent  code;  the
  21028. second module is configured for a particular system and merged with the system-
  21029. independent module to produce a customized Kermit-80.
  21030.  
  21031. The distribution kit contains:
  21032.  
  21033.    - the system-independent module, CPSKER.HEX;
  21034.    - the system-dependent modules, CPV*.HEX (see table 15-2 and 15-3);
  21035.    - the source files, CPS*.ASM and CPX*.ASM,
  21036.    - the public-domain CP/M assembler, LASM.*,
  21037.    - the public-domain CP/M load/patch utility, MLOAD.*
  21038. 15.4.1. Organization of Kermit-80                                      Page 375
  21039.  
  21040. -------------------------------------------------------------------------------
  21041. -------------------------------------------------------------------------------
  21042.  
  21043.  
  21044. Symbol  Filename System
  21045. ACCESS  CPVACC  Access Matrix
  21046. ADVANT  CPVADV  Northstar Advantage
  21047. AP6551  CPVAPL  Apple II, Z80 Softcard, 6551 ACIA in serial interface
  21048. AP6850  CPVA65  Apple II, Z80 Softcard, 6850 ACIA in Serial Iiterface
  21049. APMMDM  CPVAPM  Apple II, Z80 Softcard, Micromodem II in slot 2
  21050. APCPS   CPVCPS  Apple II, Z80 Softcard, with CPS multifunction card
  21051. BASICNS CPVBNS  Northstar Horizon (terminal required)
  21052. BBC     CPVBBC  Acorn "BBC" computer with Acorn Z80 second processor
  21053. BBII    CPVBB2  BigBoard II (terminal required)
  21054. BRAINM  CPVBRM  Intertec Superbrain using the main port
  21055. BRAINA  CPVBRA  Intertec Superbrain using the Aux port
  21056. CIFER2  CPVCIF  Cifer 1886 using the VL: Serial port and CP/M V2.2
  21057. CIFER3  CPVCI3  Cifer 1886 using the VL: Serial port and CP/M V3.0
  21058. CIFER2  CPVCA2  Cifer 1886 using the AUX: Serial port and CP/M V2.2
  21059. CIFER3  CPVCA3  Cifer 1886 using the AUX: Serial port and CP/M V3.0
  21060. CMEMCO  CPVCRO  Cromemco with TU-ART card. Terminal required)
  21061. COMART  CPVCOM  Comart Communicator (terminal required)
  21062. COMPRO  CPVPRO  Compupro with Interfacer 4 (or 3).  Terminal required.
  21063. CPC     CPVCPC  Amstrad CPC 664 and 6128 and CP/M 3
  21064. CPM3    CPVCP3  "Generic": CP/M 3.0 (CP/M Plus) systems (terminal req'd)
  21065. CPT85XX CPVCPT  CPT-85xx wordprocessor with CP/M
  21066. DELPHI  CPVDEL  Digicomp Delphi 100 (terminal required)
  21067. DISC    CPVDIS  Action Computer Enterprises "Discovery" (terminal req'd)
  21068. DMII    CPVDM2  DECmate II with CP/M option
  21069. GENER   CPVGEN  "Generic": CPM 2.2 systems with IOBYTE (terminal req'd)
  21070. GENIE   CPVGNI  Video Genie
  21071. H8QUAD  CPVH8Q  Heath-8 with Quad 8 i/o board
  21072. HEATH   CPVH89  Heath/Zenith H89
  21073. HORIZON CPVHOR  Northstar Horizon (terminal required)
  21074. KPII    CPVKPR  Kaypro-II (and 4; probably supports all Kaypro systems)
  21075. LOBO    CPVLBO  Lobo Max-80
  21076.  
  21077. "symbol" is the symbol used to select the target system, in CPVTYP.ASM;
  21078.  
  21079. "filename" is the name under which the module is supplied in the distribution.
  21080.  
  21081.              Table 15-2:   Systems supported by Kermit-80 (Part 1)
  21082.  
  21083. -------------------------------------------------------------------------------
  21084. 15.4.1. Organization of Kermit-80                                      Page 376
  21085.  
  21086. -------------------------------------------------------------------------------
  21087. -------------------------------------------------------------------------------
  21088.  
  21089.  
  21090. Symbol  Filename System
  21091. M2215   CPVMRL  British Telecom Merlin/Rair Black Box (terminal required)
  21092. MDI     CPVMDI  Morrow Decision I (terminal required)
  21093. MIKKO   CPVMIK  MikroMikko
  21094. MMATE   CPVMM   PMC 101 Micromate (terminal required)
  21095. MMDI    CPVUD   Morrow Micro Decision I (terminal required)
  21096. NCRDMV  CPVDMV  NCR Decision Mate V.  (Terminal required?)
  21097. NORTHS  CPVNS   Northstar Horizon with HSIO-4 card (terminal req'd)
  21098. OSBRN1  CPVOSB  Osborne 1
  21099. OSI     CPVOSI  Ohio Scientific
  21100. PCI2651 CPVPCI  Ithaca Intersystems with VI0 card (terminal required)
  21101. PCW     CPVPCW  Amstrad PCW 8256/8512 with serial interface
  21102. PX8     CPVPX8  Epson PX-8
  21103. RM380ZM CPVRMM  Research Machines 380Z with MDS (5.25" discs)
  21104. RM380ZF CPVRMF  Research Machines 380Z with FDS (8" discs)
  21105. ROBIN   CPVROB  DEC VT180
  21106. S1008   CPVUSM  US Microsales S-100-8 (terminal required)
  21107. SANYO   CPVSAN  Sanyo MBC-1100
  21108. SB6     CPVSB6  Micromint SB-180 with 6Mhz CPU (terminal required)
  21109. SB9     CPVSB9  Micromint SB-180 with 9Mhz CPU (terminal required)
  21110. SCNTPR  CPVSCN  Screentyper
  21111. TELCON  CPVTEL  TELCON Zobra portable
  21112. TELETEK CPVTET  Teletek Systemaster
  21113. TORCH   CPVTRC  Torch computers BBC-B with Z80 second processors
  21114. TRS80LB CPVTLB  TRS-80 model II with Lifeboat 2.25C CP/M Display
  21115. TRS80PT CPVTPT  TRS-80 model II with Pickles + Trout CP/M Display
  21116. TRSM4   CPVTM4  TRS-80 model IV
  21117. VECTOR  CPVVEC  Vector Graphics
  21118. XER820  CPVXER  Xerox 820
  21119. Z100    CPVZ00  Z-100 under CP/M-85
  21120. Z80MU   CPVZ80  Z80MU development system on a PC
  21121.  
  21122. "symbol" is the symbol used to select the target system, in CPXTYP.ASM;
  21123.  
  21124. "filename" is the name under which the module is supplied in the distribution.
  21125.  
  21126.              Table 15-3:   Systems supported by Kermit-80 (Part 2)
  21127.  
  21128. -------------------------------------------------------------------------------
  21129. 15.4.1. Organization of Kermit-80                                      Page 377
  21130.  
  21131. -------------------------------------------------------------------------------
  21132. -------------------------------------------------------------------------------
  21133.  
  21134.  
  21135. Symbol  Terminal type
  21136. CRT     Dumb terminal type.  Does not do cursor addressing
  21137. ADM3A   Lear Seigler ADM 3A
  21138. ADM22   Lear Seigler ADM 22
  21139. AM230   Ampro 230
  21140. H1500   Hazeltine 1500
  21141. SMRTVD  Netronics Smartvid
  21142. SOROQ   Soroq IQ-120
  21143. TVI912  Televideo 912
  21144. TVI925  Televideo 925 or Freedom 100
  21145. VT52    Dec VT52 or equivalent (H19)
  21146. VT100   Dec VT100 or equivalent
  21147. WYSE    Wyse 100
  21148.  
  21149. "symbol" is the symbol used to select the target system, in CPXTYP.ASM;
  21150.  
  21151. "Terminal type" is the type of terminal "symbol" selects.
  21152.  
  21153.                 Table 15-4:   Terminals supported by Kermit-80
  21154.  
  21155. -------------------------------------------------------------------------------
  21156.  
  21157.  
  21158. 15.4.2. Downloading Kermit-80
  21159.  
  21160. You'll need either a pre-configured .COM file or the system-independent module,
  21161. CPSKER,  in binary (.COM) or hex (.HEX) format and the system-dependent overlay
  21162. for your system (from Tables 15-2 and 15-3).  If your system is not  listed  in
  21163. the  table,  get  the generic CP/M 2.2 Kermit or the generic CP/M 3 Kermit.  If
  21164. you already have a version of Kermit on your micro and you want  to  install  a
  21165. new  version,  simply  use your present version to get the new files.  Transfer
  21166. the files to your system and skip ahead to "merging the modules".
  21167.  
  21168. If you do not have a copy of Kermit on your micro, and you cannot borrow a Ker-
  21169. mit  floppy  but  you do have access to a mainframe computer with a copy of the
  21170. Kermit-80 distribution, you should read this section.
  21171.  
  21172. There are several ways to get CP/M Kermit from a host  system  to  your  micro.
  21173. The easiest is to "download" the necessary "hex" files into your micro's memory
  21174. and then save them on the disk.  If you have a  terminal  emulator  program  on
  21175. your  micro which can save a copy of the session to disk, connect to your host,
  21176. and type the necessary files.  Exit from the emulator, saving the session  log,
  21177. and  edit the session log to extract the hex files.  Skip ahead to "merging the
  21178. files".
  21179.  
  21180. The following is a procedure which, though far from foolproof, should allow you
  21181. to  get a version of Kermit to your CP/M based micro.  It depends upon the host
  21182. prompt, or at least the first character of the host prompt, being some  charac-
  21183. ter  that  cannot  appear in a hex file (the valid characters for hex files are
  21184. the digits 0-9, the upper case letters A-F, the colon ``:'',  carriage  return,
  21185. and line feed).  As soon the prompt character is encountered, the transfer will
  21186. terminate.  If your host does not issue a prompt  that  will  accommodate  this
  21187. scheme,  you  can achieve the same effect by adding an atsign ``@'' to the very
  21188. 15.4.2. Downloading Kermit-80                                          Page 378
  21189.  
  21190. -------------------------------------------------------------------------------
  21191. end of the hex file before sending it from the host.  The program  below  looks
  21192. for  an  atsign  (the  normal DEC-20 prompt, hex 40).  DECSYSTEM-10 users would
  21193. look for a dot, hex 2E; VAX/VMS or UNIX users would look for a dollar sign, hex
  21194. 24; UNIX C-Shell users would look for a percent sign, hex 26.
  21195.  
  21196.    1. For  CP/M  2.2 systems, connect to a floppy disk with plenty of free
  21197.       space.  Run DDT and type in the following (the comments  should  not
  21198.       be  typed  in;  they  are  there just to tell you what's happening):
  21199.       (Note that this wont work for CP/M Plus or 3.0 systems!)
  21200.  
  21201.       ----------------------------------------------------------------
  21202.  
  21203.       -a100                   ;Begin assembling code at 100
  21204.       0100    LXI H,2FE       ;Where to store in memory
  21205.       0103    SHLD 200        ;Keep pointer there
  21206.       0106    MVI E,D         ;Get a CR
  21207.       0108    MVI C,4         ;Output to PUNCH (send to HOST)
  21208.       010A    CALL 5
  21209.       010D    MVI C,3         ;Input from READER (read from HOST)
  21210.       010F    CALL 5
  21211.       0112    ANI 7F          ;Strip parity bit
  21212.       0114    PUSH PSW        ;Save a and flags
  21213.       0115    MOV E,A         ;Move char to E for echo
  21214.       0116    MVI C,2         ;Output to screen
  21215.       0118    CALL 5
  21216.       011B    POP PSW         ;Restore A and flags
  21217.       011C    CPI 40          ;(or 4E,24,26,etc) System prompt?
  21218.       011E    JZ 127          ;Yes, have whole file in memory
  21219.       0121    CALL 17A        ;No, store another byte
  21220.       0124    JMP 10D         ;Read another byte
  21221.       0127    MVI A,1A        ;Get a Control-Z (CP/M EOF mark)
  21222.       0129    CALL 17A        ;Store it in memory
  21223.       012C    LXI H,300       ;Get memory pointer
  21224.       012F    SHLD 202        ;Store as DMA pointer
  21225.       0132    LDA 201         ;Get 'HI' byte of memory pointer
  21226.       0135    STA 200         ;and store it as 'LO' one
  21227.       0138    XRA A
  21228.       0139    STA 201         ;Zero 'HI' byte (slow *256)
  21229.       013C    MVI C,16        ;Make NEW file
  21230.       013E    LXI D,5C        ;With FCB1
  21231.       0141    CALL 5
  21232.       0144    CALL 15E        ;Write 128 bytes (sector)
  21233.       0147    CALL 15E        ;Write another sector
  21234.       014A    LXI H,FFFF      ;Get a 16-bit Minus One
  21235.       014D    XCHG            ;into DE
  21236.       014E    LHLD 200        ;Get 256-byte counter
  21237.       0151    DAD D           ;Decrement
  21238.       0152    SHLD 200        ;and store back
  21239.       0155    MVI A,2         ;Check if
  21240.       0157    CMP L           ; 256-byte counter down to offset
  21241.       0158    JZ 183          ;Yes, we're done
  21242.       015B    JMP 144         ;Keep writing..
  21243.       015E    LHLD 202        ;Get file-pointer
  21244.       0161    XCHG            ;into DE
  21245.       0162    MVI C,1A        ;Set DMA-address
  21246.       0164    CALL 5
  21247. 15.4.2. Downloading Kermit-80                                          Page 379
  21248.  
  21249. -------------------------------------------------------------------------------
  21250.       0167    MVI C,15        ;Write sector (128 bytes)
  21251.       0169    LXI D,5C        ;using FCB1
  21252.       016C    CALL 5
  21253.       016F    LHLD 202        ;Get file-pointer
  21254.       0172    LXI D,80        ;128-bytes
  21255.       0175    DAD D           ;added to file-pointer
  21256.       0176    SHLD 202        ;and save
  21257.       0179    RET             ;and return
  21258.       017A    LHLD 200        ;Get Memory-pointer
  21259.       017D    MOV M,A         ;Store character
  21260.       017E    INX H           ;Increment Pointer
  21261.       017F    SHLD 200        ;and save
  21262.       0182    RET             ;and return
  21263.       0183    MVI C,10        ;CLOSE file
  21264.       0185    LXI D,5C        ;using FCB1
  21265.       0188    CALL 5
  21266.       018B    JMP 0           ;Force WARM BOOT
  21267.       0179
  21268.       -^C                     ;(Type Control-C) Return to CP/M
  21269.       A>SAVE 1 FETCH.COM      ;Save program, we need to run it twice.
  21270.       Figure 15-1:   Bootstrap program for Kermit-80 and CP/M Version 2.2
  21271.  
  21272.       ----------------------------------------------------------------
  21273.  
  21274.       Alternatively, an assembler source file for  this  program  is  dis-
  21275.       tributed  with  CP/M Kermit as CPKFET.ASM.  You might prefer to type
  21276.       the assembler version in and assemble and load it (ASM CPKFET,  LOAD
  21277.       CPKFET,  or  MASM  CPKFET,  MLOAD  CPKFET), to let the assembler and
  21278.       loader catch any typing errors.
  21279.  
  21280.    2. Connect to your host  using  a  terminal  or  a  terminal  emulation
  21281.       program.  Ensure that your host does not have your terminal in "page
  21282.       mode" (does not pause at the end of each screenful).
  21283.  
  21284.    3. Tell the host to display the first hex file (the  system-independent
  21285.       module)  at your terminal, e.g. give a command like TYPE CPSKER.HEX,
  21286.       without a terminating carriage return.
  21287.  
  21288.    4. Return to your micro by switching the cable from the terminal to the
  21289.       micro, or by terminating the micro's terminal program.
  21290.  
  21291.    5. Make sure your IOBYTE is set so that RDR: and PUN: correspond to the
  21292.       I/O port that is connected to the host (this would normally  be  the
  21293.       case unless you have done something special to change things).
  21294.  
  21295.    6. Load  the program you entered in the first step with DDT, and use it
  21296.       to capture the first hex file:
  21297.  
  21298.         DDT FETCH.COM
  21299.         -icpsker.hex            ;Setup FCB for file CPSKER.HEX
  21300.         -g100,179               ;Execute the program.
  21301.  
  21302.       Now there should be a file CPSKER.HEX on your connected disk.
  21303.  
  21304.    7. Return to the host, and tell it to display the second hex file  (the
  21305.       system-dependent module for your configuration).  Again, do not type
  21306. 15.4.2. Downloading Kermit-80                                          Page 380
  21307.  
  21308. -------------------------------------------------------------------------------
  21309.       the terminating carriage return.
  21310.  
  21311.    8. Return to your micro, and run the capture program again:
  21312.  
  21313.         DDT FETCH.COM
  21314.         -icpxovl.hex            ;Setup FCB to create CPXOVL.HEX
  21315.         -g100,179               ;Execute the program.
  21316.  
  21317.       Now there should be  a  file  CPXOVL.HEX  on  your  connected  disk.
  21318.       Replace CPXOVL.HEX in this example with the appropriate overlay file
  21319.       for your system.
  21320.  
  21321. Merging the files:
  21322.  
  21323.    1. For purposes of illustration, we will  assume  the  system-dependent
  21324.       overlay  is  called "cpxovl.hex".  The two hex files may be combined
  21325.       with MLOAD or DDT.  If you already have a running  Kermit,  you  can
  21326.       transfer  MLOAD.HEX  to  your system and create MLOAD.COM by running
  21327.       LOAD.  If you're bootstrapping Kermit, you could transfer  MLOAD.HEX
  21328.       to  your  system  the same way you got the other two .HEX files, but
  21329.       it's probably simpler to use DDT to  get  Kermit  running,  and  get
  21330.       MLOAD later if you need it.
  21331.  
  21332.    2. Using MLOAD, the two pieces may be easily merged:
  21333.  
  21334.         A>mload kermit49=cpsker,cpxovl
  21335.         (Some messages about program size, etc...)
  21336.         A>
  21337.  
  21338.    3. If you don't have MLOAD running, it's a bit more complex:
  21339.  
  21340.         A>ddt cpsker.hex
  21341.         NEXT  PC
  21342.         3500 0100
  21343.         -icpxovl.hex
  21344.         -r
  21345.         NEXT  PC
  21346.         xxxx 0000
  21347.         -^C
  21348.         A>save dd kermit49.com
  21349.  
  21350.       The  page  count  ("dd") used in the SAVE command is calculated from
  21351.       the last address ("xxxx") given by DDT in response to the R command:
  21352.       drop  the last two digits and add 1 if they were not zero, then con-
  21353.       vert from hexadecimal (base 16) to decimal (base 10):  684F  becomes
  21354.       69 hex, which is 105 decimal (5 times 16 plus 9) -- but 6700 becomes
  21355.       67 hex, or 103 decimal (consult an introductory  computing  book  if
  21356.       you don't understand number base conversion).
  21357.  
  21358.    4. If  you  are  using the Z80MU CP/M and Z80 development toolkit on an
  21359.       IBM PC or clone, then follow the same instructions as for a  genuine
  21360.       CP/M  system.  When you have loaded your file, you will have to ship
  21361.       the .COM or two .HEX files to  the  target  CP/M  system.  (Possibly
  21362.       using a previous issue of Kermit?)
  21363.  
  21364.    5. Note that CP/M hex files have checksums on each line.  If there were
  21365. 15.4.2. Downloading Kermit-80                                          Page 381
  21366.  
  21367. -------------------------------------------------------------------------------
  21368.       any transmission errors during the downloading process, MLOAD or DDT
  21369.       will  notice a bad checksum and will report an error (something like
  21370.       "Illegal Format").  If you get any errors during loading, either fix
  21371.       the hex file locally with an editor, or repeat the transfer.
  21372.  
  21373. You now should have a running version of Kermit-80, called KERMIT49.COM.
  21374.  
  21375. Test  your new Kermit by running it.  If it gives you a prompt, it might be OK.
  21376. (don't delete your old one yet...).  Instead of a prompt, you could get one  of
  21377. two messages indicating that the configuration information is invalid:  
  21378.  
  21379.   ?Kermit has not been configured for a target system
  21380.  
  21381. or 
  21382.  
  21383.   ?Consistency check on configuration failed
  21384.  
  21385. Of  course,  neither  of these messages should appear if you're building Kermit
  21386. from the distribution kit.  The first message indicates that  the  overlay  was
  21387. not found where the system-independent module expected to find it, probably be-
  21388. cause the overlay address is incorrect; the second indicates that  the  version
  21389. of  CPXLNK used in the system-dependent module is incompatible with the system-
  21390. independent module.
  21391.  
  21392. Once you are satisfied that KERMIT40 works correctly, you  should  rename  your
  21393. old  KERMIT.COM to something else, like OKERMIT.COM, and rename KERMIT40.COM to
  21394. KERMIT.COM.
  21395.  
  21396.  
  21397. 15.4.3. Assembling Kermit-80 from the sources
  21398.  
  21399. Kermit-80 is built in two pieces from the following files:
  21400.  
  21401. The system-independent files:
  21402.   CPSKER.ASM    header file
  21403.   CPSDEF.ASM    definitions for both KERMIT and KERSYS
  21404.   CPSMIT.ASM    initialization, main loop, miscellaneous commands  (BYE,  EXIT,
  21405.                 LOG, SET, SHOW, STATUS, and VERSION)
  21406.   CPSCOM.ASM    second part of commands, status and set file
  21407.   CPSPK1.ASM    part   1   of  the  KERMIT  protocol  handler  (SEND,  RECEIVE,
  21408.                 LOGOUT,and FINISH commands)
  21409.   CPSPK2.ASM    part 2 of the KERMIT protocol handler
  21410.   CPSREM.ASM    REMOTE routines (FINISH, BYE and LOGOUT in CPXPK*.ASM)
  21411.   CPSSER.ASM    SERVER routines (for the future)
  21412.   CPSTT.ASM     the transparent commands (TRANSMIT, CONNECT)
  21413.   CPSCPM.ASM    CP/M commands (DIR, ERA, USER, TYPE, PRINT, COPY)
  21414.   CPSWLD.ASM    the wildcard handler
  21415.   CPSCMD.ASM    the command parser
  21416.   CPSUTL.ASM    utility routines and data
  21417.   CPSDAT.ASM    data space and the overlay definitions
  21418.   CPXLNK.ASM    linkage area description
  21419.  
  21420. The system-dependent files:
  21421.   CPXTYP.ASM    system selection
  21422.   CPXLNK.ASM    system overlay specification and jump table
  21423.   CPXCOM.ASM    common routines for all systems
  21424. 15.4.3. Assembling Kermit-80 from the sources                          Page 382
  21425.  
  21426. -------------------------------------------------------------------------------
  21427.   CPXSWT.ASM    system selector or switcher
  21428.  
  21429. One of:
  21430.   CPXSYS.ASM    family file for some system-specific code
  21431.   CPXTOR.ASM    family file for Torch, Superbrain, PCI2651 etc
  21432.   CPXNOR.ASM    family file for Northstar and Comart machines
  21433.   CPXMRL.ASM    family file for British Telecom merlin/Rair Black Box
  21434.   CPXSB.ASM     family file for Micromint SB-180 systems
  21435.   CPXCIF.ASM    family file for Cifer systems
  21436.   CPXHEA.ASM    family file for Heath/Zenith systems
  21437.   CPXAPP.ASM    family file for Apple II systems
  21438.   CPXPCW.ASM    family file for Amstrad PCW 8256/8512 machines
  21439.   CPXBBI.ASM    family file for BigBoard, Kaypro and Xerox 820 systems
  21440.   CPXSYO.ASM    family file for Sanyo MBS-1100 systems
  21441.   CPXTM4.ASM    family file for Tandy Model 4 with CP/M systems
  21442.   CPXGNI.ASM    family file for Video Genie systems
  21443.   CPXPRO.ASM    family file for Compupro systems
  21444.   CPXZ80.ASM    family file for the Z80MU development system
  21445.  
  21446. and if you use a terminal,
  21447.   CPXVDU.ASM    display codes for VDUs etc.  Not always required
  21448.  
  21449. The system-independent module contains all of the system-independent files  ex-
  21450. cept  for  CPXLNK.ASM,  which  is assembled into the system-dependent module to
  21451. provide the structures needed to connect the two modules.  As distributed,  the
  21452. system-independent  module  is  named  CPSKER.HEX.    If  you  have  a  copy of
  21453. CPSKER.HEX, you do not need to reassemble the system-independent module to con-
  21454. figure Kermit for your system.
  21455.  
  21456. The  system-dependent  module  consists  of CPXTYP.ASM, CPSDEF.ASM, CPXLNK.ASM,
  21457. CPXSWT.ASM,  CPSCOM.ASM,  one  of  the  family  files  CPXSYS.ASM,  CPXTOR.ASM,
  21458. CPXMRL.ASM,   CPXSB.ASM,   CPXCIF.ASM,   CPXHEA.ASM,   CPXBBI.ASM,  CPXTM4.ASM,
  21459. CPXGNI.ASM, CPXNOR.ASM, CPXAPP.ASM, CPXPCW.ASM,  or  CPXPRO.ASM,  and  possibly
  21460. CPXVDU.ASM,  if  your  system uses a terminal for the console.  One copy of the
  21461. system-dependent module is supplied already assembled for each  supported  sys-
  21462. tem;  the filename may be obtained from tables 15-2 and 15-3.  If a terminal is
  21463. required for a system, a CRT (glass TTY device) has been selected.
  21464.  
  21465. After assembling the two pieces separately, they are combined with DDT or MLOAD
  21466. into a system-specific Kermit.
  21467.  
  21468. If  you  want to rebuild the system-independent module, the only change you may
  21469. need to make is to select the assembler to be used, in CPSKER.ASM.  Define  one
  21470. of MAC80, M80, or LASM to TRUE to select it as the assembler; the others should
  21471. be defined FALSE.
  21472.  
  21473. Assuming you have the Microsoft Macro Assembler package (M80/L80), you'll  need
  21474. to do the following:
  21475.  
  21476.   A>m80 cpsker=cpsker.asm
  21477.   A>l80 /p:100,cpsker,cpsker/n/e
  21478.  
  21479. This will produce CPSKER.COM.
  21480.  
  21481. If you are using LASM instead, do this:  
  21482. 15.4.3. Assembling Kermit-80 from the sources                          Page 383
  21483.  
  21484. -------------------------------------------------------------------------------
  21485.   A>lasm cpsker
  21486.  
  21487. LASM  will  generate  CPSKER.HEX  and  CPSKER.PRN.    LASM allows options to be
  21488. specified in the same way as the standard assembler, ASM, so the command 
  21489.  
  21490.   A>lasm cpsker.abz
  21491.  
  21492. will read the source files from drive A, send the .HEX file  to  drive  B,  and
  21493. suppress the listing file.
  21494.  
  21495. If  you  are using the Z80MU development system on an IBM PC or clone, then as-
  21496. semble your files using either LASM and MLOAD or M80 and L80, as  if  you  were
  21497. using  a  genuine CP/M-80 system.  Note that you will still have the problem of
  21498. transferring your assembled files to the target CP/M system.
  21499.  
  21500. If you want to generate a system-dependent overlay for a particular system,  or
  21501. want  to  change  the  terminal  supported, you'll need to check three areas in
  21502. CPXTYP.ASM:
  21503.  
  21504. First, the overlay start ADDRESS.  The symbol "ovladr" is EQUated  to  the  ad-
  21505. dress  of "LNKFLG" in the system-independent module, as the starting address of
  21506. the overlay (6000H for version 4.09).  You'll need to know this value if you're
  21507. building  the  overlay  with  M80/L80.   You won't normally need to change this
  21508. value.
  21509.  
  21510. Second, the assembler being used.  Again, define one of MAC80, M80, and LASM to
  21511. be  TRUE  to  select  it,  and  define the others to be FALSE.  The two modules
  21512. (system-independent and system-dependent) do not need to be built with the same
  21513. assembler.
  21514.  
  21515. Third,  the  system configuration.  Locate your system in tables 15-2 and 15-3,
  21516. then define the appropriate symbol TRUE, and the rest FALSE.    If  the  system
  21517. comes  with a builtin console terminal, define all the terminal switches FALSE.
  21518. If the system uses an external terminal as the console, locate the terminal  in
  21519. table 15-5 and define the appropriate symbol TRUE, and the remainder FALSE.  If
  21520. the terminal is not listed in table 15-5, use the CRT  switch;  in  this  case,
  21521. VT52 emulation is not supported.
  21522.  
  21523. In  addition,  there are a few general and system-specific symbols which may be
  21524. altered to fit your system:
  21525.  
  21526. APSLOT          For Apple with 6551 ACIA, defines the slot number of the serial
  21527.                 card
  21528.  
  21529. CPUSPD          Processor  speed  in  units  of 100KHz (currently used only for
  21530.                 bbII and kpII for timing loops)
  21531.  
  21532. TAC             For users connecting through ARPAnet TACs: set to TRUE  if  you
  21533.                 wish the default TACTRAP status to be ON. (This may be overrid-
  21534.                 den with the SET TACTRAP command).  If  you're  not  connecting
  21535.                 through a TAC, set tac to FALSE and ignore tacval.
  21536.  
  21537. TACVAL          For  ARPANET  TAC  users:  defines  the  default  TAC intercept
  21538.                 character (may be overridden with the SET TACTRAP command).
  21539.  
  21540. If you are just assembling an  existing  configuration,  you'll  need  to  edit
  21541. 15.4.3. Assembling Kermit-80 from the sources                          Page 384
  21542.  
  21543. -------------------------------------------------------------------------------
  21544. CPXTYP.ASM  only.    If you are adding support for a new system, you should not
  21545. modify CPSDEF.ASM or CPXLNK.ASM; if you do, you'll have to change  the  system-
  21546. independent  module  also.   Eventually, CPXSYS.ASM will be split into separate
  21547. files, each of which will generate one or more related systems.  When this hap-
  21548. pens,  you'll  want to pick the one closest to your system to use as a starting
  21549. point.
  21550.  
  21551. After editing CPXTYP.ASM as necessary, assemble and link the  overlay  as  fol-
  21552. lows:
  21553.  
  21554.    - With M80 (where "xxxx" is the hex value of ovladr from CPXLNK.ASM):
  21555.  
  21556.        A>m80 cpxtyp=cpxtyp.asm
  21557.        A>l80 /p:xxxx,cpxtyp,cpxtyp/n/x/e
  21558.  
  21559.    - With LASM:
  21560.  
  21561.        A>lasm cpxtyp
  21562.  
  21563. With an IBM PC or clone using the Z80MU softwrae, follow the instructions as if
  21564. you were using a real CP/M system.
  21565.  
  21566. The overlay (CPXTYP.HEX) may then be merged with the system-independent  module
  21567. as described above (creating a runnable Kermit from the distribution kit).
  21568.  
  21569. If  you are using the Z80MU development system on a PC, and already have a run-
  21570. ning Kermit-80 v3.9 or later, you can merge the two .HEX files into a .COM file
  21571. with LINK80 (TOPS 10/20), MLOAD (Z80MU), L80 (Z80MU), and transfer the new .COM
  21572. file to your micro with Kermit:
  21573.  
  21574.    - Z80MU on a PC and MLOAD:
  21575.  
  21576.        @MLOAD KERNEW=CPSKER,CPXTYP
  21577.  
  21578.    - Z80MU on a PC and C80:
  21579.  
  21580.        @L80 /P:xxxx,CPXTYP,CPXTYP/N/X/E
  21581.  
  21582. producing KERNEW.COM.
  21583.  
  21584.  
  21585. 15.5. Adding Support For A New System
  21586.  
  21587. Kermit-80 is built from a common set  of  source  files;  the  system-dependent
  21588. module  makes  heavy  use  of  conditional  assembly (this complication will be
  21589. removed in future releases).  The system dependencies arise  from  attempts  to
  21590. answer some questions:
  21591.  
  21592.    1. What kind of terminal is to be supported?
  21593.  
  21594.       For  many micros, the console is an integral part of the system, but
  21595.       others can use an external terminal.  In either case,  the  commands
  21596.       to  manipulate  the  screen  (position the cursor, erase the screen,
  21597.       etc) must be defined.
  21598.  
  21599.    2. How is the serial line accessed?
  21600. 15.5. Adding Support For A New System                                  Page 385
  21601.  
  21602. -------------------------------------------------------------------------------
  21603. -------------------------------------------------------------------------------
  21604.  
  21605.  
  21606. Symbol         Terminal description
  21607. crt            Basic CRT, no cursor positioning
  21608. adm3a          ADM3A Display or lookalike
  21609. adm22          ADM22 Display or lookalike
  21610. am230          Ampro 230
  21611. h1500          Hazeltine 1500
  21612. smrtvd         Netronics Smartvid-80
  21613. soroq          Soroq IQ-120
  21614. tvi912         TVI 912
  21615. tvi925         TVI 925, Freedom 100
  21616. vt52           VT 52 or VT52 emulator such as Heath H19, H29, etc.
  21617. vt100          VT 100 or emulator (most ANSI terminals should work)
  21618. wyse           Wyse 100
  21619.  
  21620.                   Table 15-5:   Terminals known to Kermit-80
  21621.  
  21622. -------------------------------------------------------------------------------
  21623.  
  21624.  
  21625.       For systems supporting the IOBYTE function, this is straightforward;
  21626.       the  symbol "IOBYT" is defined TRUE.  If the serial line is accessed
  21627.       with IN and OUT instructions, it may be possible to use  the  simple
  21628.       I/O  routines provided.  In this case, the symbol "INOUT" is defined
  21629.       TRUE, the MNPORT and MNPRTS are defined to be the data  and  control
  21630.       addresses,  respectively,  and bit masks for testing for "input data
  21631.       available" and "output buffer empty" must be defined.  If the inter-
  21632.       face is strange, leave IOBYT and INOUT set to FALSE, and provide the
  21633.       I/O routines.
  21634.  
  21635.    3. What initialization is necessary?
  21636.  
  21637.       You may wish to set the baud rate or configure the  serial  line  at
  21638.       startup.  Examples for a number of devices are present.
  21639.  
  21640.    4. What special features are to be supported?
  21641.  
  21642.       You  may  want  to  provide  the capability to select one of several
  21643.       serial lines with the SET PORT command, or to change  the  speed  of
  21644.       the  serial line with the SET BAUD-RATE command.  To do this, you'll
  21645.       need to build a command table, using the systems  already  supported
  21646.       as  examples.    The  ability  to  send a BREAK signal is desirable.
  21647.       Again, examples for several different interfaces  (ACIA,  SIO,  etc)
  21648.       are present.
  21649.  
  21650.    5. Do you want to design an external terminal type?
  21651.  
  21652.       There  is  a  jump  entry  in the overlay file to allow users to add
  21653.       their own termainl emulator.  If you write  the  code  for  such  an
  21654.       emulator,  you  must load this jump address with the address of your
  21655.       emulator, and SET TERMINAL EXTERNAL from within Kermit.  All charac-
  21656.       ters will be passed to this routine during connect mode.
  21657. 15.6. Notes on New Features in Kermit-80 Version 4                     Page 386
  21658.  
  21659. -------------------------------------------------------------------------------
  21660. 15.6. Notes on New Features in Kermit-80 Version 4
  21661.  
  21662.    - Debugging aids:  SET DEBUG ON will add two fields to the SEND/RECEIVE
  21663.      display, labelled "Spack" and "Rpack".  These display the last packet
  21664.      sent  and  received.   Of course, this slows down the transfer, espe-
  21665.      cially if the console is an external terminal.  SET DEBUG OFF removes
  21666.      these  fields.    The VERSION command displays the name, edit number,
  21667.      and edit date of several of the modules that make up Kermit.
  21668.  
  21669.    - TAC support: ARPAnet TACs (and many other communication devices  such
  21670.      as  terminal  concentrators,  modems,  port contention units, network
  21671.      PADs, etc) use a  printing  character  (like  "@")  as  an  intercept
  21672.      character,  to allow commands to be issued to the TAC, or modem, etc.
  21673.      In order to send this character to the host, it must be typed  twice.
  21674.      The  command  "SET TAC CHARACTER" to Kermit enables the "TACtrap" and
  21675.      asks the user to specify the TAC intercept character.  This character
  21676.      will be automatically doubled when it appears in Kermit protocol mes-
  21677.      sages (sent by the SEND or RECEIVE commands) or when it appears in  a
  21678.      file  being  sent with the TRANSMIT command.  It is not automatically
  21679.      doubled when typed by the user in CONNECT mode.  "SET TAC ON" enables
  21680.      the TACtrap but does not change the TAC intercept character, which is
  21681.      initially "@".  "SET TAC OFF" disables the TACtrap.
  21682.  
  21683.    - File buffering:  Previous versions of  Kermit-80  buffered  only  one
  21684.      sector  (128  bytes) at a time during file transfer operations.  This
  21685.      version buffers 16Kbytes at a time, reducing the number of times  the
  21686.      floppy  drive  must be spun up and down, and increasing the effective
  21687.      throughput of the link.  If the  disk  transfer  rate  is  too  slow,
  21688.      however, the remote Kermit may time out and retransmit packets.  This
  21689.      will show up on the screen in the "Retries:" field;  if  this  occurs
  21690.      after  disk  activity,  you may want to increase the timeout value on
  21691.      the remote Kermit, SET BUFFER <new value> while  in  Kermit,or  reas-
  21692.      semble  Kermit  with  a smaller value for MAXSEC (in CPSDEF.ASM) This
  21693.      buffer is also used by the TRANSMIT command; the log file enabled  by
  21694.      the LOG command is still written a sector at a time.
  21695.  
  21696. This  section is intended for people wanting to implement their own versions of
  21697. Kermit-80 for computers not already defined.
  21698.  
  21699. The system independent code communicates to  routines  for  a  specific  system
  21700. through  a  set  of tables.  These tables are defined in CPXLNK.ASM, and should
  21701. not be modified between revisions of Kermit.  If an entry is added or  deleted,
  21702. then  the whole of Kermit-80 needs reassembling.  Make sure that the changes to
  21703. CPXLNK.ASM are duplicated in  CPSUTL.ASM,  which  has  the  system  independent
  21704. equivalent of CPXLNK.ASM.
  21705.  
  21706. The  following  entries/definitions  apply  to  revision 4.09.  There have been
  21707. three additional entries since revision 4.05.
  21708.  
  21709. The table is split into three sectors;  The  first  section  defines  two  byte
  21710. "words"  giving  16 bits of interface data; The second set is a set of jumps to
  21711. various functions, and finally the third set a set of pure data bytes.
  21712. 15.6.1. Interface Data.                                                Page 387
  21713.  
  21714. -------------------------------------------------------------------------------
  21715. 15.6.1. Interface Data.
  21716.  
  21717.         LNKFLG  Must be first entry in overlay at overlay address.   Is  a  two
  21718.                 byte  address  giving  the  size of the linkage table.  This is
  21719.                 used to check for consistency of overlay's
  21720.  
  21721.         ENTSIZE Length of entry table, also used for consistency checking after
  21722.                 the overlay.  Currently 6
  21723.  
  21724.         SYSEDT  The  address  of  a dollar-terminated string giving the overlay
  21725.                 revision  level  and  date.    Points   to   a   string   like:
  21726.                 CPXSYS.ASM(33) 4-JUN-1986$
  21727.  
  21728.         FAMILY  The  address  of  a  dollar-terminated string giving the Family
  21729.                 overlay  revision  level  and  date.    If  the  system  is  in
  21730.                 CPXSYS.ASM  rather  than  a  particular  Family  overlay, it is
  21731.                 simply a pointer to $
  21732.  
  21733.  
  21734.  
  21735.  
  21736. 15.6.2. Jump Table.
  21737.  
  21738. This is split into three main sectors-
  21739.  
  21740.  
  21741.    1. Input/Output routines
  21742.  
  21743.    2. Screen formatting routines
  21744.  
  21745.    3. other system dependent routines
  21746.  
  21747.  
  21748.   SELMDM
  21749.   Parameters    None
  21750.   Returns       None
  21751.   Description   selects the modem port.  Most systems  do  nothing  and  simply
  21752.                 return.  HL,DE and BC registers preserved.
  21753.  
  21754.   OUTMDM
  21755.   Parameters    None
  21756.   Returns       None
  21757.   Description   Output  the character in E register to the communications line.
  21758.                 BC,DE,HL registers preserved.
  21759.  
  21760.   INPMDM
  21761.   Parameters    None
  21762.   Returns       Accumulator either 0 or character from comms line if available
  21763.   Description   Check modem for character and if so, return it in  A.  HL,DE,BC
  21764.                 registers preserved, flags and accumulator lost.
  21765.  
  21766.   FLSMDM
  21767.   Parameters    None
  21768.   Returns       None
  21769.   Description   Clear  any  pending  characters  in  the  input buffer from the
  21770.                 modem.  No registers are preserved.
  21771. 15.6.2. Jump Table.                                                    Page 388
  21772.  
  21773. -------------------------------------------------------------------------------
  21774.  
  21775.   SELCON
  21776.   Parameters    None
  21777.   Returns       None
  21778.   Description   Select the console.  This is a null subroutine  for  most  sys-
  21779.                 tems, but for IOBYTE systems selects the console.
  21780.  
  21781.   OUTCON
  21782.   Parameters    Character in E
  21783.   Returns       None
  21784.   Description   Send  the  character in E to the console.  Any quirks of system
  21785.                 responding in an odd manner should be handled.    No  registers
  21786.                 preserved.
  21787.  
  21788.   INPCON
  21789.   Parameters    None
  21790.   Returns       Zero or character in A.
  21791.   Description   Get a character from the console or return a null if no charac-
  21792.                 ter to be read.  No registers are preserved.
  21793.  
  21794.   OUTLPT
  21795.   Parameters    Character in E
  21796.   Returns       None
  21797.   Description   Send the character in  E  to  the  printer.    The  console  is
  21798.                 selected.  Only DE registers are preserved
  21799.  
  21800.   LPTSTAT
  21801.   Parameters    None
  21802.   Returns       00H or 0FFH in A register
  21803.   Description   Test  the  printer to see if it is ready to receive a character
  21804.                 to be printed.  If a 00H is returned then the printer is  ready
  21805.                 to receive a character.
  21806.  
  21807.   EXTTER
  21808.   Parameters    Character  to be sent to the user supplied terminal emulator in
  21809.                 the E register
  21810.   Returns       None
  21811.   Description   If the user has supplied a terminal  emulator  in  the  overlay
  21812.                 code, EXTTER will be a JMP <non zero address>.  If SET TERMINAL
  21813.                 EXTERNAL has been set, all caharcters will be  passed  verbatim
  21814.                 to  this  terminal emulator.  If there is no external emulator,
  21815.                 this code will never be called.  The user should reset terminal
  21816.                 conditions on initialisation of both the system and before CON-
  21817.                 NECT.  All registers should be preserved.
  21818.  
  21819.   XBDOS
  21820.   Parameters    Any required for calling BDOS
  21821.   Returns       Any expected from the called BDOS routine
  21822.   Description   This is an alternative entry to BDOS.   This  entry  will  also
  21823.                 check  the  printer  status etc.  For full details see the code
  21824.                 for the BDOS trap in CPSUTL.ASM.
  21825.  
  21826.                 2b)
  21827.  
  21828.                 CLRLIN
  21829.   Parameters    None
  21830. 15.6.2. Jump Table.                                                    Page 389
  21831.  
  21832. -------------------------------------------------------------------------------
  21833.   Returns       None
  21834.   Description   Clear the current line on the terminal
  21835.  
  21836.   CLRSPC
  21837.   Parameters    None
  21838.   Returns       None
  21839.   Description   Erase the current position (after a backspace)
  21840.  
  21841.   DELCHR
  21842.   Parameters    None
  21843.   Returns       None
  21844.   Description   Make delete (7FH) look like a backspace.   Some  systems  do  a
  21845.                 backspace,  space, backspace automatically others have to simu-
  21846.                 late it
  21847.  
  21848.   CLRTOP
  21849.   Parameters    None
  21850.   Returns       None
  21851.   Description   Clear the screen and place the cursor at the top LH corner
  21852.  
  21853.   SCREND
  21854.   Parameters    None
  21855.   Returns       None
  21856.   Description   Place the cursor on the line for the Kermit-80 prompt  after  a
  21857.                 file transfer.  (Usually line 13)
  21858.  
  21859.   SCRERR
  21860.   Parameters    None
  21861.   Returns       None
  21862.   Description   Move  cursor  to  the  error message field on the file transfer
  21863.                 format screen
  21864.  
  21865.   SCRFLN
  21866.   Parameters    None
  21867.   Returns       None
  21868.   Description   Move the cursor to the filename field
  21869.  
  21870.   SCRNP
  21871.   Parameters    None
  21872.   Returns       None
  21873.   Description   Move the cursor to the packet count field
  21874.  
  21875.   SCRNRT
  21876.   Parameters    None
  21877.   Returns       None
  21878.   Description   Move cursor to the retry count field
  21879.  
  21880.   SCRST
  21881.   Parameters    None
  21882.   Returns       None
  21883.   Description   Move cursor to the status field
  21884.  
  21885.   RPPOS
  21886.   Parameters    None
  21887.   Returns       None
  21888.   Description   Move to the receive packet field (debugging use)
  21889. 15.6.2. Jump Table.                                                    Page 390
  21890.  
  21891. -------------------------------------------------------------------------------
  21892.  
  21893.   SPPOS
  21894.   Parameters    None
  21895.   Returns       None
  21896.   Description   Move to the send packet field (for debugging use)
  21897.  
  21898.                 2c)
  21899.  
  21900.                 SYSINIT
  21901.   Parameters    None
  21902.   Returns       None
  21903.   Description   Initialize  the  system  specific  items.    No  registers  are
  21904.                 preserved.  Any initialization is done once only when Kermit-80
  21905.                 is first loaded.
  21906.  
  21907.   SYSEXIT
  21908.   Parameters    None
  21909.   Returns       None
  21910.   Description   Program termination.  De-initialize anything in preparation for
  21911.                 a return to CP/M
  21912.  
  21913.   SYSCON
  21914.   Parameters    None
  21915.   Returns       None
  21916.   Description   Initialize anything before entering the connect state.
  21917.  
  21918.   SYSCLS
  21919.   Parameters    None
  21920.   Returns       None
  21921.   Description   System dependent close routine when exiting connect state
  21922.  
  21923.   SYSINH
  21924.   Parameters    None
  21925.   Returns       None
  21926.   Description   Help  routine  to  test  for  any extensions to the escape menu
  21927.                 during the connect state.  If a system has any special  feature
  21928.                 it  can  use  during  connect  mode,  then  it can be tested as
  21929.                 <escape-character>xxx.  This entry is a string for printing  to
  21930.                 the console for an <escape-character>?  Often used for generat-
  21931.                 ing breaks or controlling a modem.
  21932.  
  21933.   SYSINT
  21934.   Parameters    None
  21935.   Returns       None
  21936.   Description   This is a test-and-jump on receipt of an  escape  sequence  not
  21937.                 understood  by  Kermit-80.  If the character in A is not recog-
  21938.                 nized by your version of Kermit=80, do a rskip
  21939.  
  21940.   SYSFLT
  21941.   Parameters    Character in E
  21942.   Returns       Character in E. Either a 00H or anything else in A
  21943.   Description   Test the character in E. If it may not be printed to  the  con-
  21944.                 sole, set A to zero.  All other registers preserved.
  21945.                 NB <XON>,<XOFF>,<DEL>,<NULL> are always rejected.
  21946.  
  21947.   SYSBYE
  21948. 15.6.2. Jump Table.                                                    Page 391
  21949.  
  21950. -------------------------------------------------------------------------------
  21951.   Parameters    None
  21952.   Returns       None
  21953.   Description   System  dependent  processing for the BYE command.  (eg hang up
  21954.                 the phone)
  21955.  
  21956.   SYSSPD
  21957.   Parameters    Value from table in DE
  21958.   Returns       None
  21959.   Description   The system dependent code for baud rate change.    DE  contains
  21960.                 the  two  byte  value  from the baud rate table.  This value is
  21961.                 also stored in "SPEED"
  21962.  
  21963.   SYSPRT
  21964.   Parameters    Value in DE
  21965.   Returns       None
  21966.   Description   The system dependent code for setting the port.  The parameters
  21967.                 are passed in DE, which are obtained from the port tables
  21968.  
  21969.   SYSSCR
  21970.   Parameters    String pointer in DE
  21971.   Returns       None
  21972.   Description   Setup the screen display for file transfer.  The Kermit version
  21973.                 string is pointed to by DE.  If the terminal is not capable  of
  21974.                 cursor  addressing  (eg dumb glass TTY) then only the screen is
  21975.                 cleared and the version string is printed.
  21976.  
  21977.   CSRPOS
  21978.   Parameters    Row number in B, column number in C
  21979.   Returns       None
  21980.   Description   Move the cursor to row B, column C  where  B=1,C=1  is  top  LH
  21981.                 corner  of  screen.    The  routine  should first end a "cursor
  21982.                 position" leading string (up to four characters) then  use  the
  21983.                 parameters given to complete the versions cursor position func-
  21984.                 tion
  21985.  
  21986.   SYSSPC
  21987.   Parameters    None
  21988.   Returns       K bytes free in HL
  21989.   Description   Get the amount of free disk space on the selected  disk  drive.
  21990.                 This  could  be  in the system independent code.  Automatically
  21991.                 detects CP/M V2.2 or V3.0.  No registers saved.
  21992.  
  21993.   MOVER
  21994.   Parameters    Source Pointer in HL
  21995.                 Destination Pointer in DE
  21996.                 Byte count in BC
  21997.   Returns       None
  21998.   Description   Move (BC) bytes from (HL) to (DE) Z80 based systems do an LDIR,
  21999.                 while 8080 systems do it as a loop.  All registers destroyed
  22000.  
  22001.   PRTSTR
  22002.   Parameters    $ terminated string pointed to by DE
  22003.   Returns       None
  22004.   Description   Print the string onto the console.
  22005.  
  22006.                 3)
  22007. 15.6.2. Jump Table.                                                    Page 392
  22008.  
  22009. -------------------------------------------------------------------------------
  22010.  
  22011.  
  22012.   PTTAB         WORD      Points to VT52 equivalent escape sequences.
  22013.  
  22014.   SPDTAB        WORD      Address  of  baud-rate  command  table, or 0 if table
  22015.                 does not exist
  22016.  
  22017.   SPDHLP        WORD      Address  of  baud-rate  help  table,  or  0  if   SET
  22018.                 BAUD-RATE is not supported.
  22019.  
  22020.   PRTTAB        WORD      Address of port command table or 0 if SET PORT is not
  22021.                 supported.
  22022.  
  22023.   PRTHLP        WORD      Address of port help table or 0 if SET  PORT  is  not
  22024.                 supported
  22025.  
  22026.   TIMOUT        BYTE      FUZZY-TIMER.    Set  to value suitable to your system
  22027.                 (depends largely on CPU speed)
  22028.  
  22029.   VTFLG         BYTE      VT52 emulation flag.  Set to 0 if terminal emulates a
  22030.                 VT52,  01  if  emulation is required, or 0FFH if emulations not
  22031.                 possible (eg for "CRT")
  22032.  
  22033.   ESCCHR        BYTE      default escape character-usually control-] but  some-
  22034.                 times control-\
  22035.  
  22036.   SPEED         WORD      Storage  space  for baud-rate.  Set to 0FFFFH as baud
  22037.                 rates are initially unknown.  Note that the STATUS routine only
  22038.                 looks at the first (least significant) byte.
  22039.  
  22040.   PORT          WORD      Storage  space  for port.  Set to 0FFFFH as ports may
  22041.                 not be implemented, and is initially unknown
  22042.  
  22043.   PRNFLG        BYTE      Printer copy flag-if O no copy.    Anything  else  =>
  22044.                 copy to printer
  22045.  
  22046.   DBGFLG        BYTE      Debugging  flag.   If O then no debugging to be done.
  22047.                 (ie writing of debugging info during a file transfer)
  22048.  
  22049.   ECOFLG        BYTE      Local ECHO flag (default is off)
  22050.  
  22051.   FLWFLG        BYTE      File warning flag.  If set to 1  will  not  overwrite
  22052.                 files  already  existing  on  disk  with some-named files being
  22053.                 transferred
  22054.  
  22055.   IBMFLG        BYTE      IBM system is the host-assume IBM file transfers etc
  22056.  
  22057.   CPMFLG        BYTE      Flag indicating type of CP/M files to be transferred.
  22058.                 Default setting - DEFAULT
  22059.  
  22060.   PARITY        BYTE      Type of parity in use
  22061.                 0 = Even parity
  22062.                 3 = Mark parity
  22063.                 6 = No parity (8th bit is data)
  22064.                 9 = Odd parity
  22065.                 12 = Space parity
  22066. 15.6.2. Jump Table.                                                    Page 393
  22067.  
  22068. -------------------------------------------------------------------------------
  22069.  
  22070.   SPSIZ         BYTE      Size of send packet
  22071.  
  22072.   RPSIZ         BYTE      Size of receive packet
  22073.  
  22074.   STIME         BYTE      Send timer (time-out)
  22075.  
  22076.   RTIME         BYTE      Receive timer (time-out)
  22077.  
  22078.   SPAD          BYTE      Send Padding (default=0)
  22079.  
  22080.   RPAD          BYTE      Receive Padding (default=0)
  22081.  
  22082.   SPADCH        BYTE      Send Padding character (default=NULL)
  22083.  
  22084.   RPADCH        BYTE      Receive Padding character (default=NULC)
  22085.  
  22086.   SEOL          BYTE      Send EOL character (default=CR)
  22087.  
  22088.   REOL          BYTE      Receive EOL character (default=CR)
  22089.  
  22090.   SQUOTE        BYTE      Send quote character (default=#)
  22091.  
  22092.   RQUOTE        BYTE      Receive quote character (default=#)
  22093.  
  22094.   CHKTYP        BYTE      Ascii value of checktype
  22095.                 31H="1"=checktype1 (6bits)
  22096.                 32H="2"=checktype2 (12bits)
  22097.                 33H="3"=CCITT checksum (CRC)
  22098.                 Default is 31H("1")
  22099.  
  22100.   TACFLG        BYTE      If  set to on (non zero) send the TACCHR twice.  This
  22101.                 is for ARPA TAC users, where  the  TAC  swallows  one  "wakeup"
  22102.                 character.    If sent twice the TAC will pas one on and go back
  22103.                 to normal mode.
  22104.  
  22105.   TACCHR        BYTE      Desired TAC character.  It is ignored if TAC trapping
  22106.                 is  turned  off. Value to send twice if TAC interception is set
  22107.                 on.  Default=0, but set to commercial AT if the conditional as-
  22108.                 sembly flag TAC is set true
  22109.  
  22110.   BUFADR        WORD      Address of Multi-Sector buffering for I/O
  22111.  
  22112.   BUFSEC        BYTE      The  number  of  bytes  the  big  buffers  can  hold.
  22113.                 Default is 1. (0=256 sectors).
  22114.  
  22115.   FFUSSY        BYTE      Indicates if funny characters may  be  used  in  CP/M
  22116.                 file  names (eg <>.,;?#[]) If zero, allow anything.  Default is
  22117.                 nonzero.
  22118.  
  22119.   BMAX          SPACE:(2bytes) Highest block number on selected disk drive
  22120.  
  22121.   BMASK         SPACE:(1byte) (Records/block)-1
  22122.  
  22123.   BSHIFTF       SPACE:(1byte) Number of shifts to multiply by rec.block
  22124. 15.6.2. Jump Table.                                                    Page 394
  22125.  
  22126. -------------------------------------------------------------------------------
  22127.   NNAMS         SPACE:(1byte) Counter for file-names per line
  22128.  
  22129.  
  22130. 15.7. Future Work
  22131.  
  22132. Work that needs to be done in future releases includes:
  22133.  
  22134.    - Merge in support for additional CP/M-80 systems,  particularly  those
  22135.      for which support was recently added to the monolithic v3.x source.
  22136.  
  22137.    - Break  up  CPXSYS  into  discrete  source files, one for each system.
  22138.      These source files should serve as simple models for  adding  support
  22139.      for  new  systems  to Kermit-80 -- only the very basic screen defini-
  22140.      tions, flags, i/o primitives, initializations, and  so  forth  should
  22141.      appear in each system-dependent file.
  22142.  
  22143.    - Addition  of  missing  features -- compression of repeated characters
  22144.      during  packet  transmission,   transmission   of   file   attributes
  22145.      (particularly  size, so that "percent done" can be displayed for both
  22146.      incoming and outbound files), advanced commands for  servers  (REMOTE
  22147.      DIRECTORY,  etc),  command  macros  and  initialization  files, login
  22148.      scripts, remote operation and server mode, etc etc.  Any offers??
  22149. 16. CP/M-86 KERMIT                                                     Page 395
  22150.  
  22151. -------------------------------------------------------------------------------
  22152. 16. CP/M-86 KERMIT
  22153.  
  22154. Authors:    Bill Catchings, Columbia University; Ron  Blanford,  University  of
  22155.             Washington; Richard Garland, Columbia University.
  22156. Language:   Digital Research ASM86
  22157. Version:    2.9
  22158. Date:       December 1984
  22159. Documentation:
  22160.             Frank da Cruz, Columbia
  22161.  
  22162. This version of KERMIT is designed to support any CP/M-86 system.   So  far  it
  22163. supports  the DEC Rainbow-100 and the NEC Advanced Personal Computer (APC).  It
  22164. is very similar to CP/M-80 and MS DOS KERMIT.
  22165.  
  22166.  
  22167. CP/M-86 KERMIT-86 Capabilities At A Glance:
  22168.  
  22169.   Local operation:                   Yes
  22170.   Remote operation:                  No
  22171.   Transfers text files:              Yes
  22172.   Transfers binary files:            Yes
  22173.   Wildcard send:                     Yes
  22174.   ^X/^Y interruption:                Yes
  22175.   Filename collision avoidance:      Yes
  22176.   Can time out:                      Yes
  22177.   8th-bit prefixing:                 Yes
  22178.   Repeat count prefixing:            No
  22179.   Alternate block checks:            No
  22180.   Terminal emulation:                Yes, uses PC firmware (VT100)
  22181.   Communication settings:            Yes; duplex, parity
  22182.   Transmit BREAK:                    Yes
  22183.   IBM communication:                 Yes
  22184.   Transaction logging:               No
  22185.   Session logging (raw download):    Yes
  22186.   Raw upload:                        No
  22187.   Act as server:                     No
  22188.   Talk to server:                    Yes; SEND, GET, FIN, BYE
  22189.   Advanced commands for servers:     No
  22190.   Local file management:             Yes
  22191.   Handle file attributes:            No
  22192.   Command/init files:                Yes
  22193.   Printer control:                   No
  22194.  
  22195.  
  22196.                           CP/M-86 KERMIT DESCRIPTION
  22197.  
  22198. Since Kermit-86 runs on a standalone micro, it is  always  in  control  of  the
  22199. screen  --  it  is always local.  Thus, it always keeps the screen updated with
  22200. the file name and the packet number, whether sending or receiving.    Kermit-86
  22201. is  capable  of  timing  out  an  input  request,  and can thus break deadlocks
  22202. automatically.  In most cases, however, this is not desirable because the  KER-
  22203. MIT on the other side is most likely better able to handle the timeouts; there-
  22204. fore, Kermit-86's timer is normally not used.
  22205.  
  22206. If despite the timeout capability, the transmission appears to  be  stuck  (and
  22207. you  can  tell  that this has happened if the screen fails to change for a long
  22208. 16. CP/M-86 KERMIT                                                     Page 396
  22209.  
  22210. -------------------------------------------------------------------------------
  22211. while) you can type carriage return to have the micro do  what  it  would  have
  22212. done  on a  timeout, namely NAK the expected packet to cause to foreign host to
  22213. send it again (or, if the micro is sending, to  retransmit  the  last  packet).
  22214. Micro/micro  or micro/IBM-mainframe transfers could require this kind of manual
  22215. intervention.
  22216.  
  22217. File transfers may be interrupted in several ways.
  22218.  
  22219. Control-C       This will return you to Kermit-86 command level immediately, so
  22220.                 that  you  can  connect  back to the remote system, or take any
  22221.                 other desired action.
  22222.  
  22223. Control-X       When sending a file, this will terminate  the  sending  of  the
  22224.                 current  file  with a signal to the KERMIT on the other side to
  22225.                 discard what it got so far.  If there  are  more  files  to  be
  22226.                 sent,  KERMIT-86  will go on to the next one.  When receiving a
  22227.                 file, KERMIT-86 will send a signal to the remote KERMIT to stop
  22228.                 sending  this file.  If the remote KERMIT understands this sig-
  22229.                 nal (not all implementations of KERMIT  do),  it  will  comply,
  22230.                 otherwise  the  file  will  keep  coming.   In either case, the
  22231.                 remote KERMIT will go on to the next file in the group, if any.
  22232.  
  22233. Control-Z       Like Control-X, except if a file group  is  being  transmitted,
  22234.                 this will stop the transmission of the entire group.  If only a
  22235.                 single  file  is  being  transmitted,  it  works  exactly  like
  22236.                 Control-X.
  22237.  
  22238. Carriage Returns
  22239.                 If you type carriage return repeatedly Kermit-86 will retry the
  22240.                 current  packet  up to its retry limit (somewhere between 5 and
  22241.                 16 times) and then, if no valid response was  received,  return
  22242.                 to Kermit-86 command level.
  22243.  
  22244. When  KERMIT-86 is started, it looks for the file KERMIT.INI.  If found, it ex-
  22245. ecutes KERMIT-86 commands from it before  prompting  you  for  commands.    The
  22246. KERMIT-86 prompt looks like this:  
  22247.  
  22248.   Kermit-86 B3>
  22249.  
  22250. in  which  "B" is your current default disk and "3" is the current default user
  22251. number.
  22252.  
  22253.  
  22254. 16.1. Kermit-86 Commands
  22255.  
  22256. KERMIT-86 uses the DECSYSTEM-20 keyword style command language.   Each  keyword
  22257. may be abbreviated to its minumum unique length.  "?" may be typed to request a
  22258. menu of the available options for the current field at any point in a  command.
  22259. ESC  may  be typed at any point in a command to fill out the current keyword or
  22260. filename; if sufficient characters have not been typed to identify the  current
  22261. field uniquely, KERMIT-86 will sound a beep and allow you to continue from that
  22262. point.
  22263.  
  22264. CONNECT Establish a "virtual terminal" connection to any host that may be  con-
  22265.         nected  to the serial port, i.e. pass all typein to the serial port and
  22266.         display all input from  the  serial  port  on  the  screen,  using  the
  22267. 16.1. Kermit-86 Commands                                               Page 397
  22268.  
  22269. -------------------------------------------------------------------------------
  22270.         system's  own  built-in  support  for ANSI (VT100-like) screen control.
  22271.         When you issue the CONNECT command, the PC will print a message telling
  22272.         you how to get back by typing an an escape sequence, an uncommonly-used
  22273.         control character, normally CTRL-backslash, followed by a single letter
  22274.         "command".
  22275.  
  22276.         C   Close Connection, return to Kermit-86> command level.
  22277.         ?   List available single-character commands.
  22278.         B   Send a BREAK signal.
  22279.         Q   Quit logging the remote session.
  22280.         R   Resume logging the remote session.
  22281.         L   Toggle logging.
  22282.         ^\  (or  whatever - a second copy of the escape character) Send the es-
  22283.             cape character itself to the remote host.
  22284.  
  22285. SEND filespec
  22286.         Send  file(s)  specified  by  filespec  to the remote Kermit, using the
  22287.         prevailing file mode (ASCII or BINARY; see SET).  The filespec may con-
  22288.         tain CP/M wildcards.
  22289.  
  22290. RECEIVE Receive  file(s)  from  the  remote Kermit.  Store them under the names
  22291.         provided in the file headers supplied by the remote host.  If the names
  22292.         aren't  legal,  use  as many legal characters from the name as possible
  22293.         (see the description of SET FILE-WARNING below).   If  there's  a  con-
  22294.         flict,  and FILE-WARNING is ON, warn the user and try to build a unique
  22295.         name for the file by adding "&" characters to the name.  You  may  also
  22296.         provide  an  optional  file name in the RECEIVE command; if you do, the
  22297.         incoming file will be stored under the name you specify.  If more  than
  22298.         one  file  arrives, only the first will be stored under the given name,
  22299.         unless you included wildcard characters in  the  RECEIVE  filespec;  in
  22300.         that  case, the filespec will be used as a mask for incoming filenames.
  22301.         For instance, you told the remote Kermit to send *.ASM, you could  tell
  22302.         KERMIT-86  to "receive *.A86", thereby changing the filetype of all the
  22303.         incoming files.
  22304.  
  22305. GET filespec
  22306.         When  Kermit-86  is  talking to a Kermit Server on the host, you should
  22307.         use the GET command to request the server to send files to you, for ex-
  22308.         ample: get hlp:k*.hlp
  22309.  
  22310. BYE     When  talking  to  a  remote Kermit Server, this command shuts down the
  22311.         server and logs it out, and also exits from Kermit-86 to  CP/M  command
  22312.         level.
  22313.  
  22314. LOGOUT  Like BYE, but leaves you at Kermit-86 command level.
  22315.  
  22316. FINISH  Like  LOGOUT,  but shuts down the remote server without logging it out.
  22317.         Leaves you at Kermit-86 command level;  a  subsequent  CONNECT  command
  22318.         should put you back at host system command level.
  22319.  
  22320. EXIT    Exit from KERMIT-86 back to CP/M.
  22321.  
  22322. QUIT    Synonym for EXIT.
  22323.  
  22324. SET parameter [value]
  22325.         Set the specified parameter to the specified value.  Possible settings:
  22326. 16.1. Kermit-86 Commands                                               Page 398
  22327.  
  22328. -------------------------------------------------------------------------------
  22329.         BAUD    Change the baud rate of the communications port.  This  command
  22330.                 only  works  on some systems, and its actual operation can vary
  22331.                 from system to system.  Type SET BAUD followed  by  a  question
  22332.                 mark,  and  follow the directions.  On systems that do not sup-
  22333.                 port this command, you must set the port baud rate from CP/M or
  22334.                 other setup mechanism outside of KERMIT-86.
  22335.  
  22336.         DEBUG   ON  or  OFF.    If  ON,  displays incoming and outbound packets
  22337.                 during file transfer.  OFF by default.
  22338.  
  22339.         DEFAULT-DISK disk/user
  22340.                 Specify default disk and user number for subsequent file recep-
  22341.                 tion and transmission.  The specification following the command
  22342.                 must be in one of the following forms:
  22343.  
  22344.                     d:  = go to drive d (A through P) without changing user
  22345.                     u:  = go to user u (0 through 15) without changing drive
  22346.                     du: = go to drive d and user u
  22347.                     :   = go to the defaults when Kermit was loaded
  22348.  
  22349.                 Whenever  a  drive  is specified, even if it is the same as the
  22350.                 current default drive, the drive is logged in so that disks can
  22351.                 be  swapped  without  exiting Kermit to type control-C.  Kermit
  22352.                 restores the original drive and user upon termination.
  22353.  
  22354.         ESCAPE  Change the escape character for virtual  terminal  connections.
  22355.                 Select  a  character  in the control range that you will not be
  22356.                 likely to need at the  remote  host;  type  the  new  character
  22357.                 literally.    Certain  characters,  like  Control-X,  cannot be
  22358.                 specified.
  22359.  
  22360.         FILE-TYPE
  22361.                 Tells KERMIT-86 what kind of file it is sending, so that KERMIT
  22362.                 can correctly determine the end of the file.  SET  FILE  BINARY
  22363.                 means  to  send  all the 128-byte blocks of the file, including
  22364.                 the last block in its entirety; SET FILE ASCII is used for text
  22365.                 files,  and  transmission stops when the first Control-Z is en-
  22366.                 countered anywhere in the file (this is the CP/M convention for
  22367.                 marking  the  end  of  a text file).  If binary transmission is
  22368.                 used on a text file, some extraneous characters (up to  127  of
  22369.                 them)  may  appear at the end of the file on the target system.
  22370.                 If ASCII transmission is used on a binary file, the entire file
  22371.                 will  not  be sent if it happens to contain any data bytes that
  22372.                 correspond to Control-Z.  ASCII is the default.
  22373.  
  22374.         FLOW-CONTROL
  22375.                 Select  the desired type of flow control to be used on the com-
  22376.                 munication line.  The choices are NONE and XON/XOFF.   XON/XOFF
  22377.                 is  the  default.    If the remote system is not full duplex or
  22378.                 cannot do XON/XOFF, you should use NONE.
  22379.  
  22380.         IBM ON (or OFF)
  22381.                 Allow  the  transfer of files to and from an IBM mainframe com-
  22382.                 puter.  This  makes  Kermit-86  wait  for  the  IBM  turnaround
  22383.                 character (XON), ignore parity on input, add appropriate parity
  22384.                 to output, and use local  echoing  during  CONNECT.    As  dis-
  22385. 16.1. Kermit-86 Commands                                               Page 399
  22386.  
  22387. -------------------------------------------------------------------------------
  22388.                 tributed, KERMIT-86 uses MARK parity for IBM communication.  If
  22389.                 you don't give this command, IBM mode is OFF.  Since IBM VM/CMS
  22390.                 KERMIT  does not have timeout capability, SET IBM ON also turns
  22391.                 on the timeout facility automatically, as if you had typed "SET
  22392.                 TIMER ON".
  22393.  
  22394.         LOCAL-ECHO ON (or OFF)
  22395.                 When you CONNECT to a remote host, you must set  LOCAL-ECHO  ON
  22396.                 if  the  host  is  half  duplex,  OFF  if  full duplex.  OFF by
  22397.                 default.
  22398.  
  22399.         LOG     Specify a log file on the  current  CP/M  disk  into  which  to
  22400.                 record  incoming characters during CONNECT.  If the remote host
  22401.                 can do XON/XOFF, then the log file will normally capture  every
  22402.                 character  shown  on  the screen.  When connected to the remote
  22403.                 system, several single-character arguments to the  connect  es-
  22404.                 cape  character  can  be used to control logging -- Q (quit), R
  22405.                 (resume), L (toggle).  If you use R or L during connect without
  22406.                 having previously specified a log file name, then KERMIT.LOG is
  22407.                 used.  An open log is closed when you escape back to the PC.
  22408.  
  22409.         PARITY  Sets parity for outgoing characters to one  of  the  following:
  22410.                 NONE,  SPACE, MARK, EVEN, or ODD.  On input, if parity is NONE,
  22411.                 then the 8th bit is kept (as data), otherwise  it  is  stripped
  22412.                 and  ignored.  The parity setting applies to both terminal con-
  22413.                 nection and file transfer.  If you set parity to anything other
  22414.                 than NONE, Kermit-86 will attempt to use "8th bit prefixing" to
  22415.                 transfer binary files.  If the other KERMIT is also capable  of
  22416.                 8th  bit  prefixing,  then binary files can be transferred suc-
  22417.                 cessfully; if not, the 8th bit of each data byte will  be  lost
  22418.                 (you will see a warning on your screen if this happens).
  22419.  
  22420.         PORT    Allows  you  to switch between different communication ports on
  22421.                 the PC.  This command is not available on all systems.
  22422.  
  22423.         TIMER ON (or OFF)
  22424.                 Enable  or  disable  the timeout facility.  The timer is off by
  22425.                 default, because in the normal case KERMIT-86 is  communicating
  22426.                 with a mainframe KERMIT that has its own timer.  Mainframe KER-
  22427.                 MIT timers tend to be more precise  or  adaptable  to  changing
  22428.                 conditions.    You should SET TIMER ON if you are communicating
  22429.                 with another KERMIT that does not have a timer.  You should SET
  22430.                 TIMER  OFF  if  you  are communicating over a network with long
  22431.                 delays.
  22432.  
  22433.         WARNING ON (or OFF)
  22434.                 Warn  user  of  filename  conflicts  when  receiving files from
  22435.                 remote host, and attempt to generate a unique  name  by  adding
  22436.                 "&" characters to the given name.  OFF by default.
  22437.  
  22438. SHOW    Show the current settings of the SET parameters.
  22439.  
  22440. TAKE    Take  KERMIT-86  commands from the specified file.  The file should not
  22441.         contain any TAKE commands; nested command files do not work.
  22442.  
  22443. LOCAL   This is a prefix for local file  management  commands,  to  distinguish
  22444. 16.1. Kermit-86 Commands                                               Page 400
  22445.  
  22446. -------------------------------------------------------------------------------
  22447.         them  from  remote  file  management commands (which aren't implemented
  22448.         yet).  The LOCAL prefix is optional; if left off, the commands will  be
  22449.         performed locally.
  22450.  
  22451.         SPACE           Show  how  much space is used and remaining on the cur-
  22452.                         rent disk.
  22453.  
  22454.         DIRECTORY       Provide a directory listing for the current disk, show-
  22455.                         ing  the name and size of each file.  A filespec may be
  22456.                         given to select only a certain file  or  wildcard  file
  22457.                         group.
  22458.  
  22459.         DELETE          Delete the specified files from the current disk.
  22460.  
  22461.         TYPE            A wildcard filespec is accepted and files displayed al-
  22462.                         phabetically.  The display is  paged  in  Unix  fashion
  22463.                         with "--more--" displayed on the last line.  Typein op-
  22464.                         tions at that point can be obtained by hitting a '?'.
  22465.  
  22466.  
  22467. 16.2. Installation:
  22468.  
  22469. CP/M-86 KERMIT is broken up into several source modules:
  22470.  
  22471.       C86CMD.A86          Command parser
  22472.       C86FIL.A86          File handler
  22473.       C86Xxx.A86          System Dependent I/O
  22474.       C86KER.A86          Main Program
  22475.       C86PRO.A86          Protocol Module
  22476.       C86TRM.A86          Terminal Emulation
  22477.       C86UTL.A86          Utilities
  22478.  
  22479. The main program module, C86KER.A86, contains INCLUDE directives for the  other
  22480. files.    The  C86Xxx module is stored with "xx" replaced by codes denoting the
  22481. machine for which the program is being built -- RB for Rainbow, AP for NEC APC,
  22482. etc.    The  program  may  be  built on the CP/M-86 system by obtaining all the
  22483. source files listed above, storing them on the current disk with the names  in-
  22484. dicated,  renaming  the  appropriate C86Xxx.A86 file to be C86XXX.A86, and then
  22485. doing:
  22486.  
  22487.       ASM86 C86KER $PZ  (takes about 6 minutes on the Rainbow)
  22488.       GENCMD C86KER     (takes less than a minute)
  22489.  
  22490. and, if desired,
  22491.  
  22492.       REN KERMIT.CMD=C86KER.CMD
  22493.  
  22494.  
  22495. 16.3. DEC Rainbow 100 Support
  22496.  
  22497. Kermit-86 runs on the DEC Rainbow 100 or 100+ under CP/M-86/80, version 1 or 2,
  22498. on  the  8088 side.  It uses the built-in firmware to emulate a VT102 ANSI ter-
  22499. minal during CONNECT, and runs well at speeds up to 9600 baud.
  22500.  
  22501. You should be able to download the program using the old KERMIT on the Z80 side
  22502. (Rainbow  Kermit,  VT180 Kermit, or generic CP/M-80 Kermit will do the job, but
  22503. 16.3. DEC Rainbow 100 Support                                          Page 401
  22504.  
  22505. -------------------------------------------------------------------------------
  22506. only under DEC CP/M-86/80 version 1.0), or an earlier version of Kermit-86.
  22507.  
  22508. If you don't have an earlier version of KERMIT, then follow the directions  for
  22509. installing  KERMIT-80  (yes,  KERMIT-80) in the KERMIT-80 section of the Kermit
  22510. User Guide, but send the Kermit-86 hex file instead.  This  works  because  the
  22511. Rainbow can run CP/M-80 programs like DDT.
  22512.  
  22513. Another  way to get Kermit onto your Rainbow for the first time would be from a
  22514. DEC VT-180 diskette.  A VT-180 can use its own Kermit to  load  Rainbow  Kermit
  22515. onto  its  disk, which can then be read directly by a Rainbow.  Also, note that
  22516. VT-180 Kermit-80 can actually run on the Rainbow on  the  Z80  side  under  DEC
  22517. CP/M-86/80  version  1 (but not version 2 or higher), at speeds of 1800 baud or
  22518. lower.
  22519.  
  22520.  
  22521. 16.4. NEC Advanced Personal Computer Support
  22522.  
  22523. (Contributed by Ron Blanford, University of Washington)
  22524.  
  22525. Currently only the standard serial port is supported, and not the H14 auxiliary
  22526. port.  The SET PORT command is not implemented.
  22527.  
  22528. While  in  Kermit's  terminal emulation mode, local commands are initiated by a
  22529. two-character sequence consisting of the "escape  character"  followed  by  one
  22530. other  character  identifying the command.  (Make the second character a '?' to
  22531. see a list of the valid commands.)  As distributed, the standard Kermit-86 uses
  22532. the  control-backslash character as the escape character in terminal mode.  The
  22533. trouble is that the CP/M-86 BIOS  in  the  APC  ignores  a  keyboard  entry  of
  22534. Control-\  (i.e.  holding down the CTRL key while striking the '\' key), making
  22535. it difficult (impossible) to use this method to get out of terminal mode.
  22536.  
  22537. One solution is to perform a "SET ESCAPE ^" command  before  entering  terminal
  22538. mode  to change the escape character to a caret (or any other character the APC
  22539. keyboard will generate).  This command could be placed in your KERMIT.INI  file
  22540. for automatic execution every time Kermit is started.
  22541.  
  22542. The simpler solution is to realize that the character code for a Control-\ is a
  22543. hexadecimal 1C, and that this is the code generated  by  the  INS  key  on  the
  22544. numeric keypad.  Once you can remember that every reference to Control-\ should
  22545. be interpreted as a reference to the INS key, this is actually  easier  to  use
  22546. than the two-key Control-\ sequence.
  22547.  
  22548. In  the  standard  CP/M-86  BIOS,  the  unshifted DEL key generates a Control-X
  22549. character (hexadecimal 18).  This is the CP/M command to erase the current  in-
  22550. put  line, and is very useful for local processing.  Most mainframes do not use
  22551. the Control-X character at all, so it becomes much less useful during  terminal
  22552. emulation.    The  DEL  character (hexadecimal 7F), on the other hand, is often
  22553. used by mainframes and can only be generated on the APC  by  holding  down  the
  22554. SHIFT key while striking the DEL key (this capability is not mentioned anywhere
  22555. in the documentation).
  22556.  
  22557. Because the Control-X character is so seldom used while the  DEL  character  is
  22558. commonly  used,  the initialization procedure in Kermit-86 modifies the CP/M-86
  22559. BIOS so that the DEL key generates the DEL character whether  shifted  or  not.
  22560. Control-X  can  still  be  generated  if necessary by holding down the CTRL key
  22561. while striking the 'X' key.  The CP/M-86 BIOS is returned to its original state
  22562. 16.4. NEC Advanced Personal Computer Support                           Page 402
  22563.  
  22564. -------------------------------------------------------------------------------
  22565. when Kermit terminates.
  22566.  
  22567. The  APC uses escape sequences which have been standardized by the American Na-
  22568. tional Standards Institute (ANSI) to control cursor movement,  screen  erasing,
  22569. and  character  attribute  manipulation.  Perhaps the best-known other terminal
  22570. which follows ANSI guidelines is the DEC VT100.  The APC only recognizes a  few
  22571. of  the  more important ANSI commands, and not the complete set which the VT100
  22572. supports.
  22573.  
  22574. The ANSI/VT100 features that the NEC APC supports are:
  22575.  
  22576.    - direct cursor addressing (by row and column)
  22577.    - relative cursor addressing (up, down, left, right)
  22578.    - line erasing (cursor to end, beginning to cursor, entire line)
  22579.    - screen erasing (cursor to end, beginning to cursor, entire screen)
  22580.    - character attributes (underline, reverse video, blink, but not bold)
  22581.  
  22582. In addition, the first four grey function keys (unshifted) generate the  escape
  22583. sequences  associated  with  PF1  through PF4 on the VT100 keyboard.  The arrow
  22584. keys and numeric keypad DO NOT generate the corresponding VT100 sequences.
  22585.  
  22586. These functions are enough to support simple command line editing on most  sys-
  22587. tems,  and allow mailers or paged file display programs to clear the screen be-
  22588. fore each display.  Underlining and reverse video are also useful in  some  ap-
  22589. plications.    This is not enough to support the more sophisticated screen con-
  22590. trol required by screen editors such as EMACS or KED.  In addition,  due  to  a
  22591. bug  in the implementation of the CP/M-86 BIOS, the sequence ordinarily used to
  22592. home the cursor (esc [ H) does not work correctly; a patch for CP/M to  correct
  22593. this problem is distributed with APC Kermit-86.
  22594. I. The ASCII Character Set                                             Page 403
  22595.  
  22596. -------------------------------------------------------------------------------
  22597. I. The ASCII Character Set
  22598.  
  22599. ASCII Code (ANSI X3.4-1968)
  22600.  
  22601. There  are 128 characters in the ASCII (American national Standard Code for In-
  22602. formation Interchange) "alphabet".  The characters are listed in order of ASCII
  22603. value; the columns are labeled as follows:
  22604.  
  22605. Bit             Even parity bit for ASCII character.
  22606. ASCII Dec       Decimal (base 10) representation.
  22607. ASCII Oct       Octal (base 8) representation.
  22608. ASCII Hex       Hexadecimal (base 16) representation.
  22609. EBCDIC Hex      EBCDIC hexadecimal equivalent for Kermit translate tables.
  22610. Char            Name or graphical representation of character.
  22611. Remark          Description of character.
  22612.  
  22613. The first group consists of nonprintable 'control' characters:
  22614.  
  22615.      .....ASCII.... EBCDIC
  22616. Bit  Dec   Oct  Hex  Hex    Char  Remarks
  22617.  0   000   000   00   00    NUL   ^@, Null, Idle
  22618.  1   001   001   01   01    SOH   ^A, Start of heading
  22619.  1   002   002   02   02    STX   ^B, Start of text
  22620.  0   003   003   03   03    ETX   ^C, End of text
  22621.  1   004   004   04   37    EOT   ^D, End of transmission
  22622.  0   005   005   05   2D    ENQ   ^E, Enquiry
  22623.  0   006   006   06   2E    ACK   ^F, Acknowledge
  22624.  1   007   007   07   2F    BEL   ^G, Bell, beep, or fleep
  22625.  1   008   010   08   16    BS    ^H, Backspace
  22626.  0   009   011   09   05    HT    ^I, Horizontal tab
  22627.  0   010   012   0A   25    LF    ^J, Line feed
  22628.  1   011   013   0B   0B    VT    ^K, Vertical tab
  22629.  0   012   014   0C   0C    FF    ^L, Form feed (top of page)
  22630.  1   013   015   0D   0D    CR    ^M, Carriage return
  22631.  1   014   016   0E   0E    SO    ^N, Shift out
  22632.  0   015   017   0F   0F    SI    ^O, Shift in
  22633.  1   016   020   10   10    DLE   ^P, Data link escape
  22634.  0   017   021   11   11    DC1   ^Q, Device control 1, XON
  22635.  0   018   022   12   12    DC2   ^R, Device control 2
  22636.  1   019   023   13   13    DC3   ^S, Device control 3, XOFF
  22637.  0   020   024   14   3C    DC4   ^T, Device control 4
  22638.  1   021   025   15   3D    NAK   ^U, Negative acknowledge
  22639.  1   022   026   16   32    SYN   ^V, Synchronous idle
  22640.  0   023   027   17   26    ETB   ^W, End of transmission block
  22641.  0   024   030   18   18    CAN   ^X, Cancel
  22642.  1   025   031   19   19    EM    ^Y, End of medium
  22643.  1   026   032   1A   3F    SUB   ^Z, Substitute
  22644.  0   027   033   1B   27    ESC   ^[, Escape, prefix, altmode
  22645.  1   028   034   1C   1C    FS    ^\, File separator
  22646.  0   029   035   1D   1D    GS    ^], Group separator
  22647.  0   030   036   1E   1E    RS    ^^, Record separator
  22648.  1   031   037   1F   1F    US    ^_, Unit separator
  22649.  
  22650. The  last  four  are  usually associated with the control version of backslash,
  22651. right square bracket, uparrow (or circumflex),  and  underscore,  respectively,
  22652. but some terminals do not transmit these control characters.
  22653. I. The ASCII Character Set                                             Page 404
  22654.  
  22655. -------------------------------------------------------------------------------
  22656. The following characters are printable:
  22657.  
  22658. First, some punctuation characters.
  22659.  
  22660.      .....ASCII.... EBCDIC
  22661. Bit  Dec   Oct  Hex  Hex    Char  Remarks
  22662.  1   032   040   20   40    SP    Space, blank
  22663.  0   033   041   21   5A    !     Exclamation mark
  22664.  0   034   042   22   7F    "     Doublequote
  22665.  1   035   043   23   7B    #     Number sign, pound sign
  22666.  0   036   044   24   5B    $     Dollar sign
  22667.  1   037   045   25   6C    %     Percent sign
  22668.  1   038   046   26   50    &     Ampersand
  22669.  0   039   047   27   7D    '     Apostrophe, accent acute
  22670.  0   040   050   28   4D    (     Left parenthesis
  22671.  1   041   051   29   5D    )     Right parenthesis
  22672.  1   042   052   2A   5C    *     Asterisk, star
  22673.  0   043   053   2B   4E    +     Plus sign
  22674.  1   044   054   2C   6B    ,     Comma
  22675.  0   045   055   2D   60    -     Dash, hyphen, minus sign
  22676.  0   046   056   2E   4B    .     Period, dot
  22677.  1   047   057   2F   61    /     Slash
  22678.  
  22679. Numeric characters:
  22680.  
  22681.      .....ASCII.... EBCDIC
  22682. Bit  Dec   Oct  Hex  Hex    Char  Remarks
  22683.  0   048   060   30   F0    0     Zero
  22684.  1   049   061   31   F1    1     One
  22685.  1   050   062   32   F2    2     Two
  22686.  0   051   063   33   F3    3     Three
  22687.  1   052   064   34   F4    4     Four
  22688.  0   053   065   35   F5    5     Five
  22689.  0   054   066   36   F6    6     Six
  22690.  1   055   067   37   F7    7     Seven
  22691.  1   056   070   38   F8    8     Eight
  22692.  0   057   071   39   F9    9     Nine
  22693.  
  22694. More punctuation characters:
  22695.  
  22696.      .....ASCII.... EBCDIC
  22697. Bit  Dec   Oct  Hex  Hex    Char  Remarks
  22698.  0   058   072   3A   7A    :     Colon
  22699.  1   059   073   3B   5E    ;     Semicolon
  22700.  0   060   074   3C   4C    <     Left angle bracket
  22701.  1   061   075   3D   7E    =     Equal sign
  22702.  1   062   076   3E   6E    >     Right angle bracket
  22703.  0   063   077   3F   6F    ?     Question mark
  22704.  1   064   100   40   7C    @     "At" sign
  22705. I. The ASCII Character Set                                             Page 405
  22706.  
  22707. -------------------------------------------------------------------------------
  22708. Upper-case alphabetic characters (letters):
  22709.  
  22710.      .....ASCII.... EBCDIC
  22711. Bit  Dec   Oct  Hex  Hex    Char  Remarks
  22712.  0   065   101   41   C1    A
  22713.  0   066   102   42   C2    B
  22714.  1   067   103   43   C3    C
  22715.  0   068   104   44   C4    D
  22716.  1   069   105   45   C5    E
  22717.  1   070   106   46   C6    F
  22718.  0   071   107   47   C7    G
  22719.  0   072   110   48   C8    H
  22720.  1   073   111   49   C9    I
  22721.  1   074   112   4A   D1    J
  22722.  0   075   113   4B   D2    K
  22723.  1   076   114   4C   D3    L
  22724.  0   077   115   4D   D4    M
  22725.  0   078   116   4E   D5    N
  22726.  1   079   117   4F   D6    O
  22727.  0   080   120   50   D7    P
  22728.  1   081   121   51   D8    Q
  22729.  1   082   122   52   D9    R
  22730.  0   083   123   53   E2    S
  22731.  1   084   124   54   E3    T
  22732.  0   085   125   55   E4    U
  22733.  0   086   126   56   E5    V
  22734.  1   087   127   57   E6    W
  22735.  1   088   130   58   E7    X
  22736.  0   089   131   59   E8    Y
  22737.  0   090   132   5A   E9    Z
  22738.  
  22739. More punctuation characters:
  22740.  
  22741.      .....ASCII.... EBCDIC
  22742. Bit  Dec   Oct  Hex  Hex    Char  Remarks
  22743.  1   091   133   5B   AD    [     Left square bracket
  22744.  0   092   134   5C   E0    \     Backslash
  22745.  1   093   135   5D   BD    ]     Right square bracket
  22746.  1   094   136   5E   5F    ^     Circumflex, up arrow
  22747.  0   095   137   5F   6D    _     Underscore, left arrow
  22748.  0   096   140   60   79    `     Accent grave
  22749. Kermit User Guide                                                      Page 406
  22750.  
  22751. -------------------------------------------------------------------------------
  22752. Lower-case alphabetic characters (letters):
  22753.  
  22754.      .....ASCII.... EBCDIC
  22755. Bit  Dec   Oct  Hex  Hex    Char  Remarks
  22756.  1   097   141   61   81    a
  22757.  1   098   142   62   82    b
  22758.  0   099   143   63   83    c
  22759.  1   100   144   64   84    d
  22760.  0   101   145   65   85    e
  22761.  0   102   146   66   86    f
  22762.  1   103   147   67   87    g
  22763.  1   104   150   68   88    h
  22764.  0   105   151   69   89    i
  22765.  0   106   152   6A   91    j
  22766.  1   107   153   6B   92    k
  22767.  0   108   154   6C   93    l
  22768.  1   109   155   6D   94    m
  22769.  1   110   156   6E   95    n
  22770.  0   111   157   6F   96    o
  22771.  1   112   160   70   97    p
  22772.  0   113   161   71   98    q
  22773.  0   114   162   72   99    r
  22774.  1   115   163   73   A2    s
  22775.  0   116   164   74   A3    t
  22776.  1   117   165   75   A4    u
  22777.  1   118   166   76   A5    v
  22778.  0   119   167   77   A6    w
  22779.  0   120   170   78   A7    x
  22780.  1   121   171   79   A8    y
  22781.  1   122   172   7A   A9    z
  22782.  
  22783. More punctuation characters:
  22784.  
  22785.      .....ASCII.... EBCDIC
  22786. Bit  Dec   Oct  Hex  Hex    Char  Remarks
  22787.  0   123   173   7B   C0     {    Left brace (curly bracket)
  22788.  1   124   174   7C   4F     |    Vertical bar
  22789.  0   125   175   7D   D0     }    Right brace (curly bracket)
  22790.  0   126   176   7E   A1     ~    Tilde
  22791.  
  22792.  
  22793. Finally, one more nonprintable character:
  22794.  
  22795.  0    127   177  7F   07    DEL   Delete, rubout
  22796. Kermit User Guide                                                    Page cdvii
  22797.  
  22798. -------------------------------------------------------------------------------
  22799.                                 List of Figures
  22800.  
  22801.    Figure 1-1:   A Kermit Packet                                              7
  22802.    Figure 1-2:   Kermit File Transfer                                         8
  22803.    Figure 4-1:   Local and Remote Kermits                                    25
  22804.    Figure 5-1:   MS-Kermit File Transfer Display Screen                      76
  22805.    Figure 5-2:   MS-Kermit Script for Dialing Up and Logging In             110
  22806.    Figure 5-3:   MS-DOS Batch File Invoking Kermit to Send VAX Mail         111
  22807.    Figure 5-4:   MS-Kermit Script for Logging into VAX and Sending Mail     112
  22808.    Figure 5-5:   An Advanced MS-Kermit Initialization File                  113
  22809.    Figure 11-1:   DECSYSTEM-20 Word/Byte Organization                       253
  22810.    Figure 11-2:   DEC-20 Kermit Local Operation                             257
  22811.    Figure 13-1:   VT100 Keypad on an Apple Keyboard                         332
  22812.    Figure 13-2:   VT100 Keypad on an Apple//gs or Equivalent Keypad         333
  22813.    Figure 13-3:   VT52 Keypad on an Apple Keyboard                          334
  22814.    Figure 14-1:   MacKermit Key Modifier Dialog                             353
  22815.    Figure 15-1:   Bootstrap program for Kermit-80 and CP/M Version 2.2      379
  22816. Kermit User Guide                                                   Page cdviii
  22817.  
  22818. -------------------------------------------------------------------------------
  22819.                                 List of Tables
  22820.  
  22821.    Table 5-1:   The US ASCII Character Set (ANSI X3.4-1977)                  61
  22822.    Table 5-2:   Kermit-MS Single-Character CONNECT Escape Commands           72
  22823.    Table 5-3:   Adapters Supported by IBM PC MS-Kermit for Tektronix         75
  22824.                 Emulation
  22825.    Table 5-4:   Kermit-MS Verbs for the IBM PC Family                        97
  22826.    Table 5-5:   Kermit-MS Terminal Emulation Options                        114
  22827.    Table 5-6:   Kermit-MS Screen Scroll Keys                                115
  22828.    Table 5-7:   Kermit-MS Verbs for the DEC Rainbow                         116
  22829.    Table 5-8:   Response of MS-Kermit Tektronix Emulator to Received        131
  22830.                 Characters
  22831.    Table 5-9:   Tektronix Dot-Drawing Commands                              133
  22832.    Table 5-10:   MS-Kermit Tektronix Coordinate Interpretation              135
  22833.    Table 5-11:   IBM PC/XT/AT Serial Port Numbers                           140
  22834.    Table 7-1:   Error messages and codes for Kermit-370                     197
  22835.    Table 12-1:   Kermit-11 File Types                                       301
  22836.    Table 13-1:   Apple II Communication Cards Supported by Kermit-65        319
  22837.    Table 13-2:   Kermit-65 Single-Character CONNECT Escape Commands         324
  22838.    Table 13-3:   Apple II/II+ Keyboard Escapes                              325
  22839.    Table 15-1:   Kermit-80 SET PORT Options                                 368
  22840.    Table 15-2:   Systems supported by Kermit-80 (Part 1)                    375
  22841.    Table 15-3:   Systems supported by Kermit-80 (Part 2)                    376
  22842.    Table 15-4:   Terminals supported by Kermit-80                           377
  22843.    Table 15-5:   Terminals known to Kermit-80                               385
  22844.