home *** CD-ROM | disk | FTP | other *** search
- 10 REM ***********************
- 20 REM * CERCA.FILE *
- 30 REM * BY VINCE O'CONNOR *
- 40 REM * COPYRIGHT (C) 1989 *
- 50 REM * BY APPLEDISK & *
- 60 REM * MICROSPARC, INC *
- 70 REM ***********************
- 80 TEXT : NORMAL : HOME : SPEED= 255:TG = 0: PRINT CHR$(21)
- 90 D$ = CHR$(4): DIM SD$(7):FL = 0:F = 0:EX = 0: PRINT : HOME
- 100 DS = PEEK(48700):DD = PEEK(48701)
- 110 GOSUB 850
- 120 IF N = 1 THEN 960
- 130 IF N = 2 THEN 150
- 140 IF N = 3 THEN 270
- 150 GOSUB 220
- 160 GOSUB 350
- 170 PRINT D$"CLOSE"
- 180 IF F = 0 THEN PRINT : PRINT "Il file non esiste"
- 190 IF LV <0 THEN PRINT : GOSUB 1150: HOME : GOTO 110
- 200 GOSUB 1140: HOME : GOTO 110
- 210 PRINT D$"PREFIX /": POKE 48700,DS: POKE 48701,DD: PRINT : PRINT D$"CLOSE": HOME : PRINT CHR$(4);"-BASIC.SYSTEM": END
- 220 ONERR GOTO 760
- 230 FL = 0: VTAB 13: HTAB 1: PRINT "Ricerca nel Volume: /";: PRINT PA$: HTAB 22: VTAB 13
- 240 IF PA$ = "" THEN H = 22:V = 13: GOSUB 600:PA$ = X$
- 250 IF FL < >1 THEN PRINT D$"VERIFY /";PA$: GOTO 320
- 260 HTAB 1: VTAB 13: PRINT " ": GOTO 110: REM 33 Spazi
- 270 VTAB 23: HTAB 1: PRINT "Vuoi veramente smettere (S/N)?" CHR$(7);: POKE -16368,0
- 280 WAIT -16384,128:CH = PEEK( -16384) -128: POKE -16368,0
- 290 IF CH = 83 OR CH = 115 THEN 210
- 300 IF CH = 78 OR CH = 110 THEN HOME : GOTO 110
- 310 GOTO 280
- 320 HTAB 1: VTAB 14: PRINT "File da trovare: ";:H = 18:V = 14: GOSUB 600:TF$ = X$: IF FL = 1 THEN FL = 0: VTAB 14: HTAB 1: CALL -868:PA$ = "": GOTO 220
- 330 PA$ = "/" +PA$
- 340 SD$(0) = PA$:TL = LEN(TF$): RETURN
- 350 PRINT D$"PREFIX /": PRINT D$"OPEN"PA$",TDIR": PRINT D$"READ"PA$
- 360 INPUT A$: INPUT A$: INPUT A$: GOSUB 370: RETURN
- 370 IF TG = 1 THEN HOME : GOTO 110
- 380 INPUT IB$: IF IB$ = "" THEN GOSUB 520
- 390 IF LV <0 THEN RETURN
- 400 NA$ = MID$ (IB$,2,15)
- 410 TS$ = MID$ (IB$,18,3)
- 420 IF TF$ = LEFT$(NA$,TL) THEN GOSUB 720
- 430 IF TS$ = "DIR" THEN GOSUB 450
- 440 GOTO 370
- 450 LV = LV +1:SB$ = "": IF LV >7 THEN LV = LV -1: RETURN
- 460 FOR I = 1 TO 15:A$ = MID$ (NA$,I,1)
- 470 IF A$ < >" " THEN SB$ = SB$ +A$
- 480 NEXT
- 490 IF LEN(SD$(LV -1) +SB$) >64 THEN PRINT D$"CLOSE": VTAB 22: HTAB 1: PRINT "PATHNAME TROPPO LUNGO": GOSUB 1140:TG = 1: RETURN
- 500 SD$(LV) = SD$(LV -1) +"/" +SB$: PRINT D$"OPEN"SD$(LV)",TDIR": PRINT D$"READ"SD$(LV)
- 510 INPUT A$: INPUT A$: INPUT A$: RETURN
- 520 PRINT D$"CLOSE"SD$(LV)
- 530 SD$(LV) = ""
- 540 LV = LV -1
- 550 IF LV <0 THEN RETURN
- 560 IF TG = 1 THEN RETURN
- 570 PRINT D$"READ"SD$(LV)
- 580 INPUT IB$
- 590 RETURN
- 600 I = 1:X$ = "": HTAB H: VTAB V: PRINT " ": HTAB H: VTAB V: POKE -16368,0: REM 14 spazi
- 610 GET A$: IF A$ = CHR$(27) AND I = 1 THEN FL = 1: PRINT : RETURN
- 620 IF I = 1 AND (A$ < CHR$(65)) THEN 600
- 630 IF I = 1 AND (A$ > CHR$(90) AND A$ < CHR$(97)) THEN 600
- 640 IF I = 1 AND (A$ > CHR$(122)) THEN 600
- 650 IF (A$ = CHR$(8) OR A$ = CHR$(127)) AND I = 2 THEN I = 1:X$ = "": PRINT CHR$(8)" " CHR$(8);: GOTO 610
- 660 IF (A$ = CHR$(8) OR A$ = CHR$(127)) AND I >2 THEN I = I -1:X$ = LEFT$(X$, LEN(X$) -1): PRINT CHR$(8)" " CHR$(8);: GOTO 610
- 670 IF A$ = CHR$(27) THEN VTAB V: HTAB H: CALL -868: VTAB V: HTAB H: GOTO 600
- 680 IF A$ = CHR$(13) AND I >1 THEN PRINT " ": RETURN : REM 15 spazi
- 690 IF A$ > CHR$(96) AND A$ < CHR$(123) THEN A$ = CHR$( ASC(A$) -32)
- 700 IF I <16 AND (A$ = "." OR (A$ > CHR$(47) AND A$ < CHR$(58)) OR (A$ > CHR$(64) AND A$ < CHR$(91))) THEN X$ = X$ +A$:I = I +1: PRINT A$;: GOTO 610
- 710 GOTO 610
- 720 IF F = 0 THEN PRINT :F = 1
- 730 IF LV >0 THEN PRINT "Trovato "SD$(LV)"/"NA$
- 740 IF LV = 0 THEN PRINT "Trovato "PA$"/"NA$
- 750 RETURN
- 760 IF PEEK(222) = 255 THEN RESUME
- 770 EN = PEEK(222):EL = PEEK(218) +256 * PEEK(219):CV = PEEK(37):CH = PEEK(36): CALL -3288
- 780 IF (EN = 6 OR EN = 7) THEN MG$ = "Il disco non } nei drive ": GOTO 820
- 790 IF EN = 8 THEN MG$ = "I/O Error --- Controlla sportello drive": GOTO 820
- 800 IF EN = 16 THEN MG$ = "NOME FILE ERRATO": GOTO 820
- 810 IF EL < >200 THEN MG$ = "Errore " + STR$(EN) +" alla linea " + STR$(EL) +" - Programma sospeso.":EX = 1
- 820 VTAB 22: HTAB 1: PRINT MG$: IF EX = 1 THEN PRINT D$"CLOSE": GOTO 210
- 830 GOSUB 1140
- 840 HOME : CALL 54915: GOTO 110
- 850 FOR T = 0 TO 7:SD$(T) = "": NEXT :TG = 0:LV = 0:F = 0:PA$ = ""
- 860 VTAB 1: HTAB 1: PRINT "CERCA.FILE": VTAB 2: HTAB 1: PRINT "UTILITY PER LA RICERCA <CTRL-K>DEI FILE": VTAB 3: HTAB 1: PRINT "di VINCE O'CONNOR": VTAB 4: HTAB 1: PRINT "(C) 1989 APPLEDISK"
- 870 TG = 0
- 880 VTAB 6: PRINT "(1) RICERCA FILE PER SLOT E DRIVE"
- 890 VTAB 7: PRINT "(2) RICERCA FILE PER NOME VOLUME"
- 900 VTAB 8: PRINT "(3) FINE"
- 910 VTAB 11: PRINT "SCEGLI ";: HTAB 8: VTAB 11: PRINT " ": HTAB 8: VTAB 11: POKE -16368,0: GET CN$: PRINT CN$
- 920 IF CN$ = "" THEN 910
- 930 IF ( ASC(CN$) <49 OR ASC(CN$) >51) THEN VTAB 11: PRINT " ": GOTO 910: REM 33 spazi
- 940 N = VAL(CN$)
- 950 RETURN
- 960 ONERR GOTO 1160
- 970 HTAB 1: VTAB 19: PRINT "N. SLOT "
- 980 HTAB 1: VTAB 20: PRINT "N. DRIVE "
- 990 HTAB 14: VTAB 20: PRINT " ": HTAB 13: VTAB 19: PRINT " ": HTAB 13: VTAB 19: POKE -16368,0: GET QQ$
- 1000 IF ASC(QQ$) = 51 THEN HTAB 13: VTAB 19: PRINT " ": GOTO 990
- 1010 IF ASC(QQ$) = 27 THEN 1170
- 1020 IF ASC(QQ$) <49 OR ASC(QQ$) >55 THEN HTAB 13: VTAB 19: PRINT " ": GOTO 990
- 1030 DS = VAL(QQ$): HTAB 13: VTAB 19: PRINT DS
- 1040 HTAB 14: VTAB 20: POKE -16368,0: GET QQ$
- 1050 IF ASC(QQ$) = 27 THEN 990
- 1060 IF ( ASC(QQ$) <49 OR ASC(QQ$) >50) THEN 1040
- 1070 DD = VAL(QQ$): HTAB 14: VTAB 20: PRINT DD
- 1080 VTAB 12
- 1090 PRINT D$"PREFIX,S"DS",D"DD: PRINT D$"PREFIX"
- 1100 INPUT SD$(0)
- 1110 PA$ = LEFT$(SD$(0), LEN(SD$(0)) -1):PA$ = RIGHT$(PA$, LEN(PA$) -1)
- 1120 HTAB 1: VTAB 19: PRINT " ": VTAB 20: HTAB 1: PRINT " ": REM 14 spazi per entrambi
- 1130 GOTO 150
- 1140 HTAB 1: VTAB 23
- 1150 PRINT "PREMI RETURN PER CONTINUARE": POKE -16368,0: WAIT -16384,128:CH = PEEK( -16384): POKE -16368,0: HTAB 1: VTAB 23: PRINT " ": RETURN : REM 28 spazi
- 1160 HTAB 1: VTAB 22: PRINT "NUMERO SLOT E DRIVE ERRATO": GOSUB 1140: HTAB 1: VTAB 22: PRINT " ": GOTO 970: REM 27 Spazi
- 1170 HTAB 1: VTAB 19: PRINT " ": VTAB 20: PRINT " ": GOTO 110: REM 13 ed 14 spazi
- 1180 VTAB 21: CALL -958: RETURN