MS-DOS KERMIT                                                          Page 200


   2. Use another file capture facility to get it.

   3. Type in and run a bootstrapping program.


11.5.1. Try Again To Find A Kermit Disk

Before explaining how to bootstrap Kermit onto your PC, a  disclaimer  must  be
made.    Although  a  fair  amount  of  thought  and  time  has gone into these
procedures, they are far from error free.  If they were foolproof, there  would
be  no  need for a protocol such as Kermit.  There are many places where things
can go wrong, from something as simple as a typing mistake to something as  un-
avoidable and probably inevitable as a communications line failure.  By far the
easiest and best way to install Kermit is from a floppy disk.  Before  you  em-
bark  on  any of the following procedures it is a good idea to check once again
for a diskette to copy, even it it contains an old version of Kermit.  The time
you  spend  searching  is  likely  to be far less frustrating than the time you
spend trying to bootstrap Kermit by the methods described below.


11.5.2. Bootstrapping From the Communication Line

If you can't find a diskette with Kermit on it, there  are  two  other  methods
available for bootstrapping MS-DOS Kermit onto your PC.  The first method is to
use a file capture method or other file transfer protocol to transfer the  file
to  your PC.  Some systems come supplied with facilities like this, and various
public domain or commercial packages are available.  The second method requires
you to type in your own downloading program.

In  either  case,  you  must transmit the file from the system where it resides
over a communication line and into your PC.  The "BOO" encoding (developed  for
MS-DOS Kermit, but usable on any system for any kind of sequential binary file)
packs 3 .EXE file bytes into 4 printable characters in the MSVxxx.BOO file, and
also  compresses  adjacent  zero  bytes (of which there may be many).  The .BOO
file contains only printable ASCII characters, to ensure that  downloading  can
take  place  regardless  of  parity or other peculariaries of the communication
channel.


Use An Existing File Capture Facility

In the rest of this discussion of bootstrapping, the  host-resident  boot  .BOO
file will be referred to as MSKERMIT.BOO.  In fact, the actual name will depend
on which MS-DOS system you are using --  MSVIBM.BOO  for  the  IBM  PC  or  XT,
MSVRB1.BOO for the Rainbow-100, etc.

Use  your  file  capture  facility,  whatever  it  may  be,  to  get  the  file
MSKERMIT.BOO onto your PC's disk, but first make sure you have enough room  for
it.    Once the file is on your disk, you must run the BASIC program MSBPCT.BAS
to decode the file back into KERMIT.EXE.  This program can be downloaded by the
same method you used with MSKERMIT.BOO.  The program looks on your current disk
and directory for the file MSKERMIT.BOO and  outputs  KERMIT.EXE  to  the  same
place.    KERMIT.EXE  is about 57K bytes, so make sure there is space for it on
your disk or else you will have to start the program over.  Since  the  program
will  take  about twenty minutes to completely translate the file you will want
to avoid running it more than once.
MS-DOS KERMIT                                                          Page 201


There is a more complicated variation on this technique, but it will  save  you
some time.  Download the files MSBPCT.BAS and MSBPCT.BOO.  The latter is a com-
piled C program that does the same thing that the BASIC program does, but  much
faster.    Use  the BASIC program to "un-BOO" the C program into MSBPCT.EXE and
then use the latter to decode the Kermit BOO file.


Type In Your Own Bootstrap

If you can't find some method for downloading  the  .BOO  file  and  the  BASIC
program,  the  second  way  of  bootstrapping  Kermit  is  to  use the programs
MSBPCB.BAS and MSBOOT.FOR to download the BOO file from your host and translate
it  directly,  "on  the  fly."  You run the program MSBOOT.FOR on your host and
then run the program MSBPCB.BAS in BASIC on your PC.  The FORTRAN program sends
the BOO to the BASIC program, which decodes it and stores it in executable form
on your current directory as KERMIT.EXE.  A  very  rudimentary  form  of  error
checking  is  done  to  allow  obviously corrupted records to be retransmitted.
Follow this procedure:

   1. First, you must establish a connection from your PC to the host sys-
      tem.    A  high  speed  connection  is preferable; a "clean" line is
      preferable to a noisy one.  In fact, a clean line is  essential  for
      this  procedure.  You must be able to log in to the host system over
      this connection.  If  your  PC  already  has  a  terminal  emulation
      facility, use that.  If not, you might need to put your PC next to a
      real terminal and use that for logging in, then switch the connector
      to the PC at the critical moment.  If you are using a terminal, make
      sure the terminal and PC have their communication ports set  to  the
      same  speed.    Refer to the OPEN COM command in the Microsoft BASIC
      manual.

   2. Ensure that the files MSBOOT.FOR and MSKERMIT.BOO are present on the
      host  system.   MSBOOT.FOR is listed below, in case you need to type
      it in.

   3. Get back to your PC and type in MSPCBOOT.BAS on your PC;  a  listing
      appears  below.   There is no need to type in the comments (anything
      following an apostrophe); they are only there to  clarify  what  the
      program  is  doing.    Check  very carefully for errors.  You should
      check line 70 in the program to see that it reflects  the  way  your
      system  is  actually  set  up.  If necessary, substitute the correct
      baud rate for the supplied rate of 9600, and if you  are  not  using
      COM1:  make that change as well.  If you are downloading from an IBM
      or other half-duplex mainframe, leave line 1000 as it is; otherwise,
      replace  it  by  a  RETURN statement.  If you type it in directly to
      BASIC make sure you save the program before you run it, so you won't
      have to type it in again in case of error.

   4. Get  back  to  your  host system and compile MSBOOT.FOR, if it needs
      compiling.  Define logical unit numbers 5 and 6 to be the  controll-
      ing  terminal,  and  logical unit 7 to be the file MSKERMIT.BOO.  On
      VAX/VMS systems, for example, use these commands:

        $assign sys$input for005
        $assign sys$output for006
        $assign mskermit.boo for007
