(* *** BETA TEST VERSION *** September 30, 1987; Ron Rock FANTEST is to be used in conjunction with the FANFOLD code files, FFnnnCDE.CHN files. It will select the correct code file for the users hardware/software TPA combination to "Run" properly. Be sure to retain this program and the FANFOLD code files in case you change your system in a manner which effects your available TPA. Usage: If you do not have Turbo Pascal use the complied file FANTEST.CHN Have FANSTART.COM; FANTEST.CHN; FF11CDE.CHN; FF11SCDE.CHN & FF11MCDE.CHN on the same drive. enter: FANSTART (from FANFLD11.LBR) and reply to the Prompt with FANTEST FANTEST will find and display the highest unprotected address of TPA and select among FF11nCDE.CHN files to chain to the LARGEST useable file. Once Fanfold is running correctly with FANSTART and the correct code file, you may combine them by entering a "^C" (control C) at the "Source File Name >" prompt, followed by the CP/M command: SAVE 124 FANFOLD.COM saving the combined file as the single command file, FANFOLD.COM. *) PROGRAM FANTEST; { COMPILE TO A .CHN FILE WITH START:21A0 END: 3000 } VAR A :BYTE; B :BYTE; NUM:STRING[4]; X,Y,Z : INTEGER; FTYPE : FILE; GNAME,FNAME : STRING[16]; TPA,OK:BOOLEAN; CONST CHS :STRING[16]= '0123456789ABCDEF'; PROCEDURE TOHEX; BEGIN Y := (X DIV 16); Z := (X MOD 16); NUM:=NUM+CHS[Y+1]; NUM:=NUM + CHS[Z+1]; END; BEGIN TPA:=TRUE; B:=(MEM[7]); A:=(MEM[6]); NUM:=''; X:=B; TOHEX; X:=A; TOHEX; WRITE('As currently configured, your available TPA extends to '); WRITELN(NUM,'h'); {WRITELN(' bytes: ');} WRITE('You may install the '); BEGIN CASE B OF $C9..$FF: BEGIN GNAME:= 'FF11CDE.CHN'; WRITE(GNAME); END; $C2..$C9: BEGIN GNAME:= 'FF11SCDE.CHN'; WRITE(GNAME); END; $BA..$C2: BEGIN GNAME:= 'FF11MCDE.CHN'; WRITE(GNAME); END; $00..$BA: BEGIN WRITE(^M'NO currently available FFnnnCDE.CHN'); GNAME:=''; TPA:=FALSE; END; END; WRITELN(' file.'); IF TPA THEN BEGIN REPEAT WRITE('Enter name of FANFOLD file to CHAIN to ( = ',GNAME,' ) : '); READLN(FNAME); IF FNAME = '' THEN FNAME := GNAME; ASSIGN(FTYPE,FNAME); IF (POS('.',FNAME)=0) THEN FNAME:=FNAME+'.CHN'; ASSIGN(FTYPE,FNAME); {$I-} RESET(FTYPE) {I-}; OK:=(IORESULT=0); IF NOT OK THEN WRITELN(^G,FNAME,' Not Found: Re-enter or ^C to EXIT: '); UNTIL OK; CHAIN(FTYPE); END (* The following "ELSE" code will be invoked only if there is a TPA problem and is included for user convinience. If FANFOLD has been running but suddenly quits, you may have added a resident program which takes TPA or altered your operating system. You should re-run FANTEST to check your available TPA and proper FFnnCDE.CHN file to use. *) ELSE BEGIN WRITELN('Increase your TPA or write for Registered Users customization.'); WRITELN('If un-registered, send a donation of $15.00 to:'); WRITELN('Ron Rock, 316 N. Michigan Ave. #400, Chicago, IL 60601'); WRITELN('with the above TPA size included for registration and assistance.'); END; END; END. {FANTEST.PAS}