CHAPTER 1 KERMIT-65 USER'S GUIDE 1.1 BOOTSTRAPPING KERMIT The procedure to bootstrap an assembled KERMIT object file to the Apple is as follows: 1. On the Apple, Type in the APPLBT.BAS program supplied (See Appendix A). It is recommended that the user save this program as it may be needed to bootstrap newer versions of KERMIT or APPHXL in the future. Also, type the basic program in with none of the REMs. It will execute quicker and take up less room. 2. Call and login to the mainframe on which KERMIT-65 resides. Do the following: 1. ]IN#n ! Where n is between 1 and 7 _ 2. For Communication card, do the following: 1. Dial number for computer system. 2. Seat phone receiver in modem craddle. 3. ] !Full duplex, 300 baud _ For the D.C. Hayes Micromodem, do the following: 1. ] ! Full duplex, 300 baud _ 2. MICROMODEM II: BEGIN TERM __________ ___ _____ ____ 3. MICROMODEM II: DIALING: nnn-nnnn ! nnn-nnnn is __________ ___ ________ number of computer system KERMIT-65 USER'S GUIDE Page 1-2 3. In your directory on the mainframe, the following files should be present: 1. APPLBT.FOR 2. APPHXL.HEX 3. KERMIT.HEX - Make sure this is the correct copy for your micro. If your communication interface is not in slot 2, do the following: 1. Edit HXLOAD.M65 2. Change the address which is assigned to the symbol 'slot' to '$Cn00' where n is a number from 1 to 7 and that is the slot holding the communication interface. 3. Reassemble the source with CROSS. Compile and execute APPLBT.FOR. This will be used along with APPLBT.BAS on the Apple to load the APPHXL program. Once APPLBT is executing on the mainframe, give control back to the Apple and then run APPLBT.BAS on the Apple. For either the Communication Card or the D.C. Hayes Micromodem, the procedure is: 1. ! Give control to Apple's Brain 2. ]LOAD APPLBT.BAS _ 3. ]LOMEM:9500 _ 4. ]RUN _ 4. Relocate and save APPHXL. Type the following: 1. ]CALL -151 ! Enter Apple's system monitor _ 2. *9000<2000.21FFM ! Move APPHXL from $2000 to $9000 _ 3. * ! Reenter Apple BASIC _ 4. ]BSAVE APPHXL,A$9000,L$1FF ! Save APPHXL to disk _ 5. Now simply start executing APPHXL. 1. ]CALL -151 ! Enter monitor _ KERMIT-65 USER'S GUIDE Page 1-3 2. *9000G ! Start APPHXL _ 3. ENTER FILENAME TO LOAD KERMIT.HEX ! Tell APPHXL what _____ ________ __ ____ to load APPHXL will print what it is receiving on the screen as well as loading it into memory. 6. When APPHXL finishes type the following to the Apple: ]BSAVE KERMIT,A$800,L$3600 ! Save KERMIT to disk _ 7. The user may set up a turn-key system by having the hello file on the disk load and run KERMIT. Otherwise, to load and run KERMIT, the user must type: 1. ]BRUN KERMIT ! Execute KERMIT-65 on the Apple _ The Apple will display the following: STEVENS - APPLE ][ KERMIT-65 VER. 1.0 KERMIT-65> The user is now ready to transfer files. 1.2 DIFFERENCES FROM KERMIT-80 KERMIT-65 is currently missing some features which exist in KERMIT-80. There are also some restrictions which apply. The differences and restrictions are as follows: 1. Session logging is not included in KERMIT-65 at this time. 2. KERMIT-65 does not have the commands that pass commands to a SERVER mode KERMIT (BYE, etc.). 3. IBM-mode support has not been written. 4. There is no wild-carding of filenames as in KERMIT-80. 5. When transferring files, the file type must be made known to KERMIT-65 by setting the FILE-TYPE paramenter to one of the following: 1. TEXT 2. APPLESOFT KERMIT-65 USER'S GUIDE Page 1-4 3. INTEGER 4. BINARY 6. There is no timeout support in KERMIT-65 since the standard Apple configuration has no accessable clock. To time out KERMIT-65 and have it resend a packet, hit any printable character on the keyboard except a 'Q'. Typing a 'Q' during a transfer will abort the entire transfer. 7. Seven-bit ASCII file transfer should only be attempted for text files, otherwise data integrity may be sacrificed. Using seven-bit transfer on both KERMITS will cause KERMIT-65 to strip off the High Order bit when sending and turn on the High Order bit when receiving. This will insure that the receiving system gets positive ASCII text as opposed to negative ASCII which is used on the Apple. KERMIT-65 will write negative ASCII characters to disk when receiving in seven-bit mode. 1.3 HINTS If you wish to edit BASIC programs on the mainframe system, you should convert them to text files on the Apple before you send them since the BASIC interpreters store keywords as single character tokens. Documentation on how to convert BASIC programs to and from text files can be found in the DOS Manual for the Apple ][. If the receiving system does not handle eight-bit ASCII or negative ASCII characters well, KERMIT-65 should have it's FILE-BYTE-SIZE set to SEVEN-BIT. It will send positive seven-bit ASCII to the receiving KERMIT. When KERMIT-65 is receiving from such a system, this will pick up the seven-bit characters and write out negative ASCII on the disk file. CHAPTER 2 KERMIT-65 SYSTEM INSTALLATION GUIDE 2.1 THE FILES The following files should be supplied on the distribution tape: 1. APPLBT.BAS - Initial bootstrap program to load APPHXL 2. APPLBT.FOR - Program on mainframe to talk to APPLBT.BAS 3. APPHXL.M65 - Source of program to load KERMIT-65 4. KERMIT.M65 - Kernel of the KERMIT-65 program 5. APPDC2.HEX - Assembled version of KERMIT-65 with the defaults: 1. Apple ][ computer 2. D.C. Hayes Micro-modem 3. Slot 2 as communication port 6. APPAC2.HEX - Assembled version of KERMIT-65 with the defaults: 1. Apple ][ computer 2. Apple communication card 3. Slot 2 as communication port 7. APPLE.RNO - KERMIT-65 user and system instructions 8. APPLE.MEM - KERMIT-65 user and system instructions 9. CROSS.MAC - CROSS Microprocessor Assembler (Source) KERMIT-65 SYSTEM INSTALLATION GUIDE Page 2-2 10. CROSS.EXE - CROSS Microprocessor Assembler (Object) 2.2 BUILDING KERMIT-65 Two versions of KERMIT-65 are assembled for use. If the configuration of the machine is either of these, nothing need be done. Otherwise, the file KERMIT.M65 must be altered and the KERMIT-65 program must be assembled. A listing of the parameter portion of KERMIT.M65 for the D.C. Hayes Micromodem in slot number 2 may be found in Appendix B. The feature test FTCOM must be set to the type of computer for which KERMIT-65 is being assembled. The only machine KERMIT-65 is available for currently is the Apple ][. This parameter must be set to FTAPPL. The feature test FTCDEV represents the communication device being used. The currently defined and implemented devices are: 1. FTASER - Apple communication card 2. FTHAYS - D.C. Hayes Micro-modem That parameter should be set to one of the above according to which device is being used. There is a definition for KERSLO which must be set according to the slot in which the board resides. This is the address of the I/O rom for the board and is in the format '$Cn00' where 'n' is the slot number. After setting any options neccessary in KERMIT.M65, do the following: 1. .R CROSS ! Run CROSS Microprocessor Assembler _ 2. *KERMIT.HEX/P/PTP=KERMIT.M65/M65 ! Generate .HEX file _ This command will produce an ASCII HEX file which can be downline loaded onto the Apple using APPHXL. If a listing is desired, one can be produced by adding ",KERMIT.LST" after the "/PTP" in the command line to CROSS. APPENDIX A APPLBT.BAS - BOOTSTRAP PROGRAM FOR APPHXL 10 REM - LOADER FOR HXLOAD 11 OAD = 0 100 N$ = "0123456789ABCDEF" 110 D$ = CHR$ (4) 130 PRINT D$;"IN#2" : REM CHANGE '2' TO SLOT OF COMM. CARD IF NECCESARY 135 PRINT CHR$ (1); CHR$ (6) 136 PRINT D$;"PR#2" : REM CHANGE '2' TO SLOT OF COMM. CARD IF NECCESARY 140 C3 = 0 150 HOME 199 REM - REQUEST NEXT LINE 200 REM - PUT A DOT ON THE SCREEN FOR EACH LINE RECEIVED 201 C3 = C3 + 1: POKE 1024 + C3, ASC (".") 202 L$ = "":Y2% = 1: PRINT 203 GET A$:L$ = L$ + A$:Y2% = Y2% + 1: IF Y2% < 81 THEN 203 205 C1 = 0:C2 = 0:I = 0 208 IF LEFT$ (L$,1) > = "0" AND LEFT$ (L$,1) < = "9" THEN 220 210 L$ = RIGHT$ (L$, LEN (L$) - 1): GOTO 208 220 LL = LEN (L$) 249 REM - FETCH THE DATA BYTE COUNT FOR THIS LINE 250 GOSUB 1000:C1 = C1 + B:CO = B 255 IF CO = 0 THEN 990 259 REM - CONSTRUCT THE LOAD ADDRESS FOR THIS LINE 260 GOSUB 1000:C1 = C1 + B:AD = B: GOSUB 1000:C1 = C1 + B:AD = AD * 256 + B 265 AD = AD - 28672 266 IF AD < OAD THEN 990 267 OAD = AD 270 FOR X = 0 TO CO - 1 275 REM - GO GET A BYTE AND PUT IT IN THE NEXT MEMORY LOCATION 280 GOSUB 1000:C1 = C1 + B 290 POKE AD + X,B 300 NEXT X 310 GOSUB 1000:C2 = B: GOSUB 1000:C2 = C2 * 256 + B 320 IF C1<>C2 THEN POKE 1024+C3,ASC("E") 330 GOTO 201 990 FOR X = 1 TO 1000: NEXT X 995 PRINT D$;"IN#0": PRINT D$;"PR#0": HOME : END 999 REM - GET BYTE 1000 GOSUB 1501:B = N1: GOSUB 1501:B = B * 16 + N1 1010 RETURN APPLBT.BAS - BOOTSTRAP PROGRAM FOR APPHXL Page A-2 1500 REM - GET NIBBLE 1501 IF LEN (L$) = 0 THEN N1 = 0: RETURN 1510 H$ = LEFT$ (L$,1) 1511 IF LEN (L$) = 1 THEN L$ = "": GOTO 1525 1515 L$ = RIGHT$ (L$, LEN (L$) - 1) 1520 REM - RETURN VALUE OF HEX NIBBLE 1525 FOR X1 = 1 TO 16 1530 IF H$ = MID$ (N$,X1,1) THEN 1610 1540 NEXT X1 1550 REM - DIGIT WAS NOT FOUND, RETURN ZERO 1560 N1 = 0: RETURN 1600 REM 1610 N1 = X1 - 1: RETURN APPENDIX B THE PARAMETER REGION OF KERMIT.M65 .SBTTL Feature test definitions ; Machines ftappl = $01 ; Apple (under DOS 3.3) ; Communication devices ftaser = $01 ; Apple serial communications board fthays = $02 ; D.C. Hayes modem .SBTTL Kermit feature test options ftcom = ftappl ; Assemble for Apple ][ under DOS 3.3 ftcdev = fthays ; Assemble for D.C. Hayes Micromodem .SBTTL Additional definitions kerslo = $c200 ; Slot rom address (default slot is 2) kercsr = kerslo^ ; High order byte address of comm card rom kercsi = *16-$0c00 ; Communication card slot index