nakada@husc4.HARVARD.EDU (Paul Nakada) (01/20/89)
Comments: Originally-From: Ted Medin <MEDIN-T@SHARK.nosc.mil> ------ part 3 of 4 ------------- apple.doc 1. Apple II Kermit -------- This document is formatted as an ordinary, plain text ASCII disk file, from SCRIBE text formatter source. Typeset copies are available from Columbia University. -------- Authors: Antonino N. J. Mione (Stevens Institute of Technology), Peter Trei (Columbia University), Ted Medin (NOSC), Bob Holley (SERDAC) Version: 3.85 Date: 1988 Dec Kermit-65 Capabilities At A Glance: Local operation: Yes Remote operation: Yes Transfers text files: Yes Transfers binary files: Yes Wildcard send: Yes ^X/^Y interruption(Q): Yes Filename collision avoidance: Yes Can time out: Yes 8th-bit prefixing: Yes Repeat count prefixing: No Alternate block checks: No Terminal emulation: Yes (VT52, VT100) 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: Yes Long packets: Yes Sliding windows: 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 Motorola 6502 processor family (hence the name, Kermit-65) on the Apple II microcomputer system. It is written in 6502 assembly language and should run on any Apple II or compatible running DOS 3.3 or PRODOS. This section will describe the things you should know about the file system in order to make ef- fective use of Kermit, and then it will describe the special features of the Kermit-65 program. 1.1. Supported Systems and Devices There are several different Apple II's which can run Kermit-65. Kermit will have no problems running on an Apple II, II+, //e, //c or //gs system. Of the different communication devices available for the Apple II, Kermit-65 supports the ones shown in Table 1-1. ------------------------------------------------------------------------------- AE Serial Pro (super serial driver - sw 1 & 3 open 2 & 4 closed) AIO II (Uses the Apple Com Card driver??? - untested) ALS dispatcher (Uses the Apple Com Card driver) Apple Com Serial Card ASIO (Uses the Apple Com Card driver??? - untested) Apple Super Serial Card & //c Serial Port Apple //gs Serial Port CCS 7710 Serial Card CCS 7711 (Uses the Apple Com Card driver??? - untested) D.C. Hayes Micromodem. Microtek sv-622 Card Prometheus Versacard (Uses the Apple Com Card driver) SSM AIO (Uses the Apple Com Card driver??? - untested) Table 1-1: Apple II Communication Cards Supported by Kermit-65 ------------------------------------------------------------------------------- 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.2. The DOS 3.3 File System Items of importance which will be discussed in this section include filenames and file characteristics. 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. 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: 1. APPLESOFT BASIC 2. INTEGER BASIC 3. BINARY 4. 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 infor- mation 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, s/he must convert it to a TEXT file before sending it over. After receiving the file back on the Apple, the user may con- vert 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 if there is no need to edit them on the mainframe. The FILE-TYPE parameter must always be set cor- rectly when sending and receiving files. The procedure for archiving files is: 1. Run Kermit on remote system. 2. SET FILE-TYPE TEXT (or APPLESOFT or ...) on Kermit-65. 3. Send the files. 1.3. The PRODOS File System The PRODOS system is essentialy 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 where "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 with no imbedded spaces and few special characters, and must begin with an al- phabetic character. /volname/sub ... may be omited from the filename by use of the SET PREFIX command. Binary file transfer using PRODOS has its dangers when creating new files. PRODOS keeps the file's size and starting location in the directory which is of course not transferred. Therefore 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.4. Program Operation Prior to using Kermit-65 for transferring files, the modem interface must be set to handle data in a certain manner. First, the data format should be 8 data bits and 1 stop bit. Second, 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 interrupt 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 talk- ing out the communication port. File transfer is very dependent upon parity. Make sure the host and local parity are the same. Following are a couple of site's method for file transfer. We have an IBM 3033 and 4381 and use both 3705/3725 and 7171 or Series/1 front ends. The differences in front ends as far as any microcomputer Kermit is con- cerned duplex (local-echo on for the 3705, local-echo off for the 7171 or Series/1), parity (the two front ends might use different parity, e.g. Mark for the 3705 and Even for the 7171), and flow control (None for the 3705, XON/XOFF for the 7171). In Kermit-65, IBM mainframe users need to set the following parameters: BAUD Whatever is supported. PARITY EVEN, ODD, or MARK, whatever your front end requires. FLOW XON for the 7171, NONE for the 3705. FLOW DELAY 00 LOCAL-ECHO OFF for 7171, ON for 3705 In Kermit-65, SERDAC VAX 8800 users need to set the following parameters: BAUD SERDAC Dial-up & 300, 1200, or 2400 baud FIRN Dialup: (the highest your modem and the dial-up connection will support) Ethernet Hardwire: 300, 1200, 2400, or 4800 baud. PARITY NONE FLOW XON FLOW DELAY 00 (higher for printers, logging, or "slow" Apples) LOCAL-ECHO OFF NOTE: If you want to do a binary file transfer (Apple binary or BASIC files) via a FIRN Network connection to the SERDAC VAX 8800, you must SET PARITY SPACE before the transfer is in- itiated; that will insure that eight-bit quoting is used. If you dial directly into the VAX 8800, SET PARITY NONE; eight-bit quoting (which is less efficient) is not re- quired. 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 an ASCII text file and contain commands to set up Kermit's parameters as desired. 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. Here's a sample: 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 "brun kermit". Example: ]BRUN KERMIT NOSC/STEVENS/CU - APPLE ][ KERMIT-65 - VER 3.85 Kermit-65>send testfile (file is sent...) Kermit-65>status (performance statistics are printed...) Kermit-65>(other commands...) . . . Kermit-65>exit ] Like many Kermit programs, Kermit-65 uses a DEC-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 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. Remote and Local Operation Kermit-65 is normally run in local mode. It may be run as a remote Kermit as well although there is no advantage to doing things that way. Kermit-65 sup- ports User-mode commands for talking to a Server, and it does support a limited server mode. 1.5. Kermit-65 Commands THE SEND COMMAND Syntax: SEND filespec The SEND command causes a file to be sent from the Apple to the remote system. The Filespec is the name of the file on the Apple diskette to be sent. The parser will not accept control characters and certain special characters in a filename (like comma), so the user may have to rename the file before it is sent. The user may also have problems in filename compatibility with remote Kermits. If the remote Kermit does not have the facilities to beat the filename into a format that its system likes, the user may have to rename the file be- fore sending it. Thanks to Dick Atlee, wildcards are now acceptable when send- ing files (they have always been acceptable when receiving files). The "*" is a multiple character wildcard and the "=" is a single character wildcard. 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 'RECEIVING NUMBER OF BYTES' and 'SENDING NUMBER OF BYTES' followed by the hexidecimal number of bytes trans- ferred 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, the transfer will fail, 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. 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 at- tempt 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. Filespec is required when xmodem protocol is used. 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. 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. 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. So if the remote Kermit supports wildcards you can specify them in the remote-filespec. 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 cancelled. THE CONNECT COMMAND Syntax: CONNECT Establish a terminal connection to the remote system using all the current SET paramaters for terminal type, speed, parity, etc. Get back to Kermit-65 by typing the escape character followed by the letter C. The escape character is Control-@ by default. When you type the escape character, several single-character commands are possible. These are shown in Table 1-2. ------------------------------------------------------------------------------- ? List all the possible single-character arguments. 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. E rEfresh the screen (useful for clearing garbage on screen). K TOGGLE Keypad application-mode on/off. 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 (ASCII 0). ^@ (or whatever the Connect-Escape character is): Send the Connect-Escape character itself. Table 1-2: Kermit-65 Single-Character CONNECT Escape Commands ------------------------------------------------------------------------------- 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. Incoming characters are interpreted according the selected terminal type (see SET TERMINAL). On an Apple II+ with an incomplete keyboard, special characters can be typed by prefixing regular characters with a right-arrow. On uppercase-only screens, uppercase characters are shown in inverse and lowercase characters are dis- played 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 spe- cial 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. Table 1-3 shows the Apple II/II+ keyboard escapes; the letter "p" represents the prefix character. ------------------------------------------------------------------------------- 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. | Table 1-3: Apple II/II+ Keyboard Escapes ------------------------------------------------------------------------------- The left-arrow key sends a rubout (ASCII 127). With left-arrow and right arrow doing special things, it's a little hard to enter their characters (^H and ^U respectively). 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. THE HELP COMMAND Syntax: HELP Typing HELP alone prints a brief summary of the Kermit-65 commands. THE MODEM COMMAND Syntax: MODEM This command is designed for the hayes smart modem. Typing MODEM causes the file KERMIT.MODEM in the default drive/path to be used as a menu. You will be able to select any line in the file to be sent to the modem. Sorry, you can't back up to a previous menu, you will have to Quit and execute MODEM again. A "CONNECT" response from the smart modem will cause Kermit leave the modem com- mand and execute the CONNECT command. The Hayes smart modem must reply with text status responses (not numbers). One command per line with comments al- lowed after the first space (blank). Use your favorite editor to produce this ASCII text file. Since the attention Hayes command (AT) requires a delay the "&" character becomes the time delay for Kermit. Each "&" causes a delay of one second on a 6502 chip. If you have a //gs or an accelerator board you may have to use the SET TIMING command to produce a one second delay. If you really need to send the "&" character to the modem then the "\" is the escape character. Put a "\" before any character and that character will be sent asis. Of course two "\"'s will produce one "\". Normally Kermit will wait for 27 seconds (again on a 6502 chip) for the modem to respond, but 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 (owch!-not so hard) any key on the keyboard. Following is an example of the KERMIT.MODEM file: +++&&ATH Get the Hayes Smartmodem's attention and then hang up. ATDP1234567 Call your local BBS with pulse dialing. ATDT8901234 Call your work dialup phone with touch tone dialing. THE CATALOG COMMAND Syntax: CATALOG Typing CATALOG produces a catalog (directory) listing of your default drive. THE DELETE COMMAND Syntax: DELETE filespec Typing DELETE causes the file specified to be deleted. THE SERVER COMMAND Syntax: SERVER Typing SERVER alone turns Kermit into a file server to a remote Kermit. Cur- rently server mode will handle remote "send", "get", "remote" and "fin" com- mands. Variants of the above commands will probably work but file serving is very limited at present. Because the Apple requires knowledge of file types you can use the "remote Kermit" (or whatever the remote Kermit's syntax is) command to set the file-type on the server. Yes, the server will execute any command so you can really get the server into trouble (this is not a BBS). You must have the appropiate file type set before transfering files. You can exit server mode by typing Control-C (^C) when not doing file transfers or the remote can of course terminate via the "fin" command. THE REMOTE COMMAND Syntax: REMOTE [option character-string] The only option currently is "kermit". This command submits the command "character-string" to the remote Kermit's command processor. Long replys are not paged so you will have to use ^S to stop the screen. The obvious usage is for setting and showing parameters on the remote Kermit. THE EXIT AND QUIT COMMANDS Syntax: EXIT or QUIT Exit from Kermit-65. You can restart the program, provided you haven't run anything else, by typing 'CALL 4096'. THE SET COMMAND Syntax: SET parameter [option [value]] Establish or modify various parameters for file transfer or terminal connec- tion. You can examine their values with the SHOW command. The following parameters may be SET: APPLICATION-MODE Set VT100 gs keypad in/out of application mode. BAUD Which baud rate should the com card use? CURSOR-KEYS-VT100 In VT100 mode cursor keys give VT100 sequences. DEBUGGING TERSE or VERBOSE packet information. DEFAULT-DISK Which Diskette drive is 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 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. 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? 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? TIMER Should Kermit observe the receive timeout value? TIMIMG Change the time loop for 1 ms. delays. TERMINAL Which type of terminal should Kermit emulate? SET APPLICATION-MODE Syntax: SET APPLICATION-MODE {ON, OFF} For VT100 emulation with a gs-style keypad you can set the keypad in or out of application mode. Some computer systems set this via escape sequences so it may not be necessary to use this command. SET BAUD Syntax: SET BAUD value Value is the baud rate for your communication 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 {TERSE, VERBOSE, OFF} Record the packet traffic on your terminal. Options are: TERSE, Show packet info only (brief). VERBOSE displays packet field descriptions with packet info (lengthy). OFF disables display of debugging information (this is the default). SET DEFAULT-DISK Syntax: SET DEFAULT-DISK {SLOT, VOLUME, DRIVE} 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 ei- ther 1 or 2. The value for VOLUME ranges from 0 to 255. SET DISPLAY Syntax: SET DISPLAY {2E, 2P} or SET DISPLAY 80-COL number This command will tell Kermit-65 which kind of screen display you want to use. If you have an Apple II or II+ without an 80 column card, use the first syntax. If you have any kind of an Apple with an 80 column card, enter: SET DISPLAY 80, followed by a space and the slot number where the card resides (if you don't know the slot number, or the card is built-in to the set, try 3 ). SET ESCAPE Syntax: SET ESCAPE hexidecimal-number Specify the control character you want to use to "escape" from remote connec- tions back to Kermit-65. The default is 0 (Control-@). The number is the hex value of the ASCII control character, 1 to 37, for instance 2 is Control-B, B is Control-K. SET FILE-TYPE Syntax: SET FILE-TYPE {APPLESOFT, INTEGER, TEXT, BINARY, OTHER 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 listed below. OTHER includes 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, see Tables 1-4 and 1-5 (thanks to Phil Chien, M L Stier et al). APPLESOFT The file being transfered is an Applesoft Basic program. INTEGER The file being sent/received is an Integer Basic program. TEXT The file being sent/received is an ASCII Text file. BINARY The file being sent/received is a Binary image. OTHER The type of file being sent/received is specified by the hex-value. SET FILE-WARNING Syntax: SET FILE-WARNING {ON, OFF} This tells Kermit-65 whether to warn the user about incoming filenames con- flicting with existing files or not. If there is a conflict Kermit-65 will at- tempt to change the file name to something unique. SET FLOW Syntax: SET FLOW {OFF, XON, DELAY number} SET FLOW allows one to use the XON/XOFF protocol when 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 until XOFF takes effect Delay followed by a number (including 0) delays the program for that many mil- liseconds after the XOFF is given to the remote. This delay allows the XOFF to take effect before the program continues. NOTE: Except for printing and logging, most Apples will not require you to use a flow delay, even at rates up thru 19200 baud; for proper screen control, however, certain older Apple IIe's may require a fairly high delay (120-160 dec), even at 300 baud. 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 II+, this should be set to 2P (which is the default). When set to that, character translations are available by using the right-arrow key as a prefix character, as shown in Table 1-3. SET KEYPAD Syntax: SET KEYPAD {ON, OFF} SET KEYPAD tells Kermit-65 if the user has an Apple//gs-style keypad available. This is automatically set on a gs but must be set manually on other machines. With keypad set ON then "VT100 keypad on an Apple keyboard" (see below) will not be used but the actual keypad will be. SET LOCAL-ECHO Syntax: SET LOCAL-ECHO {ON,OFF} [Default: OFF] This command tells Kermit-65 to echo to the screen characters you type on the keyboard (LOCAL-ECHO = ON), or to let the remote system echo the typed charac- ters (LOCAL-ECHO = OFF). If, when CONNECTed to the remote, you see a duplicate of every character you type, escape back to Kermit-65, and SET LOCAL-ECHO OFF. If, when CONNECTed to the remote, you see nothing echoed to the screen, escape back to Kermit-65, and SET LOCAL-ECHO ON. SET PARITY Syntax: SET PARITY {NONE, EVEN, ODD, MARK, SPACE} [Default: NONE] This command tells Kermit-65 which parity you want to use while communicating with the remote. Most remotes use NONE; some use EVEN, a few may use the other possible values. If you have a choice of parity to use with a remote machine, if possible, choose NONE. SET PREFIX Syntax: SET PREFIX string [Default: boot volume] This command allows you to specify a ProDOS volume/file prefix. SET PRINTER Syntax: SET PRINTER {ON, SLOT} number or SET PRINTER OFF This allows one to turn the printer on for printing what is displayed on the screen. The printer can also be toggled on/off via the ESCAPE character fol- lowed 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 se- quences, tabs, etc. It may be you can tell the host you are a tty or some such device that will produce control codes 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 PROTOCOL Syntax: SET PROTOCOL {KERMIT, XMODEM} SET PROTOCOL tells kermit-65 which protocol to use for file transfer. NOTE: When XMODEM is used you will probably want to change the carrage return and carrage return/line feed translation in the send/receive parameters. eg. "SET SEND CR<->CR,LF OFF" and "SET RECEIVE CR<->CR,LF OFF". SET SLOT Syntax: SET SLOT number This option tells Kermit-65 in which slot the communication device is located. The range for the number parameter is 1-7. SET TIMER Syntax: SET TIMER {ON, 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 may have to make allowances via the SET RECEIVE TIMEOUT command or the SET TIMING command. SET TIMIMG Syntax: SET TIMIMG { number } Kermit uses a timing loop with the rom address $fca8 to produce a 1 ms. delay. If you have a machine that runs faster than the 6502 chip you may have to in- crease this number to get the 1 ms delay. SET TERMINAL Syntax: SET TERMINAL {MONITOR, NONE, VT100, VT52} When TERMINAL is NONE, then all incoming characters (except nulls) are passed directly to the display. MONITOR emulation simply displays all the characters received from the remote (except nulls) without any formating of the screen (40 or 80 characters per line). Control characters are displayed inverse. VT100 Emulation The Kermit-65 VT100 emulator is a small but working set of a true VT100 ter- minal. It appears to work with most of the standard full screen editors and processors on BSD UNIX and VAX/VMS machines. An Apple//e, //c, or //gs is probably required with the Apple 80 column text card. The VT100 keypad has also been defined for the application mode via the OA/CA/game button. Figure 1-1 shows the Apple keypad looks like to EDIT (VMS) , and Figure 1-2 shows the layout on an Apple//gs keyboard. When using EVE (VMS) the meaning of the keys will of course change. 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 in middle of the box (key) is the Apple key label. Also the arrow keys work as VT100 arrow keys with the OA/CA/game button. ------------------------------------------------------------------------------- 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 | --------------------------------------- Figure 1-1: VT100 Keypad on an Apple Keyboard ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- 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 | | ------------------------------- Figure 1-2: VT100 Keypad on an Apple//gs or Equivalent Keypad ------------------------------------------------------------------------------- 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 Apple//e 80 column card 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. Figure 1-3 should clear up the questions. ------------------------------------------------------------------------------- ^ 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| ------- ------- ------- ------- 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 | --------------------------------------- Figure 1-3: VT52 Keypad on an Apple Keyboard ------------------------------------------------------------------------------- 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? 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. 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 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? 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. 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. THE LOG COMMAND Syntax: LOG filespec When connected to a remote site, log the remote session's 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 logging 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 APP3xx.1 thru APP3xx.2 on a DOS 3.3 diskette, where xx is the current version. Make sure the diskette is a master diskette and empty. Then: EXEC APP3xx.1,R25 You will be asked several questions about your hardware and the program should execute and produce kermit3xx, kermit.help and kermit.init with some starting instructions. If you want to run Kermit on PRODOS simply use the PRODOS con- version routines to move kermit3xx, kermit.help and kermit.init to PRODOS. 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: APPAAA.HLP List of files (like this one) APP385.1 Easy install file 1 (an exec file for DOS 3.3) APP385.2 Easy install file 2 (an exec file for DOS 3.3) APPACC.HEX Apple com card hex APPACC.M65 Apple com card 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 APPLE.DOC Complete documentation (it says here) APPLE.MSS Scribe text formatter source for documentation 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 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. 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 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$6e00". 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$6e00" 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$6e00 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.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- 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. 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. 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 se- quences, 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 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 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 __ | Paul Nakada '89 #8-) | North House | nakada@husc4.HARVARD.EDU Harvard College | seismo>!harvard!husc4!nakada.UUCP Cambridge, MA 02138 | rutgers/ nakada@husc4.BITNET 617/498-6255 || 6264 | __|