home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / pckermit / pckermitdoc.txt < prev    next >
Text File  |  2020-01-01  |  38KB  |  932 lines

  1.  
  2.  
  3.  
  4. 10. PC-DOS and MS-DOS KERMIT-86
  5.  
  6. Program:    Daphne  Tzoar,  Columbia  University,  with contributions from Jeff
  7.             Damens (Columbia), Dave  King  (CMU),  Herm  Fischer  (Litton  Data
  8.             Systems), and others.
  9. Documentation:
  10.             Frank  da Cruz, Columbia University; Herm Fischer, Litton Data Sys-
  11.             tems (Van Nuys CA)
  12. Version:    2.25
  13. Date:       February 1984
  14.  
  15. KERMIT-86 is a program that implements the KERMIT file  transfer  protocol  for
  16. the  IBM  PC  and several other machines using the same processor family (Intel
  17. 8088 or 8086) and operating system family under PC-DOS  or  MS-DOS  (henceforth
  18. referred  to collectively as MS-DOS), versions 1.1, 2.0, and 2.1.  This section
  19. will describe the things you should know about the MS-DOS file system in  order
  20. to  make  effective  use  of  KERMIT,  and  then it will describe the KERMIT-86
  21. program.
  22.  
  23. MS-DOS KERMIT runs on a variety of systems, including the IBM PC  and  XT,  the
  24. the  Heath/Zenith 100, HP-150, the Seequa Chameleon, the Victor 9000, the Tandy
  25. 2000, the Compaq Portable, the Columbia MPC, and others.   This  document  con-
  26. centrates  on  the  IBM  PC/XT  implementation;  the  others  will be (possibly
  27. complete) subsets of that (see Section 10.5 for details about support for other
  28. MS DOS systems).
  29.  
  30.  
  31. 10.1. The MS-DOS File System
  32.  
  33. The features of the MS-DOS file system of greatest interest to KERMIT users are
  34. the form of the file specifications, and the distinction between pre-MS-DOS 2.0
  35. file names and newer file names which allow directory paths.
  36.  
  37.  
  38.                           MS-DOS FILE SPECIFICATIONS
  39.  
  40. MS-DOS file specifications are of the form 
  41.  
  42.   DEVICE:\PATHNAME\NAME.TYPE
  43.  
  44. where the DEVICE is a single character identifier (e.g., A for the first floppy
  45. disk, C for the first fixed disk, D for a RAM disk emulator), PATHNAME is up to
  46. 63 characters of identifier(s) (up to 8 characters each) surrounded by  reverse
  47. slashes  (or  ".."  for  parent or "." for current directory), NAME is an iden-
  48. tifier of up to 8 characters, and TYPE is an identifier of up to  3  characters
  49. in  length.  Device  and pathname may be omitted. Pathname is normally omitted,
  50. and cannot be specified for MS-DOS 1.x  or  with  those  commands  which  allow
  51. MS-DOS  1.x  use  (e.g.  pathnames  can  only be accepted by commands which are
  52. specific to MS-DOS 2.x). Device and directory pathnames, when omitted,  default
  53. to  the  user's  current  (or  "defaulted") disk and directory path (path=".").
  54. Thus NAME.TYPE is normally sufficient to specify a file, and only  this  infor-
  55. mation is sent along by KERMIT-86 with an outgoing file.
  56.  
  57. The  device, path, name, and type fields may contain uppercase letters, digits,
  58. and the special characters "-" (dash), "_" (underscore), and "$" (dollar sign).
  59. (For use only among MS-DOS processors, additional filename  special  characters
  60.  
  61.  
  62.  
  63. allowed  are  "#&!%(){}'`".  DOS 1.x allows others as well.).  There are no im-
  64. bedded or trailing spaces.  Other characters may be not be included within  the
  65. MS-DOS environment (e.g. quoted characters are not permissible).  The fields of
  66. the  file  specification  are  set  off from one another by the punctuation in-
  67. dicated above.
  68.  
  69. The device field specifies a physical or "logical" device upon which  the  file
  70. is  resident.  The directory pathname identifies an area on the device, for in-
  71. stance the area belonging to the logical ownership of the file. KERMIT-86  does
  72. not  transmit the device or pathname directory fields to the target system, and
  73. does not attempt to honor device or directory fields that may appear in  incom-
  74. ing file names.
  75.  
  76. The  name  field is the primary identifier for the file.  The type, also called
  77. the "extension", is an indicator which, by convention, tells what kind of  file
  78. we  have.    For  instance  FOO.BAS is the source of a BASIC program named FOO;
  79. FOO.OBJ might be the relocatable object module produced by  compiling  FOO.BAS;
  80. FOO.EXE could an executable program produced by linking FOO.OBJ, and so forth.
  81.  
  82. The  MS-DOS allows a group of files to be specified in a single file specifica-
  83. tion by including the special "wildcard"  characters,  "*"  and  "?".    A  "*"
  84. matches  any  string  of characters from the current position to the end of the
  85. field, including no characters at all; a  "?"  matches  any  single  character.
  86. Here are some examples:
  87.  
  88. *.BAS   All  files  of  type BAS (all BASIC source files) in the current direc-
  89.         tory.
  90.  
  91. FOO.*   Files of all types with name FOO.
  92.  
  93. F*.*    All files whose names start with F. 
  94.  
  95. F?X*.*  All files whose names start with F and contain X in the third position,
  96.         followed by zero or more characters.
  97.  
  98. ?.*     All files whose names are exactly one character long.
  99.  
  100. Wildcard notation is used on many computer systems in similar ways, and  it  is
  101. the mechanism most commonly used to instruct KERMIT to send a group of files.
  102.  
  103. KERMIT-86  uses the ? character for help while commands are being typed, so the
  104. single-character wildcard in KERMIT commands is = rather than ?, for example 
  105.  
  106.   Kermit-86>send =.*
  107.  
  108. The KERMIT-86 user must bear in mind that other (non-MS-DOS) systems  use  dif-
  109. ferent  wildcard characters; for instance KERMIT-20 uses % instead of the ?  as
  110. the single character wildcard.  When using KERMIT-86 to request a wildcard file
  111. group from a KERMIT-20 server, the Kermit-86 "=" must be replaced by DEC-20 "%"
  112. characters.
  113.  
  114.  
  115.  
  116.                           TEXT FILES AND BINARY FILES
  117.  
  118. The  MS-DOS  systems  store  files  as bulk collections of 8 bit bytes, with no
  119. peculiar differences between text, program code, and binary  files.    Since  a
  120. non-MS-DOS receiving system might need to know file type distinctions, the user
  121. might  need to use various SET functions on the remote system to inform it that
  122. the incoming file is of some particular (non-default) type.    In  transmitting
  123. files  between  KERMIT-86'es, regardless of file contents, the receiving MS-DOS
  124. system is equally capable of processing text, code, and data (and is, in  fact,
  125. not knowledgable of the usage of the bytes in the file).
  126.  
  127. ASCII files are presumed to have recognizable characteristics (carriage returns
  128. and  linefeeds  delimiting  lines, form feeds delimiting pages, and control-Z's
  129. delimiting the end of file), though all internal  bit  codes  are  transmitted.
  130. Receiving non-MS-DOS systems may well get confused when presented with nonstan-
  131. dard  ASCII files.  Files produced by EASYWRITER or Word Star, for example, may
  132. need preprocessing prior  to  transmission  by  commonly  available  "exporter"
  133. programs,  to  convert  them  to  conventional ASCII formats.  Spreadsheet data
  134. files, and dBASE II files need special formatting  to  be  meaningful  to  non-
  135. MS-DOS  recipients  (though  they  can  be  transmitted  between  MS-DOSes with
  136. KERMIT-86's).  Furthermore, those word processors storing  formatting  data  at
  137. the  end of the file, after the control-Z and before physical end (such as BLUE
  138. or Easy Writer), will need to be told to strip the formatting data,  lest  they
  139. confuse non-MS-DOS recipients.
  140.  
  141.  
  142. 10.2. Program Operation
  143.  
  144. KERMIT-86's  prompt  is "Kermit-86>".  KERMIT-86 can run interactively to issue
  145. several commands, like this:
  146.  
  147.   A>
  148.   A>kermit
  149.  
  150.   MS DOS Kermit V2.25
  151.  
  152.   Kermit-86>send foo.*
  153.  
  154.     informational messages about the files being sent
  155.  
  156.   Kermit-86>status
  157.  
  158.   various status informational data are displayed
  159.  
  160.   Kermit-86>receive
  161.  
  162.     informational messages about the files being recieved
  163.  
  164.   Kermit-86>exit
  165.   A>
  166.  
  167. During interactive operation, you may use the help ("?") and recognition  (ESC)
  168. features  freely while typing commands.  Command keywords may be abbreviated to
  169. their shortest prefix that sets them apart from any other keyword valid in that
  170. field.
  171.  
  172.  
  173.  
  174. 10.3. MS DOS KERMIT Commands
  175.  
  176. MS  DOS  KERMIT implements a large subset of the local mode commands of "ideal"
  177. KERMIT.  Not all of the following commands are available on all MS DOS systems,
  178. and some of the commands may work somewhat differently between DOS versions.
  179.  
  180.  
  181.                                THE SEND COMMAND
  182.  
  183. Syntax:  SEND filespec
  184.  
  185. The SEND command causes a file or file group to be sent from the MS-DOS to  the
  186. other  system.   The filespec may contain a device designator, like A:, and the
  187. wildcard characters "*" and/or "=".  The current release of Kermit-86 does  not
  188. allow pathnames in this command.
  189.  
  190. If  the  filespec  contains wildcard characters then all matching files will be
  191. sent, in directory search order (according to how your MS-DOS lists its  direc-
  192. tory  contents).    If  a file can't be opened for read access, standard MS-DOS
  193. recovery  procedures  will  be  available  (these  may  necessitate  restarting
  194. Kermit).
  195.  
  196.  
  197. SEND Command General Operation
  198.  
  199. Files  will  be  sent  with  their  MS-DOS  filename and filetype (for instance
  200. FOO.TXT, no device or pathname).  If you expect to be sending files whose names
  201. contain characters that would be illegal in filenames on the target system, and
  202. you know that Kermit on the target system does not have the ability to  convert
  203. incoming  filenames,  you can copy and/or rename the file using MS-DOS commands
  204. prior to loading Kermit.
  205.  
  206. Each file will be sent as a sequence of eight bit bytes.
  207.  
  208. Once you give KERMIT-86 the SEND command, the name of each file  will  be  dis-
  209. played  on your screen as the transfer begins; a packet count and retry summary
  210. will be displayed, and informational messages displayed as appropriate.  If the
  211. file is successfully transferred, you will  see  "COMPLETED",  otherwise  there
  212. will  be  an  error  message. When the specified operation is done, the program
  213. will sound a beep.
  214.  
  215. If you notice a file being sent which you do not really want to send,  you  may
  216. cancel  the  operation immediately by typing either Control-X or Control-Z.  If
  217. your are sending a file group, Control-X will cause  the  current  file  to  be
  218. skipped, and KERMIT-86 will go on to the next file, whereas Control-Z will can-
  219. cel  sending  the  entire  group  and  return you to KERMIT-86 command level. A
  220. Control-C cancels sending immediately and returns you to the Kermit-86 prompt.
  221.  
  222.  
  223.  
  224.                               THE RECEIVE COMMAND
  225.  
  226. Syntax: RECEIVE [filespec]
  227.  
  228. The  RECEIVE  command  tells KERMIT-86 to receive a file or file group from the
  229. other system.  KERMIT simply waits for the file to arrive; this command is  not
  230. to be used when talking to a KERMIT server (see GET).
  231.  
  232. If  the optional filespec is provided, store the incoming file under that name.
  233. The filespec may include a device designator, or may consist of only  a  device
  234. designator.    The  incoming  file is stored on the default or specified device
  235. (current directory in DOS 2.0).  If no name was specified, the  name  from  the
  236. incoming  file  header  packet is used; if that name is not a legal MS-DOS file
  237. name, KERMIT-86 will delete illegal or excessive characters from the name.
  238.  
  239. If the optional filespec was provided, but more  than  one  file  arrives,  the
  240. first  file  will be stored under the given filespec, and the remainder will be
  241. stored under their own names.
  242.  
  243. If the incoming file name already exists, and FILE-WARNING  is  set,  KERMIT-86
  244. will  change  the incoming name (and inform you how it renamed it) so as not to
  245. obliterate the pre-existing file.
  246.  
  247. If an incoming file does not arrive in its entirety,  KERMIT-86  will  normally
  248. discard it; it will not appear in your directory.  You may change this behavior
  249. by  using the command SET INCOMPLETE KEEP, which will cause as much of the file
  250. as arrived to be saved in your directory.
  251.  
  252. If a file begins to arrive that you don't really want, you can attempt to  can-
  253. cel  it  by  typing  Control-X; this sends a cancellation request to the remote
  254. Kermit.  If the remote Kermit understands this request  (this  is  an  optional
  255. feature),  it will comply; otherwise it will continue to send.  If a file group
  256. is being sent, you  can  request  the  entire  group  be  cancelled  by  typing
  257. Control-Z.    If  you  type  Control-C, you will be returned immediately to the
  258. Kermit-86> command level.
  259.  
  260.  
  261.                                 THE GET COMMAND
  262.  
  263. Syntax: GET remote-filespec
  264.  
  265. The GET remote-filespec command requests a remote KERMIT  server  to  send  the
  266. file or file group specified by remote-filespec.  This command can be used only
  267. when  KERMIT-86  is  local,  with a KERMIT server on the other end.  This means
  268. that you must have CONNECTed to the other system, logged in, run KERMIT  there,
  269. issued the SERVER command, and escaped back (e.g. ^]C) to the local KERMIT-86.
  270.  
  271. The  remote  filespec  is any string that can be a legal file specification for
  272. the remote system; it is not parsed or validated locally.  (A remote PC  server
  273. will  accept  device  names, but not path names in the filespec.)  As files ar-
  274. rive, their names will be displayed on your screen, along with  packet  traffic
  275. statistics and error messages.  You may type ^X to request that the current in-
  276. coming  file be cancelled, ^Z to request that the entire incoming batch be can-
  277. celled, and ^C to return immediately to the Kermit-86> prompt.
  278.  
  279. If the remote KERMIT is not capable of server functions, then you will probably
  280.  
  281.  
  282.  
  283. get  an  error  message back from it like "Illegal packet type".  In this case,
  284. you must connect to the other Kermit, give a SEND  command,  escape  back,  and
  285. give a RECEIVE command.
  286.  
  287.  
  288.                                 THE BYE COMMAND
  289.  
  290. When  running  a local Kermit which is talking to a remote KERMIT server over a
  291. communications line, use the BYE command to shut down the server  and  log  out
  292. its job, and exit from Kermit-86 to DOS.
  293.  
  294.  
  295.                               THE FINISH COMMAND
  296.  
  297. Like  BYE,  FINISH  shuts down the remote server.  However, FINISH does not log
  298. out the server's job.  You are left at Kermit-86 prompt level so that  you  can
  299. connect back to the job on the remote system.
  300.  
  301.  
  302.                               THE LOGOUT COMMAND
  303.  
  304. The  LOGOUT  command is identical to the BYE command, except you will remain at
  305. Kermit-86 prompt level, rather than exit to DOS,  so  that  you  can  establish
  306. another connection.
  307.  
  308.  
  309.                               THE CONNECT COMMAND
  310.  
  311. Syntax: CONNECT
  312.  
  313. Establish  an  interactive  terminal  connection to the system connected to the
  314. currently selected communications port (COM1 or COM2) using full duplex echoing
  315. and no parity unless otherwise specified in previous SET commands.  Get back to
  316. KERMIT-86 by typing the escape character followed by the letter  C. The  escape
  317. character is Control-] by default.  When you type the escape character, several
  318. single-character commands are possible:
  319.  
  320.   ?   Help - prints the commands allowed (as below).
  321.   C   Close the connection and return to KERMIT-86.
  322.   S   Status of the connection.
  323.   B   Break  signal  is  sent  to  the  port  (on  the  PC/XT you may also type
  324.       CTRL-BREAK to send a BREAK).
  325.   ^]  (or whatever you have set the escape character to be)
  326.       Typing the escape character twice sends one copy of it to  the  connected
  327.       host.
  328.  
  329. You  can use the SET ESCAPE command to define a different escape character, and
  330. on some systems (including the PC and XT) you can SET BAUD to change  the  baud
  331. rate, and SET PORT to switch between COM1 and COM2
  332.  
  333. In the connect mode, you can communicate with your autodialer, control the com-
  334. munications  line, hang it up, and the like.  (E.g., typing +++ to a Hayes-like
  335. modem will allow you to follow that by dialing or hang-up commands, when in the
  336. connection state).
  337.  
  338.  
  339.  
  340.                               THE REMOTE COMMAND
  341.  
  342. The REMOTE keyword is a prefix for a number of commands.  It indicates that the
  343. command  is  to  be  performed by the remote Kermit, which must be running as a
  344. server.  Note that not all Kermit servers are capable of  executing  all  these
  345. commands.    In case you send a command the server cannot execute, it will send
  346. back a message to the effect that the command is unknown to it.  If the  remote
  347. can execute the command, it will send the results to your screen.  Here are the
  348. REMOTE commands which KERMIT-86 may issue:
  349.  
  350. CWD [directory] Change  Working  Directory  on  the  remote  host.   Change the
  351.                 default source and destination area for file transfer.
  352.  
  353. DELETE filespec Delete the specified file or files on  the  remote  host.    In
  354.                 response,  the  remote  host should display a list of the files
  355.                 that were or were not successfully deleted.
  356.  
  357. DIRECTORY [filespec]
  358.                 The remote  host  will  provide  a  directory  listing  of  the
  359.                 specified  files.  If no files are specified, then all files in
  360.                 the default area will be listed.
  361.  
  362. DISK [directory]
  363.                 Provide a brief summary of disk usage in the specified area  on
  364.                 the  remote  host.    If none specified, the default or current
  365.                 area will be summarized.
  366.  
  367. HELP            The remote host tells what server functions it is capable of.
  368.  
  369. HOST [command]  Send the command to the remote host's command processor for ex-
  370.                 ecution.
  371.  
  372. TYPE filespec   Display the contents of the specified remote file or  files  on
  373.                 the screen.
  374.  
  375.  
  376.                                 THE SET COMMAND
  377.  
  378. Syntax: SET parameter [value]
  379.  
  380. Establish  or  modify  various parameters for file transfer or terminal connec-
  381. tion.  You can examine their values with the STATUS  command.    The  following
  382. parameters may be SET:
  383.  
  384. BACKARROW       Backarrow (backspace) key sends BACKSPACE or DELETE.
  385.  
  386. BAUD            Communications port line speed
  387.  
  388. BELL            The  bell  (beep)  is  normally  sounded at the end of a trans-
  389.                 action.  SET BELL OFF may be used to silence the bell.
  390.  
  391. DEBUG           Mode
  392.  
  393. END-OF-LINE     Character to replace CR at end of packets
  394.  
  395. ESCAPE          Character for Kermit-86 attention during terminal connection
  396.  
  397.  
  398.  
  399. FILE-WARNING    Warn  if  an  incoming filename would conflict with an existing
  400.                 file name, and attempt to construct a new unique name for it.
  401.  
  402. HEATH-19        Interpret Heath/Zenith-19 screen control codes.
  403.  
  404. IBM             Set up for communication with IBM mainframes: local echo  (half
  405.                 duplex)  during  terminal  emulation, line turnaround handshake
  406.                 during file transfer, and appropriate parity at all times.
  407.  
  408. INCOMPLETE      What to do with an incomplete file, KEEP or DISCARD.
  409.  
  410. LOCAL-ECHO      For terminal connection, OFF (remote echo, or full  duplex)  or
  411.                 ON (local echo, or half duplex)
  412.  
  413. PARITY          Character  parity  to use, NONE (the default), ODD, EVEN, MARK,
  414.                 or SPACE
  415.  
  416. PORT            RS232 port to use for terminal  connection  or  file  transfer,
  417.                 COM1 (the default) or COM2
  418.  
  419.  
  420. SET BACKARROW
  421.  
  422. Syntax: SET BACKARROW state
  423.  
  424. The  IBM  PC  keyboard does not have a key marked DELETE (RUBOUT) or BACKSPACE.
  425. DELETE and BACKSPACE are two different ASCII characters (ASCII 127 and  ASCI  8
  426. respectively),  and  one  or  the other of these characters is normally used by
  427. host systems for deleting the characters just typed.  Some  systems  use  BACK-
  428. SPACE, some use DELETE.  This command allows you to specify which character the
  429. backarrow key should transmit during terminal connection.
  430.  
  431. BACKSPACE       Backarrow  (backspace) key transmits the backspace (BS) charac-
  432.                 ter, Control-H.  CTRL-Backarrow sends DELETE.
  433.  
  434. DELETE          Backarrow (backspace) key transmits the  delete  (DEL,  RUBOUT)
  435.                 character.  CTRL-Backarrow sends BACKSPACE.
  436.  
  437. In all cases, CTRL-H sends BACKSPACE.
  438.  
  439.  
  440. SET BAUD
  441.  
  442. Syntax: SET BAUD rate
  443.  
  444. Set  terminal communications port speed to 300, 1200, 1800, 2400, 4800, 9600 or
  445. other common baud rates.  The site default baud rate can be determined  by  the
  446. STATUS  command  immediately  upon loading Kermit-86, and is displayed upon is-
  447. suing of the CONNECT command.
  448.  
  449.  
  450.  
  451. SET BELL
  452.  
  453. Syntax: SET BELL state
  454.  
  455. ON              Bell  (beeper) sounds, at completion of transmissions and other
  456.                 times.
  457.  
  458. OFF             Bell (beeper) remains silent.
  459.  
  460.  
  461. SET DEBUG
  462.  
  463. Syntax: SET DEBUG state
  464.  
  465. ON              Record the packet traffic on your terminal.
  466.  
  467. OFF             Don't display debugging information (this is the default).   If
  468.                 debugging was in effect, turn it off.
  469.  
  470.  
  471. SET END-OF-LINE
  472.  
  473. Syntax: SET END-OF-LINE decimal number between 0 and 31
  474.  
  475. Change the character used at the end of outgoing packets to the character whose
  476. decimal ASCII value is given.  The default is 13 (carriage return).
  477.  
  478.  
  479. SET ESCAPE
  480.  
  481. Syntax:  SET  ESCAPE character Specify the control character you want to use to
  482. "escape" from remote connections back to KERMIT-86.  The default is Control-].
  483.  
  484.  
  485. SET FILE-WARNING
  486.  
  487. Syntax: SET FILE-WARNING option
  488.  
  489. Specify what to do when an incoming file has the same name as an existing  file
  490. in  the  default  directory of the default device.  If ON, Kermit will warn you
  491. when an incoming file has the same name as an existing file, and  automatically
  492. rename  the  incoming  file  (as indicated in the warning) so as not to destroy
  493. (overwrite) the pre-existing one.  If  OFF,  the  incoming  file  replaces  the
  494. pre-existing file.
  495.  
  496.  
  497. SET HEATH-19
  498.  
  499. Syntax: SET HEATH-19 option
  500.  
  501. ON      Specifies that, in the connect state, incoming characters are to be ex-
  502.         amined  for  Heath/Zenith-19  terminal  screen control commands (escape
  503.         sequences), and if encountered, the commands are to be emulated on  the
  504.         PC  screen.   The Heath-19 codes are a superset of the popular DEC VT52
  505.         codes, so if your system does not support the Heath-19,  you  may  tell
  506.         your  terminal  type  is  VT52  (or  one of the many VT52 compatibles).
  507.  
  508.  
  509.  
  510.         Heath-19 emulation is available on the IBM PC and XT.
  511.  
  512. OFF     All incoming characters will be sent to the screen "bare", through DOS.
  513.         If  you  have loaded a device driver into DOS for the CON: device, such
  514.         as ANSI.SYS, then that driver will be able to interpret the  codes  it-
  515.         self.    Most non-IBM systems have their own screen control code inter-
  516.         preter built into DOS or firmware.
  517.  
  518. On the IBM systems, function keys and numeric keypad cursor control keys do not
  519. send characters when in the Heath-19 mode, unless  the  user  has  used  a  key
  520. redefinition package like ProKey.
  521.  
  522.  
  523. SET IBM
  524.  
  525. Syntax: SET IBM option
  526.  
  527. Specify  setup  for  communication  with an IBM mainframe.  ON sets appropriate
  528. parity (per options used to assemble Kermit at your site, MARK as distributed),
  529. local echo for CONNECT, and half-duplex line handshaking (XON line turnaround).
  530. OFF reestablishes full duplex, nonparity operation.
  531.  
  532.  
  533. SET LOCAL-ECHO
  534.  
  535. Syntax: SET LOCAL-ECHO option
  536.  
  537. Specify mode for character echoing when in the CONNECT  state.    ON  specifies
  538. that characters are to be echoed within Kermit (because neither the remote com-
  539. puter, nor the communications circuitry has been requested to echo).  Generally
  540. IBM  mainframes  accessed  directly (not via Telenet) will need this option (or
  541. the IBM option, q.v.) ON; generally most DEC sites and inter-PC  communications
  542. will  need  it  OFF.  It is OFF by default, i.e. communication is assumed to be
  543. full duplex (remote echo).
  544.  
  545.  
  546. SET PARITY
  547.  
  548. Syntax: SET PARITY keyword
  549.  
  550. The choices for SET PARITY are NONE (the default), ODD, EVEN, MARK, and  SPACE.
  551. NONE  means no parity processing is done, and the 8th bit of each character can
  552. be used for data when transmitting binary files.
  553.  
  554. You will need to SET PARITY to ODD, EVEN, MARK, or  possibly  SPACE  when  com-
  555. municating with a system, or over a network, that requires or imposes character
  556. parity  on  the  communication  line.   For instance, GTE TELENET requires MARK
  557. parity.  If you neglect to SET PARITY when  the  communications  equipment  re-
  558. quires it, the symptom may be that terminal emulation works partially, and file
  559. transfer does not work at all.
  560.  
  561. If  you  have  set parity to ODD, EVEN, MARK, or SPACE, then KERMIT-86 will re-
  562. quest that binary files will be transferred using 8th-bit-prefixing.    If  the
  563. other  side  knows  how to do 8th-bit-prefixing (this is an optional feature of
  564. the KERMIT protocol, and not all implementations of KERMIT have it),  then  bi-
  565. nary  files  can  be  transmitted successfully.  If NONE is specified, 8th-bit-
  566.  
  567.  
  568.  
  569. prefixing will not be requested.
  570.  
  571.  
  572. SET PORT
  573.  
  574. Syntax: SET PORT number
  575.  
  576. Specify  the  port  number  to  use for file transfer or CONNECT, COM1 or COM2.
  577. This command lets you use a different asynchronous adapter, or  to  switch  be-
  578. tween two simultaneous remote sessions.
  579.  
  580.  
  581.                               THE STATUS COMMAND
  582.  
  583. Report the status of parameters which can be modified by the SET commands.
  584.  
  585.  
  586. 10.4. Installation
  587.  
  588. Kermit-86  is written in 8086 Macro Assembler (ASM86), and assembled locally on
  589. the micro.  Versions for the IBM PC (PC DOS) and the Heath/Zenith Z100 (MS DOS)
  590. are prepared from common source using conditional assembly switches similar  to
  591. those  in KERMIT-80.  The IBM flag has site-dependent meaning.  As shipped from
  592. Columbia, it means local echo during CONNECT, mark parity, and half duplex line
  593. handshaking using CTRL-Q as the turnaround character.  If you need  to  install
  594. Kermit  on  your PC, and you do not have a Kermit floppy but you do have access
  595. to a mainframe computer with a copy of the  IBM  PC  Kermit  distribution,  you
  596. should read this section.
  597.  
  598. Since  the  PC  assembler is not provided with the minimum system, IBM PC users
  599. cannot be expected to have it.  Assembler  source  plus  the  runnable  version
  600.                                  16
  601. (.EXE)  of Kermit are distributed  , along with some special "bootstrap" files,
  602. described below.
  603.  
  604. The KERMIT.EXE file is converted by an assembler program on the PC, KFIX, which
  605. makes all bytes in the file printable by breaking each one up  into  two  4-bit
  606. "nibbles"  and  adding  a  constant.    The  result  is a printable file called
  607. KERMIT.FIX.  It is assumed that a copy of KERMIT.FIX is available to you  on  a
  608. mainframe  computer.   To download the file to the PC, two cooperating programs
  609. are run: a Fortran program, KSEND, on the mainframe and a Basic program,  KGET,
  610. on  the  PC.    These programs are very short; they are shown in their entirety
  611. below.  KSEND reads a line at a time from KERMIT.FIX, types the line, and waits
  612. for a signal from KGET that it can send more data.  KGET reads  each  line  and
  613. converts  the text back to the format of an executable (.EXE) file.  Here's the
  614. procedure:
  615.  
  616.    1. You should have a version of  KGET  on  the  PC  and  KSEND  on  the
  617.       mainframe;  if  you  don't  have them, copy them (i.e. type them in,
  618.  
  619.  
  620. _______________
  621.  
  622.   16
  623.     The PC assembler's object (.OBJ) files are not  printable,  like  CP/M  hex
  624. files, so the Kermit-80 bootstrapping technique would not work here.
  625.  
  626.  
  627.  
  628.                      17
  629.       using an editor  ) from the listings below.
  630.  
  631.    2. Log  in  on the mainframe.  This could be tricky if you have no ter-
  632.       minal  emulation  facility  on  the  PC.    If  you  have  the   IBM
  633.       asynchronous  communication  package,  you can do this at low speeds
  634.       (baud rates).  If your PC has no terminal emulation facility, you'll
  635.       have to use a real terminal to log in, and then switch the cable  to
  636.       the PC.
  637.  
  638.    3. Compile  KSEND.FOR on your mainframe, if it needs compiling.  Define
  639.       logical unit numbers 5 and 6 to be  the  controlling  terminal,  and
  640.       logical unit number 7 to be KERMIT.FIX.  On the DEC-20, for example:
  641.  
  642.         @define 5: tty:
  643.         @define 6: tty:
  644.         @define 7: kermit.fix
  645.  
  646.       On a DECsystem-10, do something like:
  647.  
  648.         .assign tty: 5:
  649.         .assign tty: 6:
  650.         .assign dsk: 7:
  651.         .rename for007.dat=kermit.fix
  652.  
  653.       On an IBM system under VM/CMS,
  654.  
  655.         .filedef 5 term ( lrecl 64 recfm f
  656.         .filedef 6 term ( lrecl 64 recfm f
  657.         .filedef 7 disk kermit fix ( lrecl 62 recfm f perm
  658.  
  659.       Start KSEND on the mainframe.  It will print a message, and then sit
  660.       and  wait for the PC to send back an OK; don't change any connectors
  661.       until you see the message.
  662.  
  663.    4. Escape back to the PC, or connect the PC to the mainframe.  The PC's
  664.       communication port should be connected with a  cable  to  the  modem
  665.       that's  connected  to  the  mainframe  (dialup, dedicated, switched,
  666.       whatever hookup you normally have available for logging  in  on  the
  667.       mainframe  from a terminal).  If you were using a different terminal
  668.       to log in to the mainframe, make sure the PC's communication port is
  669.       set at the same speed.
  670.  
  671.    5. Enter BASIC and run KGET on the PC.  If KGET prints  messages  about
  672.       i/o  errors,  run  it again.  If it still gets errors, reboot the PC
  673.       and try again.  Once KGET is running, the transmission  will  begin.
  674.       KGET will print each 62-character line of nibbles as it arrives from
  675.       the  mainframe.  Each line should be the same length -- if you see a
  676.       ragged edge, you can assume there has been a transmission error, and
  677.       you should start the process again.
  678.  
  679.  
  680. _______________
  681.  
  682.   17
  683.     You'll also have to compile and load the KSEND program on the mainframe.
  684.  
  685.  
  686.  
  687.    6. When  transmission  is complete, you'll see the BASIC "Ready" prompt
  688.       again.   Leave  BASIC  by  typing  SYSTEM.    You  should  now  have
  689.       KERMIT.EXE  on your PC.  Try to run it.  If you see the "Kermit-86>"
  690.       prompt, try to CONNECT to  the  host  mainframe  and  transfer  some
  691.       files.   If Kermit doesn't run correctly, there may have been trans-
  692.       mission errors, in which case you should  start  the  process  again
  693.       from step 2 above.
  694.  
  695.  
  696. KSEND.FOR - Mainframe Side of Bootstrap
  697.  
  698. This  is  the mainframe side, KSEND, in transportable Fortran (it should run on
  699. both DEC and IBM mainframes):
  700.  
  701.   C     This Fortran program should be run on the mainframe in conjunction
  702.   C     with a Basic program on the IBM PC to transfer Kermit.Fix to the PC
  703.  
  704.         INTEGER A(62)
  705.  
  706.         WRITE(6,50)
  707.   50    FORMAT(' Ready to transfer data......')
  708.  
  709.   C     Get terminal handshake
  710.   100   READ (5,10,END=35)X
  711.   10    FORMAT(A1)
  712.  
  713.   C     Get line from file
  714.   35    READ (7,20,END=90)A
  715.   20    FORMAT(62A1)
  716.  
  717.   C     Write to tty
  718.         WRITE (6,25)A
  719.   25    FORMAT(' ',62A1,';')
  720.         GOTO 100
  721.   90    CONTINUE
  722.  
  723.   C     Get final handshake
  724.         WRITE (6,30)
  725.   30    FORMAT(' ',63('@'))
  726.         STOP
  727.         END
  728.  
  729. The final @'s tell KGET that the transmission is done.  This works because  the
  730. technique for forming KERMIT.FIX ensures that the file will contain no @'s.
  731.  
  732.  
  733. KGET.BAS -- PC Side of Bootstrap
  734.  
  735. This  is  the  PC side, KGET, in PC Basic.  Note that the communication port is
  736. opened at 4800 baud (you could substitute any other speed).
  737.  
  738.   5  'Run this program on the PC in conjunction with a Fortran program on t
  739.   6  ' mainframe to get Kermit to the PC
  740.   7  ' Daphne Tzoar , December 1983
  741.   8  ' Columbia University Center for Computing Activities
  742.   9  '
  743.  
  744.  
  745.  
  746.   10 OPEN "com1:4800,n,8,1" AS #1        ' Clear the port status.
  747.   20 CLOSE #1
  748.   30 OPEN "com1:4800,n,8,1,cs,ds,cd" AS #1
  749.   40 OPEN "KERMIT.EXE" FOR OUTPUT AS #2
  750.   50 OK$ = "ok"
  751.   60 PRINT#1,OK$             ' Tell host we're ready for data
  752.   70 X$=INPUT$(63,#1)        ' Data plus semi-colon
  753.   80 VALUE$ = LEFT$(X$,1)      'First char of input
  754.   90 VALUE = ASC(VALUE$)
  755.   100 IF VALUE = 64 OR VALUE = 192 GOTO 430    ' @ means we're done
  756.   110 IF VALUE >= 176 AND VALUE <= 191 THEN GOTO 140   ' Kill all illegal c
  757.   120 IF VALUE >= 48 AND VALUE <= 63 THEN GOTO 140
  758.   130 X$ = MID$(X$,2) : GOTO 80
  759.   140 IF VALUE <> 174 GOTO 210     ' Not a dot (for read) - don't worry
  760.   150 TWO$ = MID$(X$,2,1)          ' Look at char after the dot.
  761.   160 TWO = ASC(TWO$)
  762.   170 IF TWO >= 176 AND TWO <= 191 THEN GOTO 210    ' It's ok.
  763.   180 IF TWO >= 48 AND TWO <= 63 THEN GOTO 210
  764.   190 X$ = MID$(X$,3)         ' Kill the char
  765.   200 GOTO 80
  766.   210 SIZ = LEN(X$)           ' How much input was actual data
  767.   220 READIN = 64 - SIZ
  768.   225 IF READIN = 0 GOTO 260
  769.   230 XTWO$=INPUT$(READIN,#1)     ' Get rest of data
  770.   240 X$ = X$ + XTWO$ : X$ = LEFT$(X$,62)
  771.   250 PRINT X$         ' Optional - use this line to follow the transmissio
  772.   260 GOSUB 290
  773.   270 PRINT#2,X$;      ' Put data to the file.
  774.   280 GOTO 60
  775.   290 ' GET TWO CHARS, SUBTRACT SPACE (20 HEX) FROM EACH, AND COMBINE
  776.   300 ' TO ONE DIGIT.
  777.   310 FOR A = 1 TO 31
  778.   320 Y$ = MID$(X$,A,1)
  779.   330 Z$ = MID$(X$,A+1,1)
  780.   340 YNUM = ASC(Y$) : ZNUM = ASC(Z$)
  781.   350 IF YNUM > 127 THEN YNUM = YNUM - 128    ' Turn off hi bit if on
  782.   360 IF ZNUM > 127 THEN ZNUM = ZNUM - 128
  783.   370 YNUM = YNUM -48 : ZNUM = ZNUM -48       ' Subtract the space
  784.   380 XNUM = (16 * YNUM) +ZNUM
  785.   390 NEWCHR$ = CHR$(XNUM)
  786.   400 X$ = MID$(X$,1,A-1) + NEWCHR$ + MID$(X$,A+2)
  787.   410 NEXT A
  788.   420 RETURN
  789.   430 PRINT  " [All done.]"
  790.   440 CLOSE #1,#2                            ' Clean up.
  791.   450 END
  792.  
  793. If  you already have a working Kermit on your PC and you want to get a new one,
  794. you should use Kermit itself to transfer the KERMIT.FIX file.   Once  you  have
  795. the new KERMIT.FIX on your PC disk:
  796.  
  797.    1. Rename KERMIT.EXE to something else, so you'll still have it in case
  798.       something goes wrong.
  799.  
  800.    2. Get or copy the program KEXE from the mainframe.  Alternatively, you
  801.       may modify KGET as follows:
  802.  
  803.  
  804.  
  805.          a. Remove lines 10 and 20.
  806.          b. Change line 30 to 
  807.  
  808.               30   OPEN "KERMIT.FIX" FOR INPUT AS #1
  809.  
  810.          c. Remove line 60, since we're not handshaking with a remote host
  811.             any more.
  812.          d. In line 70, change "63" to "62".
  813.          e. Remove  line 250, since there's no need to monitor a transmis-
  814.             sion line.
  815.          f. Change line 280 from "GOTO 60" to "GOTO 70".
  816.  
  817.       Save the modified KGET under a new name, say KEXE.BAS, and  run  it.
  818.       It  will end with some error like "Input past end in 70", which just
  819.       means it came to the end of file (of course, you  could  avoid  this
  820.       error by trapping it, but no harm is done in any case).
  821.  
  822.    3. You  should now have a new, working version of KERMIT.EXE on your PC
  823.       disk.
  824.  
  825.  
  826. 10.5. Adding Support for New Systems
  827.  
  828. MS DOS Kermit supports many different systems.  Like CP/M-80 KERMIT, this  sup-
  829. port  was  added to the program piecemeal, at many sites, using conditional as-
  830. sembly. However, before  allowing  the  program  to  grow  into  a  complicated
  831. monolith  like  CP/M-80  KERMIT,  we  have  broken the program up into separate
  832. modules, with system dependencies isolated into separate modules, consisting of
  833. compact collections of low-level primitives for console and port i/o.
  834.  
  835. The last monolithic (single source file) release of MS DOS Kermit was 1.20.  To
  836. this and earlier versions  was  added  support  for  systems  like  the  Seequa
  837. Chameleon,  the  HP-150, the Victor 9000, the Heath/Zenith 100, and others.  As
  838. time permits, support for these systems will be integrated with the new modular
  839. version.  Meanwhile, implementations based on these old versions will  have  at
  840. least the following incompatibilies from the version described here:
  841.  
  842.    - RECEIVE  filespec  is  used instead of GET filespec.  There is no GET
  843.      command in older versions, and no way to specify a new  name  for  an
  844.      incoming file.
  845.  
  846.    - No REMOTE command.
  847.  
  848.    - No 8th-bit prefixing.
  849.  
  850. To  install  support  for  a  new  system,  you would copy the system-dependent
  851. modules for terminal emulation and port and console i/o, modify  them  to  suit
  852. the  requirements  of  your machine, and rebuild the program.  In many cases, a
  853. "generic" MS DOS Kermit will run as-is on new systems.  The generic version ac-
  854. complishes all its port and console i/o through DOS calls, and does no terminal
  855. emulation -- many systems do not need terminal emulation because they have ter-
  856. minal firmware built in.
  857.  
  858. Details to be filled in...
  859.  
  860.  
  861.  
  862. Index
  863.  
  864.  
  865.           8086/8088   90
  866.  
  867.           Backarrow   87
  868.           Baud Rate   87
  869.           Beeper   88
  870.           Bell   88
  871.           Binary Files   89
  872.  
  873.           Cancelling a File Transfer   83, 84
  874.           Control-C   83, 84
  875.           Control-X   83, 84
  876.           Control-Z   83, 84
  877.  
  878.           Debugging   88
  879.           DECsystem-10   91
  880.           Downloading   90
  881.  
  882.           Eighth-Bit Prefix   89
  883.           End of line character   88
  884.           Escape Character for CONNECT   88
  885.  
  886.           File Renaming   88
  887.           File Warning   88
  888.           Function Keys   89
  889.  
  890.           Heath-19 Terminal Emulation   88
  891.           Help   82
  892.  
  893.           IBM Compatibility   89
  894.           IBM PC   80, 90
  895.           Incomplete File Disposition   84
  896.           Initial Filespec   83
  897.  
  898.           KEXE   94
  899.           KFIX   90
  900.           KGET   90
  901.           KSEND   90
  902.  
  903.           Local Echoing   89
  904.  
  905.           MS-DOS   80
  906.  
  907.           Normal Form for File Names   83
  908.  
  909.           Parity   89
  910.           PC-DOS   80
  911.  
  912.           RECEIVE   84
  913.           Recognition   82
  914.  
  915.           SEND   83
  916.  
  917.           Wildcard   81
  918.  
  919.  
  920.  
  921.                                Table of Contents
  922.  
  923. 10. PC-DOS and MS-DOS KERMIT-86                                              80
  924.  
  925. 10.1. The MS-DOS File System                                                 80
  926. 10.2. Program Operation                                                      82
  927. 10.3. MS DOS KERMIT Commands                                                 83
  928. 10.4. Installation                                                           90
  929. 10.5. Adding Support for New Systems                                         94
  930.  
  931. Index                                                                        95
  932.