home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / pckermit / pckermit.mss < prev    next >
Text File  |  2020-01-01  |  36KB  |  810 lines

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