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 cradle. 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 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.2280M ! Move APPHXL from $2000 to $9000 - 3. * ! Reenter Apple BASIC - 4. ]BSAVE APPHXL,A$9000,L$280 ! Save APPHXL to disk - 5. Now simply start executing APPHXL. 1. ]CALL -151 ! Enter monitor - 2. *9000G ! Start APPHXL - 3. SLOT FOR MODEM CARD? (1 TO 7) n ! 'n' is slot of card ---- --- ----- ----- -- -- -- (no ) KERMIT-65 USER'S GUIDE Page 1-3 4. 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$4C00 ! Save KERMIT to disk - 7. The user may set up a turn-key system by having the hello file on the disk load and run KERMIT. The user may also run KERMIT-65 change the defaults which are supplied in the program such as SLOT and DEVICE-DRIVER, and then resave KERMIT-65. The next time it is run, the user will not have to set these values again. If the user does not set up a turn-key system, he must start KERMIT-65 by typing: 1. ]BRUN KERMIT ! Execute KERMIT-65 on the Apple - The Apple will display the following: STEVENS - APPLE ][ KERMIT-65 VER. 2.0 KERMIT-65> The user is now ready to transfer files. 1.2 LOADING A NEW VERSION OF KERMIT-65 Once KERMIT-65 is on the users system, it can be used to load new versions of KERMIT-65. There are two ways of doing this. One will work in any enviroment where the initial bootstrap procedure works, since it depends only on the capability of transferring text files. The other method depends upon the capability of being able to obtain and transfer a binary file. 1.2.1 Loading From A .HEX File There is another hexload program available called APPDXL. This program will load a hex file from an Apple diskette into memory. To use this procedure, do the following: 1. Start executing APPHXL. KERMIT-65 USER'S GUIDE Page 1-4 1. ]CALL -151 ! Enter monitor - 2. *9000G ! Start APPHXL - 3. SLOT FOR MODEM CARD? (1 TO 7) n ! 'n' is slot of card ---- --- ----- ----- -- -- -- (no ) 4. ENTER FILENAME TO LOAD APPDXL.HEX ! Tell APPHXL what ----- -------- -- ---- to load APPHXL will print what it is receiving on the screen as well as loading it into memory. 2. Relocate and save APPDXL. Type the following: 1. ]CALL -151 ! Enter Apple's system monitor - 2. *9000<2000.2500M ! Move APPDXL from $2000 to $9000 - 3. * ! Reenter Apple BASIC - 4. ]BSAVE APPDXL,A$9000,L$500 ! Save APPDXL to disk - 3. Use Kermit-65 to transfer the new version of itself over. Make the Apple file a Text file. WARNING: This file will take LOTS of space (about 180 sectors) so make sure the disk is reasonably empty. 4. Start executing APPDXL. 1. ]BRUN APPDXL ! Start APPDXL - 2. ENTER FILENAME TO LOAD KERMIT.HEX ! Tell APPDXL what ----- -------- -- ---- to load 5. When APPDXL finishes type the following to the Apple: ]BSAVE KERMIT,A$800,L$4C00 ! Save KERMIT to disk - KERMIT-65 USER'S GUIDE Page 1-5 The new version of Kermit is now on disk. 1.2.2 Loading From The Binary Version There is yet another way to Bootstrap a new version of KERMIT onto an Apple. If the user has an older version of KERMIT-65 and has access to a machine with a valid copy of APPLEK.BIN, they can simply transfer APPLEK.BIN using their version of KERMIT. Be sure to set the File-byte-size to Eight-bit, and the File-type-mode to Binary before transfering the file since this is the actual object code. Also be sure that the sending Kermit is also set for doing a binary transfer. No special loading or conversion is needed. 1.3 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. There is no wild-carding of filenames as in KERMIT-80. 3. When transferring files, the file type must be made known to KERMIT-65 by setting the FILE-TYPE parameter to one of the following: 1. TEXT 2. APPLESOFT 3. INTEGER 4. BINARY 4. There is no timeout support in KERMIT-65 since the standard Apple configuration has no accessible 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. 5. 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 KERMIT-65 USER'S GUIDE Page 1-6 seven-bit mode. 1.4 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 its 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. APPHXL.HEX - Assembled version of Hex load program 5. APPDXL.M65 - Source of program to load KERMIT-65 from Apple diskette 6. APPDXL.HEX - Assembled version of Disk Hex load program 7. KERMIT.M65 - Source for the KERMIT-65 program 8. KERMIT.HEX - Assembled version of KERMIT-65 9. KERMIT.BIN - Assembled version of KERMIT-65 (Eight-bit Binary object code) 10. APPLE.RNO - KERMIT-65 user and system instructions (Source) 11. APPLE.MEM - KERMIT-65 user and system instructions (Processed) 12. CROSS.MAC - CROSS Microprocessor Assembler (Source) 13. CROSS.EXE - CROSS Microprocessor Assembler (Object) KERMIT-65 SYSTEM INSTALLATION GUIDE Page 2-2 2.2 BUILDING KERMIT-65 Kermit-65 currently supports the following communications devices: 1. FTASER - The Apple Communication card 2. FTHAYS - The D.C. Hayes Micromodem. 3. FTSSC - The Apple Super Serial Card All device drivers are included in the assembled version and may be used by issuing a 'SET DEVICE-DRIVER' command to Kermit. If either of the device drivers is not needed, it may be excluded by setting the appropriate feature test to zero in the Feature test section of the source code. The feature test FTCOM must be set to the type of computer for which KERMIT-65 is being assembled. The only machine KERMIT-65 is available for currently is the Apple ][. This parameter must be set to FTAPPL. After setting any options necessary in KERMIT.M65, do the following: 1. .R CROSS ! Run CROSS Microprocessor Assembler - 2. *KERMIT.HEX/PTP:KIM=KERMIT.M65/M65 ! Generate .HEX file - This command will produce an ASCII HEX file which can be downline loaded onto the Apple using APPHXL. If a listing is desired, one can be produced by adding ",KERMIT.LST" after the "/PTP:KIM" in the command line to CROSS. 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 NECESSARY 135 PRINT CHR$ (1); CHR$ (6) 136 PRINT D$;"PR#2" : REM CHANGE '2' TO SLOT OF COMM. CARD IF NECESSARY 137 PR#2 : REM THIS LINE SHOULD BE HERE ONLY FOR THE APPLE COMM. CARD 140 C3 = 0 150 HOME 199 REM - REQUEST NEXT LINE 200 REM - PUT A DOT ON THE SCREEN FOR EACH LINE RECEIVED 201 C3 = C3 + 1: POKE 1024 + C3, ASC (".") 202 L$ = "":Y2% = 1: PRINT 203 GET A$:L$ = L$ + A$:Y2% = Y2% + 1: IF Y2% < 81 THEN 203 205 C1 = 0:C2 = 0:I = 0 208 IF LEFT$ (L$,1) > = "0" AND LEFT$ (L$,1) < = "9" THEN 220 210 L$ = RIGHT$ (L$, LEN (L$) - 1): GOTO 208 220 LL = LEN (L$) 249 REM - FETCH THE DATA BYTE COUNT FOR THIS LINE 250 GOSUB 1000:C1 = C1 + B:CO = B 255 IF CO = 0 THEN 990 259 REM - CONSTRUCT THE LOAD ADDRESS FOR THIS LINE 260 GOSUB 1000:C1 = C1 + B:AD = B: GOSUB 1000:C1 = C1 + B:AD = AD * 256 + B 265 REM - IF THE LATEST VERSION OF CROSS IS USED, THIS SHOULD NOT BE NEEDED : REM AD = AD - 28672 266 IF AD < OAD THEN 990 267 OAD = AD 270 FOR X = 0 TO CO - 1 275 REM - GO GET A BYTE AND PUT IT IN THE NEXT MEMORY LOCATION 280 GOSUB 1000:C1 = C1 + B 290 POKE AD + X,B 300 NEXT X 310 GOSUB 1000:C2 = B: GOSUB 1000:C2 = C2 * 256 + B 320 IF C1<>C2 THEN POKE 1024+C3,ASC("E") 330 GOTO 201 990 FOR X = 1 TO 1000: NEXT X 995 PRINT D$;"IN#0": PRINT D$;"PR#0": HOME : END 999 REM - GET BYTE APPLBT.BAS - BOOTSTRAP PROGRAM FOR APPHXL Page A-2 1000 GOSUB 1501:B = N1: GOSUB 1501:B = B * 16 + N1 1010 RETURN 1500 REM - GET NIBBLE 1501 IF LEN (L$) = 0 THEN N1 = 0: RETURN 1510 H$ = LEFT$ (L$,1) 1511 IF LEN (L$) = 1 THEN L$ = "": GOTO 1525 1515 L$ = RIGHT$ (L$, LEN (L$) - 1) 1520 REM - RETURN VALUE OF HEX NIBBLE 1525 FOR X1 = 1 TO 16 1530 IF H$ = MID$ (N$,X1,1) THEN 1610 1540 NEXT X1 1550 REM - DIGIT WAS NOT FOUND, RETURN ZERO 1560 N1 = 0: RETURN 1600 REM 1610 N1 = X1 - 1: RETURN APPENDIX B APPLBT.FOR - MAINFRAME SIDE OF BOOTSTRAP CHARACTER LINE*80,SENTNL*1 OPEN (UNIT=00,FILE='APPHXL.HEX',MODE='ASCII') 10 READ (UNIT=05,FMT=20) SENTNL 20 FORMAT (A1) READ (UNIT=00,FMT=25,END=999) LINE 25 FORMAT(A80) WRITE (UNIT=05,FMT=30) LINE 30 FORMAT(A80) GO TO 10 999 READ (UNIT=05,FMT=20) SENTNL STOP END APPENDIX C THE PARAMETER REGION OF KERMIT.M65 .SBTTL Feature test definitions ; Machines ftappl = $01 ; Apple (under DOS 3.3) ; Communication devices ftaser = $01 ; Include support for Apple Com card fthays = $01 ; Include support for D.C. Hayes modem ftssc = $01 ; Include support for Super Ser card .SBTTL Kermit feature test options ftcom = ftappl ; Assemble for Apple ][ under DOS 3.3