.AP
.PR
.RM 70
#
.SKIP 10
.CH KERMIT-65 USER'S GUIDE
.SKIP 2
.HL 1 Bootstrapping KERMIT
	The procedure to bootstrap an assembled KERMIT object file
to the Apple is as follows:

.LS
.LE;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.

.LE;Call and login to the mainframe on which KERMIT-65
resides. Do the following:
.LS
.LE;&]IN_#n          ! Where n is between 1 and 7
.LE;For Communication card, do the following:
.LS
.LE;Dial number for computer system.
.LE;Seat phone receiver in modem craddle.
.LE;&]<Cntrl/A><Cntrl/F>     !Full duplex, 300 baud
.ELS
For the D.C. Hayes Micromodem, do the following:
.LS
.LE;&]<Cntrl/A><Cntrl/F>     ! Full duplex, 300 baud
.LE;^&MICROMODEM II: BEGIN TERM\& <Cntrl/A><Cntrl/Q>
.LE;^&MICROMODEM II: DIALING:\& nnn-nnnn<cr>  ! nnn-nnnn is number of computer system
.ELS
.ELS


.LE;In your directory on the mainframe, the following files
should be present:
.LS
.LE;APPLBT.FOR
.LE;APPHXL.HEX
.LE;KERMIT.HEX	- Make sure this is the correct copy for your micro.
.ELS

If your communication interface is not in slot 2,
do the following:
.LS
.LE;Edit HXLOAD.M65
.LE;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.
.LE;Reassemble the source with CROSS.
.ELS

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:
.LS
.LE;<Cntrl/A><Cntrl/X><cr>    ! Give control to Apple's Brain
.LE;&]LOAD APPLBT.BAS<cr>
.LE;&]LOMEM:9500<cr>
.LE;&]RUN<cr>
.ELS


.LE;Relocate and save APPHXL. Type the following:
.LS
.LE;&]CALL -151<cr>       ! Enter Apple's system monitor
.LE;&*9000<2000.21FFM<cr> ! Move APPHXL from $2000 to $9000
.LE;&*<Cntrl/C><cr>       ! Reenter Apple BASIC
.LE;&]BSAVE APPHXL,A$9000,L$1FF<cr>  ! Save APPHXL to disk
.ELS

.LE;Now simply start executing APPHXL.
.LS
.LE;&]CALL -151<cr>       ! Enter monitor
.LE;&*9000G<cr>           ! Start APPHXL
.LE;^&ENTER FILENAME TO LOAD \&KERMIT.HEX<cr> ! Tell APPHXL what to load
.ELS
APPHXL will print what it is receiving on the screen
as well as loading it into memory.

.LE;When APPHXL finishes type the following to the Apple:
.BR
	&]BSAVE KERMIT,A$800,L$3600<cr> ! Save KERMIT to disk

.LE;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:
.LS
.LE;&]BRUN KERMIT<cr>        ! Execute KERMIT-65 on the Apple
.ELS

The Apple will display the following:
			STEVENS - APPLE ][ KERMIT-65  VER. 1.0
			KERMIT-65>

The user is now ready to transfer files.
.ELS
.HL 1 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:
.LS
.LE;Session logging is not included in KERMIT-65 at this time.
.LE;KERMIT-65 does not have the commands that pass commands to a SERVER mode
KERMIT (BYE, etc.).
.LE;IBM-mode support has not been written.
.LE;There is no wild-carding of filenames as in KERMIT-80.
.LE;When transferring files, the file type must be made known to
KERMIT-65 by setting the FILE-TYPE paramenter to one of the following:
.LS
.LE;TEXT
.LE;APPLESOFT
.LE;INTEGER
.LE;BINARY
.ELS

.LE;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.

.LE;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.

.ELS


.HL 1 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.


.CH KERMIT-65 SYSTEM INSTALLATION GUIDE
.HL 1 THE FILES

	The following files should be supplied on the distribution tape:

.LS
.LE;APPLBT.BAS	- Initial bootstrap program to load APPHXL
.LE;APPLBT.FOR	- Program on mainframe to talk to APPLBT.BAS
.LE;APPHXL.M65	- Source of program to load KERMIT-65
.LE;KERMIT.M65	- Kernel of the KERMIT-65 program
.LE;APPDC2.HEX	- Assembled version of KERMIT-65 with the defaults:
.LS
.LE;Apple ][ computer
.LE;D.C. Hayes Micro-modem
.LE;Slot 2 as communication port
.ELS
.LE;APPAC2.HEX	- Assembled version of KERMIT-65 with the defaults:
.LS
.LE;Apple ][ computer
.LE;Apple communication card
.LE;Slot 2 as communication port
.ELS
.LE;APPLE.RNO	- KERMIT-65 user and system instructions
.LE;APPLE.MEM	- KERMIT-65 user and system instructions
.LE;CROSS.MAC	- CROSS Microprocessor Assembler (Source)
.LE;CROSS.EXE	- CROSS Microprocessor Assembler (Object)
.ELS
.HL 1 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:

.LS
.LE;FTASER - Apple communication card
.LE;FTHAYS - D.C. Hayes Micro-modem
.ELS

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:

.LS
.LE;&.R CROSS<cr>       ! Run CROSS Microprocessor Assembler
.LE;&*KERMIT.HEX/P/PTP=KERMIT.M65/M65	! Generate .HEX file
.ELS

	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.

.AX APPLBT.BAS - BOOTSTRAP PROGRAM FOR APPHXL
.RM 80
.LIT

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

.EL

.AX The parameter region of KERMIT.M65
.LIT

.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	=	<kerslo^>*16-$0c00	; Communication card slot index

.EL
