Compucolor.org – Virtual Media

Listing of file='MASDIR.BAS;01' on disk='vmedia/ncc_4_11-sector.ccvf'

5 CLEAR 512
10 PLOT 27,11,6,6,12
20 PRINT "MASDIR.BAS       VER 1.0":PRINT
30 PRINT "MASTER PROGRAM AND DATA FILE DIRECTORY":PRINT
40 PRINT "  DEVELOPED FOR FRED PEZOK"
50 PRINT "  1321 SAIPAN RD":PRINT "  CORONADO CA  92118"
60 PRINT "  20 JUN 79"
70 FOR T= 1TO 2000:NEXT T
80 RN= 0
100 PLOT 12
110 INPUT "CREATE NEW FILE?  Y/N  ";Y$
120 IF Y$= "N"THEN 290
130 IF Y$< > "Y"THEN 100
140 PRINT :PRINT "INSERT NEW DISKETTE - HIT RETURN TO CONTINUE";
150 INPUT Y$:PRINT "+++   STANDBY   +++"
160 PLOT 27,4:PRINT "INI CD0: MASTERFILE":PLOT 27,11
170 SAVE "MASDIR.BAS"
180 FILE "N","PRODIR.RND",152,256,2
190 FILE "R",1,"PRODIR.RND",42
200 FOR RC= 1TO 152
205 A$= "0"
210 PUT 1,RC,1;A$[1]
220 NEXT RC
230 PRINT "PROGRAM SAVED - FILE CREATED"
240 FOR T= 1TO 1500:NEXT T
250 GOTO 300
290 FILE "R",1,"PRODIR.RND",42
300 PLOT 12
310 PRINT "ENTER   FOR COMMAND"
320 PRINT "  1     ADD NEW LISTING"
330 PRINT "  2     CHANGE EXISTING LISTING"
340 PRINT "  3     DELETE EXISTING LISTING"
350 PRINT "  4     VIEW LISTINGS"
355 PRINT "  5     STOP"
360 PRINT
370 INPUT "YOUR SELECTION?  ";C
380 IF C< 1OR C> 5THEN 300
390 ON CGOTO 1000,2000,2000,5000,9000
400 GOTO 300
1000 PLOT 12:PRINT SPC( 15)"+++   NEW ADDITIONS   +++":PRINT
1005 IF RN> 184THEN 1900
1010 PRINT "8-13 DIRECTORY FILE NAME";TAB( 39)" ";:INPUT F$
1020 L= LEN (F$):IF L< 8OR L> 13THEN 1000
1030 PRINT "0-1  ATTRIBUTE CODE";TAB( 39)" ";:INPUT AT$
1040 IF LEN (AT$)> 1THEN 1030
1045 IF AT$= "0"THEN AT$= "?"
1050 PRINT "0-4  STARTING BLOCK";TAB( 39)" ";:INPUT SB$
1060 IF LEN (SB$)> 4THEN 1050
1070 PRINT "0-4  SIZE";TAB( 39)" ";:INPUT SZ$
1080 IF LEN (SZ$)> 4THEN 1070
1090 PRINT "0-2  LOGICAL BLOCK COUNT";TAB( 39)" ";:INPUT LB$
1100 IF LEN (LB$)> 2THEN 1090
1110 PRINT "0-4  LOAD ADDRESS";TAB( 39)" ";:INPUT LA$
1120 IF LEN (LA$)> 4THEN 1110
1130 PRINT "0-4  SAVE ADDRESS";TAB( 39)" ";:INPUT SA$
1140 IF LEN (SA$)> 4THEN 1130
1142 PRINT "0-4  DISKETTE NUMBER";TAB( 39)" ";:INPUT DN
1144 IF DN< > ABS (DN)THEN 1142
1150 PRINT "0-28 SHORT TITLE/DESCRIPTION"
1160 PRINT TAB( 15)" ";:INPUT ST$
1170 IF LEN (ST$)> 28THEN 1150
1180 PRINT "     ENTER UP TO THREE FULL LINES FOR DESCRIPTION"
1185 PRINT "     DO NOT ENTER COMMAS, COLONS, OR PERIODS"
1190 FOR J= 1TO 3
1200 PRINT :ON JGOTO 1210,1230,1250
1210 INPUT L1$:IF LEN (L1$)> 64THEN 1270
1220 GOTO 1300
1230 INPUT L2$:IF LEN (L2$)> 64THEN 1270
1240 GOTO 1300
1250 INPUT L3$:IF LEN (L3$)> 64THEN 1270
1260 GOTO 1300
1270 PRINT "+++   ILLEGAL LINE ENTRY - TOO MANY LETTERS   +++"
1280 GOTO 1200
1300 NEXT J
1310 PRINT
1320 INPUT "VALID DATA?  Y/N   ";Y$
1330 IF Y$= "Y"THEN 1400
1340 IF Y$< > "N"THEN 1320
1350 INPUT "REPEAT?      Y/N   ";Y$
1360 IF Y$= "Y"THEN 1000
1370 IF Y$= "N"THEN 300
1380 GOTO 1350
1400 PRINT :PRINT "+++   STANDBY   +++"
1410 RN= RN+ 1:IF RN> 152THEN 1900
1420 GET 1,RN,1;A$[1]
1430 IF LEN (A$)< 1THEN 1600
1440 IF A$< > "0"THEN 1410
1600 PUT 1,RN,1;AT$[1],F$[13],SB$[4],SZ$[4],LB$[2],LA$[4],SA$[4]
1605 PUT 1,RN,33;DN,ST$[28],L1$[64],L2$[64],L3$[64]
1610 PRINT "+++   ON FILE   +++"
1620 FOR T= 1TO 1500:NEXT T
1630 GOTO 300
1900 PRINT "+++   FILE FULL - CAN NOT ADD   +++"
1910 GOTO 1620
2000 PLOT 12:PRINT SPC( 15)"+++   CHANGES/DELETIONS   +++":PRINT
2010 PRINT "8-13  DIRECTORY FILE NAME";TAB( 39)" ";:INPUT F$
2020 L= LEN (F$):IF L< 8OR L> 13THEN 2010
2030 PRINT :PRINT "+++   STANDBY   +++"
2040 RS= 0
2050 RS= RS+ 1:IF RS> 152THEN 4100
2060 GET 1,RS,1;A$[1],B$[13]
2070 IF A$= "0"THEN 2050
2080 IF F$< > MID$ (B$,1,L)THEN 2050
2100 GET 1,RS,15;SB$[4],SZ$[4],LB$[2],LA$[4],SA$[4],DN,ST$[28]
2110 GET 1,RS,65;L1$[64],L2$[64],L3$[64]
2200 PLOT 12
2210 PRINT SPC( 15)B$
2220 PRINT
2230 PRINT "ATTRIBUTE CODE";TAB( 40)A$
2240 PRINT "STARTING BLOCK";TAB( 40)SB$
2250 PRINT "SIZE";TAB( 40)SZ$
2260 PRINT "LOGICAL BLOCK COUNT";TAB( 40)LB$
2270 PRINT "LOADING ADDRESS";TAB( 40)LA$
2280 PRINT "SAVE ADDRESS";TAB( 40)SA$
2290 PRINT "DISKETTE NUMBER";TAB( 39)DN
2300 PRINT
2310 PRINT "SHORT TITLE";TAB( 30)ST$
2320 PRINT
2330 PRINT "BRIEF DESCRIPTION -":PRINT
2340 PRINT L1$:PRINT L2$:PRINT L3$:PRINT
2350 ON C- 1GOTO 2500,4000,5100
2500 INPUT "CHANGE?                      Y/N  ";Y$
2510 IF Y$= "N"THEN 300
2520 IF Y$< > "Y"THEN 2500
2530 INPUT "CHANGE ATTRIBUTE CODE?       Y/N  ";Y$
2540 IF Y$= "N"THEN 2610
2550 IF Y$< > "Y"THEN 2530
2560 PRINT "0-1  ATTRIBUTE CODE";TAB( 39)" ";:INPUT ND$
2570 IF LEN (ND$)> 1THEN 2560
2580 INPUT "VALID?                       Y/N  ";Y$
2590 IF Y$< > "Y"THEN 2580
2600 PUT 1,RS,1;ND$[1]
2605 A$= ND$
2610 INPUT "CHANGE FILE NAME?            Y/N  ";Y$
2620 IF Y$= "N"THEN 2700
2630 IF Y$< > "Y"THEN 2610
2640 PRINT "8-13 DIRECTORY FILE NAME";TAB( 39)" ";:INPUT ND$
2650 IF LEN (ND$)< 8OR LEN (ND$)> 13THEN 2640
2660 INPUT "VALID?                       Y/N  ";Y$
2670 IF Y$= "N"THEN 2610
2680 IF Y$< > "Y"THEN 2660
2690 PUT 1,RS,2;ND$[13]
2695 B$= ND$
2700 INPUT "CHANGE DISK DIRECTORY DATA?  Y/N  ";Y$
2710 IF Y$= "N"THEN 3000
2720 IF Y$< > "Y"THEN 2700
2725 PRINT "+++   MUST MAKE ALL ENTRIES   +++"
2730 PRINT "0-4  STARTING BLOCK";TAB( 39)" ";:INPUT D1$
2740 IF LEN (D1$)> 4THEN 2730
2750 PRINT "0-4  SIZE";TAB( 39)" ";:INPUT D2$
2760 IF LEN (D2$)> 4THEN 2750
2770 PRINT "0-2  LOGICAL BLOCK COUNT";TAB( 39)" ";:INPUT D3$
2780 IF LEN (D3$)> 2THEN 2770
2790 PRINT "0-4  LOAD ADDRESS";TAB( 39)" ";:INPUT D4$
2800 IF LEN (D4$)> 4THEN 2790
2810 PRINT "0-4  SAVE ADDRESS";TAB( 39)" ";:INPUT D5$
2820 IF LEN (D5$)> 4THEN 2810
2830 INPUT "ALL ENTRIES VALID?           Y/N  ";Y$
2840 IF Y$= "N"THEN 2700
2850 IF Y$< > "Y"THEN 2830
2860 PUT 1,RS,15;D1$[4],D2$[4],D3$[2],D4$[4],D5$[4]
2870 SB$= D1$:SZ$= D2$:LB$= D3$:LA$= D4$:SA$= D5$
3000 INPUT "CHANGE DISKETTE NUMBER?      Y/N  ";Y$
3010 IF Y$= "N"THEN 3100
3020 IF Y$< > "Y"THEN 3000
3030 PRINT "0-4  DISKETTE NUMBER";TAB( 39)" ";:INPUT T
3040 INPUT "VALID?                       Y/N  ";Y$
3050 IF Y$= "N"THEN 3000
3060 IF Y$< > "Y"THEN 3040
3070 PUT 1,RS,33;T
3080 DN= T
3100 INPUT "CHANGE COMMENTS?  (3 LINES)  Y/N  ";Y$
3110 IF Y$= "N"THEN 2200
3120 IF Y$< > "Y"THEN 3100
3130 PRINT "ALL THREE LINES WILL BE CHANGED":PRINT
3140 FOR J= 1TO 3
3150 PRINT
3160 ON JGOTO 3170,3190,3210
3170 INPUT D1$:IF LEN (D1$)> 64THEN 3230
3180 GOTO 3260
3190 INPUT D2$:IF LEN (D2$)> 64THEN 3230
3200 GOTO 3260
3210 INPUT D3$:IF LEN (D3$)> 64THEN 3230
3220 GOTO 3260
3230 PRINT "+++   ILLEGAL ENTRY - USE MAX OF 64 CHARACTERS   +++"
3240 GOTO 3160
3260 NEXT J
3270 INPUT "VALID?                       Y/N  ";Y$
3280 IF Y$= "N"THEN 3100
3290 IF Y$< > "Y"THEN 3270
3300 PUT 1,RS,65;D1$[64],D2$[64],D3$[64]
3310 L1$= D1$:L2$= D2$:L3$= D3$
3320 GOTO 2200
4000 INPUT "DELETE?        Y/N  ";Y$
4010 IF Y$= "N"THEN 300
4020 IF Y$< > "Y"THEN 4000
4030 INPUT "ARE YOU SURE?  Y/N  ";Y$
4040 IF Y$= "N"THEN 4000
4050 IF Y$< > "Y"THEN 4030
4060 PRINT :PRINT "+++   STANDBY   +++"
4070 A$= "0":B$= " "
4080 PUT 1,RS,1;A$[1],B$[31],0,B$[220]
4090 PRINT "DELETED":GOTO 4110
4100 PRINT :PRINT "+++   NOT ON FILE   +++"
4110 FOR T= 1TO 1500:NEXT T
4120 GOTO 300
5000 PLOT 12:PRINT SPC( 15)"+++   VIEW DIRECTORY   +++":PRINT
5005 RS= 0
5010 INPUT "SEQUENTIAL (S) OR BY NAME (N)?  ";Y$
5020 IF Y$= "S"THEN CC= 2:GOTO 5140
5030 IF Y$= "N"THEN CC= 1:GOTO 2010
5040 GOTO 5010
5100 PRINT :PRINT
5110 INPUT "CONTINUE?  Y/N  ";Y$
5120 IF Y$= "N"THEN 300
5130 IF Y$< > "Y"THEN 5110
5140 PLOT 12
5150 ON CCGOTO 2010,5200
5200 RS= RS+ 1
5210 IF RS> 152THEN 5900
5220 GET 1,RS,1;A$[1],B$[13],SB$[4],SZ$[4],LB$[2],LA$[4],SA$[4]
5230 GET 1,RS,33;DN,ST$[28],L1$[64],L2$[64],L3$[64]
5240 IF B$= ""OR B$= "             "THEN 5200
5250 IF A$= "0"THEN 5200
5260 GOTO 2200
5900 PLOT 3,20,10
5910 PRINT "+++   END OF FILE   +++"
5920 FOR T= 1TO 1500:NEXT T
5930 GOTO 300
9000 PLOT 12
9010 PLOT 3,15,16:PRINT "+++   END OF PROGRAM   +++"
9030 FILE "C",1
9040 FOR T= 1TO 2000:NEXT T
9050 PLOT 27,11,12
9060 END