Compucolor.org – Virtual Media

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

1 REM  MAILING LIST MENU PROGRAM
2 REM  MARCH 9,1981  COMPUWORLD,INC.
3 REM  MASTER CONTROL PROGRAM
5 PLOT 15:POKE 33289,132
10 GOTO 63000
20 REM
50 DIM A$(20),A1$(20)
55 DIM BA$(7)
60 DATA "110","150","300","1200","2400","4800","9600"
65 FOR I= 1TO 7:READ BA$(I):NEXT I
70 GOSUB 2300
100 GOSUB 1000:GOSUB 1300
220 GOSUB 1400
300 GOSUB 1600
305 GOSUB 1700
400 IF LEN (A$(O))= 0THEN 500
450 LOAD A$(O):RUN
500 IF O= 3THEN 510
505 GOSUB 1800:GOTO 300
510 GOSUB 2000:GOTO 300
999 END
1000 REM  CRT DEFAULTS
1005 KB= 33278:KF= 33247
1010 CL$= CHR$ (26):REM  CURSOR LEFT
1015 EL$= CHR$ (11):REM  ERASE LINE
1020 ES$= CHR$ (12):REM  ERASE PAGE
1025 EB$= CHR$ (31)+ CHR$ (7):REM  BLINK+BEEP
1030 DB$= CHR$ (15):REM  DISABLE BLINK
1035 EE$= "":FOR I= 1TO 31:EE$= EE$+ EL$+ CHR$ (10):NEXT I
1040 I1= 40:DH$= "":SP$= "":DX$= "":FOR I= 1TO I1
1045 DH$= DH$+ "_":SP$= SP$+ " ":DX$= DX$+ CL$:NEXT I
1050 RETURN
1052 REM  SECOND ENTRY POINT   CH=CHARACTER
1055 POKE KF,31:POKE KB,0
1060 CH= PEEK (KB):IF CH= 0THEN 1060
1063 IF CH= 26OR CH= 13THEN RETURN
1070 IF CH< 32THEN 1055
1075 IF CH< 97THEN RETURN
1078 IF LC= 0THEN 1055
1080 CH= CH- 32:GOTO 1065
1095 RETURN
1100 REM  CURSOR CONTROL
1105 PLOT 3,X,Y:RETURN
1200 REM  GET DATA LINE  RETURN D$,D  DD=LENGTH OF INPUT LINE
1205 D$= "":PRINT LEFT$ (DH$,DL);LEFT$ (DX$,DL);
1210 GOSUB 1052:D1$= CHR$ (CH):DD= LEN (D$)
1215 IF CH< > 13THEN 1230
1217 IF DT= 2OR DT= 5THEN D= VAL (D$):GOTO 1225
1220 D= 0:IF DT= 1OR DT= 6THEN RETURN
1222 IF DT> 1AND DT< 6THEN D= VAL (D$):RETURN
1223 RETURN
1225 IF D> 32500OR D< - 32500THEN DD= 0:RETURN
1226 GOTO 1222
1230 IF CH< > 26THEN 1265
1235 IF DD= 0THEN GOTO 1210
1240 PRINT CL$+ "_"+ CL$;
1245 IF DD= 1THEN D$= ""
1246 IF DD< > 1THEN D$= LEFT$ (D$,DD- 1)
1247 GOTO 1210
1265 IF DT< > 1THEN 1280
1270 D$= D$+ D1$:PRINT D1$;:DD= LEN (D$):IF DD= DLTHEN 1217
1275 GOTO 1210
1280 IF DT< > 2THEN 1285
1282 IF D1$< "0"THEN 1295
1283 IF D1$> "9"THEN 1295
1284 GOTO 1270
1285 IF DT< > 3THEN 1288
1286 IF D1$= "."THEN 1270
1287 GOTO 1282
1288 IF DT< > 4THEN 1291
1289 IF D1$= "-"THEN 1270
1290 GOTO 1286
1291 IF DT< > 5THEN 1294
1292 IF D1$= "-"THEN 1270
1293 GOTO 1282
1294 IF DT= 6THEN 1282
1295 GOTO 1210
1300 REM  TITLES
1305 PRINT ES$
1310 X= 15:Y= 0:GOSUB 1100:PLOT 19,14
1315 PRINT "MAILING LIST MASTER CONTROL PROGRAM"
1320 PLOT 15:RETURN
1400 REM  PROGRAM TITLE LOAD
1405 MX= 0
1410 I$= "MAIL":I1$= "PERSONAL MAILING LIST PROGRAM":GOSUB 1500
1415 I$= "BMAIL":I1$= "BUSINESS MAILING LIST PROGRAM":GOSUB  1500
1425 I$= "":I1$= "ALLOCATE SYSTEM DATA FILES":GOSUB 1500
1430 I$= "":I1$= "SYSTEM CONFIGURATION PROGRAM":GOSUB 1500
1495 RETURN
1500 REM  LOAD TITLES
1505 MX= MX+ 1:A$(MX)= I$:A1$(MX)= I1$:RETURN
1600 REM  DISPLAY PROGRAMS
1605 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,50):PLOT 23:Y= 7:GOSUB 1100
1610 FOR I= 1TO MX
1615 N= 48+ I:IF I> 9THEN N= 55+ I
1620 PLOT 23:PRINT CHR$ (N);:PLOT 21:PRINT " - ";:PLOT 22:PRINT A1$(I)
1625 NEXT I
1630 X= 0:Y= MX+ 8:GOSUB 1100
1635 PLOT 18:PRINT "ENTER OPTION DESIRED * _"+ CL$;
1640 GOSUB 1052:PLOT CH:O$= CHR$ (CH):PRINT LEFT$ (EE$,4):IF CH= 13THEN 1630
1645 O= VAL (O$):IF CH> 64THEN O= O- 55
1650 IF O> 0AND O< = MXTHEN RETURN
1655 Y= Y+ 1:PLOT 17:GOSUB 1100
1660 PRINT EB$+ "INVALID OPTION!"+ DB$:GOTO 1630
1700 REM  SQUARE
1705 IF LEN (A$(O))= 0THEN RETURN
1710 PRINT ES$
1715 X= 18:Y= 8:PLOT 14
1720 Y= Y+ 2:GOSUB 1100:PRINT "*****************************"
1725 Y= Y+ 2:GOSUB 1100:PRINT "*                           *"
1730 Y= Y+ 2:GOSUB 1100:PRINT "*   P L E A S E   W A I T   *"
1735 Y= Y+ 2:GOSUB 1100:PRINT "*                           *"
1740 Y= Y+ 2:GOSUB 1100:PRINT "*****************************"
1745 REM 
1750 PLOT 15:RETURN
1800 REM  CONFIG ROUTINE
1805 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,50)
1810 Y= 4:GOSUB 1100
1815 FILE "T",1820:GOTO 1840
1820 FILE "N","CONFIG.DAT;1",1,20,1
1825 FILE "R",1,"CONFIG.DAT",1
1830 PUT 1,1;0,0,4,0,"CD0:"[4]
1835 FILE "C",1
1840 FILE "R",1,"CONFIG.DAT;1",1
1845 GET 1,1;C1,C2,C3,C4
1850 PLOT 22:PRINT "DEFAULT SYSTEM PARAMETERS":PRINT
1855 PLOT 19
1860 GOSUB 2200
1862 PRINT "1 - DATA DISK DRIVE = ";I$
1865 I$= "UPPER CASE ONLY":IF C2= 1THEN I$= "LOWER CASE & UPPER CASE"
1870 PRINT "2 - CHARACTER SET   = ";I$
1875 PRINT "3 - PRINTER BAUD RATE = ";BA$(C3)
1880 Y= 11:GOSUB 1100:PLOT 18
1885 PRINT "ENTER OPTION NUMBER TO CHANGE (X=EXIT) * _"+ CL$;
1890 GOSUB 1052:PLOT CH:I$= CHR$ (CH):PRINT LEFT$ (EE$,4):IF CH= 13THEN 1880
1895 IF I$= "X"THEN 1970
1900 K= VAL (I$):IF K> 0AND K< 4THEN 1910
1905 Y= Y+ 1:PLOT 17:GOSUB 1100:PRINT EB$+ "INVALID OPTION!"+ DB$:GOTO 1880
1910 ON KGOTO 1915,1930,1950
1915 Y= 6:GOSUB 1100:PLOT 23:PRINT EL$+ "1 - DATA DISK DRIVE = ";
1920 DT= 1:DL= 4:GOSUB 1200:IF DD= 0THEN 1927
1922 GOSUB 2400
1923 IF CA= 0THEN 1927
1925 Y= 11:GOSUB 1100:PLOT 17:PRINT EL$+ EB$+ "INVALID PARAMETER!"+ DB$:GOTO 1910
1927 Y= 6:GOSUB 1100:GOTO 1855
1930 Y= 7:GOSUB 1100:PLOT 23:PRINT EL$+ "2 - CHARACTER SET   = ";
1935 DT= 1:DL= 1:GOSUB 1200:IF DD= 0THEN 1927
1940 IF D$= "L"THEN C2= 1:GOTO 1927
1945 IF D$= "U"THEN C2= 0:GOTO 1927
1947 GOTO 1925
1950 Y= 8:GOSUB 1100:PLOT 23:PRINT EL$+ "3 - PRINTER BAUD RATE = ";
1955 DT= 2:DL= 4:GOSUB 1200:IF DD= 0THEN 1927
1957 FOR I= 1TO 7:IF D$= BA$(I)THEN C3= I:GOTO 1927
1960 NEXT I:GOTO 1925
1970 Y= 11:PRINT :GOSUB 1100:PLOT 18:PRINT EL$+ "PROCEED TO UPDATE (Y OR N) * _"+ CL$;
1972 GOSUB 1052:I$= CHR$ (CH):PLOT CH:IF I$= "Y"THEN 1980
1975 GOSUB 1100:PLOT 19:PRINT EL$+ "UPDATE DISREGARDED"
1977 FOR I= 1TO 1000:NEXT I:GOTO 1990
1980 PUT 1,1;C1,C2,C3,C4,CD$(C1)[4]
1990 FILE "C",1
1995 RETURN
2000 REM  ALLOCATE FILES
2005 X= 0:Y= 2:GOSUB 1100:PRINT LEFT$ (EE$,50)
1882 Y= 5:PLOT 19:GOSUB 1100
2015 PRINT "HAVE YOU DONE A SYSTEM CONFIGURATION YET (Y OR N) * _"+ CL$;
2020 GOSUB 1052:PLOT CH:IF CH= 13THEN 2010
2025 I$= CHR$ (CH):IF I$= "Y"THEN 2040
2030 GOSUB 1800:GOTO 2000
2040 GOSUB 2500:IF DF$= ""THEN RETURN
2042 GOSUB 1100:PRINT EL$;"PROCEED TO CREATE DATA FILES (Y OR N) * _"+ CL$;
2045 GOSUB 1052:PLOT CH:I$= CHR$ (CH):IF CH= 13THEN 2040
2050 IF I$< > "Y"THEN RETURN
2052 PRINT
2055 GOSUB 1100:PLOT 22:PRINT EL$+ "PLEASE WAIT WHILE I ALLOCATE THE DATA FILES"
2057 FILE "T",2062:FILE "R",1,"CONFIG.DAT",1
2058 GET 1,1;C1,C2,C3,C4,DS$[4]
2059 FILE "C",1:FILE "T",2080:GOTO 2065
2062 GOSUB 1100:PLOT 17:PRINT EB$+ "THERE IS NO SYSTEM CONFIGURATION DATA"+ DB$
2063 FOR I= 1TO 1000:NEXT I:GOTO 300
2065 KK= 0:IF C1= 0OR C1= 3THEN KK= 1
2066 IF KK= 0GOTO 2070
2067 Y= Y+ 2:GOSUB 1100:PLOT 18
2068 PRINT "REMOVE PROGRAM DISK AND INSERT DATA DISK, THEN PRESS (CR) ";
2069 GOSUB 1052
2070 FILE "R",2,DS$+ "PTR",1:FILE "C",2
2071 GOSUB 1100:PLOT 17:PRINT EL$+ EB$+ "DATA FILES ALREADY EXIST!"+ DB$
2075 FOR I= 1TO 1000:NEXT I:IF KK= 1THEN 2085
2076 RETURN
2080 GOSUB 2100
2081 IF KK= 0THEN 300
2085 X= 0:Y= 9:GOSUB 1100:PLOT 18
2090 PRINT "REMOVE DATA DISK AND INSERT PROGRAM DISK,THEN PRESS (CR) ";
2095 GOSUB 1052
2099 GOTO 300
2100 REM  CREATE FILES
2110 A= C4
2115 FILE "N",DS$+ "PTR",A,8,16
2125 FILE "N",DS$+ DF$,A,128,1
2150 FILE "R",2,DS$+ "PTR",1
2155 FILE "R",1,DS$+ DF$,1
2160 FOR Y= 1TO (A- 1):PUT 2,Y;0,Y+ 1
2161 NEXT Y
2165 PUT 2,A;0,0
2170 PUT 1,1;0
2175 FILE "C",1,2
2195 RETURN
2200 REM  DISK DRIVE TYPES
2205 ON C1+ 1GOTO 2210,2212,2214,2216,2218,2220,2222,2224,2226,2228,2230,2232,2234,2236
2210 I$= CD$(C1)+ " SINGLE HEADED 5 INCH INTERNAL DISK":GOTO 2250
2212 I$= CD$(C1)+ " SINGLE HEADED 5 INCH EXTERNAL DISK":GOTO 2250
2214 GOTO 2212
2216 I$= CD$(C1)+ " DOUBLE HEADED 5 INCH INTERNAL DISK":GOTO 2250
2218 I$= CD$(C1)+ " DOUBLE HEADED 5 INCH EXTERNAL DISK":GOTO 2250
2220 GOTO 2218
2222 I$= CD$(C1)+ " SINGLE HEADED 8 INCH DISK DRIVE":GOTO 2250
2224 GOTO 2222
2226 GOTO 2222
2228 GOTO 2222
2230 I$= CD$(C1)+ " DOUBLE HEADED 8 INCH DISK DRIVE":GOTO 2250
2232 GOTO 2230
2234 GOTO 2230
2236 GOTO 2230
2250 C4= FS(C1)
2295 RETURN
2300 REM  INIT PARMS
2305 DIM CD$(13),FS(13)
2310 DATA  "CD0:","CD1:","MD0:","DM0:","DM1:","DM2:","FD0:","FD1:"
2315 DATA "FD2:","FD3:","DF0:","DF1:","DF2:","DF3:"
2320 DATA  250,250,250,1300,1300,1300,2000,2000,2000,2000
2325 DATA 4000,4000,4000,4000
2350 FOR I= 0TO 13:READ CD$(I):NEXT I
2355 FOR I= 0TO 13:READ FS(I):NEXT I
2395 RETURN
2400 REM  CHECK DISK
2405 FOR I= 0TO 13:IF CD$(I)= D$THEN 2430
2410 NEXT I:CA= - 1:RETURN
2430 C4= FS(I):C1= I:CA= 0:RETURN
2500 REM  PERSONAL OR BUSINESS DATA FILES
2505 GOSUB 1100:PRINT EL$
2507 GOSUB 1100:PLOT 19
2510 PRINT "CREATE PERSONAL OR BUSINESS DATA FILES ? _"+ CL$;
2515 DT= 1:DL= 1:GOSUB 1200
2520 IF D$= "B"THEN DF$= "BDATA":RETURN
2525 IF D$= "P"THEN DF$= "PDATA":RETURN
2530 IF D$= ""THEN DF$= "":RETURN
2535 PRINT :GOTO 2507
63000 DATA 245,175,50,255,129,241,201
63005 TM= 256* PEEK (32941)+ PEEK (32940)- 7
63010 RESTORE 63000:FOR X= 1TO 7:READ D:POKE TM+ X,D:NEXT X
63015 BR= INT (TM/ 256):POKE 33221,195:POKE 33222,TM- BR* 256+ 1
63020 POKE 33223,BR:POKE 32941,BR:POKE 32940,TM- BR* 256
63025 CLEAR 1000:GOTO 20