
                          KERMIT-65 VERSION 3.80


                    A Kermit File-Transfer Program and

                 Terminal Emulator for Apple II Computers




                             Table of Contents

1.   APPLE-DOS KERMIT...........................................1
1.1. The DOS 3.3 File System....................................1
1.1.1.  Apple DOS Filenames.....................................1
1.1.2.  Apple DOS File Characteristics..........................2
1.2. The PRODOS file system.....................................3
1.3. Program Operation..........................................3
1.3.1.  HARDWARE CONSIDERATIONS.................................3
1.3.2.  CONVERSING WITH KERMIT-65...............................4
1.4. Remote and Local Operation.................................6
1.5. KERMIT-65 Commands.........................................6
1.5.1.  THE SEND COMMAND........................................6
1.5.2.  THE RECEIVE COMMAND.....................................6
1.5.3.  THE GET COMMAND.........................................7
1.5.4.  THE CONNECT COMMAND.....................................7
1.5.5.  THE HELP COMMAND........................................8
1.5.6.  THE MODEM COMMAND.......................................8
1.5.7.  THE CATALOG COMMAND.....................................9
1.5.8.  THE DELETE COMMAND......................................9
1.5.9.  THE SERVER COMMAND......................................9
1.5.10. THE EXIT AND QUIT COMMANDS..............................9
1.5.11. THE SET COMMAND.........................................9
1.5.12. THE SHOW COMMAND.......................................16
1.5.13. THE STATUS COMMAND.....................................17
1.5.14. THE LOG COMMAND........................................17
1.6. Standard installation.....................................17
1.7. Alternate Installation....................................18
1.8. Problems..................................................19
1.8.1.  Installation...........................................19
1.8.2.  Usage..................................................20
1.9. Customizing Kermit-65.....................................20
1.9.1.  Communications card vector area........................21
1. APPLE-DOS KERMIT

Authors:  Antonino N. J. Mione, Stevens Institute of Technology
     Peter Trei, Columbia University
          Ted Medin, Naval Ocean Systems Center
Documentation:
          Antonino N.J. Mione, Stevens Institute of Technology
          Peter Trei, Columbia University
          Ted Medin, Naval Ocean Systems Center
Version:  3.80
Date:     '87 Oct

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:                Yes
Filename collision avoidance:      Yes
Can time out:                      Yes
8th-bit prefixing:                 Yes
Repeat count prefixing:            No
Alternate block checks:            No
Terminal emulation:                Yes
Communication settings:            Yes
Transmit BREAK:                    Yes
IBM communication:                 Yes
Transaction logging:               No
Session logging (raw download):    Yes
Raw upload:                        No
Act as server:                     Yes
Talk to server:                    Yes
Advanced commands for servers:     No
Local file management:             Yes
Handle file attributes:            No
Command/init files:                Yes
Printer control:                   Yes

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 compatable running DOS 3.3 or PRODOS 8. This section will describe the things you should know about the file system in order to make effective use of KERMIT, and then it will describe the special features of the KERMIT-65 program.

1.1. The DOS 3.3 File System

Items of importance which will be discussed in this section include Filenames and File Characteristics.

1.1.1. 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.

1.1.2. 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 non text files 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 convert 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
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. The procedure for archiving files is:

-    Run Kermit on remote system

-    SET FILE-TYPE-MODE TEXT ! (or APPLESOFT or ...) on KERMIT-65

-    Send files

1.2. The PRODOS file system

The prodos system is esentialy the same as the dos system with the exception that performance has been improved, hardware usage has been expanded and file names have different syntax. File names are the major importance to the kermit system. File names have the following syntax:

/volname/subdirectory1/. . ./subdirectoryn/filename
volname is the volume name where the file is located.
Subdirectory(n) is a subdirectory on the volume and may be omitted. Filenames are much more restrictive than dos filenames. Prodos filenames are limited to 15 characters no imbedded spaces few special characters and must begin with an
alpha character. Volname may be omited from the filename by use of the prefix command.

Binary file transfer using prodos has its dangers when creating new files. Prodos keeps its size & starting location in the directory which is of course not transfered. Therefor a new binary file will have its starting location 0 which can cause some interesting problems if you try and brun the file. Basic files all start at $801 (it says here) so kermit creates new basic files with a starting address of $801.

1.3. Program Operation

