home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / hp86 / hp8kerdoc.txt < prev    next >
Text File  |  2020-01-01  |  67KB  |  2,017 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.                    HH     HH  PPPPPPPP    8888888    6666666
  30.                    HH     HH  PP     PP  88     88  66
  31.                    HH     HH  PP     PP  88     88  66
  32.                    HHHHHHHHH  PPPPPPPP    8888888   66666666
  33.                    HH     HH  PP         88     88  66     66
  34.                    HH     HH  PP         88     88  66     66
  35.                    HH     HH  PP          8888888    6666666
  36.  
  37.  
  38.  
  39.         KK    KKK  EEEEEEEE  RRRRRRRR    MMM     MMM  IIIIII  TTTTTTTTTT
  40.         KK   KKK   EE        RR     RR   MMMM   MMMM    II        TT
  41.         KK  KKK    EE        RR     RR   MM MM MM MM    II        TT
  42.         KKKKK      EEEEEEE   RRRRRRRR    MM  MMM  MM    II        TT
  43.         KKKKKK     EE        RR RRR      MM   M   MM    II        TT
  44.         KK  KKK    EE        RR   RRR    MM       MM    II        TT
  45.         KK    KKK  EEEEEEEE  RR     RRR  MM       MM  IIIIII      TT
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.                                      - 1 -
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.                             ======================
  77.                             HP86 KERMIT USER GUIDE
  78.                             ======================
  79.                                 Edition 1.00
  80.  
  81.                       This Manual applies to version 1.00
  82.  
  83.                                    CONTENTS
  84.                                    --------
  85.  
  86.       1. Introduction.
  87.  
  88.       2. What is Kermit.
  89.  
  90.       3. Running Kermit on the HP86.
  91.          3.1 Starting the HP86 Kermit.
  92.          3.2 Entering Kermit commands.
  93.          3.3 HP86 Kermit commands.
  94.          3.4 Using Kermit.
  95.          3.5 Finishing Kermit.
  96.  
  97.       4. Communicating with another computer.
  98.          4.1 Setting the RS232.
  99.          4.2 Using the HP86 as a terminal.
  100.              4.2.1 The CONNECT command.
  101.              4.2.2 Differences between command mode and terminal mode.
  102.              4.2.3 Sending a break.
  103.              4.2.4 Returning to the HP86 Kermit.
  104.  
  105.       5. Transferring files using Kermit.
  106.          5.1 The basic method.
  107.          5.2 File types.
  108.              5.2.1 The file type problem.
  109.              5.2.2 The data type problem.
  110.          5.3 HP86 to remote file transfer - The SEND command.
  111.          5.4 Remote to HP86 file transfer - The RECEIVE command.
  112.          5.5 Transfer problems.
  113.          5.6 File name conversion.
  114.              5.6.1 HP86 to standard conversion.
  115.              5.6.2 Standard to HP86 conversion.
  116.              5.6.3 File renaming.
  117.  
  118.       6. Changing Kermit attributes.
  119.          6.1 The SET command.
  120.          6.2 The SHOW command.
  121.          6.3 Settable attributes.
  122.  
  123.       Appendix A - HP86 Kermit capabilities.
  124.  
  125.       Appendix B - HP86 Kermit error messages.
  126.  
  127.       Appendix C - Converting numeric variables.
  128.  
  129.  
  130.                                      - 2 -
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.       1. INTRODUCTION
  142.       ===============
  143.  
  144.       Program:       Martin Rootes, Sheffield City Polytechnic, U.K.
  145.       Language:      HP86 Basic.
  146.       Documentation: Martin Rootes.
  147.       Version:       1.00
  148.       Date:          April 1986
  149.  
  150.         This manual describes the Kermit program for the HP86 microcomputer
  151.      produced  by  the  Computer  Services  Department  of  Sheffield  City
  152.      Polytechnic.       The   implementation   described   is   HP86 Kermit
  153.      version 1.00. The purpose of this manual is to supply  the  user  with
  154.      the information necessary to enable them to transfer files from a HP86
  155.      microcomputer to another Kermit.  As transfer will almost always be to
  156.      a  different  system the user will also have to read the corresponding
  157.      guide for the other Kermit.
  158.  
  159.        This manual has been divided into  various  chapters,  dealing  with
  160.      various  aspects of the HP86 Kermit. For users new to Kermit Chapter 2
  161.      describes what Kermit is, the way it works, and why it is better  than
  162.      some  other  methods  of  file  transfer.    Chapter 3 details the way
  163.      HP86 Kermit is run, how to enter commands, brief descriptions  of  the
  164.      commands,  and  how  they are used.   Chapter 4 deals with setting the
  165.      HP86 Kermit up to communicate with another computer, and how to use it
  166.      as a  terminal  for  a  mainframe.    Chapter  5  gives  comprehensive
  167.      information on how to transfer files, and the problems associated with
  168.      transfer.    Following these are various chapters giving more detailed
  169.      information on commands and some hints and tips.
  170.  
  171.  
  172.        The HP86 Kermit version 1.00 is written in HP86 BASIC and needs  the
  173.      binary  program UTIL/1 to be loaded to provide various extra commands,
  174.      this program is provided with the HP86 microcomputer on the demo disk.
  175.  
  176.        HP86 Kermit version 1.00 was developed, written  and  tested  on  an
  177.      Hewlett  Packard  HP86 microcomputer with a HP 82939A Serial interface
  178.      and the I/O programming ROM installed. Due to being written  in  BASIC
  179.      it  will  very probably work with the HP87 as long as the same I/O ROM
  180.      and interface are fitted, however this has not as yet been tested.
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                      - 3 -
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.       2. WHAT IS KERMIT
  207.       ==================
  208.  
  209.        Kermit is a data transfer system devised by the Center for Computing
  210.      Activities at the University of  Columbia,  New  York  (CUCCA).    The
  211.      copyright  on Kermit is retained by CUCCA, however they have published
  212.      full information on it and permit anyone  to  implement  it  on  their
  213.      machines, as long as this is not for commercial purposes.  Due to this
  214.      policy  Kermit  is now available for a large range of computers: There
  215.      are  implementations  for  nearly  all  mainframes  and  most  popular
  216.      microcomputers.
  217.  
  218.          The  basic idea behind Kermit is to allow the transfer of any data
  219.      between different systems, in a uniform manner, and producing a usable
  220.      file on the receiving system. There are other methods of data transfer
  221.      that could be used, most notably 'dumb capture',  however  Kermit  has
  222.      several advantages over this method.
  223.  
  224.          Most  simple  terminal emulator programs will allow some degree of
  225.      data transfer in the form of 'dumb capture'.  This is a method whereby
  226.      as characters are received from the mainframe they  are  placed  in  a
  227.      file, as well as being displayed on screen.  The reverse process being
  228.      to  take  characters  from a file on the microcomputer, instead of the
  229.      keyboard, and transmit them to the mainframe.
  230.  
  231.        The dumb capture method, although fast and easy  to  implement,  has
  232.      many  problems  associated  with  it.  These  are  due  to  the  RS232
  233.      communications system used to link the computers, and  the  manner  in
  234.      which it is used.
  235.  
  236.        The first problem is caused by parity, as many mainframe systems use
  237.      one bit of a byte for error checking, the 'parity' bit, only the lower
  238.      7  bits  of  a byte can be used to transmit data, thus only characters
  239.      with codes between 0 and 127 will be able to be sent.
  240.  
  241.        Secondly communications systems commonly use certain  characters  as
  242.      control  characters,  these  can  therefore not be sent as part of the
  243.      data without causing problems, control codes lie in the range 0 to  31
  244.      and sometimes include 127.
  245.  
  246.          Thirdly  in  a dumb capture system no error checking is performed,
  247.      this means that the file received may not necessarily be the  same  as
  248.      the  file  sent,  due  to  transmission  faults  as  well as the above
  249.      problems.
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                                      - 4 -
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.         Kermit  overcomes  these  problems  by  encoding  the  data  to  be
  272.      transferred  using a standard set of rules, the Kermit 'protocol'. The
  273.      rules have been designed  to  allow  transmission  of  any  character,
  274.      regardless  of  any  parity  or  control  codes,  with  adequate error
  275.      checking to ensure that the file received is  the  same  as  the  file
  276.      sent.
  277.  
  278.        The full Kermit protocol is beyond the scope of this manual, however
  279.      the basic method will be described here to aid in the comprehension of
  280.      following  discussions,  if more detail is required consult the Kermit
  281.      protocol manual (5th edition).
  282.  
  283.        Kermit transfers data by dividing data up into  individual  packets,
  284.      each  packet  containing  the  data  itself  plus  some  extra control
  285.      information.  This information is used by the receiving Kermit to give
  286.      the start of packet, the sequence number of the packet, the length  of
  287.      packet,  the  type  of  packet  and  finally  a check byte. Using this
  288.      information the receiving Kermit can verify the  data  and  check  for
  289.      missing packets.
  290.  
  291.          If  a  character needs to be sent whose code falls into one of the
  292.      problem areas as mentioned above (0-32, 128-255), Kermit will  convert
  293.      it  into  a  sequence of two 'legal' characters using prefix encoding.
  294.      This is achieved in the following manner, if  for  example  a  control
  295.      code  needs  to be sent as data it is first converted into a printable
  296.      character, corresponding with the  standard  representation  of  these
  297.      codes,  for  instance ASCII 13, usually called control M, is converted
  298.      to the letter M. This is  then  prefixed  with  the  prefix  character
  299.      (default - #), thus ASCII 13 will be sent as '#M'. A similar method is
  300.      used  to  encode  data  with  the 8th bit set using the 8th bit prefix
  301.      (default - &).
  302.  
  303.         After sending a packet Kermit will  wait  for  a  packet  from  the
  304.      receiving  Kermit  to  confirm  that the packet has arrived correctly,
  305.      this is called the acknowledge packet (ACK). If  for  any  reason  the
  306.      packet is not received correctly the receiving Kermit sends a negative
  307.      acknowledge  (NAK),  this  causes  the  sender  to retransmit the last
  308.      packet. Thus if transmission errors occur Kermit will not only  detect
  309.      the error it will try to remedy the situation by repeating the data.
  310.  
  311.        Although ensuring safe transmission of data this method can, without
  312.      adequate  safeguards, cause the system to become 'hung', however there
  313.      two mechanisms employed to stop this, timeouts and the retry limit.
  314.  
  315.        The purpose of the timeout is to avoid the situation where  the  two
  316.      Kermits  are  each waiting for a packet from the other, this can occur
  317.      when a packet is lost in transmission. A timeout is basically  a  time
  318.      limit  on  the  receiving  of packets, if after the limit has passed a
  319.      packet has still not been received the Kermit  will  assume  that  the
  320.      last one it had sent was lost and will retransmit it.
  321.  
  322.  
  323.  
  324.  
  325.                                      - 5 -
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.          The  retry limit is, as its name implies, a limit on the number of
  337.      times that Kermit will try to retransmit a  particular  packet  before
  338.      giving  up.  This  is to prevent the Kermit from endlessly sending the
  339.      same packet to a Kermit that is either  not  replying,  or  is  having
  340.      severe transmission problems.
  341.  
  342.        The result of using the Kermit protocol is a simple, highly reliable
  343.      system  of  data transfer, that can be, and has been, implemented on a
  344.      wide variety of machines ranging from  microcomputers  to  mainframes.
  345.      The  only  requirements  needed  to  transfer  data  from the HP86 and
  346.      another computer are two Kermit programs, one for the HP86 and one for
  347.      the target computer, and the existence of  a  RS232  serial  interface
  348.      port  on  both  machines.  The  great  advantage  of  Kermit over data
  349.      transfer  programs  written  for  specific  machines   is   its   wide
  350.      availability,  making  it  possible to transfer data to many different
  351.      machines using the same program.
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.                                      - 6 -
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.       3. RUNNING KERMIT ON THE HP86
  402.       =============================
  403.  
  404.        This section describes the general operation of the HP86 Kermit, how
  405.      to start it and how to enter commands.
  406.  
  407.  
  408.       3.1 STARTING THE HP86 KERMIT
  409.       ----------------------------
  410.  
  411.        To run Kermit on the HP86 the disk containing the Kermit program and
  412.      the utility programs should be inserted in the  disk  drive  (if  your
  413.      HP86  has  more  than one disk drive insert in drive 0). The following
  414.      procedure should now be taken:-
  415.  
  416.        LOAD "Kermit"      <--- Load the Kermit program.
  417.        LOADBIN "UTIL/1"   <--- Load the utility program.
  418.        <INIT>             <--- Press the INIT button.
  419.        <RUN>              <--- Press the RUN button.
  420.  
  421.       After about 80 secs the program will display the following prompt:-
  422.  
  423.        Kermit-HP86 > Enter command ?
  424.  
  425.       If this does not happen the RUN button should be pressed again.
  426.  
  427.  
  428.       3.2 ENTERING KERMIT COMMANDS
  429.       ----------------------------
  430.  
  431.        To control the HP86 Kermit commands have to be issued to it, this is
  432.      done by entering the desired  command  in  the  space  underneath  the
  433.      Kermit  prompt (note: on most implementations of Kermit the command is
  434.      entered next to the prompt).  Commands can be entered in either  upper
  435.      or  lower  case,  and  may  be abbreviated to a minimum of 1 character
  436.      (depending on command).
  437.  
  438.        Some of the commands will require parameters to be entered as  well,
  439.      these  should be typed after the command and should be separated by at
  440.      least one space, except for filenames which must be enclosed by quotes
  441.      (").  The parameters can be of various types, a filename, a character,
  442.      a numeric value, or an item from a  list.  In  the  case  of  the  SET
  443.      command  two  sets  of parameters are required, firstly the item to be
  444.      set, and secondly what it is to be set to.
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.                                      - 7 -
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.        The question mark (?) can be used  to  give  useful  information  on
  467.      commands,  if  entered  as  a  command  all the legal commands will be
  468.      displayed, and if entered as a parameter the type of parameter will be
  469.      displayed.
  470.  
  471.        send ?                                           <- You enter.
  472.        SEND "Source filename" <"Destination filespec">  <- Kermit replies.
  473.       Where '<' and '>' denote an optional item.
  474.  
  475.       If the required parameter is an item from a list the alternatives are
  476.      all displayed, also note that list items can  be  abbreviated  in  the
  477.      same way as commands.
  478.  
  479.        set flow ?                                       <- You enter.
  480.        FLOW-CONTROL - NONE, XON/XOFF, DTR/RTS           <- Kermit replies.
  481.  
  482.  
  483.       3.3 HP86 KERMIT COMMANDS
  484.       ------------------------
  485.  
  486.         The following is a list of valid commands for the HP86 with a brief
  487.      description of each, they will be explained in more detail  in  latter
  488.      chapters.
  489.  
  490.        Command  Parameters  Description
  491.  
  492.        CONNECT               Sets the  HP86  to act as a  terminal to allow
  493.                              communication with the remote host.
  494.  
  495.        SEND     "source filename" <"dest filespec">
  496.                              Send  the  specified file  to the remote,  the
  497.                              file name that is  used by the remote can also
  498.                              be specified, if required to be different from
  499.                              the source file name.
  500.  
  501.        RECEIVE  <"dest filename">
  502.                              Receive  a file,  or group of files,  from the
  503.                              remote, changing filename if required.
  504.  
  505.        SET      List option  Parameter
  506.                              Set specified option  to a new value,  used to
  507.                              change communication settings, timeouts, retry
  508.                              limit etc. Requires extra parameter(s) after
  509.                              the option.
  510.  
  511.        SHOW     List option  Displays  current  setting  of  the  requested
  512.                              option,  if  no  option  is specified  all the
  513.                              settable parameters will be displayed.
  514.  
  515.        EXIT                  Both these commands will cause the HP86 Kermit
  516.        QUIT                  to stop,  and return the  HP86  to the command
  517.                              state.
  518.  
  519.  
  520.                                      - 8 -
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.        CAT                   This command will  produce a  catalogue of the
  533.                              current disk.
  534.  
  535.          As  well as the above commands it is also possible to use the HP86
  536.      filing system commands in the following way:
  537.  
  538.        <PAUSE>                       <- Press the PAUSE key.
  539.        Warning 101 at line 0 : XFR   <- The HP86  gives  a warning  that an
  540.                                         input transfer  from the  RS232  is
  541.                                         still in progress.
  542.  
  543.        Any of the HP86 filing system  commands  can  now  be  entered,  for
  544.      example:
  545.  
  546.        PURGE "GARBAGE"               <- Erase the file called "GARBAGE"
  547.  
  548.          Once  finished  entering  commands  to the HP86 the Kermit program
  549.      should be restarted:
  550.  
  551.        <CONT>                        <- Press the continue key
  552.        ?                             <- The  HP86  replies  with this,  the
  553.                                         next  Kermit command  should now be
  554.                                         entered under this prompt.
  555.  
  556.  
  557.       3.4 USING KERMIT
  558.       ----------------
  559.  
  560.        To use Kermit to transfer data you will need a  Kermit  program  for
  561.      both  the HP86 and the other computer, the actual procedure to be used
  562.      depends on whether the other computer is a microcomputer with its  own
  563.      keyboard,  or  a  minicomputer  or  mainframe that needs a terminal to
  564.      communicate with it.
  565.  
  566.        For HP86 to microcomputer transfer the method is very simple,  after
  567.      making  any  connections  load  and  run  the  Kermit programs in both
  568.      computers, then using the SET command the RS232 interfaces  should  be
  569.      set  to  appropriate values (see chapter 4). Once all the settings are
  570.      correct transfer can begin, enter the RECEIVE command on the  computer
  571.      to  which  the  data is to be sent, then enter the SEND command on the
  572.      sending computer, the transfer will now take place.
  573.  
  574.        For HP86 to minicomputer or mainframe transfer a slightly  different
  575.      approach  is  needed,  after  physically  connecting  the  HP86 to the
  576.      computer the HP86 Kermit is run and any communication  settings  made.
  577.      The  HP86  should  now  be  put  into terminal emulator mode using the
  578.      CONNECT command, then using the HP86 as a terminal you should  log  on
  579.      to the computer and run its Kermit program. To transfer data you enter
  580.      the  required  command  on  the  remote,  either SEND or RECEIVE, then
  581.      escape back to the HP86 Kermit (using k1 - see chapter 4),  and  issue
  582.      the complimentary command.
  583.  
  584.  
  585.                                      - 9 -
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.          After  the transfer is completed connect back to the remote, if no
  597.      more transfers are required exit from the  Kermit  program,  log  off,
  598.      escape back to the HP86 and exit from its Kermit program.
  599.  
  600.          Both  these  methods will be discussed in more detail in chapter 5
  601.      'Transferring files by Kermit'.
  602.  
  603.  
  604.       3.5 FINISHING KERMIT
  605.       --------------------
  606.  
  607.        Once you have finished using Kermit  for  your  file  transfers  you
  608.      should  exit  from  the  program  by using either the EXIT or the QUIT
  609.      command, either of these  will  halt  any  RS232  transfers  that  are
  610.      active,  close  any  open files and leave the HP86 in a suitable state
  611.      for further use.  If you wish to enter a new program via the  keyboard
  612.      you  should use the SCRATCH command to clear the memory, as the Kermit
  613.      program is still present.
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.                                      - 10 -
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.       4. COMMUNICATING WITH ANOTHER COMPUTER
  662.       ======================================
  663.  
  664.        This section describes how to set up the HP86 Kermit so that it  can
  665.      communicate  with  another  computer,  the  remote  host. it will also
  666.      outline how to use the terminal emulation facility when the remote  is
  667.      a mainframe computer.
  668.  
  669.       4.1 SETTING THE RS232
  670.       ---------------------
  671.  
  672.          Once  the  HP86  is physically connected to the remote (if you are
  673.      unsure of how to do this contact your system support  personnel),  you
  674.      should  now set up the RS232 interface so that it can communicate with
  675.      the remote host. There are four separate settings that may have to  be
  676.      changed  these  are  Baud  rate,  parity,  duplex  and flow control or
  677.      handshake (depending on duplex setting).  All  the  changes  are  made
  678.      using  the  SET  command  and  the existing settings can be determined
  679.      using the SHOW command.
  680.  
  681.      BAUD RATE     110, 300                           Default 300
  682.        This is the rate that the data is transmitted along the RS232  link,
  683.      at present only two rates are allowed 110 or 300 baud.
  684.  
  685.      PARITY        NONE, ODD, EVEN, MARK, SPACE       Default MARK
  686.          This  is the parity that will be used by the RS232 interface, this
  687.      can be none, odd, even, mark or space, if none is chosen all 8 bits of
  688.      a byte will be sent, otherwise only the bottom 7 are used.
  689.  
  690.      DUPLEX        FULL, HALF                         Default HALF
  691.        This defines whether the remotes communication equipment can receive
  692.      at the same time as it is transmitting, full duplex operation, or  can
  693.      only  receive  whilst not transmitting, half duplex. Setting this will
  694.      also change the local echo setting, if set to full duplex  local  echo
  695.      will  be  switched  off, is set to half duplex it will be switched on,
  696.      this can be changed with SET LOCAL-ECHO.
  697.  
  698.      FLOW-CONTROL  NONE, XON/XOFF, DTR/RTS            Default NONE
  699.        Defines the method the remote uses to stop the HP86 transmitting any
  700.      more data, to stop its buffers overflowing. The possible settings  are
  701.      none, XON/XOFF for software flow control using control codes 17 and 19
  702.      (XON,XOFF),  and  DTR/RTS  for hardware flow control using the DTR and
  703.      RTS control lines. Setting this to any setting other  than  none  will
  704.      set handshake to none.
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.                                      - 11 -
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.      HANDSHAKE     NONE, BELL, LF, CR, XON, XOFF      Default XON
  727.          Defines the character to be used as a handshake character for half
  728.      duplex  communications,  the  handshake  character  is  used  by  both
  729.      computers  to  indicate  that they have finished transmitting and that
  730.      the other  can  now  transmit,  this  is  sometimes  called  the  line
  731.      turnaround  character.   The possible option are none, bell (ASCII 7),
  732.      linefeed (ASCII 10), carriage return (ASCII 13), XON  (ASCII  17)  and
  733.      XOFF (ASCII 19).
  734.  
  735.        To change any of these settings use the SET command in the following
  736.      manner:
  737.  
  738.        KERMIT-HP86 > Enter command ?  <- Underneath the prompt  type in set
  739.        set flow-control xon/xoff         followed by the options.
  740.        FLOW-CONTROL - XON/XOFF        <- Kermit  will respond with  the new
  741.                                          setting if it is accepted.
  742.          Note  that  the options can be abbreviated for ease of typing, for
  743.      instance the above could have been entered as set flow xon.
  744.  
  745.        The settings can be determined using the SHOW command, if no  option
  746.      is  specified  the  screen  will  display  the settings of all the set
  747.      options, otherwise specify the particular option:
  748.  
  749.        KERMIT-HP86 > Enter command ?
  750.        show parity                    <- Enter command
  751.        PARITY - MARK                  <- Kermit responds  with  the current
  752.                                          setting.
  753.  
  754.        The actual settings needed will depend on the machine that you  wish
  755.      to communicate with, you will need to know what its settings are.
  756.  
  757.        If you are linking to another microcomputer you will need to set the
  758.      RS232  options to the same on both machines. The simplest method is to
  759.      set the options on one machine to the default settings of  the  other,
  760.      depending  if  this can be done, for instance if the other micro has a
  761.      default Baud rate of 1200, which can not be set on  the  HP,  set  its
  762.      Baud rate to 300. An alternative approach is to set each option to the
  763.      'best'  that  can  be  set on both machines, ie the highest Baud rate,
  764.      full duplex, hardware flow control, and no parity (to allow 8 bit data
  765.      communication with no encoding).
  766.  
  767.        When connecting to a mainframe computer you will be limited  to  the
  768.      standard operating on that computer, the default settings are designed
  769.      to  operate  with an IBM 4341 on a 300 baud line, your Systems Support
  770.      staff should be able to tell you what settings  are  needed  for  your
  771.      installation.
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.                                      - 12 -
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.       4.2 USING THE HP86 AS A TERMINAL
  792.       --------------------------------
  793.  
  794.          As mentioned before when transferring files between the HP86 and a
  795.      minicomputer or mainframe you will need to communicate with the remote
  796.      by using the HP86 as a terminal, to achieve this you  should  use  the
  797.      CONNECT command.
  798.  
  799.       4.2.1 THE CONNECT COMMAND
  800.       -------------------------
  801.  
  802.          The  CONNECT command needs no parameters and can be abbreviated to
  803.      'C', once entered the HP86 will  clear  the  screen  and  display  the
  804.      following information:
  805.  
  806.        HP86 Kermit - Terminal emulation mode
  807.        Function key   Escape character   Action
  808.        --------------------------------------------------
  809.           k1                 C           Return to Kermit
  810.           k7                 B           Transmit break
  811.           k14                            Enable transmit
  812.  
  813.        The above display indicates the action of various function keys, and
  814.      the  corresponding  escape key sequences (Ctrl-] + character).  At the
  815.      bottom of the screen a cursor will be displayed,  this  is  where  any
  816.      keyboard input will appear.
  817.  
  818.          The HP86 will now act like a 'glass' teletype, characters typed on
  819.      the keyboard will be  sent  directly  to  the  remote  via  the  RS232
  820.      interface, and characters received from the RS232 will be displayed on
  821.      the screen.
  822.  
  823.       4.2.2 DIFFERENCES BETWEEN COMMAND MODE AND TERMINAL MODE
  824.       --------------------------------------------------------
  825.  
  826.          There are important differences in the way the keyboard and screen
  827.      are handled in the terminal mode compared to  the  normal  HP86  entry
  828.      mode, these are as follows.
  829.  
  830.          All of the special keys, cursor keys and screen control keys cease
  831.      to have any effect, except for the  ENTER  key,  RESET  key,  and  the
  832.      defined function keys.  Pressing the ENTER key sends a carriage return
  833.      (Control M)  to  the  remote,  in addition if a handshake character is
  834.      specified it will also be sent and the transmitter will  be  disabled.
  835.      The  RESET key performs its normal function of halting the program and
  836.      resetting interfaces.
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.                                      - 13 -
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.        The delete key may not have any  effect,  depending  on  the  remote
  857.      system, even if accepted the action on the screen will differ, instead
  858.      of  the  last  character typed being removed from the screen, a delete
  859.      character will be displayed  after  it.    Some  remotes  will  use  a
  860.      different  key  for  this  purpose, for instance the IBM uses '_' as a
  861.      delete character, you  will  be  able  to  find  this  from  the  user
  862.      documention on using terminals.
  863.  
  864.          If  there is any handshake or flow control specified there will be
  865.      times when the keyboard does not respond due to the transmitter  being
  866.      disabled,  with  half duplex systems this will occur immediately after
  867.      pressing the enter key and  will  remain  until  the  remote  finishes
  868.      transmitting  data  and sends the handshake character. If the keyboard
  869.      is not responding and the remote is  not  transmitting,  or  about  to
  870.      transmit,  the  transmitter can be re-enabled by pressing function key
  871.      14.
  872.  
  873.       4.2.3 SENDING A BREAK
  874.       ---------------------
  875.  
  876.        Many mainframe computers may need to be sent a  'Break'  signal  for
  877.      certain  reasons,  usually to interrupt the current program and return
  878.      to the command state. You can send a break from the HP86 Kermit either
  879.      by pressing function key 7, or by typing control ] followed by B.
  880.  
  881.       4.2.4 RETURNING TO THE HP86 KERMIT
  882.       ----------------------------------
  883.  
  884.        When you have finished issuing the required commands to  the  remote
  885.      Kermit  or you have finished your session on the remote, you will need
  886.      to return to the HP86 Kermit's command mode, this  is  achieved  using
  887.      function key 1, or control ] plus 'C'. On returning the screen will be
  888.      cleared  and the standard Kermit prompt will be displayed.  If you are
  889.      unsure what mode  you  are  in  examine  the  prompt,  if  it  is  not
  890.      'KERMIT-HP86 > Enter command ?' then you are in terminal mode.
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.                                      - 14 -
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.       5 TRANFERRING FILES USING KERMIT
  922.       ================================
  923.  
  924.          The  main  purpose  of  the HP86 Kermit is to enable file transfer
  925.      between the HP86 and another computer,  the  remote  host.  The  basic
  926.      method  will not vary from one system to another as this is defined in
  927.      the Kermit  protocol,  however  certain  details  will  be  different.
  928.      Before  attempting any file transfer you should consult the user guide
  929.      for the remote system to familiarise yourself  with  any  differences.
  930.      This  section  describes  in  detail how to transfer files between the
  931.      HP86 and the remote computer.
  932.  
  933.  
  934.       5.1 THE BASIC METHOD
  935.       --------------------
  936.  
  937.        To transfer files using Kermit you will need another Kermit  program
  938.      running in the remote host, and you will need to issue commands to it.
  939.      For  HP86 to microcomputer transfers this can be done simply by typing
  940.      the required commands on the respective keyboards, however for HP86 to
  941.      mainframes or minicomputers a more complex approach is needed.
  942.  
  943.       1. Load and run the HP86 Kermit, change any RS232 settings to  enable
  944.          the  HP86  to  communicate  with  the  remote,  and  set any other
  945.          parameters needed for the transfer.
  946.  
  947.       2. The HP86 is put into terminal mode using the CONNECT command.  Now
  948.          with the HP86 acting as a terminal the user should log on  to  the
  949.          mainframe in the normal manner.
  950.  
  951.       3. The  Kermit  program  on the remote should now be run, and any SET
  952.          commands entered.
  953.  
  954.       4. To transfer files the relevant  command  should  now  be  entered,
  955.          RECEIVE  for  HP86  to  remote,  SEND  for  remote  to HP86. After
  956.          entering the command return to HP86 Kermit command mode  using  k1
  957.          and  enter  the  complimentary  Kermit  command,  SEND for HP86 to
  958.          remote, RECEIVE for remote to HP86.
  959.  
  960.       5. After the transfer is complete re-enter terminal mode to  set  the
  961.          remote's  Kermit for any further transfer, or if you have finished
  962.          all your transfers you should log out from the remote.
  963.  
  964.        The above description is only a guide to the sequence of actions  to
  965.      be  taken,  you may not need to set any parameters, or you may wish to
  966.      run some other program on the remote using data transferred by Kermit.
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.                                      - 15 -
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.       5.2 FILE TYPES
  987.       --------------
  988.  
  989.        Before any discussion of file transfer it is  necessary  to  outline
  990.      the   types  of  files  that  can  successfully  be  transferred  with
  991.      HP86 Kermit version 1.00.  Due  to  version 1.00  being   written   in
  992.      HP86 BASIC  the  ideal  of  being  able to transfer any file cannot be
  993.      implemented.  The restrictions imposed by HP86 BASIC are quite  severe
  994.      and  can only be overcome by various forms of file conversion. Because
  995.      of the limitations it is advisable to  thoroughly  read  this  section
  996.      before attempting any file transfer.
  997.  
  998.       5.2.1 THE FILE TYPE PROBLEM
  999.       ---------------------------
  1000.  
  1001.         When a file is created by the HP86 it is assigned a particular type
  1002.      depending on its use and method of generation, these are as follows:-
  1003.  
  1004.        PROG - BASIC program created using the STORE command.
  1005.        BPGM - Binary program.
  1006.        DATA - Data file.
  1007.        GRAF - Screen dump.
  1008.        **** - Extended file.
  1009.  
  1010.       Of these only those of type DATA can be sent using  version  1.00  of
  1011.      Kermit,  this  being the only type that can be accessed by HP86 BASIC.
  1012.      Fortunately a utility program 'GETSAVE' exists on the HP86  demo  disk
  1013.      which  will  save  BASIC  programs from memory as DATA files, and load
  1014.      DATA files as BASIC programs (or sections of programs).
  1015.  
  1016.        The file type can be discovered using the CAT command either  before
  1017.      running Kermit or whilst in the command mode.
  1018.  
  1019.           KERMIT-HP86 > ?
  1020.           cat                             <- Enter catalogue command
  1021.                                           .. HP replies with
  1022.           Name        Type  Bytes   Recs
  1023.           ------------------------------
  1024.           MYFILE      DATA    256      4
  1025.           PROGRAM     PROG    256      9
  1026.           UTILITY     BPGM    256      7
  1027.  
  1028.          If  the  type  displayed  is  not  DATA  then  the  file cannot be
  1029.      transferred  using  HP86 Kermit version 1.00,  if  this  is  attempted
  1030.      Kermit will return with an error.
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.                                      - 16 -
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.       5.2.2 THE DATA TYPE PROBLEM
  1052.       ---------------------------
  1053.  
  1054.        As  previously mentioned only files of type DATA can be sent via the
  1055.      present implementation of Kermit, however there  is  a  second  factor
  1056.      that can affect the success of any transfer, that of data types.
  1057.        The  HP86 like many other microcomputers stores data on its disks in
  1058.      two different formats depending on the variable type,  either  numeric
  1059.      or  string  data.  This  causes problems when sending data to a remote
  1060.      kermit for the following reasons:
  1061.  
  1062.        All data to be transferred via Kermit has to be either  ASCII  data,
  1063.      or binary data that can be converted to ASCII by 8-bit prefixing.
  1064.  
  1065.          HP86  BASIC  is unable to access data on disk as bytes, it must be
  1066.      read either as a string variable or as a numeric variable.
  1067.  
  1068.        Therefore if data in the numeric format is encountered it has to  be
  1069.      converted into ASCII before it can be sent. There is a mechanism to do
  1070.      this   in  the  HP86  Kermit  program,  however  this  method  is  not
  1071.      satisfactory for most transfers for the following reasons:
  1072.  
  1073.        The numeric variable will be converted to a  string  of  characters,
  1074.      the  number  of which depends only on the number of significant digits
  1075.      in the variable (for instance '1 ','10 ' and '10.04 '). The  resulting
  1076.      file will therefore have a irregular format that will make its use, by
  1077.      other computer systems or languages, very difficult.
  1078.  
  1079.          There  is  no method in the Kermit program of converting this data
  1080.      back  into  numeric  variables,  therefore  a  file  sent  using  this
  1081.      conversion  and  then  received back will be of a different format and
  1082.      almost definitely unusable.
  1083.  
  1084.       For these reasons it is advisable to convert any files to be sent  by
  1085.      kermit  so  that  any  numeric  variables  are stored as, or in, ASCII
  1086.      strings.  You should attempt to do this so the numbers are stored in a
  1087.      fixed format based on their range, this will enable  the  data  to  be
  1088.      reconverted  easily,  and  allow  it  to  be used as input to programs
  1089.      written in other languages, or on different computers.
  1090.  
  1091.       For example if the data was a list of temperatures between 0 and  200
  1092.      measured  with  and accuracy of 2 decimal places, a sensible choice of
  1093.      format would be XDDD.DD (where D is a digit  or  space  if  a  leading
  1094.      zero,  X  is a space), 10 of these numbers could then be placed in one
  1095.      string, producing records with the following format:
  1096.  
  1097.        12.15  54.72 112.39  23.54 178.01 107.10  93.42 121.34 154.81 133.04
  1098.  
  1099.        This would produce a file that could be  used  by  many  high  level
  1100.      languages,  for  instance  it could be read by a FORTRAN program using
  1101.      the following format statement - FORMAT (10(1X,F6.2)).
  1102.  
  1103.  
  1104.  
  1105.                                      - 17 -
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.        For a simple method of storing numeric data as formatted strings see
  1117.      appendix C.
  1118.        Please note that there is no way that you can  determine  whether  a
  1119.      file  contains  data of the correct type until you actually attempt to
  1120.      transfer it. The default condition for the HP86 Kermit  is  to  do  no
  1121.      conversion  of numeric data, if a numeric variable is encountered then
  1122.      the transfer will be halted and an error message displayed. To use the
  1123.      inbuilt conversion facility issue the following command:
  1124.  
  1125.          SET SEND-CONVERT ON
  1126.  
  1127.      It  must  be  emphasized  again  that  using  this   method   produces
  1128.      unpredictable  results,  also  in some circumstances an type error can
  1129.      still be produced.  For these reasons it is suggested that  it  should
  1130.      be  used  vary rarely, for files containing only a small proportion of
  1131.      non crucial numeric data.
  1132.  
  1133.  
  1134.       5.3 HP86 TO REMOTE FILE TRANSFER - THE SEND COMMAND
  1135.       ---------------------------------------------------
  1136.  
  1137.        To send a file from the HP86 to the remote Kermit you use  the  SEND
  1138.      command,  however  before  you  issue  this command you should set the
  1139.      remote in to receiving state. To set the remote up to receive  a  file
  1140.      you  use the RECEIVE command, the manner in which this is done depends
  1141.      on the type of remote.
  1142.  
  1143.       If the remote is a  microcomputer  simply  enter  RECEIVE  using  its
  1144.      keyboard then enter the SEND command using the HP86's keyboard.
  1145.  
  1146.        For  a mainframe or minicomputer remote host you will have needed to
  1147.      have logged on and started Kermit using terminal mode. While still  in
  1148.      terminal  mode issue the RECEIVE command. You should now return to the
  1149.      HP86 Kermit command mode  by  using  function  key  1  and  enter  the
  1150.      HP86 Kermit SEND command.
  1151.  
  1152.         Once the remote is in a state to receive files you should enter the
  1153.      SEND command, this has the following format:
  1154.  
  1155.        SEND "source filename" <"dest filespec">
  1156.  
  1157.        Where:
  1158.  
  1159.        "source filename"  Is the name  of the file to be  sent in  standard
  1160.                           HP86 format.
  1161.  
  1162.        "dest filespec"    Is the name  that you wish the file  to be stored
  1163.                           as on the remote computer.
  1164.  
  1165.        If only the source filename is specified the HP86 Kermit  will  send
  1166.      this name converted into a 'legal' Kermit format.
  1167.  
  1168.  
  1169.  
  1170.                                      - 18 -
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.         The HP86 will now start to send the named file to the remote Kermit
  1182.      the following screen display will be seen:
  1183.  
  1184.           ----------------------------------------------------------------
  1185.           I HP86 Kermit sending file                                     I
  1186.           I ------------------------                                     I
  1187.           I                                                              I
  1188.           I Sending 'myfile dat' as 'MYFILE.DAT'                         I
  1189.           I                                                              I
  1190.           I Current action : Sending initialise      Retries : 0         I
  1191.           I Packets sent     : 0               NAKs received : 0         I
  1192.           I Bytes sent       : 0k              Timeouts      : 0         I
  1193.           I                                    Bad packets   : 0         I
  1194.           I                                                              I
  1195.  
  1196.        The file will now be sent packet by packet  to  the  remote  Kermit.
  1197.      The  progress  of  the transfer will be displayed on the screen.  When
  1198.      completed the message 'Transfer successful' will be displayed and  you
  1199.      will be returned to command mode.
  1200.  
  1201.  
  1202.       5.4 REMOTE TO HP86 TRANSFER - THE RECEIVE COMMAND
  1203.       -------------------------------------------------
  1204.  
  1205.         Before discussing the method used to transfer files from the remote
  1206.      to the HP86 a serious problem needs to  be  highlighted.  Unlike  most
  1207.      filing systems the HP86 BASIC filing system is incapable of creating a
  1208.      file  without  knowing its size. Unfortunately there is no way for the
  1209.      HP86 Kermit to know the size of the file it is receiving. Due to  this
  1210.      problem  it  is necessary to inform the HP86 Kermit of the size of the
  1211.      file that it is to receive, to do this use the SET FILE-SIZE command.
  1212.  
  1213.        SET FILE-SIZE size
  1214.  
  1215.         Where size is the desired  file  size  in  kilobytes,  the  default
  1216.      setting is 10.
  1217.  
  1218.      If  FILE-SIZE  is  not  set  correctly  one of two problems can arise.
  1219.      Firstly if FILE-SIZE is set far larger than the actual size  you  will
  1220.      be  wasting  disk space.   Secondly and more seriously if FILE-SIZE is
  1221.      smaller than the actual size then the transfer will  be  aborted  when
  1222.      the file on the HP86's disk becomes full.
  1223.  
  1224.        To  avoid  both problems before receiving files find the actual file
  1225.      size by using the relevant command on the remote system, you can  find
  1226.      this  from the user documentation.  You may have to calculate the size
  1227.      in kilobytes from the record size and number of  records,  round  this
  1228.      figure  up  to  the nearest kilobyte.  Setting FILE-SIZE to this value
  1229.      will usually be sufficient.  Occasionally though this can be less than
  1230.      actually needed as the HP86 requires  an  extra  3  bytes  per  record
  1231.      stored, so for added safety when transferring large files increase the
  1232.      file size by 1.
  1233.  
  1234.  
  1235.                                      - 19 -
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.          As  you would expect, to receive files from the remote you use the
  1248.      RECEIVE command on the HP86 Kermit and the SEND command on the remote.
  1249.      The order the two commands are entered will depend again on  the  type
  1250.      of remote.
  1251.  
  1252.        For microcomputer to HP86 transfer: Issue the RECEIVE command on the
  1253.      HP86, then the SEND command on the remote.
  1254.  
  1255.          For  transfer from mainframe or minicomputer: First issue the SEND
  1256.      command to the remote whilst in terminal mode,  then  return  to  HP86
  1257.      command mode, and enter RECEIVE.
  1258.  
  1259.        The RECEIVE command has the following format:
  1260.  
  1261.          RECEIVE  <"dest filename">
  1262.  
  1263.          Where "dest filename" is the file name that the received file will
  1264.      be stored as, if not supplied the name sent by the remote Kermit  will
  1265.      be converted to a legal HP86 name.
  1266.  
  1267.          Once  entered the HP86 screen will clear and the following will be
  1268.      displayed:
  1269.  
  1270.           ----------------------------------------------------------------
  1271.           I HP86 Kermit receiving file                                   I
  1272.           I --------------------------                                   I
  1273.           I                                                              I
  1274.         * I                                                              I
  1275.           I                                                              I
  1276.           I Current action : Wait for initialise     Retries : 0         I
  1277.           I Packets received : 0               NAKs sent     : 0         I
  1278.           I Bytes received   : 0k              Timeouts      : 0         I
  1279.           I                                    Bad packets   : 0         I
  1280.           I                                                              I
  1281.  
  1282.        * Note the name of the file being received  will  not  be  displayed
  1283.      until that information has been received from the remote.
  1284.  
  1285.          When  the  HP86 Kermit receives the file header it will attempt to
  1286.      create a file with either the name supplied after the RECEIVE command,
  1287.      or with the name contained in the header (converted to HP86 form).  If
  1288.      the file already exists on the disk then Kermit will rename  the  file
  1289.      and attempt to store it again, the new name will be displayed.
  1290.  
  1291.        Receiving 'MYFILE.DATA' as 'MYFI00 DAT'
  1292.  
  1293.          The actual way the file is renamed depends on whether the name was
  1294.      supplied as a parameter to the RECEIVE command, or  contained  in  the
  1295.      file header, see the section on file name conversion for more details.
  1296.  
  1297.  
  1298.  
  1299.  
  1300.                                      - 20 -
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.       5.5 TRANSFER PROBLEMS
  1312.       ---------------------
  1313.  
  1314.          After  the transfer has completed the HP86 Kermit will display the
  1315.      'Transfer successful' message, however if an error has occured and the
  1316.      transfer has been halted a suitable message will be displayed.
  1317.  
  1318.      Timeout           -  Time limit exceeded   on sending or  receiving  a
  1319.                           packet, increase timeout and re-run.
  1320.      NAK received      -  A  negative  acknowledge packet was received from
  1321.                           the remote that caused  the  retry  limit  to  be
  1322.                           exceeded.
  1323.      Checksum error    -  A  garbled  packet  was received from the remote.
  1324.                           Check   communication   settings   and   physical
  1325.                           connections.
  1326.      Incorrect  packet  -  The remote Kermit has sent a packet which is not
  1327.                           the type that the HP86 expects.  This should only
  1328.                           happen if both Kermits  have  been  set  to  SEND
  1329.                           files,  try  again  being  careful  to  enter the
  1330.                           correct commands.
  1331.      Error message from remote
  1332.                        -  The remote Kermit has sent an  error  packet  the
  1333.                           contents of which will be displayed.
  1334.      Transfer aborted  -  Function key 1 was pressed during transfer.
  1335.      Other messages    -  The rest of the messages generated by Kermit will
  1336.                           be  errors  produced  by  the  filing  system for
  1337.                           instance 'File does not exist', these are  mostly
  1338.                           self   explanatory,   however  the  error  no  is
  1339.                           displayed so users can check the HP86 manual  for
  1340.                           more detailed descriptions (see also Appendix B).
  1341.  
  1342.          Sometimes on connecting back to remote, especially after an error,
  1343.      garbage is printed on the  screen.  This  indicates  that  the  remote
  1344.      Kermit  is  still  in receive or send mode, having missed the relevant
  1345.      error or break packet. To rectify this situation press the  enter  key
  1346.      until the remotes prompt reappears.
  1347.  
  1348.  
  1349.       5.6 FILE NAME CONVERSION
  1350.       ------------------------
  1351.  
  1352.          The Kermit protocol specifies that the file name of the file being
  1353.      sent should be transmitted in the file header packet, to  provide  the
  1354.      receiving Kermit with a name to store the file under. However the file
  1355.      name  has  first  to  be  converted  to  a  standard  format, although
  1356.      different from the HP86 format it is very similar  to  many  mainframe
  1357.      file specifications being of the following form:
  1358.  
  1359.         filename.filetype
  1360.  
  1361.            where filename and filetype can be of any length but can only be
  1362.      composed of digits or uppercase letters.
  1363.  
  1364.  
  1365.                                      - 21 -
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.      HP86 file specifications are of the form "XXXXXXXXXX",
  1377.                                            or "XXXXXXXXXX.volume",
  1378.                                            or "XXXXXXXXXX:msus", where
  1379.  
  1380.      XXXXXXXXXX      is a filename of up to 10 characters.
  1381.  
  1382.      volume          is the volume label of the disk containing XXXXXXXXXX.
  1383.  
  1384.      msus            is the device specifier of the disk drive containing
  1385.                      XXXXXXXXX (E.G. D700).
  1386.  
  1387.        HP86 file names may contain upper or  lower  case  letters,  digits,
  1388.      special  characters,  excluding period and colon, and imbedded spaces.
  1389.      Upper and lower case letters are not equivalent.
  1390.  
  1391.        Due the differences in the format of filenames it  is  necessary  to
  1392.      convert  names  used on the HP86 if they are to be sent to the remote,
  1393.      and likewise convert names received from the remote if they are to  be
  1394.      used on the HP86.
  1395.  
  1396.       5.6.1 HP86 to standard conversion
  1397.       ---------------------------------
  1398.  
  1399.          When  sending a file to the remote and a destination file name has
  1400.      not been specified the HP86 Kermit will convert  the  source  filename
  1401.      into a 'legal' Kermit name.
  1402.          The  way this conversion takes place is as follows:  All lowercase
  1403.      characters are converted to uppercase.  If the name  contains  one  or
  1404.      more  spaces  then  the  first space will be converted to '.', else if
  1405.      name contains one or more '_' characters then the first  '_'  will  be
  1406.      changed to '.'.  The name is now scanned for legal characters (0-9,A-Z
  1407.      & first '.') if any illegal character is found it will be removed from
  1408.      the  name.  If the resulting name contains no '.' the filetype '.DATA'
  1409.      will be added to the end.
  1410.  
  1411.        For example
  1412.  
  1413.          Statistics  would be converted to  STATISTICS.DATA
  1414.          TEST FILE     ''  ''    ''     ''  TEST.FILE
  1415.          Tst File 1    ''  ''    ''     ''  TST.FILE1
  1416.          TEST#1-00     ''  ''    ''     ''  TEST100.DATA
  1417.  
  1418.        The name that Kermit sends to the remote will be  displayed  on  the
  1419.      screen along with the source file name.
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.                                      - 22 -
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.       5.6.2 Standard to HP86 conversion
  1442.       ---------------------------------
  1443.  
  1444.        When receiving files without specifying a destination file name then
  1445.      a  reverse  conversion  occurs.  First the name is scanned for the '.'
  1446.      marker, if this does not exist then the name is used as it  is.    The
  1447.      HP86  name  is  then  constructed  using the first 6 characters of the
  1448.      filename, a space and then the first 3  characters  of  the  filetype.
  1449.      Thus:
  1450.  
  1451.          STATISTICS.DATA  would be converted to  STATIS DAT
  1452.          TEST.FILE          ''  ''    ''     ''  TEST FIL
  1453.  
  1454.          Note that a filename converted to Kermit format and then converted
  1455.      back will not necessarily be the same.
  1456.  
  1457.        5.6.3 File renaming
  1458.        -------------------
  1459.  
  1460.        When receiving files from the remote the situation  can  arise  that
  1461.      the  file  name  supplied,  or the converted file name from the remote
  1462.      will clash with a file already on the disk drive. To avoid losing data
  1463.      by overwriting the existing  file  the  HP86 Kermit  will  attempt  to
  1464.      rename  the  file. The method used for renaming depends on whether the
  1465.      name was supplied as a parameter for the RECEIVE command, or converted
  1466.      from the file header sent by the remote.
  1467.  
  1468.        For a supplied name the method is to add a two digit number  to  the
  1469.      end,  keeping  the  total  length  to  10 characters, this may involve
  1470.      writing over the last two characters.  The numbering will  start  from
  1471.      00  and  will  continue  until 99 after which an error message will be
  1472.      generated.
  1473.  
  1474.        For example:-
  1475.          MYFILE      would be renamed  MYFILE00
  1476.          STATISTICS    ''  ''   ''     STATISTI00
  1477.        If MYFILE & MYFILE00 existed then
  1478.          MYFILE      would be renamed  MYFILE01
  1479.  
  1480.        If the file name is one that has been received  and  converted  from
  1481.      the  file header packet then the renumbering is done at the end of the
  1482.      part that was the filename, keeping it to 6 characters or less.
  1483.  
  1484.        For example
  1485.          MYFILE.DATA is converted to MYFILE DAT and renamed MYFI00 DAT
  1486.          TEST.BASIC  ''    ''     '' TEST BAS    ''   ''    TEST00 BAS
  1487.  
  1488.        The result of either of these  methods  will  be  displayed  on  the
  1489.      screen, however the results should not be too radically different from
  1490.      the original to enable correct identification.
  1491.  
  1492.  
  1493.  
  1494.  
  1495.                                      - 23 -
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.       6. CHANGING KERMIT ATTRIBUTES
  1507.       =============================
  1508.  
  1509.         At various points throughout this manual it has been mentioned that
  1510.      certain attributes have needed to be changed, the specific cases being
  1511.      described. This chapter gives  a  more  detailed  description  of  the
  1512.      command used to change these attributes, the SET command.
  1513.  
  1514.  
  1515.       6.1 THE SET COMMAND
  1516.       -------------------
  1517.  
  1518.        The SET command has the following format:
  1519.  
  1520.          SET option parameter(s)
  1521.  
  1522.        Where
  1523.         option        The attribute that you wish to change.
  1524.         parameter(s)  The value(s) to set the option to.
  1525.  
  1526.         The parameter types will depend on the option specified, and can be
  1527.      a character, a numeric value, or an item from a list. The option  name
  1528.      can be abbreviated, as can the parameter if it is a list item.  Kermit
  1529.      will  respond  with  the  new  setting  or with an error message if an
  1530.      illegal value is entered.
  1531.  
  1532.        SET RETRY 7        <- Enter set command
  1533.        RETRY - 7          <- Kermit replies
  1534.  
  1535.        SET RETRY #        <- Set command with incorrect value.
  1536.        Illegal value - #  <- Kermit replies.
  1537.  
  1538.        If a question mark is entered instead of the parameter  then  Kermit
  1539.      will display either the expected parameter type, numeric or character,
  1540.      or display the list from which the parameter should be chosen.
  1541.  
  1542.        SET RETRY ?                             <- Set command query.
  1543.        Numeric value                           <- Kermit replies
  1544.  
  1545.        SET FLOW ?                              <- Set command query.
  1546.        FLOW-CONTROL - NONE, XON/XOFF, DTR/RTS  <- Kermit replies.
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.                                      - 24 -
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.       6.2 THE SHOW COMMAND
  1572.       --------------------
  1573.  
  1574.          This  command  is  used  to  display  the  current settings of the
  1575.      attributes, if entered with no option  then  all  settable  attributes
  1576.      will  be  displayed,  otherwise the setting of the specified option is
  1577.      shown.
  1578.  
  1579.        SHOW DEBUG   <- You enter.
  1580.        DEBUG - OFF  <- Kermit responds.
  1581.  
  1582.  
  1583.       6.3 SETTABLE ATTRIBUTES
  1584.       -----------------------
  1585.  
  1586.        There now follows a list of the  attributes  that  can  be  set  and
  1587.      displayed using the SET and SHOW commands.
  1588.  
  1589.      OPTION         PARAMETER TYPE      DEFAULT
  1590.  
  1591.      TIMEOUT        Numeric value       Default - 10 secs
  1592.                     The  length  of  time  the  HP86 Kermit will wait for a
  1593.                     packet from the remote before causing a timeout.
  1594.  
  1595.      RETRIES        Numeric value       Default - 10 retries
  1596.                     The number of times the HP86 Kermit will try to  resend
  1597.                     a packet.
  1598.  
  1599.      SEND-CONVERT   OFF, ON             Default - OFF
  1600.                     Defines  whether  numeric variables are to be converted
  1601.                     and sent as string data, if off numeric variables  will
  1602.                     cause the transfer to abort.
  1603.  
  1604.      DEBUG          OFF, ON             Default - OFF
  1605.                     If  set  to  on  then packets sent and received will be
  1606.                     displayed on the screen.
  1607.  
  1608.      PREFIX         Character           Default - #
  1609.                     Defines the character to be used for prefix encoding.
  1610.  
  1611.      END-OF-LINE    Numeric value       Default - 13
  1612.                     The ASCII value of  the  end  of  line  character  that
  1613.                     should be sent after each packet.
  1614.  
  1615.      RECORD-END     Numeric value(s)    Default - 13 10
  1616.                     Defines   the   sequence  of  control  characters  that
  1617.                     indicate the end of a record. This  will  be  added  to
  1618.                     strings  when  sending  files, searched for and removed
  1619.                     when receiving files.
  1620.  
  1621.      FILE-SIZE      Numeric value       Default - 10
  1622.  
  1623.  
  1624.  
  1625.                                      - 25 -
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.                     The size of the file (kilobytes) that will  be  created
  1637.                     when receiving files.
  1638.  
  1639.      RECORD-LENGTH  Numeric value       Default - 256
  1640.                     The  record  length  that will be used by the HP86 when
  1641.                     creating files, if matching record  lengths  on  remote
  1642.                     systems  add  3 bytes, the HP86 needs these extra bytes
  1643.                     when storing strings.
  1644.  
  1645.      NO-OF-RECORDS  Numeric value       Default - 40
  1646.                     The number of  records  of  the  file  created  by  the
  1647.                     RECEIVE   command,   setting  this  will  override  the
  1648.                     file-size, the resulting size being the  record  length
  1649.                     times  the no of records, setting file-size will change
  1650.                     this value.
  1651.  
  1652.      DUPLEX         FULL, HALF          Default - HALF
  1653.                     The duplex setting of the remote,  setting  this  value
  1654.                     alters  the setting of the local echo, FULL - OFF, HALF
  1655.                     - ON.
  1656.  
  1657.      LOCAL-ECHO     OFF, ON             Default - ON
  1658.                     Defines whether characters typed on the  keyboard  will
  1659.                     be  displayed  on the screen (ON), this only applies to
  1660.                     terminal mode.
  1661.  
  1662.      FLOW-CONTROL   NONE, XON/XOFF, DTR/RTS        Default - NONE
  1663.                     Specifies the  flow  control  method  to  be  employed,
  1664.                     setting   this  to  any  value  other  than  NONE  sets
  1665.                     HANDSHAKE to NONE.
  1666.  
  1667.      HANDSHAKE      NONE, BELL, LF, CR, XON, XOFF  Default - XON
  1668.                     Defines the handshake character to  be  used  for  line
  1669.                     turnaround,  setting  this to anything except NONE will
  1670.                     set FLOW-CONTROL to NONE.
  1671.  
  1672.      PARITY         NONE, ODD, EVEN, MARK, SPACE   Default - MARK
  1673.                     The parity to be used by the RS232 interface.
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.                                      - 26 -
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.       Appendix A : HP86 KERMIT Capabilities
  1702.       =====================================
  1703.  
  1704.  
  1705.        The following is a list of Kermit capabilities, with information  as
  1706.      to whether they are supported by HP86 Kermit version 1.00.
  1707.  
  1708.        Local operation:                   Yes
  1709.        Remote operation:                  No
  1710.        Transfers text files:              Yes
  1711.        Transfers binary files:            No
  1712.        Wildcard send:                     No
  1713.        ^X/^Z interruption:                Yes
  1714.        Filename collision avoidance:      Yes
  1715.        Can time out:                      Yes
  1716.        8th-bit prefixing:                 No
  1717.        Repeat count prefixing:            No
  1718.        Alternate block checks:            No
  1719.        Terminal emulation:                Yes
  1720.        Communication settings:            Yes; duplex,  parity,  handshake,
  1721.                                                flow control
  1722.        Transmit BREAK:                    Yes
  1723.        IBM communication:                 Yes; default settings
  1724.        Transaction logging:               No
  1725.        Session logging (raw download):    No
  1726.        Raw upload:                        No
  1727.        Act as server:                     No
  1728.        Talk to server:                    No
  1729.        Advanced commands for servers:     No
  1730.        Local file management:             Yes; CAT
  1731.        Handle file attributes:            No
  1732.        Command/init files:                No
  1733.        Printer control:                   No
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.                                      - 27 -
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.       Appendix B : HP86 error messages
  1767.       ================================
  1768.  
  1769.  
  1770.          The following is a list of error messages that Kermit version 1.00
  1771.      will give if a transfer is aborted.
  1772.  
  1773.      Timeout receiving   The HP86 has timed out whilst waiting for a packet
  1774.                          from the remote.
  1775.  
  1776.      NAK received        The remote has sent a NAK causing the retry  limit
  1777.                          to be exceeded.
  1778.  
  1779.      Checksum error      The last packet received was garbled.
  1780.  
  1781.      Incorrect packet    The  wrong  packet type has been received from the
  1782.                          remote.
  1783.  
  1784.      Timeout sending     The HP86 has timed out whilst  trying  to  send  a
  1785.                          packet.
  1786.  
  1787.      Cannot rename file  The  file  being  received has the same name as an
  1788.                          existing file, but it cannot  be  renamed  as  the
  1789.                          number suffix is past 99.
  1790.  
  1791.      Disc write protected
  1792.                          The  disk  has a write protect label attached, the
  1793.                          file cannot be stored.
  1794.  
  1795.      File does not exist The file cannot be found on the disk.
  1796.  
  1797.      Incorrect file type The file cannot be sent as the file  type  is  not
  1798.                          DATA.
  1799.  
  1800.      Read error          There has been a read error on the disk.
  1801.  
  1802.      Record does not exist
  1803.                          The  file  has become full before all the data has
  1804.                          been received.
  1805.  
  1806.      No M.S. device      No mass storage device has been specified.
  1807.  
  1808.      Directory full      No more files can be stored on  the  disk  as  the
  1809.                          directory has become full.
  1810.  
  1811.      Volume not found    The specified volume name can not be found.
  1812.  
  1813.      MSUS not found      The specified mass storage device (disk drive) can
  1814.                          not be found.
  1815.  
  1816.      Read verify error   The data written to disk has been corrupted.
  1817.  
  1818.  
  1819.  
  1820.                                      - 28 -
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.      Disc full           The  disk  has  become  full,  or does not contain
  1832.                          enough space to create a new file.
  1833.  
  1834.      Medium damaged      The disk is faulty.
  1835.  
  1836.      Disc drive fault    The disc drive is not functioning  correctly,  can
  1837.                          be  caused  by leaving the latch on the disc drive
  1838.                          up.
  1839.  
  1840.      Data type error     The variable just read was a numeric variable  and
  1841.                          the data conversion facility is off.
  1842.  
  1843.      Transfer aborted    Function key 7 was pressed aborting the transfer.
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.                                      - 29 -
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.       Appendix C : Converting numeric variables
  1897.       =========================================
  1898.  
  1899.  
  1900.          As  mentioned  in  the  section on file transfer numeric variables
  1901.      cannot be sent to the remote without conversion. Although a very basic
  1902.      conversion method is included  as  part  of  the  HP86 Kermit,  it  is
  1903.      advisable  not to use it but to convert the whole file into one usable
  1904.      by Kermit and the remote.
  1905.  
  1906.        To convert the file you will need to know the manner  in  which  the
  1907.      data  is  arranged  in the source file, and decide on a format for the
  1908.      converted file. The structure  of  the  source  file  can  usually  be
  1909.      determined  by  examining  the  program  that  created it, with a well
  1910.      documented program this task should be fairly  easy.  However  if  the
  1911.      creating  program  is not available, and the structure is unknown, use
  1912.      the HP86 BASIC TYP command.
  1913.  
  1914.        Once you have determined the structure  of  the  file(s),  and  have
  1915.      decided on a logical format to convert them to, you will need to write
  1916.      a  short  program  to  achieve this. The easiest way of converting the
  1917.      numbers into a useful format is to use  a  facility  provided  by  the
  1918.      HP86 I/O ROM.  The method involves defining a dummy I/O buffer, output
  1919.      the  numeric  variable  to this buffer using the formatting facilities
  1920.      (USING), and reading it back in as a string with the ENTER command.
  1921.  
  1922.        For example
  1923.  
  1924.          10 DIM dummy$"88"    <- Dimension  variable to  8 bytes  more than
  1925.                                  required size.
  1926.          20 IOBUFFER dummy$   <- Set it up as an I/O buffer
  1927.          .
  1928.          .
  1929.          .
  1930.          500 OUTPUT dummy$ USING "X,M4D.DD"; N  <- Output number  using the
  1931.                                                    specified format.
  1932.          510 ENTER dummy$ USING "K" ; N$       <- Read it in as a string.
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.                                      - 30 -
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.        After converting the number to a string  it  can  either  be  stored
  1962.      separately,  or placed into another string along with others to form a
  1963.      record. The OUTPUT  command  can  be  used  to  construct  records  by
  1964.      outputting  more  than  one variable at once, or by outputting without
  1965.      end of line.
  1966.  
  1967.          500 OUTPUT dummy$ USING "XM4D.DD" ; N1,N2,N3,N4
  1968.  
  1969.        or
  1970.          500 FOR I=1 TO 10
  1971.          510 OUTPUT dummy$ USING "#,X,M4D.DD" ; N(I)  <- Output without EOL
  1972.          520 NEXT I
  1973.          .
  1974.          .   As there is now no  EOL sequence  at the end of the buffer the
  1975.          .   following statement would be needed to read this back.
  1976.          .
  1977.          530 ENTER dummy$ USING "#,#K" ; R$           <- Enter without EOL
  1978.  
  1979.        The complete record string can now be written to the disk file.
  1980.  
  1981.        As can be seen this is a very simple method of  producing  formatted
  1982.      files which can be sent using the HP86 Kermit. Also with a bit of care
  1983.      these  files  could  be  used  as  input  to programs written in other
  1984.      languages than BASIC. The reverse conversion is also easy  to  perform
  1985.      using the ENTER command:
  1986.  
  1987.          500 OUTPUT dummy$ ; R$  <- Output the string to the dummy buffer
  1988.          510 FOR I=1 T0 10
  1989.          520 ENTER dummy$ USING "#,X,M4D.DD" ; N(I) <- Get number
  1990.          530 NEXT I
  1991.  
  1992.          All  the  above conversion techniques can of course be included in
  1993.      other programs, if it is invisaged that the data files produced by the
  1994.      program will be transferred to another system using Kermit.  Including
  1995.      an option to produce files in 'Kermit' format is more  efficient  than
  1996.      having separate conversion programs.
  1997.  
  1998.          The  above  discussion  does  not  include  any  details  of image
  1999.      specifiers and other related matters, if you wish to use  this  method
  2000.      of  data  conversion  you  are strongly advised to read the section on
  2001.      Formatted I/O operations in the HP86 I/O Programming guide.
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.                                      - 31 -
  2016. 
  2017.