520 INPUT CF$(S):TC = TC -( LEFT$(CF$(S),1) = "^"): NEXT
530 PRINT D$"CLOSE
540 VTAB 9: IF NOT NC THEN PRINT "NO CARDFILES ON THIS DISK": GOTO 580
550 PRINT "CARDFILES:";
560 FOR S = 1 TO NC: HTAB 12: IF LEFT$(CF$(S),1) < >"^" THEN PRINT CF$(S)
570 NEXT
580 PRINT : RETURN
590 REM ** CARD DISPLAY **
600 TEXT : HOME : CALL CA: RETURN
610 REM ** LC TO UC CONVERSION **
620 IF NOT LEN(SS$) THEN RETURN
630 ST$ = "": FOR II = 1 TO LEN(SS$):S9 = ASC( MID$ (SS$,II,1))
640 IF S9 >96 AND S9 <123 THEN S9 = S9 -32
650 ST$ = ST$ + CHR$(S9): NEXT : RETURN
660 REM ** CHECK FOR ALPHANUMERIC STRING **
670 EF = 0: FOR II = 1 TO LEN(SS$):S9 = ASC( MID$ (SS$,II,1)): IF S9 < >46 AND (S9 <48 OR (S9 >57 AND S9 <65) OR (S9 >90 AND S9 <97) OR S9 >122) THEN EF = 1:II = LEN(SS$)
1310 ST = 20481 +494 *(S -1): FOR A = 1 TO 13:OS = ST +(A -1) *38:OE = OS +37:NS = MEM(A): GOSUB 90: NEXT
1320 VTAB 19: PRINT "IS THIS THE CARD YOU WANT (Y/N)?";: GET A$: PRINT A$: IF A$ < >"Y" AND A$ < >"N" AND A$ < > CHR$(121) AND A$ < > CHR$(110) THEN 1320
1330 IF A$ = "N" OR A$ = CHR$(110) THEN GOSUB 4410: GOTO 1220
1340 FL = 2: GOSUB 810
1350 POKE 34,17: HOME : VTAB 19
1360 PRINT "(1) RE-FILE THIS CARD": PRINT
1370 PRINT "(2) RETURN TO MENU
1380 PRINT : PRINT "SELECT ( ) OR <ESC>";
1390 HTAB 9: GET A$: IF (A$ <"1" OR A$ >"2") AND A$ < >ES$ THEN 1390
1400 PRINT A$: IF A$ = "2" OR A$ = ES$ THEN 1440
1410 HOME : VTAB 20: PRINT "INSERTING
1420 FOR A = 1 TO 13:OS = MEM(A):OE = OS +37:NS = ST +(A -1) *38: GOSUB 90: NEXT
1520 GET S$: PRINT S$;:S = VAL(S$): IF S$ = ES$ THEN S = 4
1530 IF S <1 OR S >4 THEN PRINT CHR$(7): GOTO 1510
1540 ON S GOTO 1550,1770,1950,4180
1550 REM VIEW ENTIRE FILE
1560 GOSUB 590
1570 FL = 0:DV$ = ""
1580 HTAB 13: PRINT "CARDFILE: "CF$
1590 FOR SS = 1 TO ND:ND$ = ND$(SS)
1600 POKE 34,17: HOME
1610 PRINT D$"BLOADECF."CF$"."SS",A$5000"
1620 A = PEEK(20480): IF NOT (A) THEN VTAB 20: PRINT "(THERE ARE NO CARDS IN "ND$" SECTION)": FOR A = 1 TO 2500: NEXT : NEXT : GOTO 2100
1630 FOR X = 1 TO A: POKE 34,0: CALL CA: INVERSE : VTAB 1: HTAB 2: PRINT ND$: HTAB 2: PRINT X" OF "A: NORMAL
1640 ST = 20481 +494 *(X -1): FOR Y = 1 TO 13:OS = ST +(Y -1) *38:OE = OS +37:NS = MEM(Y): GOSUB 90: NEXT
1650 VTAB 19: PRINT "(1) GO ON TO THE NEXT CARD
1660 PRINT "(2) GO ON TO THE NEXT SECTION
1670 PRINT "(3) PRINT HARDCOPY OF THIS CARD
1680 PRINT "(4) RETURN TO THE MENU
1690 PRINT : PRINT "SELECT ( ) OR <ESC>";
1700 POKE -16368,0: HTAB 9: GET S$:S = VAL(S$) +4 *(S$ = ES$): IF S <1 OR S >4 THEN CALL BL: GOTO 1700
1710 PRINT S;: VTAB 18: PRINT : ON S GOTO 1750,1720,1730,1740
1720 X = A: GOTO 1750
1730 GOSUB 200: GOTO 1750
1740 X = A:SS = ND: NEXT : GOTO 1760
1750 NEXT : CALL CA:FL = FL +A: IF FL = C THEN POKE 34,17: HOME : VTAB 20: PRINT "THERE ARE NO MORE CARDS IN THE FILE...": FOR A = 1 TO 3000: NEXT :SS = ND
1760 NEXT : GOTO 2100
1770 REM VIEW SECTION
1780 GOSUB 340
1790 IF NOT LEN(DV$) THEN 2100
1800 GOSUB 590
1810 HTAB 13: PRINT "CARDFILE: "CF$
1820 A = PEEK(20480): IF NOT (A) THEN VTAB 20: PRINT "(THERE ARE NO CARDS IN "DV$" SECTION)": FOR A = 1 TO 2500: NEXT :DV$ = "": GOTO 2100
1830 FOR X = 1 TO A: TEXT : CALL CA: INVERSE : VTAB 1: HTAB 2: PRINT DV$: HTAB 2: PRINT X" OF "A: NORMAL
1840 ST = 20481 +494 *(X -1): FOR Y = 1 TO 13:OS = ST +(Y -1) *38:OE = OS +37:NS = MEM(Y): GOSUB 90: NEXT
1850 POKE 34,17: VTAB 19: PRINT "(1) GO ON TO THE NEXT CARD
1860 PRINT "(2) PRINT HARDCOPY OF THIS CARD
1870 PRINT "(3) RETURN TO THE MENU
1880 PRINT : PRINT "SELECT ( ) OR <ESC>";
1890 HTAB 9: GET S$:S = VAL(S$) +3 *(S$ = ES$): IF S <1 OR S >3 THEN CALL BL: GOTO 1890
1900 PRINT S
1910 ON S GOTO 1940,1920,1930
1920 ND$ = DV$: GOSUB 200: GOTO 1940
1930 X = A
1940 NEXT : GOTO 2100
1950 REM VIEW CARD
1960 GOSUB 340
1970 IF NOT LEN(DV$) THEN 2100
1980 PRINT
1990 X = PEEK(20480): VTAB 20: CALL -868: IF NOT X THEN VTAB 20: PRINT "THERE ARE NO CARDS IN THAT SECTION.":DV$ = "": PRINT : GOSUB 390: GOTO 1970
2000 PRINT "WHICH CARD (1-"X;: INPUT ")? ";S$:S = VAL(S$): IF S <1 OR S >X THEN CALL BL: GOTO 1980
2010 GOSUB 590: HTAB 13: PRINT "CARDFILE: "CF$
2020 INVERSE : VTAB 1: HTAB 2: PRINT DV$: HTAB 2: PRINT S" OF "X: NORMAL
2030 ST = 20481 +494 *(S -1): FOR Y = 1 TO 13:OS = ST +(Y -1) *38:OE = OS +37:NS = MEM(Y): GOSUB 90: NEXT
2040 POKE 34,17: VTAB 19
2050 PRINT "(1) PRINT HARDCOPY OF THIS CARD": PRINT
2060 PRINT "(2) RETURN TO MENU
2070 PRINT : PRINT "SELECT ( ) OR <ESC>";
2080 HTAB 9: GET S$: IF (S$ <"1" OR S$ >"2") AND S$ < >ES$ THEN CALL BL: GOTO 2080
2090 IF S$ = "1" THEN ND$ = DV$:X = S: GOSUB 200
2100 GOSUB 4400: GOTO 1450
2110 REM ** REMOVE CARD **
2120 PRINT : HTAB 10: PRINT "REMOVE AN INDEX CARD
2130 VTAB 10: HTAB 5: PRINT "NOTE THAT ONCE A CARD HAS BEEN
2140 HTAB 5: PRINT "REMOVED IT CANNOT BE RESTORED...
2150 VTAB 14: PRINT "(1) REMOVE AN INDEX CARD": PRINT
2160 PRINT "(2) RETURN TO MAIN MENU": PRINT : PRINT
2170 PRINT "SELECT ( ) OR <ESC>";
2180 HTAB 9: GET S$: IF (S$ <"1" OR S$ >"2") AND S$ < >ES$ THEN CALL BL: GOTO 2180
2190 PRINT S$: IF S$ = "2" OR S$ = ES$ THEN 4180
2200 GOSUB 340
2210 IF NOT LEN(DV$) THEN 2440
2220 PRINT
2230 A = PEEK(20480): VTAB 20: CALL -868: IF NOT (A) THEN VTAB 20: PRINT "THERE ARE NO CARDS IN THAT SECTION.":DV$ = "": PRINT : GOSUB 390: GOTO 2210
2240 PRINT "WHICH CARD (1-"A;: INPUT ")? ";S$:X = VAL(S$): IF X <1 OR X >(A) THEN 2220
2250 GOSUB 590: HTAB 13: PRINT "CARDFILE: "CF$
2260 INVERSE : VTAB 1: HTAB 2: PRINT DV$: HTAB 2: PRINT X" OF "A: NORMAL
2270 ST = 20481 +494 *(X -1): FOR Y = 1 TO 13:OS = ST +(Y -1) *38:OE = OS +37:NS = MEM(Y): GOSUB 90: NEXT
2280 VTAB 19: PRINT "(1) DELETE THIS CARD FROM THE FILE": PRINT
2290 PRINT "(2) RETURN TO THE MENU
2300 PRINT : PRINT "SELECT ( ) OR <ESC>";
2310 HTAB 9: GET S$: IF (S$ <"1" OR S$ >"2") AND S$ < >ES$ THEN CALL BL: GOTO 2310
2320 PRINT S$: IF S$ = "2" OR S$ = ES$ THEN 2440
2330 POKE 34,17: HOME
2340 IF A = X THEN 2360
2350 OS = 20481 +494 *(A -1):OE = OS +493:NS = ST: GOSUB 90
4800 IF (S$ <"0" OR S$ >"9") OR ( NOT LEN(CF$) AND S AND S <5) OR ( NOT C AND (S >1 AND S <5)) THEN CALL BL: GOTO 4770
4810 HOME
4820 ON S +1 GOTO 4160,690,1450,2110,2450,2990,3290,3460,3710,3850
4830 REM ** ERROR TRAP **
4840 CALL -3288: TEXT : HOME : NORMAL
4850 CALL BL: PRINT
4860 PRINT D$"CLOSE": IF PEEK(222) = 6 AND VF = 1 THEN PRINT "NO INDEX FILE ON THIS DISK. INSERT": PRINT "CORRECT DATA DISK OR QUIT AND RUN": PRINT "'CREATE.INDEX' TO SET UP INDEX FILE.":VF = 0: GOTO 4890
4870 IF PEEK(222) = 255 GOTO 4380
4880 PRINT "ERROR #" PEEK(222)" HAS OCCURRED IN LINE " PEEK(218) + PEEK(219) *256
4890 PRINT : PRINT "PRESS ANY KEY TO RETURN TO MAIN MENU";: GET Z$: PRINT : GOTO 4370
4900 REM ** MOVE CARDFILES DOWN
4910 ON TS = NC GOTO 4930: FOR S = TS +1 TO NC: PRINT D$"READ"FI$",R"S: INPUT S$,ND: FOR I = 1 TO ND: INPUT DV$(I): NEXT
4920 PRINT D$"WRITE"FI$",R"S -1: PRINT S$: PRINT ND: FOR I = 1 TO ND: PRINT DV$(I): NEXT : PRINT 0: NEXT S