4.5. 8086/8088

Kermit-86  is written in 8086 Macro Assembler (ASM86), and assembled locally on
the micro.  Versions for the IBM PC (PC DOS) and the Heath/Zenith Z100 (MS DOS)
are prepared from common source using conditional assembly switches similar  to
those  in KERMIT-80.  The IBM flag has site-dependent meaning.  As shipped from
Columbia, it means local echo during CONNECT, mark parity, and half duplex line
handshaking using CTRL-Q as the turnaround character.  If you need  to  install
Kermit  on  your PC, and you do not have a Kermit floppy but you do have access
to a mainframe computer with a copy of the  IBM  PC  Kermit  distribution,  you
should read this section.

Since  the  PC  assembler is not provided with the minimum system, IBM PC users
cannot be expected to have it.  Assembler  source  plus  the  runnable  version
                                 16
(.EXE)  of Kermit are distributed  , along with some special "bootstrap" files,
described below.


4.5.1. Bootstrapping

The KERMIT.EXE file is converted by an assembler program on the PC, KFIX, which
makes all bytes in the file printable by breaking each one up  into  two  4-bit
"nibbles"  and  adding  a  constant.    The  result  is a printable file called
KERMIT.FIX.  It is assumed that a copy of KERMIT.FIX is available to you  on  a
mainframe  computer.   To download the file to the PC, two cooperating programs
are run: a Fortran program, KSEND, on the mainframe and a Basic program,  KGET,
on  the  PC.    These programs are very short; they are shown in their entirety
below.  KSEND reads a line at a time from KERMIT.FIX, types the line, and waits
for a signal from KGET that it can send more data.  KGET reads  each  line  and
converts  the text back to the format of an executable (.EXE) file.  Here's the
procedure:


_______________

  16
    The PC assembler's object (.OBJ) files are not  printable,  like  CP/M  hex
files, so the Kermit-80 bootstrapping technique would not work here.
                                    - 60 -


   1. You  should  have  a  version  of  KGET  on  the PC and KSEND on the
      mainframe; if you don't have them, copy  them  (i.e. type  them  in,
                     17
      using an editor  ) from the listings below.

   2. Log  in  on the mainframe.  This could be tricky if you have no ter-
      minal  emulation  facility  on  the  PC.    If  you  have  the   IBM
      asynchronous  communication  package,  you can do this at low speeds
      (baud rates).  If your PC has no terminal emulation facility, you'll
      have to use a real terminal to log in, and then switch the cable  to
      the PC.

   3. Compile  KSEND.FOR on your mainframe, if it needs compiling.  Define
      logical unit numbers 5 and 6 to be  the  controlling  terminal,  and
      logical unit number 7 to be KERMIT.FIX.  On the DEC-20, for example:

        @define 5: tty:
        @define 6: tty:
        @define 7: kermit.fix

      On a DECsystem-10, do something like:

        .assign tty: 5:
        .assign tty: 6:
        .assign dsk: 7:
        .rename for007.dat=kermit.fix

      On an IBM system under VM/CMS,

        .filedef 5 term ( lrecl 64 recfm f
        .filedef 6 term ( lrecl 64 recfm f
        .filedef 7 disk kermit fix ( lrecl 64 recfm f perm

      Start KSEND on the mainframe.  It will print a message, and then sit
      and  wait for the PC to send back an OK; don't change any connectors
      until you see the message.

   4. Escape back to the PC, or connect the PC to the mainframe.  The PC's
      communication port should be connected with a  cable  to  the  modem
      that's  connected  to  the  mainframe  (dialup, dedicated, switched,
      whatever hookup you normally have available for logging  in  on  the
      mainframe  from a terminal).  If you were using a different terminal
      to log in to the mainframe, make sure the PC's communication port is
      set at the same speed.

   5. Enter BASIC and run KGET on the PC.  If KGET prints  messages  about
      i/o  errors,  run  it again.  If it still gets errors, reboot the PC
      and try again.  Once KGET is running, the transmission  will  begin.
      KGET will print each 64-character line of nibbles as it arrives from
      the  mainframe.  Each line should be the same length -- if you see a
      ragged edge, you can assume there has been a transmission error, and

_______________

  17
    You'll also have to compile and load the KSEND program on the mainframe.
                                    - 61 -


      you should start the process again.

   6. When  transmission  is complete, you'll see the BASIC "Ready" prompt
      again.   Leave  BASIC  by  typing  SYSTEM.    You  should  now  have
      KERMIT.EXE  on your PC.  Try to run it.  If you see the "Kermit-86>"
      prompt, try to CONNECT to  the  host  mainframe  and  transfer  some
      files.   If Kermit doesn't run correctly, there may have been trans-
      mission errors, in which case you should  start  the  process  again
      from step 2 above.