1.3.1. 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 D.C. Hayes Micromodem, these parameters are set correctly by default, so very little has to be done. For the Apple Super Serial Card these are set from within KERMIT-65 except the interupt switch(sw6-2) which must be set for interupts on. For the Microtek sv-622 all applicable parameters are set by KERMIT-65. Some mainframes may need parity checking (i.e. most IBM machines). In this case 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 acceptable to the host. If you have the parameters set correctly then the "connect" command will start kermit talking out the com port.

File transfer is very dependent upon parity. Make sure the host and local parity are the same. Following is one ibm sites method for file transfer:

We have an IBM 3033 and 4381 and use both 3705/3725 and 7171/Series 1 front ends. The only difference in front ends as far as any microcomputer Kermit is concerned is duplex (local-echo on for the 3705, local-echo off for the 7171). In Kermit-65 they need to set the following parameters:

BAUD         - whatever is supported.
PARITY       - EVEN for us, maybe MARK for others.
(It is the PARITY which usually causes people problems.)
FLOW         - XON for the 7171, NONE for the 3705.
FLOW DELAY   - 00

1.3.2. CONVERSING WITH KERMIT-65

KERMIT-65 reads file kermit.init from the default drive when started. The lines of this file are executed one at a time starting at the begining. This file should be a ascii text file and contain commands to setup kermit the way you would like its parameters set. It will also execute kermit's other commands. However, any command which reads a file (like modem) or leaves local mode (like connect) will terminate reading of this file and continue with the command specified. Use your favorite editor to produce this file.

Following is an example of what might be in the file:

set display 80 3
set keyboard 2e
set baud 4800
modem

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

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

]BRUN KERMIT