MS-DOS KERMIT                                                          Page 202


      On a DECSYSTEM-20, do:

        @define 5: tty:
        @define 6: tty:
        @define 7: mskermit.boo

      On an IBM system under VM/CMS, do this:

        .filedef 5 term ( lrecl 80 recfm v
        .filedef 6 term ( lrecl 80 recfm v
        .filedef 7 disk mskermit boo ( lrecl 77 recfm f perm

   5. Set your host system up for downloading:

         - Ensure that your terminal does not automatically pause  at  the
           end  of  a  screenful of output.  For instance, on a DEC-20 you
           would issue the command "terminal no pause end-of-page".

         - Do whatever you can to disable messages from appearing at  your
           terminal  while these programs are running.  This would include
           messages from other users, mail notification, alarms or alerts,
           system  messages,  and  so forth.  Such messages will interfere
           with the procedure, and probably render the result useless.

         - You should put your host terminal  in  "local  echo"  or  "half
           duplex" mode, if possible.

   6. Start the MSBOOT program on your host system.

   7. Get  back  to the PC.  If you have been using a terminal, switch the
      connector to the PC.

   8. Now run the BASIC program, MSBPCB.BAS.  This procedure will take  at
      least  twenty  minutes  and possibly longer depending on line speed.
      Watch your modem and/or disk lights for reassurance  that  something
      is happening.

By  using one of these installation methods, you should now have a working ver-
sion of Kermit.  If you experience any problems or  quirky  behavior  with  the
program, you may need to repeat the procedure.

Once  you  have  Kermit-MS  on your disk, you should make the disk available to
other users for copying, so that they can be spared the tedium and  frustration
of this bootstrap procedure.

Here  is  a  listing of MSBPCT.BAS.  The "outdented" PRINT statements with line
numbers ending in 5 may be included if you want incoming  records  to  be  dis-
played on the screen.  You don't need to include the comments.

1    'Use this BASIC program on the PC if you have the printable file
2    'MSKERMIT.BOO already on the PC to convert it to an executable
3    'file.  This program takes about 30 minutes to run on a PC with
4    'floppy disks.
5    ' Bill Catchings, June 1984
6    ' Columbia University Center for Computing Activities
MS-DOS KERMIT                                                          Page 203


10   t$ = time$                         ' Save the time.
20   defint a-z                         ' Integer to gain some speed.
30   n$ = chr$(0)
40   z = asc("0")
50   t = asc("~")-z
60   def fnuchr%(a$)=asc(a$)-z
70   open "MSKERMIT.BOO" for input as #1

100  input#1,f$                         ' Is this the right file?
110  if len(f$) > 20 then goto 900
120  open f$ for output as #2
130  print "Outputting to "+f$

200  if eof(1) then goto 800            ' Exit nicely on end of file.
210  input#1,x$                         ' Get a line.
220  y$ = ""                            ' Clear the output buffer.
230  goto 400

300  print#2,y$;                        ' Print output buffer to file.
310  goto 200                           ' Get another line.

400  if len(x$) < 2 goto 300            ' Is the input buffer empty?
410  a = fnuchr%(x$)
420  if a = t then goto 700             ' Null repeat character?
430  if len(x$) < 3 goto 300            ' Is the input buffer empty?
440  q$=mid$(x$,2,3)                    ' Get the quadruplet to decode.
450  x$=mid$(x$,5)
460  b = fnuchr%(q$)
470  q$ = mid$(q$,2)
480  c = fnuchr%(q$)
490  q$ = mid$(q$,2)
500  d = fnuchr%(q$)

600  y$ = y$ + chr$(((a * 4) + (b \ 16)) and 255) ' Decode the quad.
610  y$ = y$ + chr$(((b * 16) + (c \ 4)) and 255)
620  y$ = y$ + chr$(((c * 64) + d) and 255)
630  goto 400                           ' Get another quad.

700  x$ = mid$(x$,2)                    ' Expand the nulls.
710  r = fnuchr%(x$)                    ' Get the number of nulls.
715 print " Null: ",r
720  x$ = mid$(x$,2)
730   for i=1 to r                      ' Loop, adding nulls to string.
740   y$ = y$ + n$
750   next
760  print#2,y$;                        ' Output the nulls to the file.
770  y$ = ""                            ' Clear the output buffer.
780  goto 400

800  print "Processing complete, elapsed time: "+t$+" to "+time$
810  print "Output in "+f$
820  close #1,#2
830  goto 9999

900  print "?The version of the MSKERMIT.BOO file is incorrect"
910  goto 820
MS-DOS KERMIT                                                          Page 204


9999 end


Here is a listing of MSBOOT.FOR, in case you can't find it on your host system:

C     This Fortran program should be run on the mainframe in conjunction
C     with a Basic program (MSBPCB.BAS) on the PC to transfer
C     MSKERMIT.BOO to the PC and translate it into KERMIT.EXE.  This
C     program uses a very rudimentary technique to try to insure that
C     the characters it sends arrive correctly.  It just sends a count
C     of the number of characters sent after each line.  In this way any
C     errors of character loss or insertion will be caught.  If a
C     character is just corrupted it will not be caught.  Hopefully if
C     this happens it will be in a non-critical part of the KERMIT.EXE
C     file.  The reason a simple checksum was not used was so that this
C     program could run on machines using either EBCDIC or ASCII
C     characters.  This program should take about thirty minutes to run.
C
C     This program assumes that 5 and 6 are directed to the terminal and
C     7 is directed to the file MSKERMIT.BOO.
C
C     Bill Catchings, Columbia University Center for Computing Activities
C     June 1984 (Revised September 1984)
C
      INTEGER LINE(77), ACK(4), CHECK, OK, SPACE, COMMA

      WRITE(6,100)
100   FORMAT(' Ready to transfer data, now run MSPCBOOT.BAS on the PC.')

C     Get characters for constants (character constants are rough in
C     some FORTRANs).
      READ (5,200) OK, SPACE, COMMA, ACK
200   FORMAT(4A1)
      GO TO 20

C     Get terminal handshake.
10    READ (5,200)ACK

C     Did the other side like it?  (Did they send OK?)
      IF (ACK(1) .NE. OK) GO TO 50

C     Yes, get new line from file.
20    READ (7,300,END=99)LINE
300   FORMAT(77A1)

C     Count the characters as some rudimentary check for noise.
      I = 1
30    IF (LINE(I) .EQ. SPACE) GO TO 40
      I = I + 1
      GO TO 30

C     Put in a comma followed by the count.
40    LINE(I) = COMMA

C     Write to TTY.
50    WRITE (6,400)LINE,I-1
MS-DOS KERMIT                                                          Page 205


400   FORMAT(' ',77A1,I2)
      GOTO 10

C     Send good-bye message.
99    WRITE (6,500)
500   FORMAT(' ',10('&'),',10')

      STOP
      END


11.6. Compatibility with Older Versions of MS-DOS Kermit

The last monolithic (single source file) release of MS-DOS Kermit was 1.20.  To
this and earlier versions  was  added  support  for  systems  like  the  Seequa
Chameleon,  the  Tandy 2000, and others.  Eventually, support for these systems
may be integrated with the current modular version.  Meanwhile, implementations
based  on  these  old versions will have at least the following incompatibilies
from the version described here:

   - RECEIVE filespec is used instead of GET filespec.  There  is  no  GET
     command  in  older  versions, and no way to specify a new name for an
     incoming file.
   - No LOCAL or REMOTE commands.
   - No 8th-bit prefixing, repeat counts, CRCs or 2-character checksums.
   - No TAKE or initialization files.
   - No command macros or command line arguments.
   - No terminal session logging.

and others, depending on the specific version.

Incompatibilities between 2.28 and 2.29 include:

   - The SET HEATH command has been replaced with SET TERMINAL HEATH
   - The SET AUTOWRAP command has been replaced with SET TERMINAL WRAP
   - Filename completion no longer works (a consequnce of  adding  support
     for fully qualified DOS 2.0 pathnames).


11.7. What's Missing

Kermit-MS  has  plenty  of  room for improvement.  Features that need to be im-
proved or added include:

   - A built-in facility for sending files "raw"  to  the  remote  system,
     obeying  current settings for parity, flow control, handshake, and so
     forth.

   - Specification of character sequences having special meaning  to  com-
     munications "black boxes" which use ASCII characters for control pur-
     poses.  Byte stuffing or character doubling may be required.

   - TRANSMIT command for raw file upload, obeying communication settings
   - Login scripts, integrated with Kermit commands & settings
   - DIAL command, telephone directory, support for various modems
   - Long packets, sliding windows, attribute packets
MS-DOS KERMIT                                                          Page 206


   - Tektronix or other graphics terminal emulation (except in  TI  Pro  &
     Victor)
   - ANSI printer control added to VT102 emulator
   - Redefinable keys at Kermit-MS> prompt level
   - Control over display of 8-bit characters during CONNECT
   - Pause at end of screen during local TYPE
   - A simple way to make Alt = Meta, without many many SET KEY commands
   - Piped operation a la UNIX (e.g. "compress foo.bar | kermit send")
   - Transaction file logging.
   - A  way  to  accept default values for omitted trailing fields in com-
     mands.
   - A better built-in help facility.


11.8. Program Organization

Kermit-MS version 2 is composed of separate assembler source  files,  assembled
separately, and linked together.  The modules are:

System/Device Independent:

MSSKER.ASM      Main program
MSSSEN.ASM      File sender
MSSRCV.ASM      File receiver
MSSSER.ASM      Server operation
MSSFIL.ASM      File i/o
MSSCMD.ASM      Command parser
MSSTER.ASM      CONNECT command
MSSCOM.ASM      Communications port buffering & flow control
MSSSET.ASM      SET, SHOW, and STATUS commands
MSSFIN.ASM      Dummy  module  to  find  the  end  of the data segment; must be
                linked LAST.
MSSDEF.H        Data structure definitions and equates

System/Device Dependent:

MSXxxx.ASM      System-dependent code for system xxx
MSYxxx.ASM      Terminal emulation for system xxx
MSZxxx.ASM      More terminal emulation for system xxx

The xxx is replaced by a 3-letter code for the particular system, e.g. IBM  for
the IBM PC family, RB1 for the Rainbow-100, etc.

The  modular  organization  allows  easier modification of the program, quicker
transfer of modified portions from system-to-system.  The modules are  designed
to  be  well-defined and self-contained, such that they can be easily replaced.
For instance, someone who prefers windows and mice to typing commands should be
able  replace  the command parsing module without having to worry about the ef-
fect on the other modules.

To assemble any of the Kermit modules, file MSSDEF.H must  be  on  the  default
disk.

All  the  Kermit  implementations  require  the modules MSSCMD, MSSCOM, MSSFIL,
MSSKER, MSSRCV, MSSSEN, MSSSER, MSSSET, MSSTER, MSSFIN.  MSSFIN must be  linked
last.
MS-DOS KERMIT                                                          Page 207


Each  particular  implementation requires at least an MSXxxx module, and, if it
is doing terminal emulation in software, also an MSYxxx and  possible  also  an
MSZxxx  module.    See the batch or make files from the source distribution for
details of exactly which modules are required for a particular implementation.

Once all the required object modules exist, they  may  be  linked  together  to
produce a Kermit program.  For example, on the Rainbow:

  A>link

     Microsoft Object Linker V2.00
  (C) Copyright 1982 by Microsoft Inc.

  Object Modules [.OBJ]: mssker msxrb1 msscom mssset msssen +
  mssrcv mssser mssfil msster msscmd mssfin
  Run File [MSSKER.EXE]: kermit
  List File [NUL.MAP]:

  A>


11.9. Running Kermit on New Systems

You  can bring Kermit-MS to systems that are not explicitly supported in one of
two ways -- attempt to run the "generic" MS-DOS Kermit on it, or  add  explicit
code to support your system.

To  get  started with Kermit on a new system, try running "generic" MS-DOS Ker-
mit; in many cases, it will run as is.  The generic  version  accomplishes  all
its port and console i/o through DOS calls, and during terminal connection does
not attempt to emulate any particular kind of terminal.   In  some  cases,  the
generic version may still require some fiddling to run on a new system; for in-
stance, different systems refer to their communication ports in different  ways
--  COM1,  J1,  AUX,  etc.  The SET PORT command allows you to specify the port
using any of these device names, or using DOS file handles -- keep trying until
you find the one that works.  Generic MS-DOS Kermit will probably run no faster
than 1200 baud, and it only works with DOS 2.0 or later.

If you want to write code to explicitly support a new  system,  first  call  or
write Kermit Distribution at Columbia to make sure no one else is already doing
the same work.  If you're the first, then begin by reading the file MSXAAA.DOC,
provided  with the MS-DOS Kermit sources in the Kermit distribution, which is a
guide to the system dependent modules of Kermit-MS.   Then  create  new  a  new
MSXxxx.ASM  module,  and,  if  your version is also doing terminal emulation in
software, also an MSY and possibly an MSZ module.
MS-DOS KERMIT                                                          Page 208


11.10. IBM-PC MS Kermit Terminal Emulator Summary

                     By Joe Doupnik, Utah State University

This section summarizes the IBM PC  Kermit-MS  keyboard  and  screen  operation
during emulation of H19, VT52, and VT102 terminals.  Note that spaces shown be-
tween characters of escape sequences are there for ease of reading; the  actual
sequences contain no spaces.


11.10.1. Keyboard Layout and Characters Sent

Here  is  how  the  keypad  functions are assigned to the IBM keyboard function
keys:

---------------------------------------------------------------------------

       Heath-19 and VT52 Keypads                     VT102 keypad
              IBM Keys                                 IBM keys
   +------+------+-------+----------+       +------+------+------+------+
   | Blue |  Red |  Grey | up arrow |       |  PF1 |  PF2 |  PF3 |  PF4 |
   |  F1  |  F2  |  F3   | up arrow |       |  F1  |  F2  |  F3  |  F4  |
   +------+------+-------+----------+       +------+------+------+------+
   |  7   |  8   |  9    |down arrow|       |  7   |  8   |  9   |  -   |
   |  F5  |  F6  |  F7   |down arrow|       |  F5  |  F6  |  F7  |  F8  |
   +------+------+-------+----------+       +------+------+------+------+
   |  4   |  5   |  6    | rgt arrow|       |  4   |  5   |  6   |  ,   |
   |  F9  |  F10 |  SF1  | rgt arrow|       |  F9  |  F10 |  SF1 |  SF2 |
   +------+------+-------+----------+       +------+------+------+------+
   |  1   |  2   |  3    |left arrow|       |  1   |  2   |  3   |  E   |
   |  SF3 |  SF4 |  SF5  |left arrow|       |  SF3 |  SF4 |  SF5 |  n  S|
   +------+------+-------+----------+       +------+------+------+  t  F|
   |  0------0   |  .    |  Enter   |       |  0------0   |  .   |  e  6|
   |  SF7        |  SF8  |  SF6     |       |   SF7       |  SF8 |  r   |
   +-------------+-------+----------+       +-------------+------+------+

                SF1 means push Shift and F1 keys simultaneously

---------------------------------------------------------------------------


Cursor Keys

                              H-19 & VT52           VT102
VT52/H19 key   IBM key        All Modes      Numeric   Application
up arrow       up arrow       ESC A          ESC [ A   ESC O A
down arrow     down arrow     ESC B          ESC [ B   ESC O B
right arrow    right arrow    ESC C          ESC [ C   ESC O C
left arrow     left arrow     ESC D          ESC [ D   ESC O D
MS-DOS KERMIT                                                          Page 209


Auxillary Keypad

                              Heath-19 & VT52             VT102
VT52/H19 key   IBM key        Numeric Applic.   Numeric   Applic.

PF1/HF7/Blue   F1             ESC P   ESC P     ESC O P   ESC O P
PF2/HF8/Red    F2             ESC Q   ESC Q     ESC O Q   ESC O Q
PF3/HF9/Grey   F3             ESC R   ESC R     ESC O R   ESC O R
PF4/HF1        F4             ESC S   ESC S     ESC O S   ESC O S
0              SF7            ESC ? p           ESC O p
1              SF3            ESC ? q           ESC O q
2              SF4            ESC ? r           ESC O r
3              SF5            ESC ? s           ESC O s
4              F9             ESC ? t           ESC O t
5              F10            ESC ? u           ESC O u
6              SF1            ESC ? v           ESC O v
7              F5             ESC ? w           ESC O w
8              F6             ESC ? x           ESC O x
9              F7             ESC ? y           ESC O y
- (minus)      F8             ESC ? m           ESC O m
, (comma)      SF2            ESC ? l           ESC O l (ell)
. (period)     SF8            ESC ? n           ESC O n
Enter          SF6            ESC ? M           ESC O M


        (SFn means hold down Shift key while pressing Function key n.)


Other IBM keys operational in Connect mode:

Del (White key) Send ASCII Del code (rubout).
Backspace       Send ASCII Del code (rubout).
Shift BackSpace Send ASCII BS code (backspace).
Keypad (Grey)+  Toggle mode line on/off (only if Mode Line is enabled).
Alt -           Toggle among Heath-19, VT52, and VT100 emulation.
Alt =           Clear screen and reset terminal emulator  to  starting  (setup)
                state.
Home            Roll screen up (text down) to beginning of storage.
End             Roll screen down (text up) to end of storage.
PgUp            Roll screen up (back, earlier) one screen full.
PgDn            Roll screen down (forward, later) one screen full.
Ctrl-PgUp       Roll screen up one line.
Ctrl-PdDn       Roll screen down one line.

Control PrtSc   Toggle  on/off copying of received text to printer, "PRN" shows
                on far right of mode line when activated.

Control-End     Dump image of screen  to  a  disk  file  or  device.    Default
                filename  is  KERMIT.SCN  in the current directory. Use command
                SET DUMP to change the filename.  Screen images are appended to
                the file, separated by formfeeds.

Shift-PrtSc     Standard Print-screen, dump screen image to printer.

"Alt  -"  means  hold down Alt and type minus.  This switches among the various
kinds of emulation, but does  not  change  most  operating  parameters  of  the
MS-DOS KERMIT                                                          Page 210


emulator.


CONNECT Escape Commands

Type Kermit escape character (normally "^]"), then one of the keys below:

    ?   display this short list.
    0   send a null character.
    B   send a BREAK signal.
    C   close connect session & return to Kermit prompt.
    F   dump screen to filespec, default is Kermit.scn.
    M   toggle mode line on/off.
    P   push to DOS.
    Q   quit (suspend) logging.
    R   resume logging.
    S   show status.
    Kermit escape character itself: send it to the host.


11.10.2. Responses To Characters Received By the Terminal Emulator

Unknown  escape  sequences  of the form "ESC char" are absorbed by the emulator
without further effect.

DEC VT102 functions while in ANSI (VT102) mode, unsupported features marked  by
asterisk (*):


Escape Seq     Mnemonic       Description of Action
ESC D          IND            Index, moves cursor down one line, can scroll
ESC E          NEL            Move cursor to start of line below, can scroll
ESC H          HTS            Set one horizontal tab at current position
ESC M          RI             Reverse Index, cursor up one line, can scroll
ESC Z          DECID          Indentify terminal (response is ESC [ ? 6 c)
ESC c          RIS            Reset terminal to initial state
ESC =          DECKPAM        Enter keypad application mode
ESC >          DECKNPNM       Enter keypad numeric mode
ESC 7          DECSC          Save cursor position and attributes
ESC 8          DECRC          Restore cursor from previously saved position
ESC # 3        DECDHL         Double height and width line, top half
ESC # 4        DECDHL         Double height and width line, bottom half
ESC # 5        DECSWL         Single height and width line
ESC # 6        DECDWL         Double width single height line
ESC # 8        DECALN         Screen alignment diagnostic - not supported
ESC [ Pn A     CUU            Cursor up Pn lines, does not scroll
ESC [ Pn B     CUD            Cursor down Pn lines, does not scroll
ESC [ Pn C     CUF            Cursor forward, stays on same line
ESC [ Pn D     CUB            Cursor backward, stays on same line
ESC [ Pn; Pn H CUP            Set cursor to row, column (same as HVP)
ESC [ Ps J     ED             Erase in display:
                               0 = cursor to end of screen, inclusive
                               1 = start of screen to cursor, inclusive
                               2 = entire screen, reset lines to single
                                   width, cursor does not move.
ESC [ Ps K     EL             Erase in line:
MS-DOS KERMIT                                                          Page 211


                               0 = cursor to end of line, inclusive
                               1 = start of line to cursor, inclusive
                               2 = entire line
ESC [ Pn L     (VT102)        Insert Pn lines preceding current line.
ESC [ Pn M     (VT102)        Delete Pn lines from current downward, incl.
ESC [ Pn P     (VT102)        Delete Pn chars from cursor to left, incl.
ESC [ Pn; Pn R CPR            Cursor report (row, column), sent by terminal
                              Example: home position yields ESC [ 1; 1 R
ESC [ Pn c     DA             Device attributes (reports ESC [ ? 6 c)
ESC [ Pn; Pn f HVP            Set cursor to row, column (same as CUP)
ESC [ Ps g     TBC            Tabs clear, 0 = at this position, 3 = all
ESC [ 20 h     LNM            Set newline mode (lf = cr/lf)
ESC [ 20 l     LNM            Reset newline mode (lf = lf)
ESC [ ? Ps;...;Ps h  SM       Set mode, see table below
ESC [ ? Ps;...;Ps l  RM       Reset mode, see table below

        Ps     mnemonic       mode           set            reset
        0                     error (ignored)
        1      DECCKM         cursor keys    application    cursor/numeric
        2      DECANM         ANSI/VT52      ANSI/VT102     VT52
        3      DECCOLM        Columns        *132 col       80 col
        4      DECSCLM        *Scrolling     smooth         jump
        4      (VT102)        Insert/Replace insert         replace
        5      DECSCNM        Screen         reverse video  normal
        6      DECOM          Origin         relative       absolute
        7      DECAWM         Autowrap       on             off
        8      DECARM         *Autorepeat    on             off
        9      DECINLM        *Interlace     on             off
        18     (VT102)        *Printer termination character
        19     (VT102)        *Printer extent

ESC [ Pn i     (VT102)        *Printer controls
ESC [ ? Pn i   (VT102)        *Printer controls
ESC [ Ps;...;Ps m  SGR        Select graphic rendition
                               0 = all attributes off (#'s 1, 4, 5, 7)
                               1 = bold, intensify foreground
                               4 = underscore (reverse video on IBM CGA)
                               5 = blink
                               7 = reverse video
               non-DEC extensions: 30-37 = foreground color = 30 + colors
                                   40-47 = background color = 40 + colors
                                   colors: 1 = red, 2 = green, 4 = blue
ESC [ Ps n     DSR            Device Status Report.
                              Response from VT100: 0 = ready, 3=malfunction.
                              Command to VT100: 5 = report status with DSR,
                              6 = report cursor position using CPR sequence.
ESC [ Ps;...;Ps q  DECLL      Load LEDs, Ps=0 means clear LED#1-4
                              Ps = 1,2,3,4 sets LED # 1,2,3,4
ESC [ Pn; Pn r DECSTBM        Set top and bottom scrolling margins
ESC [ sol x    DECREQTPARM    Request terminal parameters, see table below
ESC [ sol; par; nbits; xspeed; rspeed; clkmul; flags x
               DECREPTPARM    Reports terminal parameters
                              *sol = 0  request; term can send unsolicited
                                reports - not supported
                              sol = 1, request; term reports only on request
                              sol = 2, this is a report (DECREPTPARM)
MS-DOS KERMIT                                                          Page 212


                              sol = 3, terminal reporting only on request
                              par = 1 none, 2 space, 3 mark, 4 odd, 5 even
                              nbits = 1 (8 bits/char), 2 (7 bits/char)
                              xspeed,rspeed = transmit & receive speed index
 0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120 correspond to speeds of
 50,75,110,134.5,150,200,300,600,1200,1800,2000,2400,3600,4800,9600,19200 baud
                              clkmul = 1 (clock rate multiplier is 16)
                              flags = 0-15 (Setup Block #5), always 0 here
ESC [ 2; Ps y  DECST          *Confidence tests - not supported
               SCS            Select character sets.
ESC ( A        SCS            G0 points to UK symbols
ESC ) A        SCS            G1 points to UK symbols
ESC ( B        SCS            G0 points to ASCII symbols
ESC ) B        SCS            G1 points to ASCII symbols
ESC ( 0        SCS            G0 points to special (line drawing) graphics
ESC ) 0        SCS            G1 points to special (line drawing) graphics
ESC ( 1        SCS            *G0 points to alt char ROM - not supported
ESC ) 1        SCS            *G1 points to alt char ROM - not supported
ESC ( 2        SCS            *G0 points to alt graphics ROM - not supported
ESC ) 2        SCS            *G1 points to alt grpahics ROM - not supported

^G             BELL           Sound VT102 style beep
^H             BS             Backspace, move cursor left one character
^I             HT             Horizontal tab, move cursor to next tabstop
^J             LF             Linefeed, move cursor down one line
^L             FF             Formfeed, treated as a line feed
^M             CR             Carriage return, move cursor to col 1
^N             SO             Invoke usage of G1 character set
^O             SI             Invoke usage of G0 character set

Other extensions:
ESC [ ? 6 h  ESC [ 25; Pc f   VT52/VT100 move cursor to 25th line.
ESC [ ? 6 h  ESC [ 25; Pc H   VT52/VT100 move cursor to 25th line.
                              (These will disable Kermit's own status line.)
ESC * char                    VT200 series graphics command, ignored.


11.10.3. DEC VT102 functions while in VT52 mode

Escape seq                    Description of action
ESC A                         Cursor up
ESC B                         Cursor down
ESC C                         Cursor right
ESC D                         Cursor left
ESC F                         Enter graphics mode
ESC G                         Exit graphics mode
ESC H                         Cursor home
ESC I                         Reverse line feed
ESC J                         Erase to end of screen
ESC K                         Erase to end of line
ESC Y row column              Direct cursor address, offset from space
ESC Z                         Identify (response is ESC / Z)
ESC =                         Enter alternate keypad mode
ESC >                         Exit alternate keypad mode
ESC <                         Enter ANSI mode (changes to VT102)
MS-DOS KERMIT                                                          Page 213


11.10.4. Heath-19 functions while in non-ANSI mode

Escape seq     Mnemonic       Description of action
ESC A          HCUU           Cursor Up
ESC B          HCUD           Cursor Down
ESC C          HCUF           Cursor Forward, can jump to next line
ESC D          HCUB           Cursor Backward, can jump to previous line
ESC E          HCD            Clear display
ESC F          HEGM           Enter Graphics mode
ESC G          HXGM           Exit Graphic mode
ESC H          HCUH           Cursor Home
ESC I          HRI            Reverse Index
ESC J          HEOP           Erase to end of page
ESC K          HEOL           Erase to end of line
ESC L          HIL            Insert line
ESC M          HDL            Delete line
ESC N          HDCH           Delete character
ESC O          HERM           Exit Insert Char mode
ESC Y row col  HDCA           Direct cursor addressing, offset from space
ESC Z          HID            Identify (responds ESC / K  which is a VT52)
ESC b          HBD            Erase Beginning of display
ESC j          HSCP           Save cursor position
ESC k          HRCP           Set cursor to saved position
ESC l          HEL            Erase entire line
ESC n          HCPR           Cursor Position Report request
ESC o          HEBL           Erase beginning of line
ESC p          HERV           Enter Reverse Video mode
ESC q          HXRV           Exit Reverse Video mode
ESC r Bn       HMBR           *Modify baud rate - not supported
ESC t          HEKS           *Enter Keypad shifted mode, not supported
ESC u          HXKS           *Exit Keypad shifted mode, not supported
ESC v          HEWA           Wrap around at end of line
ESC w          HXWA           Discard at end of line
ESC x Ps       HSM            Set Mode. See table below
ESC y Ps       HRM            Reset Mode. See table below

        Ps     Mnemonic       Mode           Set            Reset
        1      HSM/HRM        25th line      enabled        disabled
        2                     *keyclick      off            on
        3                     *holdscreen    enabled        disabled
        4                     cursor type    block          underl.
        5                     *cursor on/off on             off
        6                     *keypad shifted  shifted      unshiftd
        7                     alt app keypad  enabled       disabled
        8                     *linefeed      CR=CRLF        just CR
        9                     newline mode   enabled        disabled

ESC z          HRAM           Reset to power-up configuration
ESC =          HAKM           Enter Alternate Keypad mode
ESC >          HXAM           Exit Alternate Keypad mode
ESC <          HEAM           Enter ANSI mode (ESC [ stuff)
ESC @          HEIM           Enter Insert Char mode
ESC [          HEHS           *Enter Hold Screen mode, not supported
ESC \          HXHS           *Exit Hold Screen mode, not supported
ESC { and }    HEK, HDK       *Keyboard enable/disable, not supported
ESC ]          HX25           *Transmit 25th line, not supported
MS-DOS KERMIT                                                          Page 214


ESC #          HXMP           *Transmit page, not supported


Heath-19 functions while in ANSI mode

Escape Seq     Mnenonic       Description of Action
ESC [ s        PSCP           Save cursor position & attributes
ESC [ u        PRCP           Restore cursor position & attributes
ESC [ z        PRAM           Reset to power-up configuration
ESC [ 2 J      ED             Erase entire screen but do not move cursor;
                              regular Heath-19 moves cursor to Home.
ESC [ ? 2 h    PEHM           Revert to normal Heath-19 non-ANSI mode
ESC [ > Ps h   SM             Same as ESC x Ps
ESC [ > Ps l   RM             Same as ESC y Ps

Plus most of the ANSI escape sequences listed for the VT102.
CP/M-80 KERMIT                                                         Page 215


12. CP/M-80 KERMIT

Program:    Bill   Catchings,  Columbia  University,  with  contributions  from
            Charles Carvalho (ACC), Bernie Eiben (DEC),  Nick  Bush  (Stevens),
            John   Bray  (University  of  Tennessee),  Bruce  Tanner  (Cerritos
            College), Greg Small (University of California at Berkeley),  Kimmo
            Laaksonen (Helskini University of Technology), and many others.
Language:   8080 Assembler or MAC80
Version:    4.05
Date:       February 1985
Documentation:
            Charles Carvalho, ACC; Frank da Cruz, Columbia

KERMIT-80 Capabilities At A Glance:

  Local operation:                   Yes
  Remote operation:                  No
  Transfers text files:              Yes
  Transfers binary files:            Yes
  Wildcard send:                     Yes
  ^X/^Z interruption:                Yes
  Filename collision avoidance:      Yes
  Can time out:                      Yes
  8th-bit prefixing:                 Yes
  Repeat count prefixing:            No
  Alternate block checks:            Yes
  Terminal emulation:                Yes, VT52 and others
  Communication settings:            Yes; duplex, parity
  Transmit BREAK:                    Yes; some versions
  IBM communication:                 Yes
  Transaction logging:               No
  Session logging (raw download):    Yes
  Raw upload:                        Yes
  Act as server:                     No
  Talk to server:                    Yes; SEND, GET, FIN, BYE
  Advanced commands for servers:     No
  Local file management:             Yes; DIR, ERA, SET DEFAULT disk
  Handle file attributes:            No
  Command/init files:                No
  Printer control:                   Yes, limited


12.1. Summary of CP/M

CP/M-80 (version 2.2) has only five built-in commands, and they all  deal  with
files; other functions are done by invoking programs.

CP/M file specifications are of the form DEV:XXXXXXXX.YYY, where

DEV:            is  a  device  name, normally the A: or B: floppy.  If omitted,
                the device name defaults to your connected diskette.

XXXXXXXX        is a filename of up to 8 characters.

YYY             is the file type, up to 3 characters.
CP/M-80 KERMIT                                                         Page 216


File names and file types may contain letters, digits, and some special charac-
ters, including dash, dollar sign, and underscore, but no imbedded spaces.  Up-
per and lower case letters are equivalent.

"Wildcard" file-group specifications are permitted in file names and file types
(but  not device names) within certain contexts; a "*" matches a whole field, a
"?"  matches a single character, including space.  Examples: "*.F??"  specifies
all  files  whose types start with F and are 1, 2, or 3 characters long; "F?.*"
specifies all files whose names start with F and are no more than  two  charac-
ters long (before the trailing spaces).

The five CP/M commands are:

DIR file        Lists  the  the names of the specified files.  The default file
                specification is "*.*".  Example: "DIR B:*.FOR".

ERA file        Erases (deletes) the specified file(s); wildcards allowed.

REN new old     Changes the name of a file from old to new, e.g.
                "REN NEW.FOR=OLD.FOR".

SAVE            Saves the specified number of memory blocks into a file.

TYPE file       Types the specified file on the screen, e.g.  "TYPE FOO.TXT".

The most important programs are:

STAT            Gives statistics on disk usage; sets and displays IOBYTE.

PIP             Peripheral Interchange Program.  Copies files.  In response  to
                the "*" prompt, give a command of the form

                  disk:outfile=disk:infile

                Wildcards  ("*"  for a whole field or "?"  for a letter) can be
                used.  Examples: "A:=B:*.*" to copy a whole disk,  "A:=B:*.FOR"
                to  copy all the Fortran programs from disk B to disk A. If the
                disk specification is omitted, your  "connected"  disk  is  as-
                sumed.    Command  line  arguments are also accepted, e.g. "PIP
                A:=B:*.*".

For further information on CP/M, consult your microcomputer manual  or  a  CP/M
handbook.


12.2. Kermit-80 Description

Since  Kermit-80  runs  on  a  standalone micro, it is always in control of the
screen -- it is always local.  Thus, it always keeps the  screen  updated  with
the  file  name and the packet number, whether sending or receiving.  Kermit-80
is capable of an imprecise or "fuzzy" timeout on  an  input  request,  and  can
break  deadlocks  automatically.  In most cases, this is not important, because
the KERMIT on the other side is most likely able to handle the timeouts.    The
timeouts  done  by  Kermit-80 are fuzzy because they depend on the speed of the
processor and other factors that can vary from system to system.
CP/M-80 KERMIT                                                         Page 217


If despite the timeout capability, the transmission appears to  be  stuck  (and
you  can tell that this has happened if the screen fails to change for a while)
you can type carriage return to have the micro do what it would have done on  a
timeout,  namely  NAK  the  expected packet to cause to foreign host to send it
again (or, if the micro is sending, to retransmit the  last  packet).    Micro/
micro or micro/IBM-mainframe transfers could require this kind of manual inter-
vention.

File transfers may be interrupted in several ways.

Control-C       This will return you to Kermit-80 command level immediately, so
                that  you  can  connect  back to the remote system, or take any
                other desired action.

Control-X       When sending a file, this will terminate  the  sending  of  the
                current  file  with a signal to the KERMIT on the other side to
                discard what it got so far.  If there  are  more  files  to  be
                sent,  KERMIT-80  will go on to the next one.  When receiving a
                file, KERMIT-80 will send a signal to the remote KERMIT to stop
                sending  this file.  If the remote KERMIT understands this sig-
                nal (not all implementations of KERMIT  do),  it  will  comply,
                otherwise  the  file will keep coming.  In any case, the remote
                KERMIT will go on to the next file in the group, if any.

Control-Z       Like Control-X, except if a file group  is  being  transmitted,
                this will stop the transmission of the entire group.  If only a
                single  file  is  being  transmitted,  it  works  exactly  like
                Control-X.

Carriage Return If you type a carriage return Kermit-80 will resend the current
                packet.  You may do this repeatedly, up  to  the  packet  retry
                limit  (somewhere  between  5  and  16  times) for a particular
                packet.


                              KERMIT-80 COMMANDS

KERMIT-80 uses the DECSYSTEM-20 keyword style command language.   Each  keyword
may be abbreviated to its minumum unique length.  "?" may be typed to request a
menu of the available options for the current field at any point in a  command.
ESC  may  be typed at any point in a command to fill out the current keyword or
filename; if sufficient characters have not been typed to identify the  current
field uniquely, KERMIT-80 will sound a beep and allow you to continue from that
point.

CONNECT Establish a "virtual terminal" connection to any host that may be  con-
        nected  to the serial port, i.e. pass all typein to the serial port and
        display all input from the serial port on the screen.  Also, emulate  a
        DEC   VT52   to   allow  cursor  control,  screen  clearing,  etc.,  if
        VT52-EMULATION is ON (see below), in which case  you  should  also  set
        your  terminal type on the remote host to VT52.  (Some versions emulate
        other terminals.)  The escape character differs from  micro  to  micro;
        when  you  issue  the  CONNECT  command, the micro will print a message
        telling you how to get back.   The  escape  sequence  is  generally  an
        uncommonly-used    control    character,    like    CTRL-backslash   or
        CTRL-rightbracket, followed by a single letter "command".
CP/M-80 KERMIT                                                         Page 218


        C   Close Connection, return to Kermit-80> command level.
        S   Display Status of connection, but maintain remote connection.
        ?   List available single-character commands.
        0   (zero) Send a null (0) character.
        B   Send a BREAK signal.  Only some systems provide this function.
        ^]  (or whatever - a second copy of the escape character) Send the  es-
            cape character itself to the remote host.

SEND filespec
        Send file(s) specified by filespec to the remote Kermit.  The  filespec
        may contain CP/M wildcards.

RECEIVE Receive  file(s)  from  the  remote Kermit.  Store them under the names
        provided in the file headers supplied by the remote host.  If the names
        aren't  legal,  use  as many legal characters from the name as possible
        (see the description of SET FILE-WARNING below).   If  there's  a  con-
        flict,  and FILE-WARNING is ON, warn the user and try to build a unique
        name for the file by adding "&" characters to the name.

GET filespec
        When  Kermit-80  is  talking to a Kermit Server on the host, you should
        use the GET command to request the server to send files to you, for ex-
        ample:

          get hlp:k*.hlp

        Limitation:  If you request an alternate block check type using the SET
        BLOCK command, the GET command will not communicate it  to  the  remote
        server.  If you want to have type 2 or 3 block checks done when getting
        files from the server, you have to issue the appropriate SET BLOCK com-
        mand to the remote KERMIT before putting it in server mode.

LOG filespec
        When CONNECTed to a foreign host as a terminal, log the  terminal  ses-
        sion  to  the  specified  diskette file.  This functionality depends to
        some extent on the remote host's ability to do XON/XOFF  flow  control,
        and  does  not  guarantee a complete transcript (after all, that's what
        the KERMIT protocol is for).  The log file is closed when  the  connec-
        tion  is  closed by typing the escape character followed by the single-
        character command "C".

TRANSMIT filespec
        Send  the  specified file to the system on the other end of the connec-
        tion as though it were being typed at the terminal, one line at a time.
        No  KERMIT  protocol is involved.  You must manually confirm each line.
        This is useful for sending files to systems that don't  have  a  KERMIT
        program.    During transmission, you may type the escape character fol-
        lowed by one of these single-character commands:

        C   Cease transmission
        R   Re-transmit the previous line

BYE     When talking to a remote Kermit Server, this  command  shuts  down  the
        server  and  logs it out, and also exits from Kermit-80 to CP/M command
        level.
CP/M-80 KERMIT                                                         Page 219


LOGOUT  Like BYE, but leaves you at Kermit-80 command level.

FINISH  Like LOGOUT, but shuts down the remote server without logging  it  out.
        Leaves you at Kermit-80 command level; subsequent CONNECT commands will
        put you back at host system command level.

VERSION Show the name, edit number, and edit date of  several  of  the  modules
        that make up Kermit-80.

SET parameter [value]
        Set the specified parameter to the specified value.  Possible settings:

        WARNING ON (or OFF)
                Warn  user  of  filename  conflicts  when  receiving files from
                remote host, and attempt to generate a unique  name  by  adding
                "&" characters to the given name.  ON by default.

        VT52-EMULATION ON (or OFF)
                When connected as  a  terminal  to  a  foreign  host,  controls
                whether  the  micro  emulates  a VT52 or runs in "native mode".
                VT52 emulation is ON by default, except on micros that  already
                have terminal functionality built in, such as the DEC VT180 and
                DECmate (these act as VT100-series terminals).    Some  systems
                emulate other terminals, like the ADM3A; see table 12-3.

        LOCAL-ECHO ON (or OFF)
                When you CONNECT to a remote host, you must set  LOCAL-ECHO  ON
                if  the  host  is  half  duplex,  OFF  if  full duplex.  OFF by
                default.

        ESCAPE  Change the escape character for virtual  terminal  connections.
                Kermit-80  will  prompt you for the new escape character, which
                you enter literally.

        BAUD-RATE
                Change  the baud rate of the communications port.  This command
                only works on some systems.  value is  the  numeric  baud  rate
                (300,  9600,  etc.) desired.  Type SET BAUD followed by a ques-
                tion mark for a list of supported baud rates.  On systems  that
                do  not  support  this command, you must set the port baud rate
                from CP/M or other setup mechanism outside of KERMIT-80.

        PARITY  Sets parity for outgoing characters to one  of  the  following:
                NONE,  SPACE, MARK, EVEN, or ODD.  On input, if parity is NONE,
                then the 8th bit is kept (as data), otherwise  it  is  stripped
                and  ignored.  The parity setting applies to both terminal con-
                nection and file transfer.  If you set parity to anything other
                than none, KERMIT-80 will attempt to use "8th bit prefixing" to
                transfer binary files.  If the other KERMIT is also capable  of
                8th  bit  prefixing,  then binary files can be transferred suc-
                cessfully; if not, the 8th bit of each data byte will  be  lost
                (you will see a warning on your screen if this happens).

        TIMER ON (or OFF)
                Enable or disable the "fuzzy timer".    The  timer  is  off  by
                default,  because in the normal case KERMIT-80 is communicating
CP/M-80 KERMIT                                                         Page 220


                with a mainframe KERMIT that has its own timer.  Mainframe KER-
                MIT  timers  tend  to  be more precise or adaptable to changing
                conditions.  You should SET TIMER ON if you  are  communicating
                with a KERMIT that does not have a timer.  You should SET TIMER
                OFF if you are communicating over a network with long delays.

        IBM ON (or OFF)
                Allow  the  transfer of files to and from an IBM mainframe com-
                puter.  This  makes  Kermit-80  wait  for  the  IBM  turnaround
                character (XON), ignore parity on input, add appropriate parity
                to output, and use local  echoing  during  CONNECT.    As  dis-
                tributed, KERMIT-80 uses MARK parity for IBM communication.  If
                you don't give this command, IBM mode is OFF.  Since IBM VM/CMS
                KERMIT  does not have timeout capability, SET IBM ON also turns
                on the "fuzzy timer" automatically.

        BLOCK-CHECK-TYPE
                The options are:

                1-CHARACTER-CHECKSUM
                        Normal, default, standard 6-bit checksum.
                2-CHARACTER-CHECKSUM
                        A 12-bit checksum encoded as two characters.
                3-CHARACTER-CRC-CCITT
                        A 16-bit CCITT-format Cyclic Redundancy Check,  encoded
                        as 3 characters.

                The  2  and  3 character options should only be used under con-
                ditions of extreme line noise.  Many implementations of  KERMIT
                only support the single character checksum.

        FILE-MODE
                Tells KERMIT-80 what kind of file it is sending, so that KERMIT
                can  correctly  determine the end of the file.  SET FILE BINARY
                means to send all the 128-byte blocks of  the  file,  including
                the last block in its entirety; SET FILE ASCII is used for text
                files, and transmission stops when the first Control-Z  is  en-
                countered anywhere in the file (this is the CP/M convention for
                marking the end of a text file).  SET FILE DEFAULT tells Kermit
                to attempt to determine the file type by examining the file be-
                ing transmitted.  If a Control-Z appears before the last  block
                of  the  file,  it  is assumed to be BINARY; if, when the first
                Control-Z is encountered, the remainder of  the  file  contains
                only  control-Z's,  it  is  assumed  to be a text file.  Unfor-
                tunately, not all programs  fill  the  remainder  of  the  last
                record  of  a  text file with Control-Z's, so this algorithm is
                not always successful.  If binary transmission  is  used  on  a
                text  file,  some extraneous characters (up to 127 of them) may
                appear at the end of the file on the target system.   If  ASCII
                transmission is used on a binary file, the entire file will not
                be sent if it happens to contain any data bytes that correspond
                to Control-Z.

        DEFAULT-DISK
                This allows you to set the default disk as source and  destina-
                tion  of  file  transfers.    In addition, issuing this command
CP/M-80 KERMIT                                                         Page 221


                causes you to switch to the  specified  disk  and  log  it  in,
                write-enabled.    The  colon  must be included in the disk name
                (A:).  The selected disk appears in your KERMIT-80 prompt,  for
                instance

                  Kermit-80 A:>

        PORT    Allows  you  to  switch  between different communication ports.
                This command is not available on all systems.  Type SET PORT  ?
                for a list of valid options for your system.

        PRINTER ON  or OFF.  Turns copying of CONNECT session to printer on and
                off.  No attempt is made to do buffering or flow control;  Ker-
                mit assumes the printer can keep up.

        DEBUG   ON  or  OFF.    Enables/disables  displaying  of packets on the
                screen during file transfer.

DIRECTORY
        This  provides a directory listing of the specified files.  If no files
        are specified, all files on the default disk are listed.   File  sizes,
        in  K,  are  included.    You  may interrupt the listing at any time by
        typing any character.  The listing (even if interrupted) concludes with
        a display of the amount of free storage left on the disk.

ERASE   This executes the CP/M ERA command on the specified file(s).  The names
        of the files being erased are not displayed.


12.3. Kermit-80 Flavors

Many of the systems supported use an external terminal, rather than a  built-in
console.    Kermit  may be further customized for these systems by defining (at
assembly time) the terminal type to be used.  If the terminal type  is  unknown
or  does  not match any of the existing terminal options, the generic "CRT" op-
tion may be selected.  In this case, Kermit  cannot  do  fancy  screen  control
during  file transfer; it simply types the file names, packet numbers, and mes-
sages in sequence across and down the screen.  This works best if you  can  put
your  micro  or  terminal in "autowrap" mode; otherwise the packet numbers will
pile up in the rightmost column; the filenames and messages will always  appear
on a new line, however.  If no specific terminal has been selected, Kermit can-
not do VT52 emulation; it can act as a  "dumb  terminal"  (sometimes  called  a
"glass  TTY"),  or else its own built in terminal firmware provides cursor con-
trol functions independent of the Kermit program.


12.3.1. Generic Kermit-80

"Generic Kermit-80" is an implementation of Kermit that should run on any 8080-
compatible CP/M 2.2 system with no modification at all, or perhaps only a minor
one.  Unlike other Kermit-80 implementations, it contains  no  system-dependent
manipulation  of  the  serial  port.    All I/O is done with standard CP/M BIOS
calls, and I/O redirection is done using the CP/M IOBYTE function,  which,  ac-
cording  to  the  Digital Research CP/M Operating System Manual, is an optional
feature of any particular CP/M implementation.  If your system does not provide
the IOBYTE function, Generic Kermit-80 will not work; furthermore, not all sys-
CP/M-80 KERMIT                                                         Page 222


tems that implement IOBYTE do so in the same way.  The SET PORT command may  be
used  to  select the devices to be used for input and output.  Table 12-1 lists
the options to the SET PORT command and their effects.

  -------------------------------------------------------------------------


                    SET PORT xxx    input from      output to
                         CRT            CRT:            CRT:
                         PTR            PTR:            PTP:
                         TTY            TTY:            TTY:
                         UC1            UC1:            UC1:
                         UR1            UR1:            UP1:
                         UR2            UR2:            UP2:
                   Table 12-1:   Kermit-80 SET PORT Options

  -------------------------------------------------------------------------

The default is SET PORT PTR.  In all cases, the console (CON:) and list  (LST:)
devices used are those selected when Kermit is started.

The  reason all Kermit-80 implementations aren't generic is that a good deal of
speed is sacrificed by getting all services from the operating system.  While a
specific  implementation  of Kermit-80 may be able to operate at 4800, 9600, or
even 19200 baud, Generic Kermit will fail to work on some systems at speeds  in
excess  of  1200  baud.    In  addition,  many  features of Kermit require more
specific knowledge of the hardware involved -- Generic  Kermit  cannot  send  a
BREAK signal, or change the baud rate.


12.3.2. CP/M 3 Kermit

CP/M  3  Kermit  should  run  on  most CP/M 3 (CP/M-Plus) systems.  It uses the
auxilliary port (AUX:) to communicate to the remote Kermit.  The SET  BAUD  and
SET  PORT  commands  are  not supported; nor can a BREAK be sent.  Like Generic
Kermit, a terminal may be selected at assembly time.


12.3.3. System-Specific Versions

There are also many versions of Kermit-80 tailored to specific systems.    Most
of  these  operate  uniformly,  but  some  of  them  take  advantage (or suffer
limitations) of the specific system.  Here are some of the special features for
particular systems:

Apple II -- two variations:

    APMMDM:
        Apple with Z80 Softcard and Micromodem II in slot 2 Dialout  capability
        provided  in connect command; user is prompted for phone number if car-
        rier is not present.  During connect mode, ^]D drops carrier.  BYE com-
        mand also causes carrier to be dropped.

    AP6551:
        Apple with Z80 Softcard, and one of  several  6551-based  communication
        cards; the slot number is a compile-time parameter (default is slot 2).
CP/M-80 KERMIT                                                         Page 223


        SET BAUD-RATE supported; speeds are 110-19200 baud.

BigBoard II:
    Uses  serial  port  A. To use port B, change mnport, mnprts, and baudrt and
    reassemble.  Can generate BREAK.    SET  BAUD-RATE  supported;  speeds  are
    300-38400 baud.

Digicomp Delphi 100:
    SET BAUD-RATE supported; speeds are 50-19200 baud.

CPT-85xx word processors:
    Can generate BREAK.  SET BAUD-RATE supported; speeds are 50-9600 baud.

DEC DECmate II word processor (with Z80 card):
    Can generate BREAK.

DEC VT180 (Robin):
    Three  output  ports,  referred to as COMMUNICATIONS, GENERAL, and PRINTER.
    Can generate BREAK.

Intertec SuperBrain:  SET BAUD-RATE supported; speeds are 50-19200 baud.

Kaypro:
    Should  work  on  most  Kaypro  models,  as  well  as  some related systems
    (Ferguson BigBoard I, Xerox 820).  For  the  newer  Kaypros  with  multiple
    ports,  Kermit uses the one labeled "serial data"; it cannot use the serial
    printer or internal modem ports (but it should be possible  to  modify  the
    values  for  mnport,  mnprts,  and baudrt to do this).  Can generate BREAK.
    SET BAUD-RATE supported; speeds are 50-19200 baud.

Morrow Decision I:
    Uses  the Multi-I/O board.  Port 1 is the console, port 3 is the communica-
    tions line.  SET BAUD-RATE supported; speeds are 75-56000 baud.

Nokia MicroMikko:
    Will  not  echo control-O (which locks keyboard).  SET BAUD-RATE supported;
    speeds are 75-9600 baud.

Ohio Scientific:
    Doesn't have screen control.

Osborne 1:Uses serial line, not internal modem.  Left-arrow key generates <DEL>
    ("delete" or "rubout" character) during connect mode.  SET  BAUD-RATE  sup-
    ported; speeds are 300 and 1200 baud.

TRS-80: Two versions, one for Lifeboat CP/M, one for Pickles & Trout CP/M.


12.4. Installation of Kermit-80

Kermit-80  was written originally for the Intertec SuperBrain in lowest-common-
denominator  8080 code with the standard assembler, ASM (single source  module,
no  macros,  no  advanced  instructions),  so that it could be assembled on any
CP/M-80 system (the 8080  assembler  is  distributed  as  a  standard  part  of
CP/M-80,  whereas  the  fancier Z80 or macro assemblers are normally commercial
products).  It has since been modified to run on many other  systems  as  well.
CP/M-80 KERMIT                                                         Page 224


Kermit-80  should be able to run on any 8080-, 8085- or Z80-based microcomputer
under  CP/M with appropriate minor changes to reflect the port i/o  and  screen
control for the system (see below).

The  proliferation  of new systems supported by Kermit-80 made the program grow
so large and complicated that it had to be broken  up  into  system-independent
and  system-dependent  modules,  as of version 4 (this was done by Charles Car-
valho of ACC).  Each module is composed of multiple files.   This  has  reduced
the time and disk space necessary for assembly; Kermit-80 may once again be as-
sembled on a CP/M system with roughly 150Kbytes of space.  The majority of  the
code  does  not need to be reassembled to support a new system.  Unfortunately,
it can no longer be assembled with ASM, since ASM does not support multiple in-
put  files.   To allow it to be assembled on any CP/M system, the public-domain
assembler LASM is included in the distribution kit; Kermit-80 may also  be  as-
sembled  with Microsoft's M80 (not supplied), or cross-assembled on a DEC-10 or
DEC-20 with MAC80 (also supplied in the distribution kit).  In theory, any 8080
assembler supporting the INCLUDE directive ought to work, as well.

All versions of Kermit-80 are assembled from the same set of sources, with sys-
tem dependencies taken care of by assembly-time conditionals within the system-
dependent module (eventually, the system-dependent module will itself be broken
up into multiple files, one for each system).  The most important system depen-
dencies  are  terminal emulation (when CONNECTed to the remote host) and screen
handling, which are dependent on the individual  micro's  escape  codes  (these
features  are table driven and easily modified for other CP/M systems), and the
lowest level i/o routines  for  the  serial  communications  port.    The  port
routines  are  best  done  only  with BDOS calls, but some systems do not allow
this, primarily because the BDOS routines strip the parity bit during port i/o,
and the parity bit is used for data when transmitting binary files.

Kermit-80's  I/O routines must check the port status and go elsewhere if no in-
put is available; this allows for virtual terminal connection, keyboard  inter-
ruption  of  stuck  transmissions,  etc.    On systems that fully implement I/O
redirection via the optional CP/M IOBYTE facility, this may be done by  switch-
ing  the IOBYTE definition.  On others, however, IN/OUT instructions explicitly
referencing the port device registers must be used.

CP/M-80 KERMIT versions 3.8 and later include a "fuzzy  timer"  that  allows  a
timeout to occur after an interval ranging from 5 to 20 seconds (depending upon
the speed of the processor and the operating system routines) during which  ex-
pected  input does not appear at the port.  In this case, retransmission occurs
automatically.  In any case, you may type a carriage return during transmission
to simulate a timeout when the transfer appears to be stuck.


12.4.1. Organization of Kermit-80

Kermit-80  consists  of  two  modules, each of which is generated from multiple
source files.  The first  module  contains  the  system-independent  code;  the
second module is configured for a particular system and merged with the system-
independent module to produce a customized Kermit-80.

The distribution kit contains:

   - the system-independent module, CP4KER.HEX;
   - the system-dependent modules, CP4*.HEX (see table 12-2);
CP/M-80 KERMIT                                                         Page 225


   - the source files, CP4*.ASM,
   - the DEC-10/DEC-20 cross-assembler and linker, MAC80.* and LINK80.*,
   - the public-domain CP/M assembler, LASM.*,
   - the public-domain CP/M load/patch utility, MLOAD.*

-------------------------------------------------------------------------------


Symbol  Filename System
AP6551  CP4APL  Apple II, Z80 Softcard, 6551 ACIA in serial interface
APMMDM  CP4APM  Apple II, Z80 Softcard, Micromodem II in slot 2
BBII    CP4BB2  BigBoard II (terminal required)
BRAIN   CP4BRN  Intertec SuperBrain.
CPM3    CP4CP3  "generic": CP/M 3.0 (CP/M Plus) systems (terminal req'd)
DELPHI  CP4DEL  Digicomp Delphi 100 (terminal required)
DMII    CP4DM2  DECmate II with CP/M option
GENER   CP4GEN  "Generic": CPM 2.2 systems with IOBYTE (terminal req'd)
HEATH   CP4H89  Heath/Zenith H89.
KPII    CP4KPR  Kaypro-II (and 4; probably supports all Kaypro systems)
MDI     CP4MDI  Morrow Decision I (terminal required)
MIKKO   CP4MIK  MikroMikko
MMDI    CP4UDI  Morrow Micro Decision I (terminal required)
OSBRN1  CP4OSB  Osborne 1
OSI     CP4OSI  Ohio Scientific
ROBIN   CP4ROB  DEC VT180
TELCON  CP4TEL  TELCON Zorba portable
TRS80LB CP4TLB  TRS-80 model II with Lifeboat 2.25C CP/M Display
TRS80PT CP4TPT  TRS-80 model II with Pickles + Trout CP/M Display
VECTOR  CP4VEC  Vector Graphics.
Z100    CP4Z00  Z-100 under CP/M-85

"symbol" is the symbol  used  to  select  the  target  system,  in  CP4TYP.ASM;
"filename" is the name under which the module is supplied in the distribution.

                 Table 12-2:   Systems supported by Kermit-80

-------------------------------------------------------------------------------


12.4.2. Downloading Kermit-80

You'll need either a pre-configured .COM file or the system-independent module,
CP4KER, in binary (.COM) or hex (.HEX) format and the system-dependent  overlay
for  your system (from table 12-2).  If your system is not listed in the table,
get the generic CP/M 2.2 Kermit or the generic CP/M 3 Kermit.  If  you  already
have  a  version of Kermit on your micro and you want to install a new version,
simply use your present version to get the new files.  Transfer  the  files  to
your system and skip ahead to "merging the modules".

If you do not have a copy of Kermit on your micro, and you cannot borrow a Ker-
mit floppy but you do have access to a mainframe computer with a  copy  of  the
Kermit-80 distribution, you should read this section.

There  are  several  ways  to get Kermit from a host system to your micro.  The
easiest is to "download" the necessary "hex" files into your micro's memory and
then  save  it  on  the  disk.  If you have a terminal emulator program on your
CP/M-80 KERMIT                                                         Page 226


micro which can save a copy of the session to disk, connect to your  host,  and
type  the necessary files.  Exit from the emulator, saving the session log, and
edit the session log to extract the hex files.   Skip  ahead  to  "merging  the
files".

The following is a procedure which, though far from foolproof, should allow you
to get a version of Kermit to your CP/M based micro.  It depends upon the  host
prompt,  or at least the first character of the host prompt, being some charac-
ter that cannot appear in a hex file (the valid characters for  hex  files  are
the  digits  0-9, the upper case letters A-F, the colon ``:'', carriage return,
and line feed).  As soon the prompt character is encountered, the transfer will
terminate.    If  your  host does not issue a prompt that will accommodate this
scheme, you can achieve the same effect by adding an atsign ``@'' to  the  very
end  of  the hex file before sending it from the host.  The program below looks
for an atsign (the normal DEC-20 prompt, hex 40).    DECsystem-10  users  would
look for a dot, hex 2E.

Begin  by  typing  in the following assembly language program, FETCH.ASM.  This
program provides unguarded text capture into memory.  It begins by transmitting
a  carriage return to the host, then stores every character received in memory,
until it receives an "@" character, at which point it stores the captured  data
on  disk.    The biggest file it can capture is about 40K.  The program assumes
RDR/PUNCH are aimed at the communication port and set at the  appropriate  baud
rate,  and  there's  sufficient  free space on the disk.  On most micros, FETCH
cannot work successfully at baud rates above 1200.

Note that this program only works for files  that  do  not  contain  the  "end"
character.    Since  hex files do not contain atsign, period, dollar sign, per-
cent, or other common prompt characters, this program should work for hex files
on  almost  any  system,  but  not for arbitrary text files.  When entering the
program, you don't have to type the comments.

  ;Originally by Bill Catchings, Columbia University
  ;Fixed and translated to assembler, 22-May-86, Bernie Eiben, DEC
  ;
  ORG 100H                        ;let's start at a standard address
  MEMADR  equ     300H            ;Where we start storing bytes
  MEMOFF  equ     2H              ;Linked to MEMADR [offset in 2 sector pai
  MEMST   equ     MEMADR-2        ;We 'swallow' first two bytes
  BYTPTR  equ     200H            ;Here we keep the pointer
  BYTHI   equ     BYTPTR+1        ;High order byte
  BYTLOW  equ     BYTPTR          ;Low order byte
  DMAPTR  equ     BYTPTR+2        ;Sector pointer to write

  SECLEN  equ     80H             ;128 bytes are a 'sector'
  SEVBIT  equ     7FH             ;parity mask
  MONE    equ     0FFFFH          ;Minus one in 16 bits

  BDOS    equ     5H              ;System call
  Punch   equ     4H              ;Send to Punch {to Host}
  Reader  equ     3H              ;Read from Reader {from Host}
  Screen  equ     2H              ;Write to screen
  CLSFIL  equ     10H             ;Close file
  WRTSEC  equ     15H             ;Write a sector
  MAKFIL  equ     16H             ;Write NEW file
  SETDMA  equ     1AH             ;Set DMA address
CP/M-80 KERMIT                                                         Page 227


  FCB1    equ     5CH             ;File Control Block 1

  CR      equ     0DH             ;ASCII Carriage Return
  CTRLZ   equ     1AH             ;ASCII Control-Z

  ;Note--The following may need to be changed when downloading from other
  ;systems, e.g. to '.' for TOPS-10, '$' for VAX/VMS, etc.  Alternatively,
  ;the hex file itself can have an '@' added to it, after its last line.

  ENDSIG  equ     40H             ;DEC-20 prompt '@'

  ;Here's the program:

  start:  lxi     h,MEMST         ;Where to store in memory
          shld    BYTPTR          ;keep address there
          mvi     e,CR            ;oct 15 is CR
          mvi     c,PUNCH         ;Output to PUNCH {send to HOST}
          call    BDOS

  gbyte:  mvi     c,READER        ;Input from RDR {read from HOST}
          call    BDOS
          ani     7FH             ;mask to 7-bit {strip parity}
          push    psw             ;save a and flags
          mov     e,a             ;char to e for echo-call
          mvi     c,SCREEN        ;Output to screen
          call    BDOS
          pop     psw             ;restore a and flags
          cpi     ENDSIG          ;End signal (system's prompt)?
          jz      donfil          ;Yes, we have whole file in memory
          call    stuff           ;No, store byte
          jmp     gbyte           ;go back for next byte

  donfil: mvi     a,CTRLZ         ;Control-Z is EOF
          call    stuff           ;Store Control-Z
          lxi     h,MEMADR        ;Pointer to file in memory
          shld    DMAPTR          ;Save here for DMA pointer
                                  ;a long divide by 256 follows
          lda     BYTHI           ;get HI byte
          sta     BYTLOW          ;store as low byte
          xra     a               ;zero a
          sta     BYTHI           ;wipe old HI byte
          mvi     c,MAKFIL        ;MAKE new FILE
          lxi     d,FCB1
          call    BDOS

  again:  call    nsect           ;write 128 bytes
          call    nsect           ;and another 128 bytes
          lxi     h,MONE          ;stick a -1
          xchg                    ;into DE
          lhld    BYTPTR          ;get modified pointer (per 256 bytes)
          dad     d               ;decrement
          shld    BYTPTR          ;and store back
          mvi     a,MEMOFF        ; getting
          cmp     l               ;  done ?
          jz      done            ;Yes, we hit it on the nail
          jmp     again           ;Not quite
CP/M-80 KERMIT                                                         Page 228


  nsect:  lhld    DMAPTR          ;Get the file-pointer
          xchg                    ;move into DE
          mvi     c,SETDMA        ;Set DMA
          call    BDOS
          mvi     c,WRTSEC        ;Write sector to file
          lxi     d,FCB1
          call    BDOS
          lhld    DMAPTR          ;Get the file-pointer
          lxi     d,SECLEN        ;128 bytes got moved
          dad     d               ;add them to adjust pointer
          shld    DMAPTR          ;and save again
          ret                     ;and return

  stuff:  lhld    BYTPTR          ;Get the pointer
          mov     m,a             ;store the character
          inx     h               ;Increment the pointer
          shld    BYTPTR          ;and save again
          ret                     ;and return

  done:   mvi     c,CLSFIL        ;Close file
          lxi     d,FCB1
          call    BDOS
          jmp     0               ;Do warm-reboot to always come back

          END     START

After saving FETCH.ASM on the disk, assemble it using ASM  or  LASM,  and  then
load it using LOAD or MLOAD:

  ASM FETCH
  LOAD FETCH

    or

  LASM FETCH
  MLOAD FETCH

Now follow these steps:

   1. On your micro, connect to a floppy disk with plenty of free space.

   2. Connect  to  your  host  using  a  terminal  or a terminal emulation
      facility.  Ensure that your host does  not  have  your  terminal  in
      "page  mode".  E.g. on the DEC-20, give the Exec command TERMINAL NO
      PAUSE END-OF-PAGE.  Give any commands necessary  to  disable  system
      messages,  line wrap, and so forth, to prevent corruption of the hex
      file.

   3. Tell the host to display the first hex file (the  system-independent
      module)  at  your  terminal.   On most systems, the command would be
      "TYPE CP4KER.HEX", but typed without a terminating carriage return.

   4. Return to your micro.  Make sure your IOBYTE is set so that RDR: and
      PUN:  correspond to the I/O port that is connected to the host (this
      would normally be the case unless you have done something special to
      change things).
CP/M-80 KERMIT                                                         Page 229


   5. Run the FETCH program to get the system-independent hex file:

        FETCH CP4KER.HEX

      The  FETCH program will display the file on your screen as it is be-
      ing captured.  If there is any obvious corruption, you will probably
      notice  it.    When  the  display  stops,  there  should  be  a file
      CP4KER.HEX on your disk.

   6. Return to the host, and tell it to display the second hex file  (the
      system-dependent module for your configuration).  Again, do not type
      the terminating carraige return.  For example, to get the  Kaypro-II
      hex file, "type cp4kpr.hex".

   7. Return to your micro, and run the capture program again:

        FETCH CP4KPR.HEX

      Now there should be a file CP4KPR.HEX on your connected disk.

Merging the files:

   1. For  purposes  of  illustration, we will assume the system-dependent
      overlay is called "cp4kpr.hex".  The two hex files may  be  combined
      with  MLOAD  or  DDT.  If you already have a running Kermit, you can
      transfer MLOAD.HEX to your system and create  MLOAD.COM  by  running
      LOAD.   If you're bootstrapping Kermit, you could transfer MLOAD.HEX
      to your system the same way you got the other two  .HEX  files,  but
      it's  probably  simpler  to  use  DDT to get Kermit running, and get
      MLOAD later if you need it.

   2. Using MLOAD, the two pieces may be easily merged:

        A>mload kermit40=cp4ker,cp4kpr
        [some messages about program size, etc.]
        A>

   3. If you don't have MLOAD running, it's a bit more complex:

        A>ddt cp4ker.hex
        NEXT  PC
        3500 0100
        -icp4kpr.hex
        -r
        NEXT  PC
        xxxx 0000
        -^C
        A>save dd kermit40.com

      The page count ("dd") used in the SAVE command  is  calculated  from
      the last address ("xxxx") given by DDT in response to the R command:
      drop the last two digits and add 1 if they were not zero, then  con-
      vert  from  hexadecimal (base 16) to decimal (base 10): 384F becomes
      39 hex, which is 57 decimal (3 times 16 plus 9) -- but 3700  becomes
      37 hex, or 55 decimal (consult an introductory computing book if you
      don't understand number base conversion).
CP/M-80 KERMIT                                                         Page 230


   4. Note that CP/M hex files have checksums on each line.  If there were
      any  transmission  errors  during  the  downloading process, LOAD or
      MLOAD will notice a bad checksum and will report an error (something
      like  "Illegal  Format").  If you get any errors during loading, ei-
      ther fix the hex file locally with an editor, or repeat  the  trans-
      fer.

You now should have a running version of Kermit-80, called KERMIT40.COM.

Test  your new Kermit by running it.  If it gives you a prompt, it might be OK.
(don't delete your old one yet...).  Instead of a prompt, you could get one  of
two messages indicating that the configuration information is invalid:

  ?Kermit has not been configured for a target system

or

  ?Consistency check on configuration failed

Of  course,  neither  of these messages should appear if you're building Kermit
from the distribution kit.  The first message indicates that  the  overlay  was
not found where the system-independent module expected to find it, probably be-
cause the overlay address is incorrect; the second indicates that  the  version
of  CP4LNK used in the system-dependent module is incompatible with the system-
independent module.

Once you are satisfied that KERMIT40 works correctly, you  should  rename  your
old  KERMIT.COM to something else, like OKERMIT.COM, and rename KERMIT40.COM to
KERMIT.COM.


12.4.3. Assembling Kermit-80 from the sources

Kermit-80 is built in two pieces from the following 12 files:

The system-independent files:
  CP4KER.ASM    header file
  CP4DEF.ASM    definitions for both KERMIT and KERSYS
  CP4MIT.ASM    initialization, main loop, miscellaneous commands  (BYE,  EXIT,
                LOG, SET, SHOW, STATUS, and VERSION)
  CP4PKT.ASM    the  KERMIT protocol handler (SEND, RECEIVE, LOGOUT, and FINISH
                commands)
  CP4TT.ASM      the transparent commands (TRANSMIT, CONNECT)
  CP4CPM.ASM    CP/M commands (DIR, ERA)
  CP4WLD.ASM    the wildcard handler
  CP4CMD.ASM    the command parser
  CP4UTL.ASM    utility routines and data
  CP4LNK.ASM    linkage area description

The system-dependent files:
  CP4TYP.ASM    system selection
  CP4SYS.ASM    system-specific code

The system-independent module contains all of the system-independent files  ex-
cept  for  CP4LNK.ASM,  which  is assembled into the system-dependent module to
provide the structures needed to connect the two modules.  As distributed,  the
CP/M-80 KERMIT                                                         Page 231


system-independent  module  is  named  CP4KER.HEX.    If  you  have  a  copy of
CP4KER.HEX, you do not need to reassemble the system-independent module to con-
figure Kermit for your system.

The system-dependent module consists of CP4TYP.ASM, CP4DEF.ASM, CP4LNK.ASM, and
CP4SYS.ASM.  One copy of the system-dependent module is  supplied  already  as-
sembled  for  each  supported  system;  the filename may be obtained from table
12-2.

After assembling the two pieces separately, they are combined with DDT or MLOAD
into a system-specific Kermit.

If  you  want to rebuild the system-independent module, the only change you may
need to make is to select the assembler to be used, in CP4KER.ASM.  Define  one
of MAC80, M80, or LASM to TRUE to select it as the assembler; the others should
be defined FALSE.

Assuming you have the Microsoft Macro Assembler package (M80/L80), you'll  need
to do the following:

  A>m80 cp4ker=cp4ker.asm
  A>l80 /p:100,cp4ker,cp4ker/n/e

This will produce CP4KER.COM.

If you are using LASM instead, do this:

  A>lasm cp4ker

LASM  will  generate  CP4KER.HEX  and  CP4KER.PRN.    LASM allows options to be
specified in the same way as the standard assembler, ASM, so the command

  A>lasm cp4ker.abz

will read the source files from drive A, send the .HEX file  to  drive  B,  and
suppress the listing file.

If  you have access to a TOPS-10 or TOPS-20 system, you can cross-assemble Ker-
mit there with MAC80, producing CP4KER.HEX:

  .run mac80
  *=cp4ker.asm

If you want to generate a system-dependent overlay for a particular system,  or
want  to  change  the  terminal  supported, you'll need to check three areas in
CP4TYP.ASM:

First, the overlay start ADDRESS.  The symbol "ovladr" is EQUated  to  the  ad-
dress  of "LNKFLG" in the system-independent module, as the starting address of
the overlay (3400H for version 4.05).  You'll need to know this value if you're
building  the  overlay  with  M80/L80.   You won't normally need to change this
value.

Second, the assembler being used.  Again, define one of MAC80, M80, and LASM to
be  TRUE  to  select  it,  and  define the others to be FALSE.  The two modules
(system-independent and system-dependent) do not need to be built with the same
CP/M-80 KERMIT                                                         Page 232


assembler.

Third, the system configuration.  Locate your system in table 12-2, then define
the appropriate symbol TRUE, and the rest FALSE.  If the system  comes  with  a
builtin  console terminal, define all the terminal switches FALSE.  If the sys-
tem uses an external terminal as the console, locate the terminal in table 12-3
and  define  the appropriate symbol TRUE, and the remainder FALSE.  If the ter-
minal is not listed in table 12-3, use the  CRT  switch;  in  this  case,  VT52
emulation is not supported.

In  addition,  there are a few general and system-specific symbols which may be
altered to fit your system:

APSLOT          For Apple with 6551 ACIA, defines the slot number of the serial
                card

CPUSPD          Processor  speed  in  units  of 100KHz (currently used only for
                bbII and kpII for timing loops)

TAC             For users connecting through ARPAnet TACs: set to TRUE  if  you
                wish the default TACTRAP status to be ON. (This may be overrid-
                den with the SET TACTRAP command).  If  you're  not  connecting
                through a TAC, set tac to FALSE and ignore tacval.

TACVAL          For  ARPANET  TAC  users:  defines  the  default  TAC intercept
                character (may be overridden with the SET TACTRAP command)

If you are just assembling an  existing  configuration,  you'll  need  to  edit
CP4TYP.ASM  only.    If you are adding support for a new system, you should not
modify CP4DEF.ASM or CP4LNK.ASM; if you do, you'll have to change  the  system-
independent  module  also.   Eventually, CP4SYS.ASM will be split into separate
files, each of which will generate one or more related systems.  When this hap-
pens,  you'll  want to pick the one closest to your system to use as a starting
point.

After editing CP4TYP.ASM as necessary, assemble and link the  overlay  as  fol-
lows:

   - With M80 (where "xxxx" is the hex value of ovladr from CP4LNK.ASM):

       A>m80 cp4typ=cp4typ.asm
       A>l80 /p:xxxx,cp4typ,cp4typ/n/x/e

   - With LASM:

       A>lasm cp4typ

   - With MAC80 on TOPS-10:

       .run mac80
       *=cp4typ.asm

   - With MAC80 on TOPS-20:

       @run mac80
       *=cp4typ.asm
CP/M-80 KERMIT                                                         Page 233


The  overlay (cp4typ.hex) may then be merged with the system-independent module
as described above (creating a runnable Kermit from the distribution kit).

If you have a TOPS-10 or TOPS-20 system and already have  a  running  Kermit-80
v3.9  or  later, you can merge the two .HEX files into a .COM file with LINK80,
and transfer the new .COM file to your micro with Kermit:

   - Tops-10:

       .copy kernew.hex=cp4ker.hex,cp4typ.hex
       .link80 kernew

   - Tops-20:

       @append cp4ker.hex,cp4typ.hex (to) kernew.hex
       @link80 kernew

producing KERNEW.COM.  If LINK80 says "?Data overlaid", you have an old version
of LINK80, and will have to transfer the .HEX files to the micro and merge them
there.

-------------------------------------------------------------------------------


Symbol         Terminal description
crt            Basic CRT, no cursor positioning
adm3a          ADM3A Display or lookalike
smrtvd         Netronics Smartvid-80
tvi925         TVI925, Freedom 100
vt52           VT52 or VT52 emulator such as Heath H19, H29, etc.
vt100          VT100 or emulator (most ANSI terminals should work)

                  Table 12-3:   Terminals known to Kermit-80

-------------------------------------------------------------------------------


12.5. Adding Support For A New System

Kermit-80 is built from a common set  of  source  files;  the  system-dependent
module  makes  heavy  use  of  conditional  assembly (this complication will be
removed in future releases).  The system dependencies arise  from  attempts  to
answer some questions:

   1. What kind of terminal is to be supported?

      For  many micros, the console is an integral part of the system, but
      others can use an external terminal.  In either case,  the  commands
      to  manipulate  the  screen  (position the curser, erase the screen,
      etc) must be defined.

   2. How is the serial line accessed?

      For systems supporting the IOBYTE function, this is straightforward;
      the  symbol "IOBYT" is defined TRUE.  If the serial line is accessed
      with IN and OUT instructions, it may be possible to use  the  simple
CP/M-80 KERMIT                                                         Page 234


      I/O  routines provided.  In this case, the symbol "INOUT" is defined
      TRUE, the MNPORT and MNPRTS are defined to be the data  and  control
      addresses,  respectively,  and bit masks for testing for "input data
      available" and "output buffer empty" must be defined.  If the inter-
      face is strange, leave IOBYT and INOUT set to FALSE, and provide the
      I/O routines.

   3. What initialization is necessary?

      You may wish to set the baud rate or configure the  serial  line  at
      startup.  Examples for a number of devices are present.

   4. What special features are to be supported?

      You  may  want  to  provide  the capability to select one of several
      serial lines with the SET PORT command, or to change  the  speed  of
      the  serial line with the SET BAUD-RATE command.  To do this, you'll
      need to build a command table, using the systems  already  supported
      as  examples.    The  ability  to  send a BREAK signal is desirable.
      Again, examples for several different interfaces  (ACIA,  SIO,  etc)
      are present.


12.6. Notes on New Features in Kermit-80 Version 4

Debugging  aids:  SET DEBUG ON will add two fields to the SEND/RECEIVE display,
labelled "Spack" and "Rpack".  These display the last packet sent and received.
Of course, this slows down the transfer, especially if the console is an exter-
nal terminal.  SET DEBUG OFF removes these fields.  The  VERSION  command  dis-
plays  the name, edit number, and edit date of several of the modules that make
up Kermit.

TAC support: ARPAnet TACs (and many other communication devices  such  as  ter-
minal  concentrators,  modems,  port contention units, network PADs, etc) use a
printing character (normally "@") as an intercept character, to allow  commands
to  be issued to the TAC.  In order to send this character to the host, it must
be typed twice.  The command "SET TAC CHARACTER" to Kermit enables the  TACtrap
and  asks the user to specify the TAC intercept character.  This character will
be automatically doubled when it appears in Kermit protocol messages  (sent  by
the  SEND or RECEIVE commands) or when it appears in a file being sent with the
TRANSMIT command.  It is not automatically doubled when typed by  the  user  in
CONNECT mode.  "SET TAC ON" enables the TACtrap but does not change the TAC in-
tercept character, which is initially "@".  "SET TAC OFF" disables the TACtrap.
(These comments apply equally to any communication device that uses a printable
attention character which it will pass through if doubled.)

File buffering:  Previous versions of Kermit-80 buffered only one  sector  (128
bytes)  at  a  time  during  file  transfer  operations.   This version buffers
16Kbytes at a time, reducing the number of times the floppy drive must be  spun
up  and down, and increasing the effective throughput of the link.  If the disk
transfer rate is too  slow,  however,  the  remote  Kermit  may  time  out  and
retransmit  packets.   This will show up on the screen in the "Retries:" field;
if this occurs after disk activity, you may want to increase the timeout  value
on  the remote Kermit, or reassemble Kermit with a smaller value for MAXSEC (in
CP4SYS.ASM).  This buffer is also used by the TRANSMIT command;  the  log  file
enabled by the LOG command is still written a sector at a time.
CP/M-80 KERMIT                                                         Page 235


12.7. Future Work

Work that needs to be done in future releases includes:

   - Merge  in  support for additional CP/M-80 systems, particularly those
     for which support was recently added to the monolithic v3.x source.

   - Break up CP4SYS into discrete source  files,  one  for  each  system.
     These  source  files should serve as simple models for adding support
     for new systems to Kermit-80 -- only the very  basic  screen  defini-
     tions,  flags,  i/o  primitives, initializations, and so forth should
     appear in each system-dependent file.  Even better would be to struc-
     ture  CP/M-80  Kermit  like  MODEM,  so that Kermit can use the MODEM
     overlays, which support many more systems, terminals, and modems than
     does Kermit.

   - Make  the  file-stepping mechanism faster (buffer the FCB's in chunks
                                                    th
     of 16 or 32 or 64).  Currently, to access the n   file in a directory
     requires n(n+1)/2 lookups...

   - Addition  of  missing  features -- compression of repeated characters
     during  packet  transmission,   transmission   of   file   attributes
     (particularly  size, so that "percent done" can be displayed for both
     incoming and outbound files), advanced commands for  servers  (REMOTE
     DIRECTORY,  etc),  command  macros  and  initialization  files, login
     scripts, remote operation and server mode, etc etc.
CP/M-86 KERMIT                                                         Page 236


13. CP/M-86 KERMIT

Authors:    Bill Catchings, Columbia University; Ron  Blanford,  University  of
            Washington; Richard Garland, Columbia University.
Language:   Digital Research ASM86
Version:    2.9
Date:       December 1984
Documentation:
            Frank da Cruz, Columbia

This version of KERMIT is designed to support any CP/M-86 system.   So  far  it
supports  the DEC Rainbow-100 and the NEC Advanced Personal Computer (APC).  It
is very similar to CP/M-80 and MS DOS KERMIT.


CP/M-86 KERMIT-86 Capabilities At A Glance:

  Local operation:                   Yes
  Remote operation:                  No
  Transfers text files:              Yes
  Transfers binary files:            Yes
  Wildcard send:                     Yes
  ^X/^Y interruption:                Yes
  Filename collision avoidance:      Yes
  Can time out:                      Yes
  8th-bit prefixing:                 Yes
  Repeat count prefixing:            No
  Alternate block checks:            No
  Terminal emulation:                Yes, uses PC firmware (VT100)
  Communication settings:            Yes; duplex, parity
  Transmit BREAK:                    Yes
  IBM communication:                 Yes
  Transaction logging:               No
  Session logging (raw download):    Yes
  Raw upload:                        No
  Act as server:                     No
  Talk to server:                    Yes; SEND, GET, FIN, BYE
  Advanced commands for servers:     No
  Local file management:             Yes
  Handle file attributes:            No
  Command/init files:                Yes
  Printer control:                   No


                          CP/M-86 KERMIT DESCRIPTION

Since Kermit-86 runs on a standalone micro, it is  always  in  control  of  the
screen  --  it  is always local.  Thus, it always keeps the screen updated with
the file name and the packet number, whether sending or receiving.    Kermit-86
is  capable  of  timing  out  an  input  request,  and can thus break deadlocks
automatically.  In most cases, however, this is not desirable because the  KER-
MIT on the other side is most likely better able to handle the timeouts; there-
fore, Kermit-86's timer is normally not used.

If despite the timeout capability, the transmission appears to  be  stuck  (and
you  can  tell  that this has happened if the screen fails to change for a long
CP/M-86 KERMIT                                                         Page 237


while) you can type carriage return to have the micro do  what  it  would  have
done  on a  timeout, namely NAK the expected packet to cause to foreign host to
send it again (or, if the micro is sending, to  retransmit  the  last  packet).
Micro/micro  or micro/IBM-mainframe transfers could require this kind of manual
intervention.

File transfers may be interrupted in several ways.

Control-C       This will return you to Kermit-86 command level immediately, so
                that  you  can  connect  back to the remote system, or take any
                other desired action.

Control-X       When sending a file, this will terminate  the  sending  of  the
                current  file  with a signal to the KERMIT on the other side to
                discard what it got so far.  If there  are  more  files  to  be
                sent,  KERMIT-86  will go on to the next one.  When receiving a
                file, KERMIT-86 will send a signal to the remote KERMIT to stop
                sending  this file.  If the remote KERMIT understands this sig-
                nal (not all implementations of KERMIT  do),  it  will  comply,
                otherwise  the  file  will  keep  coming.   In either case, the
                remote KERMIT will go on to the next file in the group, if any.

Control-Z       Like Control-X, except if a file group  is  being  transmitted,
                this will stop the transmission of the entire group.  If only a
                single  file  is  being  transmitted,  it  works  exactly  like
                Control-X.

Carriage Returns
                If you type carriage return repeatedly Kermit-86 will retry the
                current  packet  up to its retry limit (somewhere between 5 and
                16 times) and then, if no valid response was  received,  return
                to Kermit-86 command level.

When  KERMIT-86 is started, it looks for the file KERMIT.INI.  If found, it ex-
ecutes KERMIT-86 commands from it before  prompting  you  for  commands.    The
KERMIT-86 prompt looks like this:

  Kermit-86 B3>

in  which  "B" is your current default disk and "3" is the current default user
number.


13.1. Kermit-86 Commands

KERMIT-86 uses the DECSYSTEM-20 keyword style command language.   Each  keyword
may be abbreviated to its minumum unique length.  "?" may be typed to request a
menu of the available options for the current field at any point in a  command.
ESC  may  be typed at any point in a command to fill out the current keyword or
filename; if sufficient characters have not been typed to identify the  current
field uniquely, KERMIT-86 will sound a beep and allow you to continue from that
point.

CONNECT Establish a "virtual terminal" connection to any host that may be  con-
        nected  to the serial port, i.e. pass all typein to the serial port and
        display all input from  the  serial  port  on  the  screen,  using  the
CP/M-86 KERMIT                                                         Page 238


        system's  own  built-in  support  for ANSI (VT100-like) screen control.
        When you issue the CONNECT command, the PC will print a message telling
        you how to get back by typing an an escape sequence, an uncommonly-used
        control character, normally CTRL-backslash, followed by a single letter
        "command".

        C   Close Connection, return to Kermit-86> command level.
        ?   List available single-character commands.
        B   Send a BREAK signal.
        Q   Quit logging the remote session.
        R   Resume logging the remote session.
        L   Toggle logging.
        ^\  (or  whatever - a second copy of the escape character) Send the es-
            cape character itself to the remote host.

SEND filespec
        Send  file(s)  specified  by  filespec  to the remote Kermit, using the
        prevailing file mode (ASCII or BINARY; see SET).  The filespec may con-
        tain CP/M wildcards.

RECEIVE Receive  file(s)  from  the  remote Kermit.  Store them under the names
        provided in the file headers supplied by the remote host.  If the names
        aren't  legal,  use  as many legal characters from the name as possible
        (see the description of SET FILE-WARNING below).   If  there's  a  con-
        flict,  and FILE-WARNING is ON, warn the user and try to build a unique
        name for the file by adding "&" characters to the name.  You  may  also
        provide  an  optional  file name in the RECEIVE command; if you do, the
        incoming file will be stored under the name you specify.  If more  than
        one  file  arrives, only the first will be stored under the given name,
        unless you included wildcard characters in  the  RECEIVE  filespec;  in
        that  case, the filespec will be used as a mask for incoming filenames.
        For instance, you told the remote Kermit to send *.ASM, you could  tell
        KERMIT-86  to "receive *.A86", thereby changing the filetype of all the
        incoming files.

GET filespec
        When  Kermit-86  is  talking to a Kermit Server on the host, you should
        use the GET command to request the server to send files to you, for ex-
        ample: get hlp:k*.hlp

BYE     When  talking  to  a  remote Kermit Server, this command shuts down the
        server and logs it out, and also exits from Kermit-86 to  CP/M  command
        level.

LOGOUT  Like BYE, but leaves you at Kermit-86 command level.

FINISH  Like  LOGOUT,  but shuts down the remote server without logging it out.
        Leaves you at Kermit-86 command level;  a  subsequent  CONNECT  command
        should put you back at host system command level.

EXIT    Exit from KERMIT-86 back to CP/M.

QUIT    Synonym for EXIT.

SET parameter [value]
        Set the specified parameter to the specified value.  Possible settings:
CP/M-86 KERMIT                                                         Page 239


        BAUD    Change the baud rate of the communications port.  This  command
                only  works  on some systems, and its actual operation can vary
                from system to system.  Type SET BAUD followed  by  a  question
                mark,  and  follow the directions.  On systems that do not sup-
                port this command, you must set the port baud rate from CP/M or
                other setup mechanism outside of KERMIT-86.

        DEBUG   ON  or  OFF.    If  ON,  displays incoming and outbound packets
                during file transfer.  OFF by default.

        DEFAULT-DISK disk/user
                Specify default disk and user number for subsequent file recep-
                tion and transmission.  The specification following the command
                must be in one of the following forms:

                    d:  = go to drive d (A through P) without changing user
                    u:  = go to user u (0 through 15) without changing drive
                    du: = go to drive d and user u
                    :   = go to the defaults when Kermit was loaded

                Whenever  a  drive  is specified, even if it is the same as the
                current default drive, the drive is logged in so that disks can
                be  swapped  without  exiting Kermit to type control-C.  Kermit
                restores the original drive and user upon termination.

        ESCAPE  Change the escape character for virtual  terminal  connections.
                Select  a  character  in the control range that you will not be
                likely to need at the  remote  host;  type  the  new  character
                literally.    Certain  characters,  like  Control-X,  cannot be
                specified.

        FILE-TYPE
                Tells KERMIT-86 what kind of file it is sending, so that KERMIT
                can correctly determine the end of the file.  SET  FILE  BINARY
                means  to  send  all the 128-byte blocks of the file, including
                the last block in its entirety; SET FILE ASCII is used for text
                files,  and  transmission stops when the first Control-Z is en-
                countered anywhere in the file (this is the CP/M convention for
                marking  the  end  of  a text file).  If binary transmission is
                used on a text file, some extraneous characters (up to  127  of
                them)  may  appear at the end of the file on the target system.
                If ASCII transmission is used on a binary file, the entire file
                will  not  be sent if it happens to contain any data bytes that
                correspond to Control-Z.  ASCII is the default.

        FLOW-CONTROL
                Select  the desired type of flow control to be used on the com-
                munication line.  The choices are NONE and XON/XOFF.   XON/XOFF
                is  the  default.    If the remote system is not full duplex or
                cannot do XON/XOFF, you should use NONE.

        IBM ON (or OFF)
                Allow  the  transfer of files to and from an IBM mainframe com-
                puter.  This  makes  Kermit-86  wait  for  the  IBM  turnaround
                character (XON), ignore parity on input, add appropriate parity
                to output, and use local  echoing  during  CONNECT.    As  dis-
CP/M-86 KERMIT                                                         Page 240


                tributed, KERMIT-86 uses MARK parity for IBM communication.  If
                you don't give this command, IBM mode is OFF.  Since IBM VM/CMS
                KERMIT  does not have timeout capability, SET IBM ON also turns
                on the timeout facility automatically, as if you had typed "SET
                TIMER ON".

        LOCAL-ECHO ON (or OFF)
                When you CONNECT to a remote host, you must set  LOCAL-ECHO  ON
                if  the  host  is  half  duplex,  OFF  if  full duplex.  OFF by
                default.

        LOG     Specify a log file on the  current  CP/M  disk  into  which  to
                record  incoming characters during CONNECT.  If the remote host
                can do XON/XOFF, then the log file will normally capture  every
                character  shown  on  the screen.  When connected to the remote
                system, several single-character arguments to the  connect  es-
                cape  character  can  be used to control logging -- Q (quit), R
                (resume), L (toggle).  If you use R or L during connect without
                having previously specified a log file name, then KERMIT.LOG is
                used.  An open log is closed when you escape back to the PC.

        PARITY  Sets parity for outgoing characters to one  of  the  following:
                NONE,  SPACE, MARK, EVEN, or ODD.  On input, if parity is NONE,
                then the 8th bit is kept (as data), otherwise  it  is  stripped
                and  ignored.  The parity setting applies to both terminal con-
                nection and file transfer.  If you set parity to anything other
                than NONE, Kermit-86 will attempt to use "8th bit prefixing" to
                transfer binary files.  If the other KERMIT is also capable  of
                8th  bit  prefixing,  then binary files can be transferred suc-
                cessfully; if not, the 8th bit of each data byte will  be  lost
                (you will see a warning on your screen if this happens).

        PORT    Allows  you  to switch between different communication ports on
                the PC.  This command is not available on all systems.

        TIMER ON (or OFF)
                Enable  or  disable  the timeout facility.  The timer is off by
                default, because in the normal case KERMIT-86 is  communicating
                with a mainframe KERMIT that has its own timer.  Mainframe KER-
                MIT timers tend to be more precise  or  adaptable  to  changing
                conditions.    You should SET TIMER ON if you are communicating
                with another KERMIT that does not have a timer.  You should SET
                TIMER  OFF  if  you  are communicating over a network with long
                delays.

        WARNING ON (or OFF)
                Warn  user  of  filename  conflicts  when  receiving files from
                remote host, and attempt to generate a unique  name  by  adding
                "&" characters to the given name.  OFF by default.

SHOW    Show the current settings of the SET parameters.

TAKE    Take  KERMIT-86  commands from the specified file.  The file should not
        contain any TAKE commands; nested command files do not work.

LOCAL   This is a prefix for local file  management  commands,  to  distinguish
CP/M-86 KERMIT                                                         Page 241


        them  from  remote  file  management commands (which aren't implemented
        yet).  The LOCAL prefix is optional; if left off, the commands will  be
        performed locally.

        SPACE           Show  how  much space is used and remaining on the cur-
                        rent disk.

        DIRECTORY       Provide a directory listing for the current disk, show-
                        ing  the name and size of each file.  A filespec may be
                        given to select only a certain file  or  wildcard  file
                        group.

        DELETE          Delete the specified files from the current disk.

        TYPE            A wildcard filespec is accepted and files displayed al-
                        phabetically.  The display is  paged  in  Unix  fashion
                        with "--more--" displayed on the last line.  Typein op-
                        tions at that point can be obtained by hitting a '?'.


13.2. Installation:

CP/M-86 KERMIT is broken up into several source modules:

      C86CMD.A86          Command parser
      C86FIL.A86          File handler
      C86Xxx.A86          System Dependent I/O
      C86KER.A86          Main Program
      C86PRO.A86          Protocol Module
      C86TRM.A86          Terminal Emulation
      C86UTL.A86          Utilities

The main program module, C86KER.A86, contains INCLUDE directives for the  other
files.    The  C86Xxx module is stored with "xx" replaced by codes denoting the
machine for which the program is being built -- RB for Rainbow, AP for NEC APC,
etc.    The  program  may  be  built on the CP/M-86 system by obtaining all the
source files listed above, storing them on the current disk with the names  in-
dicated,  renaming  the  appropriate C86Xxx.A86 file to be C86XXX.A86, and then
doing:

      ASM86 C86KER $PZ  (takes about 6 minutes on the Rainbow)
      GENCMD C86KER     (takes less than a minute)

and, if desired,

      REN KERMIT.CMD=C86KER.CMD


13.3. DEC Rainbow 100 Support

Kermit-86 runs on the DEC Rainbow 100 or 100+ under CP/M-86/80, version 1 or 2,
on  the  8088 side.  It uses the built-in firmware to emulate a VT102 ANSI ter-
minal during CONNECT, and runs well at speeds up to 9600 baud.

You should be able to download the program using the old KERMIT on the Z80 side
(Rainbow  Kermit,  VT180 Kermit, or generic CP/M-80 Kermit will do the job, but
CP/M-86 KERMIT                                                         Page 242


only under DEC CP/M-86/80 version 1.0), or an earlier version of Kermit-86.

If you don't have an earlier version of KERMIT, then follow the directions  for
installing  KERMIT-80  (yes,  KERMIT-80) in the KERMIT-80 section of the Kermit
User Guide, but send the Kermit-86 hex file instead.  This  works  because  the
Rainbow can run CP/M-80 programs like DDT.

Another  way to get Kermit onto your Rainbow for the first time would be from a
DEC VT-180 diskette.  A VT-180 can use its own Kermit to  load  Rainbow  Kermit
onto  its  disk, which can then be read directly by a Rainbow.  Also, note that
VT-180 Kermit-80 can actually run on the Rainbow on  the  Z80  side  under  DEC
CP/M-86/80  version  1 (but not version 2 or higher), at speeds of 1800 baud or
lower.


13.4. NEC Advanced Personal Computer Support

(Contributed by Ron Blanford, University of Washington)

Currently only the standard serial port is supported, and not the H14 auxiliary
port.  The SET PORT command is not implemented.

While  in  Kermit's  terminal emulation mode, local commands are initiated by a
two-character sequence consisting of the "escape  character"  followed  by  one
other  character  identifying the command.  (Make the second character a '?' to
see a list of the valid commands.)  As distributed, the standard Kermit-86 uses
the  control-backslash character as the escape character in terminal mode.  The
trouble is that the CP/M-86 BIOS  in  the  APC  ignores  a  keyboard  entry  of
Control-\  (i.e.  holding down the CTRL key while striking the '\' key), making
it difficult (impossible) to use this method to get out of terminal mode.

One solution is to perform a "SET ESCAPE ^" command  before  entering  terminal
mode  to change the escape character to a caret (or any other character the APC
keyboard will generate).  This command could be placed in your KERMIT.INI  file
for automatic execution every time Kermit is started.

The simpler solution is to realize that the character code for a Control-\ is a
hexadecimal 1C, and that this is the code generated  by  the  INS  key  on  the
numeric keypad.  Once you can remember that every reference to Control-\ should
be interpreted as a reference to the INS key, this is actually  easier  to  use
than the two-key Control-\ sequence.

In  the  standard  CP/M-86  BIOS,  the  unshifted DEL key generates a Control-X
character (hexadecimal 18).  This is the CP/M command to erase the current  in-
put  line, and is very useful for local processing.  Most mainframes do not use
the Control-X character at all, so it becomes much less useful during  terminal
emulation.    The  DEL  character (hexadecimal 7F), on the other hand, is often
used by mainframes and can only be generated on the APC  by  holding  down  the
SHIFT key while striking the DEL key (this capability is not mentioned anywhere
in the documentation).

Because the Control-X character is so seldom used while the  DEL  character  is
commonly  used,  the initialization procedure in Kermit-86 modifies the CP/M-86
BIOS so that the DEL key generates the DEL character whether  shifted  or  not.
Control-X  can  still  be  generated  if necessary by holding down the CTRL key
while striking the 'X' key.  The CP/M-86 BIOS is returned to its original state
CP/M-86 KERMIT                                                         Page 243


when Kermit terminates.

The  APC uses escape sequences which have been standardized by the American Na-
tional Standards Institute (ANSI) to control cursor movement,  screen  erasing,
and  character  attribute  manipulation.  Perhaps the best-known other terminal
which follows ANSI guidelines is the DEC VT100.  The APC only recognizes a  few
of  the  more important ANSI commands, and not the complete set which the VT100
supports.

The ANSI/VT100 features that the NEC APC supports are:

   - direct cursor addressing (by row and column)
   - relative cursor addressing (up, down, left, right)
   - line erasing (cursor to end, beginning to cursor, entire line)
   - screen erasing (cursor to end, beginning to cursor, entire screen)
   - character attributes (underline, reverse video, blink, but not bold)

In addition, the first four grey function keys (unshifted) generate the  escape
sequences  associated  with  PF1  through PF4 on the VT100 keyboard.  The arrow
keys and numeric keypad DO NOT generate the corresponding VT100 sequences.

These functions are enough to support simple command line editing on most  sys-
tems,  and allow mailers or paged file display programs to clear the screen be-
fore each display.  Underlining and reverse video are also useful in  some  ap-
plications.    This is not enough to support the more sophisticated screen con-
trol required by screen editors such as EMACS or KED.  In addition,  due  to  a
bug  in the implementation of the CP/M-86 BIOS, the sequence ordinarily used to
home the cursor (esc [ H) does not work correctly; a patch for CP/M to  correct
this problem is distributed with APC Kermit-86.
APPLE-DOS KERMIT                                                       Page 244


14. APPLE-DOS KERMIT

Authors:    Antonino N. J. Mione, Stevens Institute of Technology\*
            Peter Trei, Columbia University
Documentation:
            Antonino N.J. Mione, Stevens Institute of Technology
            Peter Trei, Columbia University
Version:    2.1(45)
Date:       July 1984

Kermit-65 Capabilities At A Glance:

  Local operation:                   Yes
  Remote operation:                  Yes
  Transfers text files:              Yes
  Transfers binary files:            Yes
  Wildcard send:                     No
  ^X/^Y interruption:                No
  Filename collision avoidance:      Yes
  Can time out:                      No
  8th-bit prefixing:                 Yes
  Repeat count prefixing:            No
  Alternate block checks:            No
  Terminal emulation:                Yes (VT52)
  Communication settings:            Yes; local echo, parity
  Transmit BREAK:                    Yes
  IBM communication:                 Yes
  Transaction logging:               No
  Session logging (raw download):    No
  Raw upload:                        No
  Act as server:                     No
  Talk to server:                    Yes
  Advanced commands for servers:     No
  Local file management:             No
  Handle file attributes:            No
  Command/init files:                No
  Printer control:                   No

KERMIT-65 is a program that implements the KERMIT file  transfer  protocol  for
the Apple ][ micro computer system. It is written in 6502 assembly language and
should run on any Apple ][ or Apple ][ Plus system running DOS 3.3.  This  sec-
tion  will describe the things you should know about the DOS 3.3 file system in
order to make effective use of KERMIT, and then it will  describe  the  special
features of the KERMIT-65 program.


14.1. The DOS 3.3 File System

Items  of  importance which will be discussed in this section include Filenames
and File Characteristics.
APPLE-DOS KERMIT                                                       Page 245


Apple DOS Filenames

Filenames under Apple DOS may contain almost  any  ASCII  character  (including
space). It is not recommended that special characters, (i.e. control characters
or spaces) be used in a filename to be transferred by Kermit-65 since they  may
cause problems when parsing the filename.

Filenames  may be up to 40 characters in length. No wildcarding of any kind can
be done in KERMIT-65.


Apple DOS File Characteristics

All files in Apple DOS have a file type associated with them which is contained
in  the  directory  entry  for the file but is not part of the filename itself.
There are four types of files in DOS 3.3. They are:

   - APPLESOFT BASIC

   - INTEGER BASIC

   - BINARY

   - TEXT

All file types have their data stored in eight-bit bytes although  not  all  of
them need the eighth bit. The two file types containing basic programs required
the eighth bit due to the nature of the data being  stored.  BINARY  files  are
images  of  memory  copied into a file. Often, these are machine code programs.
These files require all eight bits. TEXT files normally contain only  printable
or  carriage control characters. They are stored in the form of seven-bit ASCII
characters but the eighth bit should always be set since Apples manipulate  all
text internally as 'NEGATIVE ASCII'.

When  transmitting  text  files, the byte size should be set to seven-bit. When
transmitting anything else, the user must insure that both Kermits are handling
eight bit data so that no information is lost. If an eight-bit data path is not
available (i.e. the remote Kermit needs to do parity checking  with  the  eigth
bit), then eight-bit quoting should be used. Of course, BINARY files as well as
Apple BASIC files will not have much meaning on a different  system.    If  the
user desires to edit a BASIC file on a mainframe, for instance, he must convert
it to a TEXT file before sending it over. After receiving the file back on  the
Apple, the user may convert it back to BASIC once again. The reason BASIC files
would be meaningless to a different machine is  that  the  Apple  stores  BASIC
keywords  as single character tokens to save space and processing time. To con-
vert a BASIC program to and from a TEXT file, consult the Apple DOS 3.3 Manual.

File information can be obtained by issuing the CATALOG command. For example:

  ]CATALOG

   DISK VOLUME 010

     *A 002 HELLO
      B 078 KERMIT
      A 002 READER
APPLE-DOS KERMIT                                                       Page 246


      T 005 TESTFILE

  ]

When KERMIT-65 is receiving a file, the file it creates on diskette will be  of
the type indicated by the FILE-TYPE parameter.  The file will always be left in
an unlocked state after it  is  closed  by  KERMIT-65.  When  sending  a  file,
KERMIT-65  will  use  the  FILE-TYPE  parameter  to  determine how to detect an
End-of-file condition. Thus, it is important to have this set properly  in  all
cases.


Recommendations for archiving files

When using a large system for archiving purposes, there is no reason to convert
Apple Basic programs into text files before sending them since there is no need
to edit them on the mainframe.

The FILE-TYPE parameter must always be set correctly when sending and receiving
files. Also, when sending files which require eight-bit  FILE-BYTE-SIZEs,  this
parameter  must  also  be  set  properly  since  KERMIT-65  does  not change it
automatically based on FILE-TYPE.

The procedure for archiving TEXT files is:

   - Run Kermit on remote system

   - SET FILE-BYTE-SIZE SEVEN-BIT ! On KERMIT-65

   - SET FILE-TYPE-MODE TEXT ! On KERMIT-65

   - Send files

The procedure for archiving APPLESOFT, INTEGER, and BINARY files is:

   - Run Kermit on remote system

   - Set File-byte-size to Eight-bit ! On Remote Kermit

   - SET FILE-BYTE-SIZE EIGHT-BIT ! On KERMIT-65

   - SET FILE-TYPE-MODE APPLESOFT ! (or INTEGER, or BINARY) On KERMIT-65

   - Send files


14.2. Program Operation
APPLE-DOS KERMIT                                                       Page 247


                            HARDWARE CONSIDERATIONS

Prior to using KERMIT-65 for transferring files, the modem  interface  must  be
set  to  handle  data in a certain manner. Firstly, the data format should be 8
data bits and 1 stop bit. Secondly, the card should be set to  no  parity.  The
baud  rate  (if  adjustable) must be set to whatever rate the modem can handle.
For the Apple Com card and the D.C. Hayes Micromodem, these parameters are  set
correctly by default, so very little has to be done. For the Apple Super Serial
Card, however, these have to be set before using KERMIT-65. In all  cases,  use
the same procedure to connect to the mainframe host as is indicated in the sec-
tion below on Installing KERMIT.

Some mainframes cannot handle data in the format of 8 data bits and 1 stop  bit
because they may need parity checking (i.e. most IBM machines). In this case, 7
data bits and 1 stop bit plus  some  parity  setting  (other  than  none)  will
usually  work. When talking with such mainframes, binary and basic files on the
Apple cannot be transferred unless Eighth-bit-quoting is used.


                           CONVERSING WITH KERMIT-65

KERMIT-65's prompt is "KERMIT-65>".

To run KERMIT-65 and issue commands to it, type the following:

  ]BRUN KERMIT

  STEVENS/CU - APPLE ][ KERMIT-65 - VER 2.1

  Kermit-65>SEND TESTFILE

  file is sent

  Kermit-65>STATUS

  performance statistics are printed

  Kermit-65>Other commands
                  .
                  .
                  .

  Kermit-65>EXIT
  ]

KERMIT-65 uses a TOPS-20 style command parser.

During interactive operation, you may use the ?-prompting help feature    ("?")
and recognition (ESC) features while typing commands.  A question mark typed at
any point in a command displays the options available at that point; typing  an
ESC  character  causes the current keyword to be completed (or default value to
be supplied).  If you have not typed sufficient characters to uniquely  specify
the  keyword  or filename (or if there is no default value) then a beep will be
sounded and you may continue typing. Keywords may be abbreviated to any  prefix
that is unique.
APPLE-DOS KERMIT                                                       Page 248


There  are  several  different  Apple ]['s which can run KERMIT-65. Kermit will
have no problems running on an Apple ][ or Apple ][+ system. It will run on the
Apple //e as well, however, the 80-column board cannot be used at this time.

Of  the  different  communication devices available for the Apple ][, three are
supported:

   - Apple Com Card

   - D.C. Hayes Micromodem

   - Apple Super Serial Card

It is possible that other  cards  may  have  operational  characteristics  very
similar  or  identical to one of the devices above. If this is the case, it may
work using one of the currently available device drivers.  The user may want to
try each of the above options to see if any of them work.

KERMIT-65  must  be told which device is being used so that it may run with the
correct device driver. It also must be told in which  slot  the  card  resides.
This may be done with the 'SET' command (documented below).


14.3. Remote and Local Operation

KERMIT-65  is  normally  run in local mode. It may be run as a remote Kermit as
well although there is no advantage to doing things that  way.  KERMIT-65  sup-
ports User-mode commands for talking to a Server. It does not currently support
server mode.


14.4. KERMIT-65 Commands


                               THE SEND COMMAND

Syntax: SEND filespec

The SEND command causes a file to be sent from the Apple to the remote  system.
The Filespec is the name of the file on the Apple diskette to be sent. The par-
ser will not accept control characters and  certain  special  characters  in  a
filename  (i.e.  a comma), so the user may have to rename the file before it is
sent. The user may also have problems in  filename  compatibility  with  remote
Kermits. If the remote Kermit does not have the facilities to beat the filename
into a format that its system likes, the user may have to rename the  file  be-
fore  sending  it.  The default disk drive used for file transfers is the drive
used to boot the system or the last drive accessed with a DOS command. This can
be  changed  with  the 'SET DEFAULT-DISK' command (explained below). Either the
slot or the drive or both may be altered.

As a file is being sent, the screen  displays  either  'SENDING  PACKET...'  or
'WAITING  PACKET...'  followed  by  the  absolute  packet number since start of
transmission. If a packet must be transmitted several times and it reaches  the
maximum  retry  count,  the transfer will fail and the 'KERMIT-65>' prompt will
return. If the remote Kermit sends an error packet, the text of the packet will
be displayed on the screen and the prompt will return.
APPLE-DOS KERMIT                                                       Page 249


Currently,  a  packet  can  be retransmitted manually by typing anything on the
keyboard. If a 'Q' is typed, the entire transmission will be aborted.


                              THE RECEIVE COMMAND

Syntax: RECEIVE [filespec]

The RECEIVE command tells KERMIT-65 to receive a file or file  group  from  the
other system.  If only one file is being received, you may include the optional
filespec as the name to store the incoming file under; otherwise, the  name  is
taken  from the incoming file header.  If the name in the header is not a legal
filename in DOS 3.3, KERMIT-65 will attempt to change it into something  legal.
There  are  very  few things that are illegal in DOS 3.3. If FILE-WARNING is on
and an incoming file has a name identical to a file  already  existing  on  the
diskette,  KERMIT-65 will issue a warning to the user and attempt to modify the
filename to make it unique.


                                      GET

Syntax: GET remote-filespec

The GET command requests a remote KERMIT server to send the file or file  group
specified by remote-filespec.  This command can be used with a KERMIT server on
the other end.

The remote filespec is any string that can be a legal  file  specification  for
the remote system; it is not parsed or validated locally.

If the remote KERMIT is not capable of server functions, then you will probably
get an error message back from it like "Illegal packet type".   In  this  case,
you  must  connect  to  the other Kermit, give a SEND command, escape back, and
give a RECEIVE command.


                              THE CONNECT COMMAND

Syntax: CONNECT

Establish a terminal connection to the remote system. Get back to KERMIT-65  by
typing  the  escape character followed by the letter C. The escape character is
Control-@ by default.  When you type  the  escape  character,  several  single-
character commands are possible:

  B   Send a BREAK Signal.
  C   Close the connection and return to KERMIT-65.
  S   Show status of the connection.
  0   Send a null.
  Connect-escape
      Send the Connect-escape character itself.
  ?   List all the possible single-character arguments.

You can use the SET ESCAPE command to define a different escape character.

When 'CONNECTED', KERMIT-65 will be passing characters entered on the  keyboard
APPLE-DOS KERMIT                                                       Page 250


to  the remote system, and passing characters from the remote system to the Ap-
ple screen. If VT52-EMULATION is turned on, Kermit will trap escape  codes  and
simulate the appropriate functions of a VT52 terminal.

On an Apple ][+ with an incomplete keyboard, special characters can be obtained
by prefixing regular characters with a right-arrow. Also, Uppercase is shown in
inverse and lowercase characters are displayed as normal uppercase characters.

Here are the rules for using the special 2/2+ input, to get all printable ASCII
characters, and how they appear on the screen:

Special meanings are applied in various contexts to certain  characters.    The
left  and right arrow keys do special things, and sometimes the escape key does
as well.

For letters, the keyboard is always in either default UPPERCASE mode or default
lowercase  mode.    When in UPPERCASE, all letters typed are sent out as upper-
case. In lowercase, all letters are sent as lowercase. To reverse the case  for
the  next  character  only,  hit  the right-arrow ("prefix") key. To switch the
default case, hit the prefix-key twice in a row.

For funny characters, the prefix key is also used to get the  unusual  punctua-
tion  characters  which  are  not  on  the  Apple keyboard. Here they are:  (To
represent the prefix character I am using the letter p).

        To get                  Type    Appearence

        Left Square Bracket     p(      [
        Right Square Bracket    p)      ]
        Left Curly Bracket      p<      {
        Right Curly Bracket     p>      }
        Underline               p-      _
        Backslash               p/      \
        Tilde (wiggle)          p^      ~
        Vertical Line           p.      |

The left-arrow key sends a rubout.

With left-arrow and right arrow doing special things,  its  a  little  hard  to
enter  their  characters  (^H and ^U respectivly). There is therefore an escape
from prefix mode sequence. If you type prefix-ESC, the next character  is  sent
without any interpretation.

Currently,  it is impossible to turn this special input and display on and off,
so its a bit of a pain if you are on a Apple 2e.


                               THE HELP COMMAND

Syntax: HELP

Typing HELP alone prints a brief summary of the KERMIT-65 commands.
APPLE-DOS KERMIT                                                       Page 251


                          THE EXIT AND QUIT COMMANDS

Syntax: EXIT

Exit from KERMIT-65.  You can restart the program,  provided  you  haven't  run
anything else, by typing 'CALL 2049'.

Syntax: QUIT

This is merely a synonym for EXIT.


                                THE SET COMMAND

Syntax: SET parameter [option] [value]

Establish  or  modify  various parameters for file transfer or terminal connec-
tion.  You can examine their values with  the  SHOW  command.    The  following
parameters may be SET:

DEBUGGING       TERSE or VERBOSE packet information.

DEFAULT-DISK    Which Diskette drive is used for file transfer?

DEVICE-DRIVER   Which communication device is being used?

EIGHT-BIT-QUOTING
                Should eight-bit-quoting be used?

ESCAPE          Character for terminal connection.

FILE-BYTE-SIZE  SEVEN or EIGHT significant bits in a byte.

FILE-TYPE       Of Apple DOS file being sent/received.

FILE-WARNING    Warn users if incoming file exists?

IBM             For communicating with an IBM mainframe

KEYBOARD        ][+ or //e keyboard.

LOCAL-ECHO      Full or half duplex switch.

PARITY          Character parity to use

RECEIVE         Various parameters for receiving files

SEND            Various parameters for sending files

SLOT            Which slot # is communication device in?

VT52-EMULATION  Should Kermit emulate a VT52 when connected?
APPLE-DOS KERMIT                                                       Page 252


SET DEBUGGING

Syntax: SET DEBUGGING options

Record the packet traffic on your terminal.  Options are:

TERSE           Show packet info only (brief).

VERBOSE         Display packet field descriptions with packet info (lengthy).

OFF             Don't display debugging information (this is the default).


SET DEFAULT-DISK

Syntax: SET DEFAULT-DISK parameter value

This command will tell KERMIT-65 which disk  drive  should  be  used  for  file
transfers.  The  two parameters which may be set separately are SLOT and DRIVE.
The value for SLOT ranges from 1 to 7. The value for DRIVE is either 1 or 2.


SET DEVICE-DRIVER

Syntax: SET DEVICE-DRIVER parameter keyword

This command will tell KERMIT-65 what type of  communication  device  is  being
used.  Currently,  three  different  cards are supported, however, other unsup-
ported cards may work similar enough to one of the three available that it  may
be  possible  to use them. KERMIT-65 must also be told where the card is in the
machine (see the SET SLOT command).  The options for this set command are:

APPLE-COM-CARD  The old Apple communication card (300 baud).

DC-HAYES        The D.C. Hayes Micromodem II (300 baud).

SUPER-SERIAL-CARD
                The Apple Super Serial Card (300-19.2k baud).


SET ESCAPE

Syntax: SET ESCAPE hexidecimal-number

Specify  the  control character you want to use to "escape" from remote connec-
tions back to KERMIT-65.  The default is 0 (Control-@).  The number is the  hex
value of the ASCII control character, 1 to 37, for instance 2 is Control-B.


SET FILE-BYTE-SIZE

Syntax: SET FILE-BYTE-SIZE parameter

Byte size for Apple DOS file I/O.  The choices are SEVEN-BIT or EIGHT-BIT.

SEVEN-BIT
APPLE-DOS KERMIT                                                       Page 253


        When sending a file, shut the H.O. bit. When receiving, turn  the  H.O.
        bit  on.  This is done since text files are the only files which should
        be sent as SEVEN-BIT files and text files only make sense to the  Apple
        if they are encoded in 'negative ascii' values.

EIGHT-BIT
        Always send and receive the bytes intact. All 8 bits are significant.


SET FILE-TYPE

Syntax: SET FILE-TYPE parameter keyword

This will inform KERMIT-65 what type of DOS file is being sent or received.  It
is  important  that this is set correctly since KERMIT-65 must create a file of
the appropriate type when receiving (and it has no way of knowing what kind  of
file  it  is).  When  KERMIT-65  is sending, it must also know the type of file
since that tells it how to detect the actual end-of-file. The options for  this
parameter are APPLESOFT, INTEGER, TEXT and BINARY.

APPLESOFT
        The file being sent/received is an Applesoft Basic program.

INTEGER The file being sent/received is an Integer Basic program.

TEXT    The file being sent/received is an ASCII Text file.

BINARY  The file being sent/received is a Binary image.


SET FILE-WARNING

Syntax: SET FILE-WARNING ON or OFF

This tells KERMIT-65 whether to warn the user  about  incoming  filenames  con-
flicting with existing files or not.


SET IBM

Syntax: SET IBM ON or OFF

SET  IBM  actually sets a number of parameters. When setting it on, the command
also turns on LOCAL-ECHO (half-duplex) and sets PARITY to MARK.   When  setting
IBM OFF, LOCAL-ECHO will revert back to OFF and PARITY will be set to NONE.  It
should be used when doing file transfers with an IBM or similar mainframe.


SET KEYBOARD

Syntax: SET KEYBOARD 2P or 2E

SET KEYBOARD tells KERMIT-65 if the user has a full keyboard (2E) or not  (2P).
If  the  user  is  on  an  Apple  ][+,  this  should be set to 2P (which is the
default). When set to that, certain character  translations  are  available  by
using the right-arrow key as a prefix character.
APPLE-DOS KERMIT                                                       Page 254


SET SLOT

Syntax: SET SLOT parameter

This  option tells KERMIT-65 in which slot the communication device is located.
The range for the parameter is 1-7.


                               THE SHOW COMMAND

Syntax: SHOW [option]

The SHOW command displays various information:

ALL             All parameter settings (this is quite long).

DEBUGGING       Debugging mode.

DEFAULT-DISK    Which Diskette drive is used for file transfer?

DEVICE-DRIVER   Which communication device is being used?

EIGHT-BIT-QUOTING
                Should eight-bit-quoting be used?

ESCAPE          Character for terminal connection.

FILE-BYTE-SIZE  SEVEN or EIGHT significant bits in a byte.

FILE-TYPE       Of Apple DOS file being sent/received.

FILE-WARNING    Warn users if incoming file exists?

IBM             For communicating with an IBM mainframe

KEYBOARD        ][+ or //e keyboard.

LOCAL-ECHO      Full or half duplex switch.

PARITY          Character parity to use

RECEIVE         Various parameters for receiving files

SEND            Various parameters for sending files

SLOT            Which slot # is communication device in?

VT52-EMULATION  Should Kermit emulate a VT52 when connected?

The above options are analogous to the equivalent SET commands.
APPLE-DOS KERMIT                                                       Page 255


                              THE STATUS COMMAND

Give  statistics about the most recent file transfer. This includes information
such  as  number  of  characters  sent/received,  number  of  data   characters
sent/received, and last error encountered.


14.5. Customizing, Building, and Installing KERMIT-65


                             STANDARD INSTALLATION


The Procedure

The  procedure  to bootstrap an assembled KERMIT object file to the Apple is as
follows:

   1. On the Apple, Type in the APPLBT.BAS program supplied  (See  below).
      It  is  recommended  that  the  user  save this program as it may be
      needed to bootstrap newer versions of KERMIT or APPHXL  in  the  fu-
      ture.  Also, type the APPLESOFT program in with none of the REMs. It
      will execute quicker and take up less room.

   2. Call and login to the mainframe on which the KERMIT-65  object  file
      resides. Do the following:

         - ]IN#n ! Where n is between 1 and 7

         - For Communication card, do the following:

              * Dial number for computer system.

              * Seat phone receiver in modem cradle.

              * ]<Cntrl/A><Cntrl/F> !Full duplex, 300 baud

         - For the D.C. Hayes Micromodem, do the following:

              * ]<Cntrl/A><Cntrl/F> ! Full duplex, 300 baud

              * MICROMODEM II: BEGIN TERM <Cntrl/A><Cntrl/Q>

              * MICROMODEM  II: DIALING: nnn-nnnn<cr> ! nnn-nnnn is number
                of computer system

         - For the Apple Super Serial Card, do the following:

              * ]<Cntrl/A>

              * APPLE SSC:0D ! 8 data bits, 1 stop bit

              * ]<Cntrl/A>

              * APPLE SSC:0P ! Force no parity
APPLE-DOS KERMIT                                                       Page 256


              * ]<Cntrl/A>

              * APPLE SSC:nB ! n = 6 for 300 baud, n = 8 for 1200 baud

              * Dial number for computer system.

              * Seat phone receiver in modem cradle.

              * ]<Cntrl/A>

              * APPLE SSC:T ! Terminal mode, now talking to remote host

   3. In your directory on the mainframe, the following  files  should  be
      present:

         - APPLBT.FOR

         - APPHXL.HEX

         - APPLEK.HEX

      Compile  and  execute  APPLBT.FOR.  This  will  be  used  along with
      APPLBT.BAS on the Apple to load the APPHXL program. Once  APPLBT  is
      executing  on the mainframe, give control back to the Apple and then
      run APPLBT.BAS on the Apple. For either the  Communication  Card  or
      the D.C. Hayes Micromodem, the procedure is:

         - <Cntrl/A><Cntrl/X><cr> ! Give control to Apple's Brain

         - ]LOAD APPLBT.BAS<cr>

         - ]LOMEM:9500<cr>

         - ]RUN<cr>

   4. Relocate and save APPHXL. Type the following:

         - ]CALL -151<cr> ! Enter Apple's system monitor

         - *9000<2000.2280M<cr> ! Move APPHXL from $2000 to $9000

         - *<Cntrl/C><cr> ! Reenter APPLESOFT

         - ]BSAVE APPHXL,A$9000,L$280<cr> ! Save APPHXL to disk

   5. Now simply start executing APPHXL.

         - ]CALL -151<cr> ! Enter monitor

         - *9000G<cr> ! Start APPHXL

         - SLOT  FOR  MODEM  CARD?  (1 TO 7 )n ! 'n' is slot # of card (no
           <cr>)

         - ENTER FILENAME TO LOAD APPLEK.HEX<cr> !  Tell  APPHXL  what  to
           load
APPLE-DOS KERMIT                                                       Page 257


      APPHXL  will  print the byte count and load address for each line it
      is receiving as it loads it into memory. At the end of each line, it
      will  print  '[OK]'  if the line was received properly or '[CHECKSUM
      ERROR]' if there was a problem with it.

   6. When APPHXL finishes type the following to the Apple:

        ]BSAVE KERMIT,A$801,L$4E00<cr> ! Save KERMIT to disk

   7. The user may set up a turn-key system by having the  hello  file  on
      the  disk  load  and  run  KERMIT.  The user may also run KERMIT-65,
      change the defaults which are supplied in the program such  as  SLOT
      and  DEVICE-DRIVER,  and then resave KERMIT-65.  The next time it is
      run, the user will not have to set these values again.  If the  user
      does  not  set  up  a  turn-key  system,  he must start KERMIT-65 by
      typing:

]BRUN KERMIT<cr>        ! Execute KERMIT-65 on the Apple

      The Apple will display the following:

                STEVENS/CU - APPLE ][ KERMIT-65  VER. 2.1
                KERMIT-65>

      The user is now ready to transfer files.

NOTE: For those users with the Apple Super Serial Card, the <cntrl/A> intercept
character  should be shut off by typing <cntrl/A>Z to the card before Kermit is
run. The reason for this is that Kermit uses  <cntrl/A>  as  a  Start-of-Header
character  and this character may never reach the program if the card is taking
it to be a command.


APPLBT.BAS - The APPLESOFT Bootstrap program

10  REM  - LOADER FOR HXLOAD
11  OAD = 0
100 N$ = "0123456789ABCDEF"
110 D$ =  CHR$ (4)
130  PRINT D$;"IN#2" : REM CHANGE '2' TO SLOT OF COMM. CARD IF NECESSARY
135  PRINT  CHR$ (1); CHR$ (6)
136  PRINT D$;"PR#2" : REM CHANGE '2' TO SLOT OF COMM. CARD IF NECESSARY
137  PR#2  : REM THIS LINE SHOULD BE HERE ONLY FOR THE APPLE COMM. CARD
140 C3 = 0
150  HOME
199  REM  - REQUEST NEXT LINE
200  REM - PUT A DOT ON THE SCREEN FOR EACH LINE RECEIVED
201 C3 = C3 + 1: POKE 1024 + C3, ASC (".")
202 L$ = "":Y2% = 1: PRINT
203  GET A$:L$ = L$ + A$:Y2% = Y2% + 1: IF Y2% < 81 THEN 203
205 C1 = 0:C2 = 0:I = 0
208  IF  LEFT$ (L$,1) >  = "0" AND  LEFT$ (L$,1) <  = "9" THEN 220
210 L$ =  RIGHT$ (L$, LEN (L$) - 1): GOTO 208
220 LL =  LEN (L$)
249  REM - FETCH THE DATA BYTE COUNT FOR THIS LINE
250  GOSUB 1000:C1 = C1 + B:CO = B
APPLE-DOS KERMIT                                                       Page 258


255  IF CO = 0 THEN 990
259  REM - CONSTRUCT THE LOAD ADDRESS FOR THIS LINE
260  GOSUB 1000:C1 = C1 + B:AD = B: GOSUB 1000:C1 = C1 + B
     :AD = AD * 256 + B
265 REM - IF THE LATEST VERSION OF CROSS IS USED, THIS SHOULD NOT
     BE NEEDED : REM AD = AD - 28672
266  IF AD < OAD THEN 990
267 OAD = AD
270  FOR X = 0 TO CO - 1
275  REM - GO GET A BYTE AND PUT IT IN THE NEXT MEMORY LOCATION
280  GOSUB 1000:C1 = C1 + B
290  POKE AD + X,B
300  NEXT X
310  GOSUB 1000:C2 = B: GOSUB 1000:C2 = C2 * 256 + B
320  IF C1<>C2 THEN POKE 1024+C3,ASC("E")
330  GOTO 201
990  FOR X = 1 TO 1000: NEXT X
995  PRINT D$;"IN#0": PRINT D$;"PR#0": HOME : END
999  REM  - GET BYTE
1000  GOSUB 1501:B = N1: GOSUB 1501:B = B * 16 + N1
1010  RETURN
1500  REM - GET NIBBLE
1501  IF  LEN (L$) = 0 THEN N1 = 0: RETURN
1510 H$ =  LEFT$ (L$,1)
1511  IF  LEN (L$) = 1 THEN L$ = "": GOTO 1525
1515 L$ =  RIGHT$ (L$, LEN (L$) - 1)
1520  REM - RETURN VALUE OF HEX NIBBLE
1525  FOR X1 = 1 TO 16
1530  IF H$ =  MID$ (N$,X1,1) THEN 1610
1540  NEXT X1
1550 REM - DIGIT WAS NOT FOUND, RETURN ZERO
1560 N1 = 0: RETURN
1600  REM
1610 N1 = X1 - 1: RETURN



APPLBT.FOR - The Mainframe Bootstrap program

      CHARACTER LINE*80,SENTNL*1
      OPEN (UNIT=00,FILE='APPHXL.HEX',MODE='ASCII')
   10 READ (UNIT=05,FMT=20) SENTNL
   20 FORMAT (A1)
      READ (UNIT=00,FMT=25,END=999) LINE
   25 FORMAT(A80)
      WRITE (UNIT=05,FMT=30) LINE
   30 FORMAT(A80)
      GO TO 10
  999 READ (UNIT=05,FMT=20) SENTNL
      STOP
      END
APPLE-DOS KERMIT                                                       Page 259


                      ALTERNATIVE INSTALLATION PROCEDURES


HEXloading from Diskette

Once the user has a working version of KERMIT-65 on his system, he can use this
to  load the .HEX files of future versions of KERMIT.  There is another hexload
program available called APPDXL. This program will load a hex file from an  Ap-
ple diskette into memory. To use this procedure, do the following:

   1. Start executing APPHXL.

         - ]BLOAD APPHXL ! Get APPHXL into memory

         - ]CALL -151<cr> ! Enter monitor

         - *9000G<cr> ! Start APPHXL

         - SLOT  FOR  MODEM  CARD?  (1 TO 7 )n ! 'n' is slot # of card (no
           <cr>)

         - ENTER FILENAME TO LOAD APPDXL.HEX<cr> !  Tell  APPHXL  what  to
           load

      APPHXL  will  print  what  it  is receiving on the screen as well as
      loading it into memory.

   2. Relocate and save APPDXL. Type the following:

         - ]CALL -151<cr> ! Enter Apple's system monitor

         - *9000<2000.2500M<cr> ! Move APPDXL from $2000 to $9000

         - *<Cntrl/C><cr> ! Reenter APPLESOFT

         - ]BSAVE APPDXL,A$9000,L$500<cr> ! Save APPDXL to disk

   3. Use Kermit-65 to transfer the new version of itself over.  Make  the
      Apple  file  a Text file. WARNING: This file will take LOTS of space
      (about 180 sectors) so make sure the disk is reasonably empty.   The
      transfer takes a LONG time also, so please be patient.

   4. Start executing APPDXL.

         - ]BRUN APPDXL<cr> ! Start APPDXL

         - ENTER  FILENAME  TO  LOAD  APPLEK.HEX<cr> ! Tell APPDXL what to
           load

   5. When APPDXL finishes type the following to the Apple:

        ]BSAVE KERMIT,A$801,L$4E00<cr> ! Save KERMIT to disk

The new version of Kermit is now on disk.
APPLE-DOS KERMIT                                                       Page 260


Using KERMIT-65 to transfer APPLEK.BIN

There is yet another way to Bootstrap a new version of KERMIT onto an Apple. If
the  user  has an older version of KERMIT-65 and has access to a machine with a
valid copy of APPLEK.BIN, they can simply transfer APPLEK.BIN using their  ver-
sion  of  KERMIT.  Be  sure  to  set  the  File-byte-size to Eight-bit, and the
File-type-mode to Binary before transfering the file since this is  the  actual
object  code.  No  special  loading  or  conversion is needed. The file will be
placed on the disk and ready to run.


                         FILES SUPPLIED FOR KERMIT-65

The following files should be supplied on the distribution tape:

   - APPLBT.BAS - Initial bootstrap program to load APPHXL

   - APPLBT.FOR - Program on mainframe to talk to APPLBT.BAS

   - APPHXL.M65 - Source of program to load KERMIT-65

   - APPHXL.HEX - Assembled version of Hex load program

   - APPDXL.M65 - Source of program to load KERMIT-65 from Apple diskette

   - APPDXL.HEX - Assembled version of Disk Hex load program

   - APPLEK.M65 - Source for the KERMIT-65 program

   - APPLEK.HEX - Assembled version of KERMIT-65

   - APPLEK.BIN - Assembled version of KERMIT-65 (Eight-bit Binary  object
     code)

   - CROSS.MAC - CROSS Microprocessor Assembler (Source)

   - CROSS.EXE - CROSS Microprocessor Assembler (Object)


                      CUSTOMIZING AND BUILDING KERMIT-65

The  source  code  to KERMIT-65 is in 6502 Assembler. It has been formatted for
CROSS which is a micro-Cross Assembler program which runs on DECsystem-10s  and
DECSYSTEM-20s.  Customizations  would  be made the easiest if CROSS were avail-
able.

KERMIT-65 currently supports the following communications devices:

   - FTASER - The Apple Communication card

   - FTHAYS - The D.C. Hayes Micromodem.

   - FTSSC - The Apple Super Serial Card

All device drivers are included in the assembled version and may be used by is-
suing a 'SET DEVICE-DRIVER' command to Kermit. If any of the device drivers are
APPLE-DOS KERMIT                                                       Page 261


not needed, it(they) may be excluded by setting the appropriate feature test to
zero  in  the  Feature  test  section of the source code. Excluding one or more
device drivers can reduce the size of the object code greatly. DO  NOT  disable
all  device  drivers  since KERMIT-65 will then have no way of talking over the
communication device.

The feature test FTCOM must be set to the type of computer for which  KERMIT-65
is  being  assembled.  The only machine KERMIT-65 is available for currently is
the Apple ][. This parameter must be set to FTAPPL.

After setting any options necessary in APPLEK.M65, rename it to KERMIT.M65, and
do the following:

   - .R CROSS<cr> ! Run CROSS Microprocessor Assembler

   - *KERMIT.HEX/PTP:KIM=KERMIT.M65/M65 ! Generate .HEX file

This  command  will produce an ASCII HEX file which can be downline loaded onto
the Apple using APPHXL.  If a listing is desired, one can be produced by adding
",KERMIT.LST" after the "/PTP:KIM" in the command line to CROSS.
Kermit User Guide                                                      Page 262


I. The ASCII Character Set

ASCII Code (ANSI X3.4-1968)

There  are 128 characters in the ASCII (American national Standard Code for In-
formation Interchange) "alphabet".  The characters are listed in order of ASCII
value; the columns are labeled as follows:

Bit             Even parity bit for ASCII character.
ASCII Dec       Decimal (base 10) representation.
ASCII Oct       Octal (base 8) representation.
ASCII Hex       Hexadecimal (base 16) representation.
EBCDIC Hex      EBCDIC hexadecimal equivalent for Kermit translate tables.
Char            Name or graphical representation of character.
Remark          Description of character.

The first group consists of nonprintable 'control' characters:

     .....ASCII.... EBCDIC
Bit  Dec   Oct  Hex  Hex    Char  Remarks
 0   000   000   00   00    NUL   ^@, Null, Idle
 1   001   001   01   01    SOH   ^A, Start of heading
 1   002   002   02   02    STX   ^B, Start of text
 0   003   003   03   03    ETX   ^C, End of text
 1   004   004   04   37    EOT   ^D, End of transmission
 0   005   005   05   2D    ENQ   ^E, Enquiry
 0   006   006   06   2E    ACK   ^F, Acknowledge
 1   007   007   07   2F    BEL   ^G, Bell, beep, or fleep
 1   008   010   08   16    BS    ^H, Backspace
 0   009   011   09   05    HT    ^I, Horizontal tab
 0   010   012   0A   25    LF    ^J, Line feed
 1   011   013   0B   0B    VT    ^K, Vertical tab
 0   012   014   0C   0C    FF    ^L, Form feed (top of page)
 1   013   015   0D   0D    CR    ^M, Carriage return
 1   014   016   0E   0E    SO    ^N, Shift out
 0   015   017   0F   0F    SI    ^O, Shift in
 1   016   020   10   10    DLE   ^P, Data link escape
 0   017   021   11   11    DC1   ^Q, Device control 1, XON
 0   018   022   12   12    DC2   ^R, Device control 2
 1   019   023   13   13    DC3   ^S, Device control 3, XOFF
 0   020   024   14   3C    DC4   ^T, Device control 4
 1   021   025   15   3D    NAK   ^U, Negative acknowledge
 1   022   026   16   32    SYN   ^V, Synchronous idle
 0   023   027   17   26    ETB   ^W, End of transmission block
 0   024   030   18   18    CAN   ^X, Cancel
 1   025   031   19   19    EM    ^Y, End of medium
 1   026   032   1A   3F    SUB   ^Z, Substitute
 0   027   033   1B   27    ESC   ^[, Escape, prefix, altmode
 1   028   034   1C   1C    FS    ^\, File separator
 0   029   035   1D   1D    GS    ^], Group separator
 0   030   036   1E   1E    RS    ^^, Record separator
 1   031   037   1F   1F    US    ^_, Unit separator

The  last  four  are  usually associated with the control version of backslash,
right square bracket, uparrow (or circumflex),  and  underscore,  respectively,
but some terminals do not transmit these control characters.
Kermit User Guide                                                      Page 263


The following characters are printable:

First, some punctuation characters.

     .....ASCII.... EBCDIC
Bit  Dec   Oct  Hex  Hex    Char  Remarks
 1   032   040   20   40    SP    Space, blank
 0   033   041   21   5A    !     Exclamation mark
 0   034   042   22   7F    "     Doublequote
 1   035   043   23   7B    #     Number sign, pound sign
 0   036   044   24   5B    $     Dollar sign
 1   037   045   25   6C    %     Percent sign
 1   038   046   26   50    &     Ampersand
 0   039   047   27   7D    '     Apostrophe, accent acute
 0   040   050   28   4D    (     Left parenthesis
 1   041   051   29   5D    )     Right parenthesis
 1   042   052   2A   5C    *     Asterisk, star
 0   043   053   2B   4E    +     Plus sign
 1   044   054   2C   6B    ,     Comma
 0   045   055   2D   60    -     Dash, hyphen, minus sign
 0   046   056   2E   4B    .     Period, dot
 1   047   057   2F   61    /     Slash

Numeric characters:

     .....ASCII.... EBCDIC
Bit  Dec   Oct  Hex  Hex    Char  Remarks
 0   048   060   30   F0    0     Zero
 1   049   061   31   F1    1     One
 1   050   062   32   F2    2     Two
 0   051   063   33   F3    3     Three
 1   052   064   34   F4    4     Four
 0   053   065   35   F5    5     Five
 0   054   066   36   F6    6     Six
 1   055   067   37   F7    7     Seven
 1   056   070   38   F8    8     Eight
 0   057   071   39   F9    9     Nine

More punctuation characters:

     .....ASCII.... EBCDIC
Bit  Dec   Oct  Hex  Hex    Char  Remarks
 0   058   072   3A   7A    :     Colon
 1   059   073   3B   5E    ;     Semicolon
 0   060   074   3C   4C    <     Left angle bracket
 1   061   075   3D   7E    =     Equal sign
 1   062   076   3E   6E    >     Right angle bracket
 0   063   077   3F   6F    ?     Question mark
 1   064   100   40   7C    @     "At" sign
Kermit User Guide                                                      Page 264


Upper-case alphabetic characters (letters):

     .....ASCII.... EBCDIC
Bit  Dec   Oct  Hex  Hex    Char  Remarks
 0   065   101   41   C1    A
 0   066   102   42   C2    B
 1   067   103   43   C3    C
 0   068   104   44   C4    D
 1   069   105   45   C5    E
 1   070   106   46   C6    F
 0   071   107   47   C7    G
 0   072   110   48   C8    H
 1   073   111   49   C9    I
 1   074   112   4A   D1    J
 0   075   113   4B   D2    K
 1   076   114   4C   D3    L
 0   077   115   4D   D4    M
 0   078   116   4E   D5    N
 1   079   117   4F   D6    O
 0   080   120   50   D7    P
 1   081   121   51   D8    Q
 1   082   122   52   D9    R
 0   083   123   53   E2    S
 1   084   124   54   E3    T
 0   085   125   55   E4    U
 0   086   126   56   E5    V
 1   087   127   57   E6    W
 1   088   130   58   E7    X
 0   089   131   59   E8    Y
 0   090   132   5A   E9    Z

More punctuation characters:

     .....ASCII.... EBCDIC
Bit  Dec   Oct  Hex  Hex    Char  Remarks
 1   091   133   5B   AD    [     Left square bracket
 0   092   134   5C   E0    \     Backslash
 1   093   135   5D   BD    ]     Right square bracket
 1   094   136   5E   5F    ^     Circumflex, up arrow
 0   095   137   5F   6D    _     Underscore, left arrow
 0   096   140   60   79    `     Accent grave
Kermit User Guide                                                      Page 265


Lower-case alphabetic characters (letters):

     .....ASCII.... EBCDIC
Bit  Dec   Oct  Hex  Hex    Char  Remarks
 1   097   141   61   81    a
 1   098   142   62   82    b
 0   099   143   63   83    c
 1   100   144   64   84    d
 0   101   145   65   85    e
 0   102   146   66   86    f
 1   103   147   67   87    g
 1   104   150   68   88    h
 0   105   151   69   89    i
 0   106   152   6A   91    j
 1   107   153   6B   92    k
 0   108   154   6C   93    l
 1   109   155   6D   94    m
 1   110   156   6E   95    n
 0   111   157   6F   96    o
 1   112   160   70   97    p
 0   113   161   71   98    q
 0   114   162   72   99    r
 1   115   163   73   A2    s
 0   116   164   74   A3    t
 1   117   165   75   A4    u
 1   118   166   76   A5    v
 0   119   167   77   A6    w
 0   120   170   78   A7    x
 1   121   171   79   A8    y
 1   122   172   7A   A9    z

More punctuation characters:

     .....ASCII.... EBCDIC
Bit  Dec   Oct  Hex  Hex    Char  Remarks
 0   123   173   7B   C0     {    Left brace (curly bracket)
 1   124   174   7C   4F     |    Vertical bar
 0   125   175   7D   D0     }    Right brace (curly bracket)
 0   126   176   7E   A1     ~    Tilde


Finally, one more nonprintable character:

 0    127   177  7F   07    DEL   Delete, rubout
,Kermit User Guide                                                  Page cclxvi


Index

                                     1
          3270 Protocol Emulation   2Completion   171, 173
                                     CONNECT    9,  11,  175,  195,
          8080   221, 223                    217, 237, 249
                                     CONTINUE   35, 67, 100
          ?-prompting   247          Control Characters   9, 262
                                     Control-A   56, 90
          ANSI.SYS   191             Control-C   35, 67, 100
          APC   242                  Control-V   56
          Apple ][   244             Control-X      30, 31, 56, 57,
          APPLESOFT   253                    90, 91, 176, 177
          ARPANET   65, 234          Control-Z   30,  31,  56,  57,
          ASCII   262                        90, 91, 176, 177
          ASCII-to-EBCDIC   112      CP/M   50, 224
          Attention Character   234  Crash   22
          Autoanswer   16            CRC   184
          Autodialer   13, 75, 195
                                     Deadlock   22
          Batch   64                 Debugging     37, 62, 96, 113,
          Batch  Operation of Kermit-CMS     184, 239, 252
                  109                DEC Rainbow   241
                                     -MS
          Batch Operation  of  KermitDECSYSTEM-20   46
                  173                DEFAULT-DISK   252
          Baud   219, 238            DEFINE   66, 194
          Baud Rate   36, 184        Define SET Macros   42
          Beeper   184               Delay   37
          Bell   184                 DELETE   56, 90
          BINARY   253               DEVICE-DRIVER   252
                                     55,
          Binary Files   20, 29, 40, Dialout   75
                  56, 90, 188        Dialout Modems   139
          Binhex   158               Dialup   14
          BIOS   221                 Diskette   22
                                     84,
          Block Check    36,  113,  1Display, File Transfer   185
                  220                DO Command   195
          Bootstrap   225            DOS 3.3   244
                                     mit
          Bootstrapping   MS-DOS  KerDownloading   225
                  200                Duplex   37
          BREAK Simulation   61, 65
          BYE   17, 18, 218, 238     EBCDIC   262
          Byte Size   48, 58, 62, 252EBCDIC-to-ASCII   113
                                     Echo   20, 67
          C-Kermit   118             Eighth-Bit Prefix     29,  30,
          Cables   14, 15                    40,  55,  56,  90, 91,
          Cancelling  a  File   Transfer     188, 219, 240
                                     90,
                  30,  31,  56,  57, EMACS   198
                  91, 110, 176, 177  Emergency Exit   120
          Capturing Files   43       End Of File   50, 170, 186
          Checksum   184             End Of Line   40, 41
          CKMKER   153               EOF   186
          CKMKEY   158               Error Recovery   19
          CLEAR   69                 Escape Character     11,  217,
          CLOSE Command   182                219, 237, 239
          Command Files   191        Escape  Character  for CONNECT
          Command Macro   194                38, 62, 97, 186, 252
          Command Parsing   25       Escape Sequence   9
Kermit User Guide                                                       Page ii


          EXIT   35, 67, 100, 251    Local Echoing   187
                                     2
          Expunging Deleted Files   6Local-Echo   219, 240
                                     LOG   43, 218, 240
          File Renaming   114, 193   LOG Command   182
          File Type   97             Login Scripts   69
                                     3
          File Warning   114, 120, 19LOGOUT   218, 238
          FILE-BYTE-SIZE   252
          FILE-TYPE   253            Macintosh Kermit   153
                                     3
          File-Warning   218, 238, 25Macro   194
          Filespec   248             Message Interference   52, 88
          FINISH   17, 18, 219, 238  META Key   161, 198
          Flow Control   38, 186, 239Mode Line   188, 196
                                     Modem   195
          Generation   56            Modems   139
          Generic Kermit-80   221    MS-DOS   167
          Generic MS-DOS Kermit     189,
                  207                NAK   217, 237
          GET   17, 218, 238, 249    NEC Advanced Personal Computer
                                             242
          Handicapped   185          Noise   6
          Handshake   38, 78, 98, 187Normal  Form  for  File  Names
          Hayes Modem   140                  55, 63, 89, 98
                                     ion
          Heath/Zenith-19      EmulatNull Modem   14, 15
                  208
          Help   51, 171, 247, 250   OUTPUT   69

                                     20,
          IBM   63, 98, 106,  137,  2Packet   7
                  239, 253           Packet Length   40, 41
          IBM PC   167               Padding   41
                                     ion
          Incomplete   File  DispositParity     29, 30, 39, 55, 56,
                  30, 56, 91, 111,  177,     90, 91, 188, 219, 240,
                  187                        262
                                     39
          Incomplete File Transfer   Password   72
          Indirect Command File   72 Passwords   72
                                     54,
          Initial Filespec   22, 29, PAUSE   69
                  89                 Pause Between Packets   41
          INPUT   64, 66, 69, 70, 72 PC-DOS   167
                                     mit
          Installation of MS-DOS  KerPCjr   195
                  199                Printer   182, 185, 198
          INTEGER   253              Prompt   9, 40
          Intercept Character   234
          Interference   52, 88      QUIT   35, 67, 101, 251
          Internal Modem   19
          ITS-Binary Format   63     Rainbow 100   241
                                     Raw Download   76, 101
          Kermit Commands   10       Raw Upload   73, 77
          Kermit Protocol   7        RECEIVE    11, 12, 13, 30, 56,
          Kermit server   16                 90,  111,  177,   218,
          Key Redefinition   187             238, 249
          Key Redefinitions   198    Recognition   51, 247
          KEYBOARD   253             Remote   10, 18, 25
                                     Repeated Character Compression
          Line Sequence Numbers   55         29, 30, 55, 56, 90
          Linefeed   78              Retry Limit   42
          Local   10, 25, 216, 236   Rollback   197
          Local Echo   37
Kermit User Guide                                                      Page iii


          Screen Dump   186, 197     Word Size   48
          Screen Scroll   197
                                     54,
          SEND   10, 13, 17, 22, 29, XON/XOFF   38, 218, 262
                  89, 175, 218, 238, 248
          Series/1   114             Z80   223
          Server   16, 18, 32, 58, 92
          Server, MS-DOS   182
          SET   11, 219, 238
          SET INPUT   64, 73
          SET TERMINAL   191
          Setfile   158
          SHOW      11, 43, 66, 99, 240,
                  254
          SLOT   254
          Smart Modem   195
          Speaking Device   185
          Speed   65, 66
          Start Of Packet   41, 42

          TAC   234
          TAC Binary Mode   65
          TAKE   64, 240
          TELENET   39, 42, 142, 188
          Terminal   191
          TERSE   252
          TEXT   253
          Timeout    40,  41,  70,  193,
                  216,  217,  224,  236,
                  237
          TIMER   219, 240
          TOPS-20   46
          TopView   167
          TRANSMIT   73, 77, 218
          TVT-Binary   65
          Typeahead   72

          UNDELETE   56, 90
          Unix Kermit   118
          Upload   73

          VAX/VMS   83
          VERBOSE   252
          Version   90, 219
          Virtual Terminal   9, 11, 217,
                  237
          VM/CMS   13, 106
          VT-102 Emulation   167
          VT100   219
          VT102 Emulation   192, 208
          VT52   219
          VT52 Emulation   208

          Warning    114, 120, 193, 219,
                  240
          Wildcard    11,  12,  47,  84,
                  107, 169, 172
