8-Bit Software Online Conversion
Database - Listing
10REM"
20REM"
40REM" By C.J.Richardson.
50REM" For 8 bit software.
60REM" Can be altered easily to suit
70REM" your needs by changing the DAT
A.
80REM" Change the size of the databas
e
90REM" by altering Q%.
100REM" ------------------------------
----
110DEFFNS="DBase"
120MODE7
130Q%=10:REM" SIZE
140A%=Q%:DIM B$(A%),C$(A%),D$(A%),F$(A
%),G$(A%),H$(A%),I$(A%),J$(A%),K$(A%),P$
(A%),M$(A%),N$(10):FORL%=0TO10:READN$(L%
):NEXT
150P%=1:X%=0
160GOSUB310
170VDU23;10,32;0;0;0;
180*FX21
190L$=GET$:IFASCL$>96L$=CHR$(ASC(L$)-3
2)
200VDU23;10,114;0;0;0;
210IFL$="F"IFP%<A% P%=P%+1
220IFL$="B"IFP%>1 P%=P%-1
230IFL$="E"GOSUB530
240IFL$="L"GOTO710
250IFL$="S"GOSUB770
260IFL$="G"INPUTTAB(9,20)" Enter recor
d to display "P%:IFP%>A%P%=A% ELSE IF P%
<1P%=1
270IFL$="A":E$="A":F%=0:GOSUB670:IF F%
<>0:CLS:PRINT" Adding record: ";STR$ P
%;" "':GOSUB550 ELSE IFL$="A"PRINTTAB(
12,22);" No free records.":GOTO170
280IFL$="P"X%=X%EOR2
290IFL$="U"PRINTTAB(0,22)" This destro
ys present data. Sure? Y/N":IFGET$="Y"CH
AIN"DBsort"
300GOTO160
310CLS
320PRINTTAB(7)" Database for 8BS by
CJR. "
330RESTORE:PRINTCHR$X%'N$(0);B$(P%)
340PRINTN$(1);C$(P%)
350PRINTN$(2);D$(P%)
360PRINTN$(3);F$(P%)
370PRINTN$(4);G$(P%)
380PRINTN$(5);H$(P%)
390PRINTN$(6);I$(P%)
400PRINTN$(7);J$(P%)
410PRINTN$(8);K$(P%)
420PRINTN$(9);P$(P%)
430PRINTN$(10);M$(P%):VDU3
440PRINTTAB(9,18)" Record: ";STR$P%;
" of ";STR$A%;TAB(24);" "
450PRINTTAB(9)" (F)orward (B)ackward
. "
460PRINTTAB(9)" (G)oto record.
"
470PRINTTAB(9)" (E)dit this record.
"
480PRINTTAB(9)" (A)dd (U)tils.
"
490PRINTTAB(9)" (L)oad/(S)ave data.
"
500PRINTTAB(9)" (P)rinter off.
";
510IFX%=2PRINTTAB(8,24);" (P)rinter
on. ";
520RETURN
530PRINTTAB(12,18);SPC255;TAB(0,18);"
Enter item code to edit "'
540E$=GET$:IFE$="A"E$="a"
550IFINSTR("1A",E$)PRINTN$(0);:INPUTLI
NE""B$(P%)
560IFINSTR("2A",E$)PRINTN$(1);:INPUTLI
NE""C$(P%)
570IFINSTR("3A",E$)PRINTN$(2);:INPUTLI
NE""D$(P%)
580IFINSTR("4A",E$)PRINTN$(3);:INPUTLI
NE""F$(P%)
590IFINSTR("5A",E$)PRINTN$(4);:INPUTLI
NE""G$(P%)
600IFINSTR("6A",E$)PRINTN$(5);:INPUTLI
NE""H$(P%)
610IFINSTR("7A",E$)PRINTN$(6);:INPUTLI
NE""I$(P%)
620IFINSTR("8A",E$)PRINTN$(7);:INPUTLI
NE""J$(P%)
630IFINSTR("9A",E$)PRINTN$(8);:INPUTLI
NE""K$(P%)
640IFINSTR("Aa",E$)PRINTN$(9);:INPUTLI
NE""P$(P%)
650IFINSTR("ABb",E$)PRINTN$(10);:INPUT
LINE""M$(P%)
660RETURN
670FORL%=A%TO1STEP-1
680IFB$(L%)=""F%=L%:P%=F%
690NEXT
700RETURN
710CLS:*.
720INPUT" LOAD WHICH FILE? RETURN=dbda
t "L$:IFL$=""L$="dbdat"
730F%=OPENIN L$:INPUT#F%,A%:IFQ%>A%PRI
NT" Increase records from ";STR$A%;" to
";STR$Q%;" Y/N?":IFINSTR("Yy",GET$)B%=Q%
ELSEB%=A%
740CLEAR:DIM B$(B%),C$(B%),D$(B%),F$(B
%),G$(B%),H$(B%),I$(B%),J$(B%),K$(B%),P$
(B%),M$(B%),N$(10)
750FORL%=0TO10:INPUT#F%,N$(L%):NEXT:FO
RL%=1TOA%:INPUT#F%,B$(L%),C$(L%),D$(L%),
F$(L%),G$(L%),H$(L%),I$(L%),J$(L%),K$(L%
),P$(L%),M$(L%):NEXT:CLOSE#F%
760A%=B%:GOTO150
770CLS:*.
780INPUT" SAVE WHICH FILE? RETURN=dbda
t "L$:IFL$=""L$="dbdat"
790F%=OPENOUT L$:PRINT#F%,A%:FORL%=0TO
10:PRINT#F%,N$(L%):NEXT:FORL%=1TOA%:PRIN
T#F%,B$(L%),C$(L%),D$(L%),F$(L%),G$(L%),
H$(L%),I$(L%),J$(L%),K$(L%),P$(L%),M$(L%
):NEXT:CLOSE#F%
800RETURN
810DATA" 1. Date: "
820DATA" 2. Location: "
830DATA" 3. Decca Position: "
840DATA" 4. Depth: "
850DATA" 5. Weather conditions: "
860DATA" 6. Sea State: "
870DATA" 7. Visibility: "
880DATA" 8. Bottom Time: "
890DATA" 9. Decompression: "
900DATA" A. Partner: "
910DATA" B. Notes: "