NOSC/STEVENS/CU - APPLE ][ KERMIT-65 - VER X.XX

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. There are several different Apple ]['s which can run KERMIT-65. Kermit will have no problems running on an Apple ][, ][+, //e, //c, or //gs system. Of the different communication devices available for the Apple ][, seven are currently supported:

-    Microtek sv-622 Card

-    D.C. Hayes Micromodem

-    Apple Super Serial Card & //c serial port

-    CCS 7710 Serial Card

-    Apple Com Serial Card

-    Prometheus Versacard - use the apple com card driver

-    CPS card

-    //gs serial port

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 in which slot the card resides. This may be done with the 'SET' command (documented below).

1.4. 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 supports User-mode commands for talking to a Server. It does support a limited server mode.

1.5. KERMIT-65 Commands

1.5.1. 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 parser 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 before sending it. The default disk drive is used for file transfers this can be changed with the 'SET DEFAULT-DISK'(dos) or 'SET PREFIX'(prodos) command (explained below). 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. Currently, a packet can be retransmitted manually by typing anything on the keyboard. If a 'Q' is typed, the entire transmission will be aborted.

1.5.2. 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, KERMIT-65 will attempt to change it into something legal. 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. Currently, a packet can be retransmitted manually by typing anything on the keyboard. If a 'Q' is typed, the entire transmission will be aborted.

1.5.3. THE GET COMMAND

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. Currently, a packet can be retransmitted manually by typing anything on the keyboard. If a 'Q' is typed, the entire transmission will be aborted.

1.5.4. 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 commands are possible:

B Send a BREAK Signal.
C Close the connection and return to KERMIT-65.
D Drop the phone line to the remote and return to KERMIT-65.
P Toggle the printer on/off.
R pRint the screen, >= //e required
S Show status of the connection.
W sWap the del and backspace key.
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 to the remote system, and passing characters from the remote system to the Apple 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 uppercase. 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 punctuation 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. If you have the capability for upper/lower case etc then use the 'SET KEYBOARD' and 'SET DISPLAY' commands to specify complete keyboards.

1.5.5. THE HELP COMMAND

Syntax: HELP

Typing HELP alone prints a brief summary of the KERMIT-65 commands.

1.5.6. THE MODEM COMMAND

Syntax: MODEM

Typing MODEM causes the file kermit.modem in the default drive to be used as a menu. You will be able to select any line in the file to be sent to the modem. Sorry cant back up to a previous menu, you will have to Quit and execute modem again. A "connect" response from the modem will cause kermit to leave the modem command and execute the connect command. This file should have commands for a hayes modem using text status responses (not numbers). One command per line with comments allowed after the first space (blank). Use you favorite editor to produce this ascii text file. Since the attention hayes command requires a delay the & character takes on time delay for kermit. Each & causes a delay of one second on a 6502 chip. If you have a //gs or an accelerator board the timing may change and you may requirer several to produce a one second delay. Normally kermit will wait for 27 seconds (again on a 6502 chip) for the modem to respond, any character typed on the keyboard will terminate this wait. You may hear the busy signal and there is no sense waiting any longer, so hit (crash-not so hard) any key on the keyboard. Following is an example of the file:

+++&&ATH gets the hayes modem's attention and then hangs up
ATDP1234567 call your local bbs with pulse dialing
ATDT8901234 call your work dialup phone with touch tone dialing

1.5.7. THE CATALOG COMMAND

Syntax: CATALOG

Typing CATALOG produces a catalog listing of your default drive.

1.5.8. THE DELETE COMMAND

Syntax: DELETE filespec

Typing DELETE causes the file specified to be deleted.

1.5.9. THE SERVER COMMAND

Syntax: SERVER

Typing SERVER alone turns kermit into a file server to a remote kermit. Currently server mode will handle remote "send", "get" and "fin" commands. Variants of the above commands will probably work but file serving is very limited at present. Because the apple requires knowledge of file types and there is no current way for a remote to change the file type. You must set the appropiate file type before going into server mode. You can exit server mode by typing a control C (^C) when not doing file transfers or the remote can of course terminate via the "fin" command.

1.5.10. 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 4096'.

Syntax: QUIT

This is merely a synonym for EXIT.

1.5.11. THE SET COMMAND

Syntax: SET parameter [option] [value]

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

BAUD               Which baud rate should the com card use?

CURSOR-KEYS-VT100  In vt100 mode cursor keys work directly.

DEBUGGING          TERSE or VERBOSE packet information.

DEFAULT-DISK       Diskette drive used for dos 3.3 file transfer.

DISPLAY            Which type of screen display is being used?

ESCAPE             Character for terminal connection.

FILE-TYPE          Type of Apple DOS file being sent/received.

FILE-WARNING       Warn users if incoming file exists?

FLOW               Should xon/xoff flow control be used?

KEYBOARD           ][+ or //e keyboard.

KEYPAD             Is there a gs style keypad?

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?

RECEIVE            Various parameters for receiving files

SEND               Various parameters for sending files

SLOT               Which slot # is communication device in?

TIMER              Should Kermit observe the rec. timeout value?

TERMINAL           Which type of terminal should kermit emulate?


SET BAUD

Syntax: SET BAUD value

Value is the baud rate for your com card. For the super serial and the microtek it can be 300 to 19200. The actual values will depend upon the com card you are running with.

SET CURSOR-KEYS-VT100

Syntax: SET CURSOR-KEYS-VT100 {on/off}

In vt100 emulation the cursor keys can also emulate the vt100 cursor keys.

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 dos command will tell KERMIT-65 which disk drive should be used for file transfers. The three parameters which may be set separately are SLOT, VOLUME and DRIVE. The value for SLOT ranges from 1 to 7. The value for DRIVE is either 1 or 2. The value for VOLUME ranges from 0 to 255.

SET ESCAPE

Syntax: SET ESCAPE hexidecimal-number

Specify the control character you want to use to "escape" from remote connections 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-TYPE

Syntax: SET FILE-TYPE keyword hex-value

This will inform KERMIT-65 what type of 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 keywords for this parameter are APPLESOFT, INTEGER, TEXT, BINARY and OTHER. Other has an added hex-value so that the user may specify the hex value of the file-type. This has meaning only in prodos and allows the user to specify any of the many different file types used in prodos.

APPLESOFT   - Applesoft Basic program.
INTEGER     - Integer Basic program.
TEXT        - ASCII Text file.
BINARY      - Binary image.
OTHER       - specified by the hex-value.

SOME COMMON PRODOS FILETYPES:

HEX   DEC    DESCRIPTION

$00     0    Typeless File
$04     4    ASCII Text File
$06     6    General Binary File
$08     8    Graphics Screen File
$0F    15    Directory File
$19    25    AppleWorks Database File
$1A    26    AppleWorks Word Processor File
$1B    27    AppleWorks Spreadsheet File
$FC   252    Applesoft BASIC Program File
$FD   253    Applesoft BASIC Variables File
$FE   254    Relocatable Code File (EDASM)
$FF   255    ProDOS System File

Extracted from Table B-1 page 173 of the 'ProDOS Technical Reference Manual' an Addison-Wesley Publication, Copyright (c) 1985 Apple Computer

SET FILE-WARNING

Syntax: SET FILE-WARNING ON or OFF

This tells KERMIT-65 whether to warn the user about incoming filenames conflicting with existing files or not. If there is a conflict KERMIT-65 will attempt to change the file name to something unique.

SET FLOW

Syntax: SET FLOW {off/xon/delay} number

This allows one to use the xon/xoff protocol when you are connected to a remote site. Delay timings are part of this command. Using delay times is probably a desperation move to keep the screen/printer from losing characters. Setting the timings will have to be set by experience. Perhaps the best way to set the timings is to bring the values down until you get failures and then double the timing figure. Both LOG and SET PRINTER will probably depend on flow control.

OFF - turn off flow control
XON - turn on xon/xoff flow control with the remote
DELAY number - delay the micro til xoff takes effect

Delay followed by number(including 0) delays the program for number milliseconds after the xoff is given to the remote. This delay allows the xoff to take effect before the program continues.

SET KEYBOARD

Syntax: SET KEYBOARD {2P/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.

SET KEYPAD

Syntax: SET KEYPAD {on/off}

SET KEYPAD tells KERMIT-65 if the user has a gs style keypad available. This is automaticly set on a gs but must be set on other machines. With keypad set then "vt100 keypad on an apple keyboard" (see below) will not be used but the actual keypad will be.

SET PRINTER

Syntax: SET PRINTER {on/off/slot} number

This allows one to turn the printer on for printing what is displayed on the screen. With all the different printers and printer cards there will be a lot of variability here but flow control (xon/xoff) is probably required when you are connected to a remote site. The printer can also be toggled on/off via the ESCAPE character followed by the command "P".

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 sequences, tabs etc. It may be you can tell the host you are a tty or some such device that will give carrage returns etc that your printer can handle. Some printers may require the flow control and delay to get readable printing.

ON - turn the printer on, slot number is required
OFF - turn the printer off
SLOT number - printer card is in slot "number"

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.

SET TIMER

Syntax: SET TIMER ON or OFF

SET TIMER will turn on or off the timeout checking for receive file transfers. Since there is no clock for exact timing a loop of instructions has been set up
assuming a 1 megacycle cpu. Cpus which run faster will have to make allowances via the SET RECEIVE TIMEOUT command.

SET TERMINAL

Syntax: SET TERMINAL {monitor/none/vt100/vt52}

MONITOR emulation

This emulation simply displays all the characters received from the remote (except nulls) without any formating of the screen (40 or 80 ch per line). Control characters are displayed inverse.

NONE

In this mode all incoming characters (except nulls) are passed directly to the display.

Vt100 emulation

The vt100 is a small but working set of a true vt100 terminal, it appears to work with most of the standard full screen editors and processors on bsd un*x machines and vax vms machines. A //e, //c or //gs is probably required with the apple 80 column text card. Sorry but the II and II+ will probably have to use one of the other terminal options. The vt100 keypad has also been defined for the application mode via the OA/CA/game button. Following is a picture of what the keypad looks like to ed (vms). When using eve (vms) the meaning of the keys will of course change.

             Vt100 keypad on an apple keyboard.

                      PF1     PF2     PF3     PF4     .(period)
                    ------- ------- ------- ------- -------
                   |       |       |findnxt|delline|select |
                   |   6   |   7   |   8   |   9   |   0   |
                   | gold  | help  | find  |undelln| reset |
                    ------- ------- ------- ------- -------
                          7       8       9       -
                       ------- ------- ------- -------
                      | page  |section|append |delword|
                      |   Y   |   U   |   I   |   O   |
                      |command| fill  |replace|undelwd|
                       ------- ------- ------- -------
                             4       5       6       ,
                          ------- ------- ------- -------
                         |advanc |backup |  cut  |delchar|
                         |  H    |   J   |   K   |   L   |
                         |bottom |  top  | paste |undelch|
                          ------- ------- ------- -------
                                1       2       3     ENTER
                             ------- ------- ------- -------
                            | word  |  eol  | char  | enter |
                            |   N   |   M   |   ,   |   .   |
                            |chgcase|deleol |specins|  sub  |
                             ------- ------- ------- -------
                                    0
       ---------------------------------------
                                   bline      |
            space bar                         |
                                  openline    |
       ---------------------------------------

As you can see the keypad is physically laid out like the vt100 keypad except for the lower right corner. Notice that above the keys are the vt100 labels while within the box (key) is the apple key label. Also the arrow keys work as vt100 arrow keys with the OA/CA/game button.

             Vt100 keypad on a gs or equivalent keypad.

                      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|
                    ------- ------- ------- -------
                       4       5       6       ,
                    ------- ------- ------- -------
                   | advanc|backup |  cut  |delchar|
                   |   4   |   5   |   6   |   -   |
                   | 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 |       |
                    -------------------------------

VT52 emulation

SET TERMINAL VT52 will turn on the vt52 terminal emulation. One thing that is required is your 80 column card must handle the $16 command in order for reverse scrolling to work. The //e 80 col handles this fine.

The vt52 keypad has been defined using the open/closed apple. For II or II+ one will have to have a game paddle or joy stick (key shift mod too????) and use the buttons. When a button /open /closed apple is pushed then the keys starting with 6,7,8 & 9 form the top of the keypad. Key 6 is the blue key key 7 is the red key etc. The keys directly below the 6,7,8 & 9 and shifted one-half key to the right form the second row of the keypad etc. Every thing is fine until you get to the last row on the keypad. There the sp bar is 0 and the other two keys are moved to the upper right as the 0 & - keys. This way the arrow keys are available as vt52 keys with the OA/CA/game button combination (thanks to Dick Atlee for this idea). With those two exceptions the keypad is physically 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.

How about a picture to clear up the questions?

(^ is up arrow)   BLUE     RED    GRAY      ^       .     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|
                    ------- ------- ------- -------
                          4       5       6       ->
                       ------- ------- ------- -------
                      |advanc |backup |delchar| right |
                      |   H   |   J   |   K   |   L   |
                      |bottom |  top  |undelch|specins|
                       ------- ------- ------- -------
                             1       2       3      <-
                          ------- ------- ------- -------
                         | word  |  eol  |  cut  | left  |
                         |   N   |   M   |   ,   |   .   |
                         |chgcase|deleol | paste |append |
                          ------- ------- ------- -------
                                  0
    ---------------------------------------
                                bline      |
         space bar                         |
                               openline    |
    ---------------------------------------

The arrow keys work as vt52 arrow keys with the OA/CA/game button.

1.5.12. 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 cursor keys emulating the vt100 keys?

DEBUGGING          Is debugging mode on or off?.

DEFAULT-DISK       Which Diskette drive is being used?

DEVICE-DRIVER      Which communication device is being used?

DISPLAY            Which screen display is being used?

ESCAPE             Character used for terminal connection.

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

FILE-WARNING       Warn users if incoming file exists?

FLOW               Is xon/xoff flow control being used?

KEYBOARD           ][+ or //e keyboard.

KEYPAD             Does a gs style keypad exist?

LOCAL-ECHO         Full or half duplex switch.

PARITY             Character parity to use

PREFIX             Which default prefix to use with prodos?

PRINTER            Is the printer being used for the display?

RECEIVE            Various parameters for receiving files

SEND               Various parameters for sending files

SLOT               Which slot # is communication device in?

TIMER              Is the receive timeout on or off?

TERMINAL           Which terminal (if any) should kermit emulate?

The above options are analogous to the equivalent SET commands.

1.5.13. 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.14. THE LOG COMMAND

Syntax: LOG filespec

When connected to a remote site, log the remote sessions output to the specified file. The file type and file warning protocols are observed. This command is dependent upon the flow control (xon/xoff) working. Without flow control there is little possibility of getting a correct copy of the terminal session. The loging begins when you connect to the remote and is terminated when you escape back to the local kermit with the ESCAPE character followed by the "C" command.

1.6. Standard installation

To bootstrap kermit to the apple, get the files a2k3xx.1 thru a2k3xx.3 on a dos 3.3 diskette. Where xx is the current version. Make sure the diskette is a master diskette and empty. Rename the files to ker3xx.1 thru ker3xx.3. Then:

EXEC KER3XX.1,R25

You will be asked several questions about your hardware and the program should execute and produce a binary with some starting instructions. If you want to run kermit on prodos simply use the prodos conversion routines to move the binary to prodos. If you want to make settings permanent in the binary. Start up kermit and set all the parameters in kermit the way you want them. Then "exit" kermit and "bsave kermit,a$1000,l$6900". The next time you "brun kermit" you will find all your parameters already set.

FILES SUPPLIED FOR KERMIT-65

The following files should be supplied on the distribution tape:

a2acc.hex   - apple com card hex
a2acc.m65   - apple com card source
a2ccs.hex   - ccs 7710 com card hex
a2ccs.m65   - ccs 7710 com card source
a2cps.hex   - cps com card hex
a2cps.m65   - cps com card source
a2diff.doc  - difference between the original m65 doc and this
a2gs.hex    - gs serial port hex
a2hmm.hex   - hayes micro modem card hex
a2hmm.m65   - hayes micro modem card source
a2k3xx.1    - easy install file 1 (an exec file for dos 3.3)
a2k3xx.2    - easy install file 2 (an exec file for dos 3.3)
a2k3xx.3    - easy install file 3 (an exec file for dos 3.3)
a2m65.doc   - complete documentation (it says here)
a2main.hex  - main kermit pgm hex
a2main.m65  - main kermit pgm source
a2make.unx  - make file for unix xasm (to assemble kermit)
a2msv.hex   - microtec com card hex
a2msv.m65   - microtec com card source
a2ssc.hex   - super serial com card hex
a2ssc.m65   - super serial com card source
a2xasm.1    - xasm for unix system part 1
a2xasm.2    - xasm for unix system part 2
a2xasm.3    - xasm for unix system part 3

1.7. Alternate Installation

The main problem exists in getting the hex files onto your disketts 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 business. 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 a2main.hex and select which com card hex you will need. First "exec p2main.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 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$6900" 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 equipment. Do all your "set's" etc and then do an "exit". Now you should be back in basic. At this point do a "BSAVE name,A$1000,L$6900" and when you do a "BRUN name" all your setup 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 (eg. //e -> //e+) will not be possible. 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:

EXEC A2MAIN.HEX

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

3D0G
EXEC A2SSC.HEX
BSAVE kermit,A$1000,L$6900

And you should be in business. Remember there is the command HELP and whenever you are into a command a "?" will give you the posible 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.8. Problems

1.8.1. 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 to me that you can run your apple 2 with sw6-2 on and in 99% of the cases will cause no problems. This is because dos runs with interupts locked out ("sei" in assembly language) and the program must explicitly give a "cli" for interupts to work (the super serial driver does).
The microtek driver is a super serial look alike which does not run with interupts. 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.
Unconfirmed reports have it that the apple cat will work with the apple com driver. Would appreciate a confirmation.
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.

1.8.2. Usage

There is the command HELP and whenever you are into a command a "?" will give you the posible 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 sequences, tabs etc. It may be you can tell the host you are a tty or some such device that will give carrage returns etc that your printer can handle. Some printers may require the flow control and delay to get readable printing. File transfer is very dependent upon parity. Make sure the host and local parity are the same.

1.9. Customizing Kermit-65

                         CUSTOMIZING AND BUILDING 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 a2xasm.1 thru a2xasm.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 a2make.unx is the make file to use with the xasm to reassemble all of kermit's parts.
   KERMIT-65 currently supports the following communications devices:
   The Microtek sv-622 card
   The D.C. Hayes Micromodem.
   The Apple Super Serial Card
   The CCS 7710 Serial Card
   The Apple Com Serial Card
   The Prometheus Versacard - uses the apple com card driver
   The CPS card
   The //gs serial card
Kermit 3 has now been separated into two assemblies. The main routines and the com card routines. 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 character 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 loosing characters.

1.9.1. Communications card vector area


  address - size - provided by - 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
                              for example:
                              if index is a 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 the slot #.
  1008      byte     main     Force initialization flag when 0.
                              initilization 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
  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 to do command
  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 on the line 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. micorseconds
                              delay =1/2(26+27A+5A*A) where A is the
                              accumulator
  1043    3 bytes    main     Jump to routine to print null terminatedstring.
                             X reg contains least significant byte of address
                             Y reg contains most significant byte of address
                             routine does not issue a carrage 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 carrage rtn & line feed.
  104f    3 bytes    main     Jump to routine to set characters parity.
                              A reg contains the character befor and after

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 appropiately. That is:a "beq" instruction will branch on a false indication and the "bne" will branch on a true indication. Currently the com driver should start its routines at address $7600. If your com driver gets too large then the
bsave address would have to be changed when you are saving the binary to diskette.

