Tom Woods‘ file management program (PRO/FILE) with the machine code sort included (BREAKTHROUGH: Upgrade for Pro/file 2068 Issue #1) is a very acceptable program for information storage and retrieval. The upgrade gives the added advantage of a fairly fast machine code sort. Those of you who have not tried it should write to Tom at PO Box 64, Jefferson NH, 03583 USA and order a copy. But for those who already have the upgraded version, here are some notes on using it and, of course, tailoring it to suit individual needs. I modified the BASIC to work with the Larken DOS (ie, LKDOS). This version uses Peter Hacksel‘s printer interface code which George Chambers had imbedded into the profile machine code. George and I worked on some other changes which are included below.
1. We changed the SAVE routine to save DATA only. This required saving the value of p (the length of current data) in the array. Why save the whole program when only variable p had to be kept. So, the SAVE routine became:
107 IF x$="SAVE"THEN RANDOMIZE p:LET d$(LEN d$-1)=CHR$ PEEK VAL "23670":LET d$(LEN d$)=CHR$ PEEK VAL "23671":RANDOMIZE USR VAL "100":SAVE f$+".A$"DATA D$():GO TO PI/PI
This puts the value of p at the tail end of d$ and this is decoded on LOAD as follows:
5510 INK 7:CLS :RANDOMIZE USR 100:CAT ".A$",
5520 POKE VAL "23658",NOT PI: PRINT AT 16,1; PAPER 5; INK 0;"WHAT FILE NAME DO YOU WISH ";AT 17,1;"TO LOAD ";: INPUT F$: PRINT f$: RANDOMIZE USR 100: LOAD F$+".A$" DATA D$()
5530 LET p=(CODE d$(LEN d$-1)+CODE d$(LEN d$)*256): POKE VAL "23658",VAL "8": GO TO 1
Line 5510 displays the part of the disk catalog with .A$ extensions. Line 5520 LOADS the array and 5530 decodes the value of p from the last two bytes of d$.
2. You can size an array differently from the original (ie, 28020) and SAVE the array. This will be taken into account when you LOAD it, despite the DIM statement in LINE 9996. To change the array size for a SAVE, alter DIM d$(28020) to whatever you want: do a CLEAR and GO TO 9996. Select “C” and create a new file. Here is the new listing from 9990 to end.
9990 CLEAR VAL "34000":BORDER NOT PI:PAPER NOT PI:INK NOT PI:RANDOMIZE USR 102
9992 CLEAR VAL "63487": RANDOMIZE USR 100: LOAD "profil.C1"CODE : REM Includes LPRINT @ 65000
9993 POKE VAL "26704",VAL "254": POKE VAL "65535",NOT PI
9994 PRINT AT VAL "5",VAL "8"; PAPER PI/PI; INK VAL "7";"* PRO/FILE 2068 *";AT VAL "7",VAL "4"; PAPER NOT PI;"1984 By THOMAS B, WOODS";AT VAL "10",VAL "11"; INK VAL "6";"P.O. Box 64";AT VAL "11",VAL "6"; INK VAL "6";"Jefferson, N.H. 03583"
9996 DIM d$(28020): LET p=20: LET d$(1 TO 20)="*SEARCH IS COMPLETE*": LET a$="1/2/3/0": LET c$="": FOR x=1 TO 3: LET c$=c$+CHR$ x: NEXT x: LET c$=c$+CHR$ 0: LET s=0
9997 POKE VAL "23658",VAL "8": PRINT AT 19,2; INK 7;"Press""C"" to CREATE a new file or ""L"" to LOAD an existing one": INPUT y$: PRINT AT 19,0;D$(100 TO 164): IF y$="L" THEN GO TO 5510
9998 PRINT AT 19,4; INK 7;"ENTER A NAME FOR THIS FILE": INPUT F$: IF f$="" OR LEN f$>10 THEN GO TO 9998
9999 GO TO 1
3. The machine code sort is very good. It does have one annoyance and that is: unless you are printing a copy of the data, you have to sit with your finger on the ENTER key until the sort is done and this can take a few minutes. Here is the mod to let you go for a coffee while the machine does its thing.
5200 LET a=1:LET sfs=0:PRINT AT 14,0;PAPER 0;INK 7;"PRINT OUT? (Y/N)",,,,,,,,:INPUT Y$:LET Y=Y$="Y"
5221 IF NOT Y THEN INPUT "Superfast sort? 1=yes;0=no"'sfs
7202 IF Y=0 AND sfsTHEN CLS :GO TO 7000
7203 IF Y=0 AND NOT sfs THEN GO TO 1050
7221 IF INKEY$<>"" THEN GO TO 1
With these changes, PRO/FILE should meet the needs of the most exacting users. Saving just the array saves disk space; the AUTOSEARCH routine is easier to use; the appropriate part of the disk catalog is displayed for your LOAD selection.
R.H.Mitchell
Products
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.