[comp.binaries.apple2] Kermit docs in Ascii

ptrepan1@umn-d-ub.D.UMN.EDU (pat trepanier) (10/26/89)

Here is the second part of the kermit docs.
--------------------------------cut here------------------------------
        ---------------------------------------
                                    bline      |
             space bar                         |
                                   openline    |
        ---------------------------------------

                Figure 1-1:  VT100 Keypad on an Apple Keyboard

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

similar  to  a  VT52 keypad.  Remember the open/closed Apple or the game button
must be pushed (like the cntl key) to get the keypad  emulation.    Figure  1-3
should clear up the questions.


1.5.16. the SHOW command

Syntax: SHOW [option]

The SHOW command displays various information:

    ALL                     All parameter settings (this is quite long).

    BAUD                    Baud rate of the com card.

    CURSOR-KEYS-VT100       Are  the  cursor  keys  emulating  the VT100 cursor
                            keys?
1.5.16. the SHOW command                                                Page 18

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



                       PF1     PF2     PF3     PF4
                     ------- ------- ------- -------
                    |       |       |findnxt|delline|
                    | CLEAR |   =   |   /   |   *   |
                    | gold  | help  | find  |undelln|
                     ------- ------- ------- -------
                       7       8       9       -
                     ------- ------- ------- -------
                    | page  |section|append |delword|
                    |   7   |   8   |   9   |   +   |
                    |command| fill  |replace|undelwd|
                     ------- ------- ------- -------
   vt100 key ---->      4       5       6       ,
                     ------- ------- ------- -------
   vms edit usage ->| advanc|backup |  cut  |delchar|
   gs key ------->  |   4   |   5   |   6   |   -   |
   vms edit usage ->| bottom|  top  | paste |undelch|
                     ------- ------- ------- -------
                       1       2       3       ENTER
                     ------- ------- ------- -------
                    | word  |  eol  | char  |       |
                    |   1   |   2   |   3   |       |
                    |chgcase|deleol |specins|       |
                     ------- ------- -------| enter |
                            0          .    | ENTER |
                     -----------------------|  sub  |
                    |    bline      |select |       |
                    |      0        |   .   |       |
                    |  openline     | reset |       |
                     -------------------------------

                   Figure 1-2:  VT100 Keypad on an Apple//gs

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

    DEBUGGING               Debugging mode.

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

    DEVICE-DRIVER           Which communication device is being used?

    DISPLAY                 Which screen display is being used?

    ESCAPE                  Character for terminal connection.

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

    FILE-WARNING            Warn users if incoming file exists?

    FLOW                    Should XON/XOFF flow control be used to the remote?

    KEYBOARD                II+ or //e keyboard.
1.5.16. the SHOW command                                                Page 19

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



    ^ is up arrow    BLUE     RED     GRAY     ^    .(period) ENTER
                     ------- ------- ------- ------- ------- -------
                    |       |       |delline|  up   |select | enter |
                    |   6   |   7   |   8   |   9   |   0   |   -   |
                    | gold  | help  |undelln|replace| reset |  sub  |
                     ------- ------- ------- ------- ------- -------
      v is down arrow     7       8       9       v
                        ------- ------- ------- -------
                       | page  |findnxt|delword| down  |
                       |   Y   |   U   |   I   |   O   |
                       |command| find  |undelwd|section|
                        ------- ------- ------- -------
       vt52 key ---->         4       5       6       ->
                           ------- ------- ------- -------
    vms edit usage ---->   |advanc|backup |delchar| right |
       apple key ---->     |  H   |   J   |   K   |   L   |
    vms edit usage ---->   |bottom|  top  |undelch|specins|
                           ------- ------- ------- -------
                                1       2       3      <-
                              ------- ------- ------- -------
                             | word  |  eol  |  cut  | left  |
                             |   N   |   M   |   ,   |   .   |
                             |chgcase|deleol | paste |append |
                              ------- ------- ------- -------
                                   0
        ---------------------------------------
                                    bline      |
             space bar                         |
                                   openline    |
        ---------------------------------------

                 Figure 1-3:  VT52 Keypad on an Apple Keyboard

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

    KEYPAD                  Does a gs keypad exist?

    LOCAL-ECHO              Full or half duplex switch.

    PARITY                  Character parity to use

    PREFIX                  Which default prefix to use with PRODOS?

    PRINTER                 Should the printer be used for the display?

    PROTOCOL                Which protocol is to be used for file transfer.

    RECEIVE                 Various parameters for receiving files

    SEND                    Various parameters for sending files

    SLOT                    Which slot # is communication device in?
1.5.16. the SHOW command                                                Page 20

-------------------------------------------------------------------------------
    TIMER                   Is the receive timeout on or off?

    TIMING                  Count for timing loop

    TERMINAL                Which terminal (if any) should Kermit emulate?

The above options are analogous to the equivalent SET commands.


1.5.17. The STATUS Command

Syntax: STATUS

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.


1.5.18. The TAKE Command

Syntax: TAKE filespec

The TAKE commands tells kermit-65 to execute commands from the  specified  file
similarly  to  the  KERMIT.INIT  file.  See discussion on KERMIT.INIT above for
details.


1.5.19. The TYPE Command

Syntax: TYPE filespec

The TYPE commands tells kermit-65 to print to the  screen  from  the  specified
file. Text files only and works best with 80 characters per line or less.


1.5.20. The UNLOCK Command

Syntax: UNLOCK filespec

UNLOCK will unlock the given filespec on the default drive.


1.6. Installation


1.6.1. Standard Installation

To  bootstrap  Kermit  to  prodos, get the file APPPRO.BNS on a apple diskette.
Use binscii to convert this file into a shrinkit file. Use shrinkit to  extract
the  files  onto a prodos diskette with your own prodos and basic.system files.
Then "-read.me" for further instructions. Thanks to Les Ferch for this  install
system.   For dos 3.3 get the files APP386.[1-2] on a master diskette then read
the first of app386.1 for further instructions.  Thanks to Alan Kalker for this
install system.

