home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / c / ucpeca.doc < prev    next >
Text File  |  2020-01-01  |  26KB  |  510 lines

  1.  
  2.        Implementation of KERMIT for Pecan Software Systems UCSD p-System
  3.  
  4.                                 R. Tim Coslet
  5.              R_Tim_Coslet@cup.portal.com
  6.                                  Version 1.1
  7.  
  8.  
  9.             KERMIT-UCSD  is a  program  which implements the KERMIT file-
  10.         transfer protocol for use under the Version IV.x UCSD p-System on
  11.         various computers.  The distributed version has been developed on
  12.         an  Atari MEGA ST2 under  Pecan Software Systems, Inc. p-System
  13.         Version IV.2.2 with the Standard File System (SFS).
  14.  
  15.             This implementation was done by  Tim Coslet  from the UCIBMPC
  16.         implementation  by  Steven   Pacenka,   which  was  based largely
  17.         on  an  implementation  by  Kate MacGregor of  Cornell  Computing
  18.         Services for the Version II.0 p-System on a Terak 8510a.
  19.  
  20.  
  21.                    Summary of Kermit-UCSD Capabilities at a Glance
  22.              --------------------------------------------------------------
  23.               Local operation                      Yes
  24.               Remote operation                     No
  25.               Transfers text files                 Yes
  26.               Transfers binary files               Yes
  27.               Wildcard send                        Yes
  28.               ^X,^Z interruptions                  Yes
  29.               Filename collision avoidance         Yes
  30.               Send Literal/Converted filenames     Yes
  31.               Can time out                         Yes
  32.               8th-Bit prefixing                    Yes
  33.               Repeat count prefixing               No
  34.               Alternate block checks               No
  35.               Communication settings               Yes, Baud & Parity
  36.               Transmit break                       Yes, dependent on REMUNIT
  37.               Support for dialout modems           No
  38.               IBM mainframe communications         Yes
  39.               Transaction logging                  No
  40.               Session logging                      No
  41.               Packet logging                       No
  42.               Debug logging                        Yes
  43.               Raw file transmit                    No
  44.               Act as server                        No
  45.               Talk to server                       Yes
  46.               Local file management                No
  47.               File Attributes packets              Yes, date only
  48.               Selectable user interfaces           Yes, Kermit & UCSD styles
  49.               Take initialization command file     Yes, *KERMITINFO.TEXT
  50.               Take commands from file              Yes
  51.               Command macros                       No
  52.               Login Scripts                        No
  53.               Large packets                        No
  54.               Extra Large packets                  No
  55.               Sliding windows                      No
  56.               Terminal emulation                   ??
  57.                            Has Datamedia from UCIBMPC but I had
  58.                            problems with it. Didn't need it on
  59.                            Atari ST as it already partially emulates
  60.                            a VT52 terminal.
  61.  
  62.  
  63.                             CONSTRUCTING A NEW KERMIT
  64.  
  65.  
  66.             The program consists of several Pascal source files which
  67.         need to be compiled.  Also required is a REMUNIT.CODE to
  68.         interface with your computer's serial port.  REMUNIT's are
  69.         available for most computers running the p-System, from USUS.
  70.         
  71.             This version also uses several Library Units provided by
  72.         Pecan Software Systems: KERNEL, SCREENOPS, DIRINFO, WILD, 
  73.         and optionally ERRORHANDLING.
  74.         
  75.             If you have the Advanced File System (AFS) you may also
  76.         use Pecan's Library Unit ATTRIBUTES. (current versions of this
  77.         unit appear to have a bug that prevents them from operating
  78.         correctly under the Standard File System (SFS).)
  79.  
  80.             The source files (which are concatenated into a single large
  81.         file on the distribution tape) are:
  82.  
  83.                       KERMIT
  84.     UCSD Name      Distribution                  Contents
  85.                        Name
  86.   --------------   ------------   --------------------------------------------
  87.   UCPECAN.D.TEXT    UCPECA.DOC    This documentation
  88.   UCPECAN.P.TEXT    UCPECA.PAS    Following source files (self separating)
  89.     KERMIT.TEXT         "           Main program
  90.     SENDER.TEXT         "           UNIT Sender (file sending)
  91.     RECEIVER.TEXT       "           UNIT Receiver (file receiving)
  92.     CLIENT.TEXT         "           UNIT Client (talks to server)
  93.     HELPER.TEXT         "           UNIT Helper (online help info)
  94.     PARSER.TEXT         "           UNIT Parser (command parsing)
  95.     INTFUTIL.TEXT       "           Interface part of KermUtil UNIT
  96.     FAKEUTIL.TEXT       "           UNIT KermUtil (fake implementation)
  97.     KERMUTIL.TEXT       "           UNIT KermUtil (misc utilities)
  98.     SETSHOW.TEXT        "           Include file for KERMIT.TEXT
  99.     KERMENUS.TEXT       "           UNIT KerMenus (UCSD style Menus)
  100.     KERMPACK.TEXT       "           UNIT KermPack (packet utilities)
  101.     KERMGLOB.TEXT       "           UNIT KermGlob (declarations)
  102.     UCPECAN.M.TEXT      "           "make" file (compiles in correct order)
  103.   UCPECAN.U.TEXT    UCPECA.UPD    Update information (V1.0 -> V1.1)
  104.  
  105.             The .PAS file is a "self separating" text file containing
  106.         the Pascal source files, the .DOC file (obviously) contains
  107.         this user documentation and instructions for building UCSD
  108.         Pascal Kermit, and the .UPD file contains a list of the
  109.         changes made from V1.0 to V1.1 of Kermit-UCSD.
  110.         
  111.             All of the .PAS modules should compile and execute on any
  112.         adaptation of Version IV of the UCSD p-System, provided that
  113.         an equivalent of the REMUNIT.CODE unit is available for the
  114.         particular computer being used.  (This file implements the
  115.         UCSD p-System Users' Society (USUS) "standard remote unit.")
  116.  
  117.             To generate a variant of this  KERMIT  for  another  computer
  118.         running the Version IV p-System:
  119.  
  120.           1.  Create  or  obtain  a  REMUNIT  that  implements  the  USUS
  121.               standard  remote unit.  Specifications and  implementations
  122.               for a variety of different  computers  are  available  from
  123.               USUS.  For  communications  above  300  baud,  the incoming
  124.               characters to REMIN: should be  processed  in  a  buffered,
  125.               interrupt-driven mode.  The  buffer  should be at least 256
  126.               characters long.
  127.  
  128.           2.  Change all instances of the volume name "syslibr:" in the
  129.               .PAS file to the name of your volume containing the
  130.               Pecan Library Units.
  131.  
  132.           3.  Using ASE (Advanced System Editor) separate the Pascal source
  133.               files in the "self separating" .PAS file by performing the
  134.               following steps:
  135.               
  136.               a)  Create a Volume with at least 720 free blocks. Make this
  137.                   Volume your "Prefix Vol" (default).
  138.                   
  139.                   Note: This will run fastest from ramdisk. So if your
  140.                         RAMDISK: Volume is large enough ( >1030 blocks )
  141.                         then you may creat this Volume as a .SVOL on RAMDISK:.
  142.                         If your RAMDISK: is not large enough to do this
  143.                         then a Virtual Vol on HardDisk is next best. If
  144.                         you have only floppies available, it will be very
  145.                         slow, but will still work (provided they are large
  146.                         enough. 720 blocks is the size of a SSDD "Native"
  147.                         p-System floppie on the Atari ST).
  148.               
  149.               b)  Make sure that the RAMDISK: still has at least 300 block
  150.                   of free space left over (for the extracted source files).
  151.               
  152.               c)  Put the "self separating" .PAS file on your "Prefix Vol"
  153.                   as UCPECAN.P.TEXT (its UCSD Name, see table above).
  154.               
  155.               d)  E(dit UCPECAN.P
  156.               
  157.               e)  Press the <f1> Function Key. This will initiate the
  158.                   file extraction, which takes several minutes.
  159.               
  160.               f)  If it completes with NO Errors then Q(uit E(xit ASE.
  161.               
  162.                   Note: If errors occur attempt to correct them and try
  163.                         again (e.g. "not enough room on vol" means you need 
  164.                         more space, try again with larger Volumes). If 
  165.                         problems persist you may extract the files by hand;
  166.                         they are separated with lines in the format below...
  167.                         
  168.                                 {>>>> filename}
  169.                                 
  170.                         The file UCPECAN.M.TEXT must have this line removed 
  171.                         before X(ecuting it (this is normally done 
  172.                         automagically in the "self separation" process).
  173.               
  174.               g)  It would be a good idea to copy the extracted .TEXT files
  175.                   to another Volume at this time (i.e. backup floppy).
  176.               
  177.           4.  Place all of the source Pascal files together on your usual 
  178.               prefix volume along with the REMUNIT.CODE file.
  179.  
  180.           5.  Configure the conditional compilation switches in these files
  181.               to the state required by your environment:
  182.               
  183.                  Unit         Compiler Control
  184.                  --------     ----------------------------------------------
  185.                  KERMUTIL     {$D OS_ERHDL+}  change + to - if ERRORHANDLING
  186.                                               is not available.
  187.                               {$D OS_TIMER+}  change + to - if time() does
  188.                                               not work on your machine.
  189.                  SENDER       {$D AFS-}       change - to + if AFS available
  190.                  RECEIVER     {$D AFS-}       change - to + if AFS available
  191.  
  192.           6.  Compile the  Pascal  units  by  selecting the X(ecute command
  193.               and entering the following execution-option string:
  194.               
  195.                  i=ucpecan.m
  196.           
  197.           7.  At  this  point  you  can   use   the   standard   p-System
  198.               LIBRARY.CODE  program  to  combine  the  units   (including
  199.               REMUNIT) into one code file for easier and faster  loading,
  200.               or you can enter their individual .CODE file names into the
  201.               USERLIB.TEXT file on your root disk.
  202.  
  203.           8.  Optionally creat a file (with ASE) called KERMITINFO.TEXT
  204.               in your boot volume containing any initialization commands
  205.               that you may need.
  206.               
  207.                    Example:
  208.  
  209.                        set system-id atari mega ST2
  210.                        set file-warning on
  211.                        set baud 4800
  212.  
  213.  
  214.  
  215.  
  216.                                    LIMITATIONS
  217.  
  218.  
  219.           1.  No character repeat counts are used in packets.
  220.  
  221.           2.  '?'  and <esc> cannot  be  used  when  entering  a  command
  222.               line.   Some  versions of Kermit parse  commands  from  the
  223.               keyboard character  by character as they are entered.  This
  224.               version interprets the line after it has been terminated by
  225.               a carriage return.  Use the  HELP  command in place of '?',
  226.               and type out the command names in full.
  227.  
  228.           3.  All linefeed characters received during TEXT file transfer
  229.               are stripped from the local file that is being  created,
  230.               since the p-System does not recognize them in text files. This
  231.               may cause difficulties in files received from certain other
  232.               computers which omit carriage returns at the ends of lines,
  233.               particularly blank lines. But if both Kermits are correctly
  234.               set for TEXT (ASCII) transfer you should not have a problem.
  235.  
  236.           4.  BINARY file transfers are exact only if you use the ATTRIBUTES
  237.               Unit (which at this time only works under AFS). Without this
  238.               Unit file size will be rounded up to the next full block
  239.               (512 bytes) and filled with NUL characters: chr(0).
  240.  
  241.           5.  In this version of Kermit-UCSD the "UCSD style" user interface
  242.               Unit remains resident durring file transfers (unlike the PARSER
  243.               Unit used by the "Kermit style" user interface). This could
  244.               present problems on machines using an internal Codepool. If
  245.               this causes problems for you (e.g. *STACK OVERFLOW* while
  246.               transfering files) then avoid using the menus, just use 
  247.               the "normal" Kermit command mode.
  248.  
  249.           6.  I was not able to get access to a "Known working" Kermit that
  250.               implements attribute packets to verify the operation of the
  251.               protocol. They have only been tested against another copy of
  252.               this program.
  253.  
  254.           7.  Limited server communications are supported (only GET, PUT,
  255.               BYE, and FINISH) in this version. The CLIENT Unit contains
  256.               code for handling "X" packets sent by a server, but I only
  257.               had access to a "Known working" Kermit Server for a limited
  258.               time so this code is untested (and probably won't work).
  259.  
  260.           8.  V1.0 had a problem where occasionally the Creation Date 
  261.               passed in an attribute packet was not correctly recorded. 
  262.               While trying to locate this problem I added some test code
  263.               to the RECEIVER Unit (debugdate) that rereads the file's
  264.               date and have been unable to duplicate the problem since
  265.               then (I was duplicating it regularly before this). I have
  266.               left this code in, since it appears to fix the problem. But
  267.               as I do not know the cause of the problem I can not be sure
  268.               that it is really fixed. If anyone using this program
  269.               encounters this problem, please send me a copy of a debug
  270.               log file showing the problem.
  271.  
  272.  
  273.  
  274.                                     COMMANDS
  275.  
  276.  
  277.             The commands recognized by KERMIT-UCSD are listed below.
  278.  
  279.         CONNECT         To make  a  "virtual  terminal"  connection  to a
  280.                         remote  system.   The  CONNECT  command  may   be
  281.                         abbreviated to 'CON'.   When  in  CONNECT mode, all
  282.                         typed characters are sent to the serial interface
  283.                         except the  escape  character  (see  SET  ESCAPE,
  284.                         below).  The escape character  may be followed by
  285.                         another  character   which   is   interpreted  as
  286.                         follows:
  287.  
  288.                         c           Break  the  connection  and  "escape"
  289.                                     back to the micro
  290.  
  291.                         b           Send   a  "break"  signal  over   the
  292.                                     communications  line;  this  is  only
  293.                                     useful on mainframes such as the  IBM
  294.                                     3081/370/4341 et.  al.
  295.  
  296.                         s           Same as the  "show  all"  command  in
  297.                                     command  mode;  displays the  current
  298.                                     parameter  settings   for  the  local
  299.                                     KERMIT.
  300.  
  301.                         ?           Displays the possible  characters  to
  302.                                     follow the escape code
  303.  
  304.                         <Escape char>
  305.                                     Two consecutive  escapes are required
  306.                                     to send one  such  character  to  the
  307.                                     communications line
  308.  
  309.         EXIT            To return to main p-System command level.
  310.       
  311.         QUIT            Same as EXIT.
  312.  
  313.         HELP            To get a list of KERMIT commands.   HELP  can  be
  314.                         followed by any  command,  in which case the help
  315.                         will refer only to that command.
  316.  
  317.         RECEIVE         To accept a file  from  the  remote system.  If
  318.                         FILE-TYPE is TEXT the suffix ".TEXT" will be
  319.                         appended, if not already present in the received
  320.                         file name. If FILE-TYPE is BINARY the name will
  321.                         be used as received without modification.
  322.  
  323.         SEND            To send a file to the  remote  system.   
  324.                         Wildcards may be used in the filename to send
  325.                         multiple files. The wildcard system used here
  326.                         (From Pecan's WILD Library Unit) is an "extension"
  327.                         of "standard UCSD" wildcards.
  328.                         
  329.                                 ?  -  Matches any single character.
  330.                                 
  331.                                 =  -  Matches any sequence of 0 or more chars.
  332.                                 
  333.                                 %  -  Escape char. to allow special characters
  334.                                       to be matched literally.
  335.                                 
  336.                                 {} -  Matches any in specified set.
  337.                                 
  338.                                         a-c  is subrange.
  339.                                         
  340.                                         ,    seperates elements.
  341.                                         
  342.                                         ~    excludes char from set.
  343.                                         
  344.                                         {a-c,~b} is same as {a,c}
  345.                                 
  346.                                 *  -  Following {} matches 0 or more of
  347.                                       the specified characters.
  348.                                 
  349.                                 +  -  Following {} matches 1 or more of
  350.                                       the specified characters.
  351.  
  352.         GET             To request a file from a remote Kermit in SERVER mode.
  353.  
  354.         PUT             To send a file to a remote Kermit in SERVER mode.
  355.                         Wildcards may be used in the filename to send
  356.                         multiple files. 
  357.  
  358.         BYE             Shutdown and logout a remote Kermit in SERVER mode.
  359.  
  360.         FINISH          Shutdown a remote Kermit in SERVER mode.
  361.                         
  362.         SET             To  establish  system-dependent parameters.   The
  363.                         SET options are as follows:
  364.  
  365.                         BAUD         To set the communications baud rate.
  366.                                      Permisable values are dependant on
  367.                                      your Hardware and REMUNIT.
  368.                                      (default is 1200).
  369.  
  370.                         DEBUG        To set debug mode ON or OFF (default
  371.                                      is OFF).
  372.  
  373.                         EMULATE      To set DataMedia 1520A screen control
  374.                                      code interpretation ON or OFF (default
  375.                                      is OFF).
  376.  
  377.                         ESCAPE       To change the escape sequence that
  378.                                      lets you return to the PC Kermit from
  379.                                      the remote host.  The default is CTRL-
  380.                                      ] c.
  381.         
  382.                         FILE-NAMES   LITERAL/CONVERTED, Default is
  383.                                      CONVERTED, In this Kermit LITERAL
  384.                                      Names have Volume name Stripped, while
  385.                                      CONVERTED Names also have all but the
  386.                                      final '.' removed.
  387.         
  388.                         FILE-TYPE    BINARY/TEXT Default is TEXT.
  389.  
  390.                         FILE-WARNING ON/OFF, default is OFF.  If ON, Kermit
  391.                                      will rename an incoming file so as not
  392.                                      to write over a file that currently
  393.                                      exists with the same name.
  394.       
  395.  
  396.                         IBM          ON/OFF, default is OFF.  This flag
  397.                                      should be ON only when transfering
  398.                                      files between the PC and an IBM VM/CMS
  399.                                      system.  It also causes the parity to
  400.                                      be set appropriately (mark) and activates
  401.                                      local echoing.
  402.         
  403.                         INTERFACE    KERMIT/UCSD, default is KERMIT. Permits
  404.                                      selection of prefered User Interface:
  405.                                      KERMIT command line or UCSD menus.
  406.  
  407.                         LOCAL-ECHO   ON/OFF, default is OFF.  When on, this
  408.                                      causes characters typed at the
  409.                                      keyboard during connect mode to be
  410.                                      echoed to the screen.
  411.  
  412.                         PARITY       EVEN, ODD, MARK, SPACE, or NONE. NONE
  413.                                      is the default but if the IBM flag is
  414.                                      set, parity is set to MARK. This flag
  415.                                      selects the parity for outgoing and
  416.                                      incoming characters during CONNECT and
  417.                                      file transfer to match the
  418.                                      requirements of the remote computer.
  419.  
  420.                         SYSTEM-ID    Specify the System-ID for your REMUNIT
  421.                                      if your REMUNIT needs it specified.
  422.                                      Called "model" in the REMUNIT specs.
  423.                                      Default System-ID is UNKNOWN
  424.  
  425.         SHOW            To  see  the  values  of parameters that  can  be
  426.                         modified via the SET command. For an explanation 
  427.                         of the parameter, see the help for the matching 
  428.                         SET command.
  429.                         Additional SHOW options are as follows:
  430.                         
  431.                         ALL          Show all parameters.
  432.                         
  433.                         VERSION      Show version information.
  434.                         
  435.                         Note: there is no SHOW INTERFACE command (it was
  436.                               not needed as you already can see which 
  437.                               interface you are using).
  438.  
  439.         TAKE            This command instructs Kermit to take further
  440.                         commands from a specified file.
  441.     
  442.         COMMENT         Comments a TAKE file. (ignored)
  443.       
  444.         LOG             This command opens a selected log file.
  445.                         LOG options are as follows:
  446.       
  447.                         DEBUG        open specified file for debug output.
  448.         
  449.         CLOSE           This command closes a selected log file previously
  450.                         opened via the LOG command.
  451.  
  452.  
  453.  
  454.                           WISH LIST FOR FUTURE VERSIONS
  455.  
  456.  
  457.             If anyone  tries these, please consider portability and share
  458.         your work with the rest of the p-System community.
  459.  
  460.           1.  Increased memory buffering  of  sent  and received packets.
  461.               Now only the standard 512 character buffers provided by the
  462.               operating system  are utilized.  On floppy disk systems the
  463.               throughput is slowed considerably by frequent disk access.
  464.               This may require you to write your own UCSD .TEXT output
  465.               formatter (which will need to be bypassed if the file being
  466.               received is not a .TEXT or .BACK type file).
  467.  
  468.           2.  Implementation  of  the  immediate '?'   (help)  and  <esc>
  469.               (abbreviate) commands in the parsing routines.
  470.  
  471.           3.  A DIR command to list a local volume directory.
  472.  
  473.           4.  Text  file  capture  with memory  buffering,  and  XON/XOFF
  474.               protocol.  (For remote computers not supporting Kermit.)
  475.               
  476.               Note: on the Atari XON/XOFF protocol is already implemented
  477.                     in the Host's Operating System (TOS).
  478.  
  479.           5.  Text file transmission without protocol.
  480.  
  481.           6.  SET TIMEOUT command. (Hardware timing is now available, but
  482.               the timeout is currently fixed at 5 seconds).
  483.  
  484.  
  485.  
  486.                             CREDITS AND ADDRESSES
  487.           
  488.           1.  Pecan Software Systems, Inc.
  489.               1410 39th Street
  490.               Brooklyn, NY 11218
  491.               (800) 63-PECAN    (orders)
  492.               (718) 851-3100
  493.               
  494.               Library Units used by this program.
  495.               
  496.           2.  USUS      (UCSD p-System Users' Society)
  497.               P.O. Box 1148
  498.               La Jolla, CA 92038
  499.               
  500.               REMUNIT specification and sources.
  501.           
  502.           3.  R. Tim Coslet
  503.               Usenet:   R_Tim_Coslet@cup.portal.com
  504.                         {sun,atari}!portal!R_Tim_Coslet
  505.               BIX:      r.tim_coslet
  506.               
  507.               Programmer (me).
  508.               The above e-mail addresses may be used to contact
  509.               me if you have problems with this version of Kermit.
  510.