The  kermit  binaries will run on either system.  Simply use the PRODOS conver-
1.6.1. Standard Installation                                            Page 21

-------------------------------------------------------------------------------
sion routines (if they have them fixed, better to use copy II+ or whatever)  to
move kermit, kermit.help and kermit.init files.  If you want other options as a
regular thing then you can change file kermit.init with your favorite editor.


    Files Supplied for Kermit-65

The following files should be supplied on the columbia distribution tape:

    APP386.1       Install system for dos 3.3 (1 of 2)
    APP386.2       Install system for dos 3.3 (2 of 2)
    APPAAA.HLP     List of files (like this one)
    APPAAA.NEW     Whats new in this release
    APPACC.HEX     Apple com card hex
    APPACC.M65     Apple com card source
    APPCAT.HEX     Apple cat hex
    APPCAT.M65     Apple cat source
    APPCCS.HEX     CCS 7710 com card hex
    APPCCS.M65     CCS 7710 com card source
    APPCPS.HEX     CPS com card hex
    APPCPS.M65     CPS com card source
    APPGS.HEX      GS serial port hex
    APPGS.M65      GS serial port source
    APPHMM.HEX     Hayes micro modem card hex
    APPHMM.M65     Hayes micro modem card source
    APPICON.BNS    Kermit icon for gs users
    APPLE.DOC      Complete documentation (it says here)
    APPLE.MSS      Scribe text formatter source for documentation
    APPLE.PS       Documentation ready for a postscript printer
    APPMAI.HEX     Main kermit pgm hex
    APPMAI.M65     Main kermit pgm source
    APPMAK.UNX     Make file for UNIX cross assembly (to assemble Kermit)
    APPMSV.HEX     Microtec com card hex
    APPMSV.M65     Microtec com card source
    APPPRO.BNS     Install system for prodos
    APPSSC.HEX     Super serial com card hex
    APPSSC.M65     Super serial com card source
    APPXAS.1       65c02 cross assembler for UNIX system part 1
    APPXAS.2       65c02 cross assembler for UNIX system part 2
    APPXAS.3       65c02 cross assembler for UNIX system part 3

The syntax of the filenames may vary.  On UNIX systems, the filenames  will  be
in  lowercase.  On VM/CMS systems, the period will be replaced by a space.  All
files are text, however the suffix of BNS are binsciied binary files.


1.6.2. Alternate Installation

The main problem exists in getting the hex files onto your diskette as  a  text
file.    But  again that is a test of your creativity. If you have a version of
Kermit running then GET or RECIEVE the file as a text file and you are in busi-
ness.    Since Kermit has been separated into two assemblies then two hex files
will have to be present on the diskette. Get the main hex file  APPMAI.HEX  and
select  which  com card hex you will need. First "exec APPMAI.HEX".  Your Apple
(or compatable) will go into monitor and show  you  *'s  for  several  minutes.
This  is  the  monitor  loading the hex into binary.  If you get beeps from the
1.6.2. Alternate Installation                                           Page 22

-------------------------------------------------------------------------------
monitor its probably because you didnt get a good copy of the text file.    Now
EXEC  the com card driver you are going to use.  You will have to get back into
basic(aha another test for you, try "3d0G") to do this.  And you will  see  the
monitor loading the com driver. The order of EXEC's is important.  The com card
should  be  loaded  last.    Next  get  back  into  basic  and  do   a   "bsave
kermit,A$1000,L$7000".    You  may  have to specify the drive to do this binary
save, with a slot or drive on the end of the BSAVE (aha another test).  You now
run Kermit via "brun kermit".

If  you  want  to customize Kermit for your needs, the recommended method is to
use file "kermit.init" OR do all your SETs, etc, and then do an  "exit".    Now
you should be back in BASIC.  At this point do a "bsave name,A$1000,L$7000" and
when you do a "brun name" all your setups will be remembered.    NOTE:  If  you
save your current settings via "bsave kermit ..." you may find that moving that
binary to another type of Apple (e.g. from a //e to an //e+) will not  be  pos-
sible.    So  make  sure  you  keep the original binary to move between machine
types.

Since the org is now $1000 if you have been using Kermit and then went back  to
basic  for  some  trivial  thing  a  "CALL 4096" should start up Kermit without
having to reload it.

In summary:

   1. EXEC APPMAI.HEX

   2. Choose the com card driver you will use.  For example APPSSC.HEX.

   3. 3D0G

   4. EXEC APPSSC.HEX

   5. BSAVE kermit,A$1000,L$7000

And you should be in business.  Remember there is the command HELP and whenever
you  are  into  a command a "?" will give you the possible options available at
that point of a command.  The escape key will finish typing an option if it  is
possible.  The  syntax  of  all  the  commands and options only requires enough
characters to make that command or option unique.


1.7. Problems


    Installation

NOTE: When using the super serial driver you must  have  the  cards  sw6-2  on.
This  allows  the  card to use interupts. The rest of the switches are set from
within Kermit. It appears that you can run your Apple 2 with sw6-2  on  and  in
99%  of the cases will cause no problems.  This is because the OS runs with in-
terupts locked out ("sei" in assembly language) and the program must explicitly
give a "cli" for interupts to work (the super serial driver does).

The  AE Serial Pro must have switches 1 & 3 open and 2 & 4 closed. This appears
to dissagree with the documentation since those settings turn off irq interupts
and  turn  on  nmi  interupts. So watch this it may get corrected in later ver-
1.7. Problems                                                           Page 23

-------------------------------------------------------------------------------
sions.

The Microtek driver is a super serial look alike which does not run with inter-
upts.    If you have trouble with the super serial driver you might try the MSV
driver.  For you people with the MSV-622c card, you might try running a  jumper
from  the UART 6551 pin 26 to the card edge pin 30.  This will enable interupts
just like the SSC sw2-6, and then you can use the super serial driver.

The Prometheus card will work with the Apple com driver.  However you will have
to  set  the switches on the card for baud etc.  Evidently this card can not be
programed by the software. If that is not true then here is an  oportunity  for
you  to write a better driver. If you do please pass it on for other Prometheus
users.

The apple cat uses the modem's firmware for dialing. Type ";" for  a  2  second
delay,  or any control character to abort the dialing. ROM is not needed if ex-
ternal phone is used for dialing.  Supports 110-600 baud, and  45.5  baud  (use
kermit-65's  135 baud setting).  Supports 1200 baud with apple-cat 212 card, in
slot-saver configuration.  Allows use of external serial port by typing "X"  as
dialing  string.    Thanks to Dick Wotiz for this driver.  Reports have it that
the Apple Cat will also work with the Apple com driver.

Some have noted the Apple com card must be initialized via  the  "IN#x"  before
starting  Kermit. Ike has now updated this driver and the initialization is now
done within the Apple com driver.  Thanks Ike.


    Usage

There is the command HELP and whenever you are into a command a "?"  will  give
you  the  possible options available at that point of a command. The escape key
will finish typing an option if it is possible. The syntax of all the  commands
and  options  only  requires  enough  characters to make that command or option
unique.

When using flow control you may appear to hang. Type a ^Q (Control-Q) and  that
may free you up.

Remember when you use your printer there are a lot of variables here.  What was
being sent to the screen now is being sent  to  your  printer.    If  you  were
emulating  the  VT52  your  printer  may  not know how to handle the escape se-
quences, tabs etc. It may be you can tell the host you are a tty or  some  such
device  that will give carriage returns etc that your printer can handle.  Some
printers may require the flow control and delay to get readable printing.


    File Transfer Errors

"File Transfer Errors," was added to this document by  the  Southeast  Regional
Data Center (SERDAC), '88 July 17.

In  spite  of  the fact that successful Kermit file transfers are almost always
error free, there are a number of circumstances which can corrupt, prevent,  or
interrupt/abort  a transfer.  In the case of an actual abort, there may be data
loss or corruption, and an incomplete file may not have a correct  end-of-file.
These circumstances may be roughly divided into two groups: (1) problems due to
1.7. Problems                                                           Page 24

-------------------------------------------------------------------------------
file or disk errors, and (2) problems due  to  delays  or  failures  in  Kermit
packet exchange.

Common problems in category (1) include the following:

(a)  improper  file specification (b) wrong file type (c) protected file(s) (d)
disk problems

(1a) problems can occur when you specify, to either the Apple or host Kermit, a
non-existent   or  improperly  located  file.    Misspelling  and/or  incorrect
(sub)directory specification are popular villains!  If you are  commanding  ei-
ther Kermit to SEND a file (SEND filespec), the problem will be fairly obvious.
On the Apple II, you'll see an error message like: "FILE NOT FOUND."    On  the
VAX/VMS  8800,  for example, you'll see the message: "%KERMIT32 ....., file not
found for 'filespec'".  In either case, the transfer will not take place.    If
you're  using  Kermit-65  to  GET  (GET filespec) files from the VAX/VMS Kermit
server, and the requested file does not exist in your  VAX  default  directory,
you  should see a Kermit-32 generated "REMOTE MESSAGE %KERMIT32 ....., file not
found for 'filespec'" appear in the transmission status display, and  then  the
Kermit-65  message  "CANNOT  RECEIVE  FILE-HEAD".  Transfer of the questionable
file will not take place.

(1b) problems can occur if you forget to specify, to either the Apple  or  host
Kermit,  what type of file you wish to transfer.  If you are using Kermit-65 to
send files to a host, you are fairly well protected against this error.  If you
attempt  to  send  a  file  whose  CATALOG  type  does  not match the FILE-TYPE
parameter setting, you will receive a "INCOMPATIBLE FILE FORMAT" error message,
or  something  similar, and the transfer will not take place.  If, however, you
are receiving (via RECEIVE or GET) a file whose native type does not match  the
FILE-TYPE  setting, the file WILL be received.  It will be mis-typed (according
to the FILE-TYPE setting), though, and any later attempt to use it on the Apple
will probably be unsuccessful.

The  same sort of circumstances generally apply for a host Kermit. With the VAX
8800, for example, when Kermit-32 is sending a file,  you  generally  need  not
worry  about  setting  its  file  type.    When  Kermit-32 is receiving a file,
however, properly setting its file type is very critical.  If you wish  to  put
Kermit-32  in  server  mode to receive multiple files, set the file type BEFORE
using the SERVER command, and make sure that you only send it  the  appropriate
type  of files during that server session.  You cannot switch file types DURING
a given server session!

NOTE: One other way you can get into trouble with "wrong file type" is by  try-
ing to send a file which is mixed-- mostly text, but with some imbedded charac-
ters that are not true 7-bit ASCII (i.e., ASCII codes 00-127).  This often hap-
pens  when  you  are  trying to transfer a file which is word processor output.
Most word processing software claims to allow you to output  a  true  ASCII  or
text  file,  but  in some cases it really does not, and in others the choice of
output options is confusing.  If you have  set  up  either  Kermit  program  to
send/receive  a  text  file,  and  you try to transfer illegal ASCII characters
(codes 128-256), your transfer may "hang" or be aborted.  At the very best,  if
the transfer "works," the suspect characters will later probably be meaningless
or confusing to the destination machine.

(1c) problems can occur in two ways on the Apple II.   If  your  default  drive
disk  is write protected, and you attempt to receive a file, you will receive a
1.7. Problems                                                           Page 25

-------------------------------------------------------------------------------
"WRITE PROTECTED" error message, and no transfer will take place.  If you  have
set  Kermit-65's  FILE-WARNING parameter to OFF (normally NOT a good idea), and
you attempt to receive a file that already exists in a  locked  state  on  your
default  diskette,  you will receive a "FILE LOCKED" error message (if the file
is very short, you may have to check with a Kermit-65 STATUS command to see the
error message), and no transfer will take place.

Similar  problems  may  occur  on  the  host because of various file protection
schemes.  On the VAX/VMS 8800, for example, Kermit-32 cannot send  out  a  file
that  you  are  unauthorized to read.  And, it cannot receive a file unless you
are authorized to write to that filename and its (sub)directory.   If  you  use
Kermit-32 to attempt to SEND (SEND filespec) a protected file, you should see a
"%KERMIT32 ....., insufficient  privilege  or  file  protection  violation  for
'filespec'"  error  message,  and  no  transfer  will  take place.  If you have
Kermit-32 in server mode, and you are trying to GET a protected file  from  it,
or  you are trying to SEND it a file whose space is protected, you should see a
similar Kermit-32 generated REMOTE MESSAGE appear in  the  transmission  status
display,  and  then,  on GET, the Kermit-65 message "CANNOT RECEIVE FILE-HEAD".
Transfer of the protected file will not take place.

(1d) problems are most likely to occur because of Apple II  diskette  or  drive
problems.    The  following  conditions will generate "DISK I/O" or "I/O ERROR"
messages when Kermit-65 transfer commands are entered:  bad diskette in default
drive, no diskette in default drive, default drive door open, and/or unINITial-
ized disk in default drive.

If any of those errors are detected before  the  attempted  transmission  of  a
given  file,  the  transfer  of  that  file will not begin. If any are detected
DURING a file transmission, the file transfer will likely abort; at best trans-
mitted data will be incomplete. Data which does reach the destination end of an
aborted transfer should be considered very suspect; the disk problem should  be
corrected  and  the transfer should be repeated!  (The best chance you have for
salvaging text file data in an abort is if the file  destination  is  the  host
machine  and  you  have  told its Kermit to save incomplete files, e.g., on the
VAX-8800, you need to SET INCOMPLETE KEEP).

One other Apple II  disk  problem  can  be  encountered  while  you  are  using
Kermit-65 to receive files. If you exceed the storage capacity of your diskette
during a RECEIVE or a GET, you should see a "DISK FULL" error  message.    Data
that  has  been  received up to the point of the overflow will be automatically
DELETEd.  Make CERTAIN that you do not try to receive any more files until  you
have  DELETEd  some files from the problem diskette, or until you have replaced
it with one that has adequate capacity to receive the complete file.  NOTE: See
Section 1.5.4.

It  is  less likely that (1d) problems would occur because of host machine disk
problems.  The most likely circumstance you  might  encounter  on  the  VAX/VMS
8800,  for example, would be in receiving a large file and, in the process, ex-
ceeding your VAX disk quota.  In such a case, you  should  see  an  appropriate
Kermit-32  generated  REMOTE  MESSAGE  appear within the Kermit-65 transmission
status  display.    If  this  happens,  delete  some  files   from   your   VAX
(sub)directories,  and/or have your VAX disk quota increased BEFORE you try the
transfer again. If you have issued a SET INCOMPLETE KEEP command to  Kermit-32,
there  may  be  some chance of salvaging text file data that arrived before the
disk quota overage, but the best thing you can do is to repeat the transfer!

As a general rule, if some disk or file error prevents a transfer  from  begin-
1.7. Problems                                                           Page 26

-------------------------------------------------------------------------------
ning,  to get it to "go," you will need to correct the error and repeat all the
steps that preceded it.

If you are still commanding the host Kermit, and you see an error message,  you
will  have  to get the host Kermit's prompt back and give it an acceptable com-
mand. If you have commanded the host Kermit to SEND or RECEIVE,  and  are  back
commanding  Kermit-65  when  you notice the error, you will have to correct the
problem, CONNECT back to the host, get the host Kermit prompt (with the VAX/VMS
8800, try typing RETURN or CTRL-Y), and repeat the SEND or RECEIVE command, be-
fore returning back to Kermit-65 to command it again.

If you have placed the host Kermit in server mode,  and  are  giving  Kermit-65
commands when you notice an Apple disk/file error prevents a file transfer from
starting, chances are good that you won't have to CONNECT back to the host.  It
is  also  important  to  note that within a single server session, when you are
transferring multiple files, all  files  transferred  PRECEDING  an  error  (or
abort)  are  probably good. To repeat the transfer, correct the error, and give
Kermit-65 the appropriate command to transfer the  file  that  messed  up.  The
first  time  you  do  it,  you  may  get  back  a  message like "REMOTE MESSAGE
%KERMIT-32..... protocol error" This is just the host server trying to get back
"on  track"  after  the  error.   When the Kermit-65> prompt returns, enter the
transfer command again, and it will probably be accepted.

If the second attempt should fail,  wait  for  the  Kermit-65>  prompt,  enter:
FINISH,  wait  for the prompt again, and enter: CONNECT.  If you do not see the
host operating system prompt ($ on the VAX 8800), type a few RETURNs (or on the
VAX/VMS a CTRL-Y). Re-invoke the host Kermit and put it back in server mode.

If disk or file errors prevent a transfer from completing, recovery will depend
on the error, whether you had the host Kermit in server mode  or  not,  and  on
your desire for accuracy.

Some  disk/file  error aborts are "fatal" (e.g., Apple DISK FULL, and uploading
to the VAX 8800 w/o having commanded Kermit-32 to SET INCOMPLETE  KEEP).    The
destination  file  will be destroyed.  The transfer of the file will have to be
repeated again from the beginning.  Again, unless you have set the host  Kermit
for server mode, you will have to CONNECT back, get the host Kermit prompt, and
re-command it.  If you were in a  server  session,  though,  you  can  probably
repeat the transfer of the interrupted file without going back to the host (see
recovery procedures above).

Other disk/file errors that interrupt/abort a transfer  may  leave  salvageable
text  data  at the transfer destination.  The best policy, though, is to repeat
the transfer of the incomplete file (see recovery procedures above).

Common problems in category (2) include the following:

(a) bad parity

(b) noisy communications line

(c) timeout due to delays, "disaster," etc.

(d) Kermit-program incompatibility

(e) user error
1.7. Problems                                                           Page 27

-------------------------------------------------------------------------------
(2a)

Parity settings are very critical to correct transfers.  If you do  not  inform
Kermit-65  of  the  correct parity being used by the remote host machine or the
communications path to it,  "checksum"  error  checking  calculations  will  be
wrong, and packets will be consistently rejected when they arrive at their des-
tination.  In particular, most binary file Kermit transfers won't get very  far
if parity is not set correctly.

[NOTE:  If  you want to do a binary file transfer (Apple binary or BASIC files)
via a FIRN Network connection to the SERDAC VAX/VMS 8800, you must  SET  PARITY
SPACE before the transfer is initiated; that will insure that eight-bit quoting
is used.  If you  dial  directly  into  the  VAX/VMS  8800,  SET  PARITY  NONE;
eight-bit quoting (which is less efficient) is not required].

(2b)

Line  noise can be the root cause for a variety of file transfer problems.  The
beauty of a "packetized protocol transfer"  scheme  like  Kermit  is  that  or-
dinarily, the scheme will overcome an occasional burst of line noise.  A packet
which arrives out of sequence, or which does not have the  same  checksum  "bit
count"  as when it was sent, will get retransmitted, and the noise induced data
error will correct itself.

Sometimes, however, bad line noise can outwit even  the  cleverest  aspects  of
Kermit.  There are some times where severe noise can corrupt the "checksum" er-
ror checking and lead to undetected transmission of a bad  character  (assuming
that  the severe line noise exists, chances of this happening for one character
are, for Kermit-65 error checking, less than two percent).

If line noise is bad enough and persistent enough,  it  is  also  a  cause  for
several  problems  that  will  eventually "hang" or totally confuse and abort a
transfer:

Each transfer is preceded by the Kermit-to-Kermit  exchange  of  several  short
"initialization  packets.   These tell the controlling programs critical things
to expect about the upcoming transfer. If line noise prevents the packets  from
arriving,  or  scrambles  them up, the transfer probably can't get started cor-
rectly.

One of the biggest vulnerabilities of the Kermit scheme is that  each  arriving
packet must be acknowledged (ACK) by the receiver, and that the sender must ac-
tually receive back the acknowledgement (likewise, if an expected  packet  does
not  arrive,  there often must be a negative acknowledgement (NAK)).  Since the
ACK/NAK packets are very short, they are rather vulnerable to severe noise.  If
too  many of them are scrambled or lost, the transfer can get out of synch, and
the transferring programs can lose track of where they are.

One other place Kermit is vulnerable is in the beginning of a data packet.  The
first  several  bytes  of  these longer packets are reserved for control infor-
mation: packet  type,  byte  count,  sequence  number,  etc.    If  line  noise
repeatedly  coincides  with the transmission of this control information, it is
very easy for the transfer to get confused-- particularly if the packet number-
ing gets garbled.

If  you detect frequent line noise after you've connected to a host, but before
1.7. Problems                                                           Page 28

-------------------------------------------------------------------------------
you begin transfers (you will probably see extraneous junk characters appearing
on your screen), you're probably in for trouble. Once transfers actually begin,
line noise problems are  often  characterized  by  incrementing  of  the  RETRY
counter  on the Kermit-65 transmission status display, and/or by long pauses in
incrementing of the status display byte counter.

To minimize line noise, first see if there are any obvious loose connections in
your equipment (telephone line connection to wall box, telephone line to modem,
modem cabling to serial connector, or, if appropriate,  cabling  from  hardwire
port  to  serial connector).  If not, you may want to hang up and redial to get
another telephone connection (almost every connection is unique,  and  you  may
get  a  better  one than you had).  Many line noise problems will clear up with
those simple remedies, but some may be beyond your control!

If all else fails, you may also try shortening the maximum length of your  data
packets (SET SEND/RECEIVE PACKET-LENGTH) to possibly lessen the effects of per-
sistent noise.

(2c)

A Kermit transfer consists of a regular and predictable exchange of initializa-
tion,  data,  and,  ACK/NAK  packets.  If something (line noise, busy computer,
user error, etc.) interrupts or delays this regular exchange, there must  be  a
way  for  a Kermit program on at least one end to figure out something is wrong
and try to get the packet exchange back on track again.

This is usually done with a timer and retry mechanism.  If a  Kermit  does  not
receive  an expected packet, within its timer's time limit (a timeout), it will
resend its last sent packet to try to "wake up" the other  Kermit  (effectively
by  asking  it  to  send  its  last  packet again).  This resending is repeated
("retried") a number of times before the program assumes it cannot  get  things
on  track  again.  Each packet resent by Kermit-65 is counted as a RETRY on its
transmission status display. If Kermit-65's retry count exceeds 20, it will try
to  issue  an error message according to what kind of packet it was waiting for
and/or it will say MAX RETRY COUNT EXCEEDED. The transfer will then be aborted.

Very frequently, timeouts are caused by unexpected delays in  the  remote  com-
puter,  or  in  the network thru which you connect to it.  If you know that the
host machine or network is very busy, and you repeatedly have aborted transfers
due  to  timeouts,  you  may be able to alleviate the problem by increasing the
value of the default Kermit-65 receive timeout parameter (SET RECEIVE TIMEOUT).

Other common ways that Kermit-65 can timeout and abort are:  (1)  if  the  host
machine  "goes  down"  during  a  transfer,  (2)  if the telephone, network, or
hardwire connection is completely broken during a transfer, (3) if  you  forgot
to "start up" the host Kermit and give it a transfer command (SEND, RECEIVE, or
SERVER) BEFORE giving Kermit-65 a transfer command,  and  (4)  if  (2a),  (2b),
(2d),  or  (2e)  problems  occur  and critical initialization packets are never
received.

In cases (1) and (2), you will eventually probably see a CANNOT RECEIVE DATA or
MAX  RETRY COUNT EXCEEDED message from Kermit-65.  Cases (3) and (4) may result
in a CANNOT RECEIVE INIT message.

(2d)

To do effective Kermit transfers, there must be two Kermit  programs  working--
1.7. Problems                                                           Page 29

-------------------------------------------------------------------------------
one  on  either  end  of a "computer connection."  In addition, the two Kermits
must be able to "talk to" each other in a prescribed,  standard  way.  Although
there are specific standards for writing all Kermit programs, most of them have
been written by volunteers and are in the "public domain."   The  protocol  re-
quirements  and  resultant programs are generally rather complex, and it is all
too easy to inadvertently program in a subtle error in a given Kermit  version.
Additionally,  there  are many "levels of ability" of Kermit programs: some can
operate in server mode, some cannot. Some can transfer binary files; some  can-
not,  etc.    Unless the Kermit programs you are using are both error free, and
both have the same capabilities for the transfers you wish to perform, you  are
in trouble!

If there is a systematic "bug" in one of the Kermit programs, or if you are as-
king one Kermit to do something the other can't do, there  will  usually  be  a
problem  with  packet  exchange;  in many cases the requested transfer will not
even get started.  You may see a Kermit-65 error message, on  the  transmission
status display, saying that a packet was not received, or a REMOTE MESSAGE say-
ing a packet was unexpectedly received, or one that the command cannot  be  ex-
ecuted  by  the  other Kermit.  In some cases, you may see no explanatory error
messages at all; the transfer will just "hang"  and  will  probably  eventually
"timeout" and abort (MAX RETRY COUNT EXCEEDED).

(2e)

If  you've  read  about category (1) errors above, you can see that there are a
variety of things you can do to with files or disks to mess up a Kermit  trans-
fer.   You can also wreak havoc by issuing improper or illegal commands to Ker-
mit programs.  Before trying to transfer a lot of files, or trying  out  a  new
type  of  transfer, be sure you understand the procedure you need to follow and
the various Kermit commands that will be involved.

New Kermit users often  try  to  command  their  local  Kermit  program  (e.g.,
Kermit-65)  to  send  or  receive a file, without having first invoked and com-
manded the host Kermit.

Another common error is to issue improper commands to a remote server.  For ex-
ample,  when  VAX/VMS Kermit-32 is in server mode, and you are requesting files
from it via Kermit-65 commands, you cannot use a RECEIVE command; you must  in-
stead use GET.

As  with  Kermit  program  incompatibilities, illegal or inappropriate commands
will often cause a problem with packet exchange; in many  cases  the  requested
transfer  or  action  will not even get started.  You may see a Kermit-65 error
message, on the transmission status display, saying a packet was not  received,
a  REMOTE MESSAGE that a packet was unexpectedly received, or one that the com-
mand cannot be executed by the other Kermit.  In some cases, you may see no ex-
planatory  error  messages at all; the transfer will just "hang" and will prob-
ably eventually "timeout" and abort (MAX RETRY COUNT EXCEEDED).

Except for the fact that you will probably never note a  category  (2)  "packet
exchange"  error while you are "talking to" the remote system or commanding its
Kermit, and that the remedies you must employ to correct  the  errors  will  be
different,  recovery  procedures to get your file transferred correctly will be
much the same as those we described at the end of the  discussion  on  category
(1)  "disk/file"  errors.    Make sure to read that discussion for more details
than we have included below.
Apple II Kermit                                                         Page 30

-------------------------------------------------------------------------------
In short, if an error prevents a given transfer from  actually  beginning,  you
will need to correct the error and repeat all the steps that preceded it.  This
will be more difficult if you are transferring only one file-- having commanded
the  remote Kermit to SEND or RECEIVE.  If you have placed the remote Kermit in
server mode, and an error prevents the transfer of one file, all  files  trans-
ferred  up  to  that  point  are  probably  OK, and you can usually correct the
problem, and get a transfer started again without having to reCONNECT  back  to
the host.

If  you are transferring a text file, and an abort occurs in mid-transfer, some
data may be salvageable in the destination file, but the  best  rule  with  any
type  of  file is to repeat the transfer, in which case the recovery procedures
in the last paragraph apply.


1.8. Customizing Kermit-65

The source code to Kermit-65 is in 6502 Assembler. It has been formatted for  a
cross  assembler  which  runs on a unix 2's complement machine.  Files appxas.1
thru appxas.3 are the cross assembler for UNIX.  Get the files on a UNIX system
and  then  look  at the documentation at the start. They will easily make you a
xasm for Kermit.  The file appmak.unx is the makefile to use with the  xasm  to
reassemble all of Kermit's parts.

Kermit-65 has been separated into two assemblies, the main routines and the com
card routines for the devices shown in Table 1-1.  A vector has been set up  in
low  memory  for  the  two  assemblies  to communicate. Look at the working com
drivers for tips on how to incorporate your version of  the  com  driver.  some
things  to note: It is probably best to buffer the input from the remote and to
get input characters from the remote every chance you get.  Note  the  Microtek
SV-622  driver, whenever the input is checked for a character and has a charac-
ter the character is put into the buffer immeadiatly.  Also when the output  is
checked  for  ready  to  output,  if the card is not ready to output then it is
checked for a character to input.  All this should help prevent losing  charac-
ters.

All  the routines should return with the "rts" instruction.  Routines which can
return a true/false indication should return with the P reg zero flag  set  ap-
propiately.  That is: a "beq" instruction will branch on a false indication and
the "bne" will branch on a true indication.  The com driver  should  start  its
routines  above  the  main routines and tell where the end of the com driver is
via location $100c.  If your com driver gets too large then the  bsave  address
would have to be changed when you are saving the binary to diskette.
Apple II Kermit                                                         Page 31

-------------------------------------------------------------------------------
  address size  module   function
  1003    byte   main     This is the baud rate index as follows:
                           3 - 110
                           4 - 135.4
                           5 - 150
                           6 - 300
                           7 - 600
                           8 - 1200
                           9 - 1800
                          10 - 2400
                          11 - 3600
                          12 - 4800
                          13 - 7200
                          14 - 9600
                          15 - 19200
                          eg:if index is 6 then line should be 300 baud
  1004    byte            unused
  1005    word   driver   Address of a null terminated string.
                          address should point to a capitalized
                          string of the drivers id
  1007    byte   main     Com slot in the form $n0 where n is slot #.
  1008    byte   main     Force initialization flag when 0.
                          init routine should always initialize when
                          this flag is 0 & then set flag non-zero.
  1009    word   main     Address of the end of Kermit main routine.
  100b    byte   main     Flow control is on when high bit is set.
  100c    word   driver   Address of the end of the com driver.
  1020  3 bytes  driver   Jump to initialization routine.
  1023  3 bytes  driver   Jump to command routine.  A reg has command
                            0 - hang up the line
                          $0b - set baud rate
                          $0c - set break on the line
                          $91 - do xon on the line
                          $93 - do xoff on the line
                          routine returns false (P reg zero flag) if unable
  1026  3 bytes  driver   Jump to check for input from the line.
                          routine returns false (P reg zero flag)
                          if no character on line
  1029  3 bytes  driver   Jump to get input character from line.
                          routine returns character in A reg
  102c  3 bytes  driver   Jump to put character in A reg on line.
  102f  3 bytes  driver   Jump to reset com driver.
  1040  3 bytes  main     Jump to Apple ROM wait rtn. microsecs delay
                          =1/2(26+27A+5A*A) where A is the accumulator
  1043  3 bytes  main     Jump to routine to print null-terminated string.
                          X reg contains least significant byte of address
                          Y reg contains most significant byte of address
                          routine does not issue a carriage return.
  1046  3 bytes  main     Jump to routine to read the keyboard.
                          A reg contains the character read
  1049  3 bytes  main     Jump to routine to print carriage rtn & line feed.
  104f  3 bytes  main     Jump to routine to set characters parity.
                          A reg contains the character before and after.

                  Table 1-4:  Communications card vector area
Apple II Kermit                                                         Page 32

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



              List of most of the prodos file types.

  Num      Name    OS      Definition
  $00                      typeless
  $01      BAD     both    BAD blocks file
  $02      PCD     SOS     Pascal CoDe file
  $03      PTX     SOS     Pascal TeXt file
  $04      TXT     both    ASCII text file
  $05      PDA     SOS     Pascal DAta file
  $06      BIN     both    BINary file
  $07      CHR     SOS     CHaRacter font file
  $08      PIC     both    PICture file
  $09      BA3     SOS     Business BASIC (SOS) program file
  $0A      DA3     SOS     Business BASIC (SOS) data file
  $0B      WPD     SOS     Word Processor Document
  $0C              SOS     SOS system file
  $0D              SOS     SOS reserved file type
  $0E              SOS     SOS reserved file type
  $0F      DIR     Both    subDIRectory file
  $10      RPD     SOS     RPS data file
  $11      RPI     SOS     RPS index file
  $12              SOS     Applefile diskcard file
  $13              SOS     Applefile model file
  $14              SOS     Applefile report format file
  $15              SOS     Screen library file
  $16              SOS     SOS reserved file type
  $17              SOS     SOS reserved file type
  $18              SOS     SOS reserved file type
  $19      ADB     ProDOS  AppleWorks Database file
  $1A      AWP     ProDOS  AppleWorks WordProcessing file
  $1B      ASP     ProDOS  AppleWorks Spreadsheet file
  $1C-$5F                  Reserved
  $60-$6F          ProDOS  PC Transporter (Applied Engineering)
   $60     PRE     ProDOS  ProDOS preboot driver
   $61-$6A         ProDOS  Reserved
   $6B     NIO     ProDOS  PC Transporter BIOS and drivers
   $6C             ProDOS  Reserved
   $6D     DVR     ProDOS  PC Transporter device drivers
   $6E             ProDOS  Reserved
   $6F     HDV     ProDOS  MSDOS HardDisk Volume
  $70-$9F                  Reserved
  $A0      WPF     ProDOS  WordPerfect document file
  $A1      MAC     ProDOS  Macrofile
  $A2      HLP     ProDOS  Help File
  $A3      DAT     ProDOS  Data File
  $A4                      Reserved
  $A5      LEX     ProDOS  Spelling dictionary
  $A6-$AB                  Reserved

                     Table 1-5:  PRODOS file types, part 1

-------------------------------------------------------------------------------
Apple II Kermit                                                         Page 33

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



  Num         Name    OS      Definition
  $AC         ARC     ProDOS  General Purpose Archive file
  $AD-$AF                     Reserved
  $B0         SRC     ProDOS  ORCA/M & APW source file
  $B1         OBJ     ProDOS  ORCA/M & APW object file
  $B2         LIB     ProDOS  ORCA/M & APW library file
  $B3         S16     ProDOS  ProDOS16 system file
  $B4         RTL     ProDOS  ProDOS16 runtime library
  $B5         EXE     ProDOS  APW shell command file
  $B6         STR     ProDOS  ProDOS16 startup init file
  $B7         TSF     ProDOS  ProDOS16 temporary init file
  $B8         NDA     ProDOS  ProDOS16 new desk accessory
  $B9         CDA     ProDOS  ProDOS16 classic desk accessory
  $BA         TOL     ProDOS  ProDOS16 toolset file
  $BB         DRV     ProDOS  ProDOS16 driver file
  $BC-$BE                     Reserved for ProDOS16 load file
  $BF         DOC     ProDOS  document file
  $C0         PNT     ProDOS  //gs paint document
  $C1         SCR     ProDOS  //gs screen file
  $C2-$C7                     Reserved
  $C8         FNT     ProDOS  Printer font file
  $C9                 ProDOS  finder files
  $CA                 ProDOS  finder icons
  $CB-$DF                     Reserved
  $E0         LBR     ProDOS  Apple archive library file
  $E1                         Unknown (unlisted)
  $E2         ATI     ProDOS  Appletalk init file
  $E3-$EE                     Reserved
  $EF         PAS     ProDOS  ProDOS Pascal file
  $F0         CMD     ProDOS  added command file
  $F1-$F8             ProDOS  User defined filetypes
                            (popular ones include:)
   $F1        OVL     ProDOS  Overlay file
   $F2        DBF     ProDOS  Database file
   $F3        PAD     ProDOS  MouseWrite file
   $F4        MCR     ProDOS  AE Pro macro file
   $F5        ECP     ProDOS  ECP batch file
   $F6        DSC     ProDOS  description file
   $F7        TMP     ProDOS  temporary work file
   $F8        RSX     ProDOS  linkable object module
  $F9         IMG     ProDOS  ProDOS image file
  $FA         INT     ProDOS  Integer BASIC program
  $FB         IVR     ProDOS  Integer BASIC variables file
  $FC         BAS     ProDOS  AppleSoft BASIC program
  $FD         VAR     ProDOS  AppleSoft BASIC variables file
  $FE         REL     ProDOS  ProDOS EDASM relocatable object module file
  $FF         SYS     ProDOS  ProDOS8 system file

                     Table 1-6:  PRODOS file types, part 2

-------------------------------------------------------------------------------
Apple II Kermit                                                         Page 34

-------------------------------------------------------------------------------
Index

          Apple II   1               REMOTE Command   10
          Apple II Keypad   14, 16   RENAME Command   10
          Apple II+ keyboard   7
          Applesoft   13             SEND Command   10
          Archiving files   3        SERVER Command   11
                                     SET APPLICATION-MODE   11
          Backspace key   15         SET BAUD   12
          Binary   13                SET Command   11
          Blink   7                  SET CURSOR-KEYS-VT100   12
                                     SET DEBUGGING   12
          CA key   16, 17            SET DEFAULT-DISK   12
          CATALOG Command   6        SET DISPLAY   12
          CONNECT Command   6        SET ESCAPE   12
          Control-c   11             SET FILE-TYPE   13
                                     SET FILE-WARNING   13
          Del key   15               SET FLOW   13
          Delay   9, 13, 16          SET KEYBOARD   14
          DELETE Command   8         SET KEYPAD   14
          Dos   2                    SET LOCAL-ECHO   14
          Dos filenames   2          SET PARITY   14
                                     SET PREFIX   14
          Escape character   9       SET PRINTER   15
          EXIT Command   8           SET PROTOCOL   15
                                     SET SLOT   15
          Game button   16, 17       SET SWAP   15
          GET Command   8            SET TERMINAL   16
                                     SET TIMER   15
          HELP Command   9           SET TIMING   16
                                     SHOW command   17
          Install   20               Smart modem   9
          Integer   13               STATUS Command   20

          Kermit   15                TAKE Command   20
          Kermit.help   21           Text   13
          Kermit.init   21           TYPE Command   20
          KERMIT.MODEM   9
                                     UNLOCK Command   20
          LOCK Command   9
          LOG Command   9            Vt100   16
                                     VT100 Emulation   16
          MODEM Command   9          Vt52   16
          Monitor   16               VT52 Emulation   16

          OA key   16, 17            Xmodem   10, 15
          Other   13

          Prodos file system   4
          Prompting   6

          Q   8

          Readme   20
          RECEIVE Command   10
Apple II Kermit                                                          Page i

-------------------------------------------------------------------------------
                               Table of Contents

1. Apple II Kermit                                                            1

   1.1. Supported Systems and Devices                                         2
   1.2. The DOS 3.3 File System                                               2
   1.3. The PRODOS File System                                                4
   1.4. Program Operation                                                     4
   1.5. Kermit-65 Commands                                                    6
       1.5.1. The CATALOG Command                                             6
       1.5.2. The CONNECT Command                                             6
       1.5.3. The DELETE Command                                              8
       1.5.4. The EXIT and QUIT Commands                                      8
       1.5.5. The GET Command                                                 8
       1.5.6. The HELP Command                                                9
       1.5.7. The LOCK Command                                                9
       1.5.8. The LOG Command                                                 9
       1.5.9. The MODEM Command                                               9
       1.5.10. The RECEIVE Command                                           10
       1.5.11. The REMOTE Command                                            10
       1.5.12. The RENAME Command                                            10
       1.5.13. The SEND Command                                              10
       1.5.14. The SERVER Command                                            11
       1.5.15. The SET Command                                               11
       1.5.16. the SHOW command                                              17
       1.5.17. The STATUS Command                                            20
       1.5.18. The TAKE Command                                              20
       1.5.19. The TYPE Command                                              20
       1.5.20. The UNLOCK Command                                            20
   1.6. Installation                                                         20
       1.6.1. Standard Installation                                          20
       1.6.2. Alternate Installation                                         21
   1.7. Problems                                                             22
   1.8. Customizing Kermit-65                                                30

Index                                                                        34
Apple II Kermit                                                         Page ii

-------------------------------------------------------------------------------
                                List of Figures

   Figure 1-1:   VT100 Keypad on an Apple Keyboard                           17
   Figure 1-2:   VT100 Keypad on an Apple//gs                                18
   Figure 1-3:   VT52 Keypad on an Apple Keyboard                            19
Apple II Kermit                                                        Page iii

-------------------------------------------------------------------------------
                                List of Tables

   Table 1-1:   Apple II Communication Cards Supported by Kermit-65           2
   Table 1-2:   Kermit-65 Single-Character CONNECT Escape Commands            7
   Table 1-3:   Apple II/II+ Keyboard Escapes                                 8
   Table 1-4:   Communications card vector area                              31
   Table 1-5:   PRODOS file types, part 1                                    32
   Table 1-6:   PRODOS file types, part 2                                    33