1 COMMON A, AL, B, BASEONLY, C, C$, C1, CAT$, CC, CKT$, D, D$, DD, DIA, DIMN$, DMS, E, EO, EX$, F, F$, FD, FF, FQ, FRQ, G$, GO$, I, I$, L, LATLONG, LD, LL, LN, LS, LW, LX, MAX, MENU, MIN, MX, N, NN, NT, OV, P, PI, PROG$, Q, QQ, QU, R, RA, RC, T, T$, U, U$, UH, UL$, V$, VC, W, WHIP, WIRD, WW, X, X$, X1, XS, Z$, ZP, ZS
5 'OMMON EX$
10 '\hamcalc\prog\REMIND - Reminder - rev. 11 APR 2000
20 CLS:KEY OFF
30 IF EX$=""THEN EX$="EXIT"
40 
50 COLOR 7,0,1
60 '
70 '.....title page
80 COLOR 15,2
90 PRINT " DAILY REMINDERS";TAB(57);"by George Murphy VE3ERP ";
100 COLOR 1,0:PRINT STRING$(80,223);
110 COLOR 7,0
120 '
130 U$=STRING$(80,205)
140 E$=STRING$(80,32)
150 DIM A$(26)
160 COLOR 7,0
170 M=VAL (LEFT$(DATE$,2))
180 D=VAL (MID$(DATE$,4,2)):Y=VAL (RIGHT$(DATE$,4))
190 Y=VAL (RIGHT$(DATE$,4))
200 GOSUB 1900
210 J$=J$(ZZ)
220 ON ERROR GOTO 440
230 '
240 '.....start
250 FOR Z=1 TO 26:A$(Z)=" ":NEXT Z
260 PRINT " These are the existing REMINDER files . . . . ."
270 PRINT U$;
280 CHDIR"\hamcalc\data"
290 FILES"*.rem"
300 CHDIR"\hamcalc\prog"
310 LOCATE CSRLIN-2
320 PRINT U$;
330 PRINT " To start a new file ENTER new filename (maximum 8 characters)"
340 COLOR 14,4
350 PRINT " To QUIT press <ENTER> ";:COLOR 7,0
360 COLOR 7,0
370 PRINT U$;
380 INPUT " ENTER: File you want (omit .REM extension).....";I$
390 IF I$=""THEN CLS: CHAIN EX$
400 GOSUB 1750:N$=I$
410 FOR Z=1 TO 26:A$(Z)=" ":NEXT Z
420 GOSUB 490:GOSUB 650:GOTO 780
430 '
440 IF ERR=53 THEN 450 ELSE PRINT "Error";ERR;;"in line";ERL:END
450 PRINT " There are no .REM files on this disk";:PRINT U$:RESUME 320
460 BEEP:IF ERR=53 THEN 470 ELSE PRINT "Error";ERR;;"in line";ERL:END
470 GOSUB 580:GOSUB 650:GOTO 780
480 '
490 '.....load file
500 CLS'      :PRINT "Loading ";N$;;" data file from disk";
510 ON ERROR GOTO 460
520 OPEN "I",1,"\hamcalc\data\"+N$+".REM"
530 INPUT # 1,N
540 FOR Z=1 TO N
550 INPUT # 1,A$(Z):NEXT Z:CLOSE:CLS
560 RETURN
570 '
580 '.....save data
590 CLS'      :PRINT "Saving ";N$;;" data file to disk";
600 OPEN "O",1,"\hamcalc\data\"+N$+".REM"
610 WRITE #1,N
620 FOR Z=1 TO N
630 WRITE #1,A$(Z):NEXT Z:CLOSE:RETURN
640 '
650 '.....display files
660 COLOR 7,0
670 CLS
680 DA$=RIGHT$(DATE$,4)+"/"+LEFT$(DATE$,2)+"/"+MID$(DATE$,4,2)
690 COLOR 15,1:PRINT " ";N$;;" ";
700 COLOR 7,0:PRINT "Reminder memo dated ";J$;;" ";DA$
710 PRINT U$;
720 FOR Z=1 TO 13
730 LOCATE Z+2, 1:PRINT CHR$(Z+96);;") ";A$(Z);
740 LOCATE Z+2,41:PRINT CHR$(Z+109);;") ";A$(Z+13)
750 NEXT Z:PRINT U$;
760 RETURN
770 '
780 '.....menu
790 COLOR 11,6
800 PRINT " Press number in ( ) for next step ";
810 PRINT "or press <*> for printout "
820 COLOR 7,0
830 PRINT U$;
840 PRINT "(1) Add new item to end of list";
850 PRINT TAB(40);"(6) Clear contents of ";
860 COLOR 15,1:PRINT N$;:COLOR 7,0:PRINT " file"
870 PRINT "(2) Insert new item in mid-list";
880 PRINT TAB(40);"(7) Erase ";
890 COLOR 15,1:PRINT N$;:COLOR 7,0:PRINT " file from disk"
900 PRINT "(3) Reword existing item";
910 PRINT TAB(40);"(8)";
920 PRINT "(4) Relocate existing item in list";
930 PRINT TAB(40);"(9)";
940 PRINT "(5) Delete an item from list";
950 PRINT TAB(40);"(0) EXIT";
960 Z$= INKEY$
970 IF Z$="*"THEN 2100
980 IF Z$="1"THEN GOSUB 1280:GOTO 1340
990 IF Z$="2"THEN GOSUB 1280:GOTO 1390
1000 IF Z$="3"THEN GOSUB 1280:GOTO 1800
1010 IF Z$="4"THEN GOSUB 1280:GOTO 1500
1020 IF Z$="5"THEN GOSUB 1280:GOTO 1660
1030 IF Z$="6"THEN GOSUB 1280:GOTO 1090
1040 IF Z$="7"THEN 1120
1050 IF Z$="8"THEN 960
1060 IF Z$="0"THEN GOSUB 580:GOTO 240
1070 GOTO 960
1080 '
1090 CLS:FOR Z=1 TO 26:A$(Z)="":NEXT Z:GOSUB 650
1100 N=0:GOSUB 580:GOTO 240
1110 '
1120 '.....delete file
1130 CLS
1140 W$="\HAMCALC64\DATA\"+N$+".REM"
1150 PRINT
1160 PRINT " Are you sure you want to erase ";CHR$(34);W$;CHR$(34);;"   (y/n)"
1170 Z$=INKEY$:IF Z$="n"THEN 240
1180 IF Z$="y"THEN 1200
1190 GOTO 1170
1200 CLS:KILL W$:GOTO 240
1210 '
1220 '.....length of string
1230 IF LEN(Z$)<37 THEN RETURN
1240 BEEP
1250 PRINT "TOO LONG! 36 characters or less, please...Press any key to continue";
1260 IF INKEY$=""THEN 1260 ELSE GOSUB 650:GOTO 780
1270 '
1280 '.....erase menu
1290 VIEW PRINT 17 TO 24:CLS:VIEW PRINT:LOCATE 17:RETURN
1300 '
1310 N=N+1:IF N<=26 THEN RETURN
1320 N=N-1:CLS:FOR Z=1 TO 15:BEEP:PRINT "FILES FULL";:NEXT Z:GOTO 150
1330 '
1340 '.....add new item
1350 COLOR 14,6
1360 PRINT " ENTER: New item ";:COLOR 7,0:INPUT Z$
1370 GOSUB 1220:GOSUB 1310:A$(N)=Z$:GOSUB 650:GOTO 780
1380 '
1390 '.....insert new item
1400 COLOR 14,6
1410 PRINT " Press letter in ( ) to select location of new item "
1420 Z$=INKEY$:IF Z$=""THEN 1420
1430 IF ASC(Z$)>96 AND ASC(Z$)<97+N THEN 1440 ELSE LOCATE CSRLIN-1:GOTO 1390
1440 COLOR 1,3
1450 X=ASC(Z$)-96:PRINT Z$;;") ";
1460 LINE INPUT " ENTER: New item? ";Z$
1470 GOSUB 1220:GOSUB 1310:FOR Z=26 TO X+1 STEP -1:A$(Z)=A$(Z-1):NEXT Z
1480 A$(X)=Z$:GOSUB 650:GOTO 780
1490 '
1500 '.....relocate item
1510 COLOR 14,6
1520 PRINT " Press letter in ( ) to select item to be relocated "
1530 Z$=INKEY$:IF Z$=""THEN 1530
1540 IF ASC(Z$)>96 AND ASC(Z$)<97+N THEN 1550 ELSE LOCATE CSRLIN-1:GOTO 1520
1550 X=ASC(Z$)-96:GOSUB 1280:X$=A$(X)
1560 FOR Z=X TO 25:A$(Z)=A$(Z+1):NEXT Z:A$(26)=" "
1570 COLOR 1,3
1580 PRINT "Press letter in ( ) to select new location of this item: "
1590 PRINT "...";X$;;"...";
1600 Z$=INKEY$:IF Z$=""THEN 1600
1610 IF ASC(Z$)>96 AND ASC(Z$)<97+N THEN 1620 ELSE LOCATE CSRLIN-1:GOTO 1580
1620 Y=ASC(Z$)-96:GOSUB 1280
1630 FOR Z=26 TO Y+1 STEP -1:A$(Z)=A$(Z-1):NEXT Z
1640 A$(Y)=X$:GOSUB 650:GOTO 780
1650 '
1660 '.....delete item
1670 COLOR 14,6
1680 PRINT " Press letter in ( ) to select item to be deleted "
1690 Z$=INKEY$:IF Z$=""THEN 1690
1700 IF ASC(Z$)>96 AND ASC(Z$)<97+N THEN 1710 ELSE LOCATE CSRLIN-1:GOTO 1680
1710 X=ASC(Z$)-96
1720 FOR Z=X TO 25:A$(Z)=A$(Z+1):NEXT Z
1730 A$(26)=" ":N=N-1:GOSUB 650:GOTO 780
1740 '
1750 '.....upper case
1760 FOR U=1 TO LEN(I$):V=ASC(MID$(I$,U,1)):IF V=44 THEN RETURN
1770 IF V>96 AND V<123 THEN MID$(I$,U,1)=CHR$(V-32)
1780 NEXT U:RETURN
1790 '
1800 '.....re-word item
1810 COLOR 14,6
1820 PRINT " Press letter in ( ) to select item to be re-worded "
1830 Z$=INKEY$:IF Z$=""THEN 1830
1840 IF ASC(Z$)>96 AND ASC(Z$)<97+N THEN 1850 ELSE LOCATE CSRLIN-1:GOTO 1820
1850 X=ASC(Z$)-96:GOSUB 1280
1860 COLOR 1,3
1870 PRINT " ENTER: New wording for item (";Z$;;") ? ";:LINE INPUT A$(X)
1880 GOSUB 650:GOTO 780
1890 '
1900 '.....day of week
1910 J$(1)="SUNDAY
1920 J$(2)="MONDAY
1930 J$(3)="TUESDAY
1940 J$(4)="WEDNESDAY
1950 J$(5)="THURSDAY
1960 J$(6)="FRIDAY
1970 J$(7)="SATURDAY
1980 K=INT(6.000000E-01+(1/M))
1990 L=Y-K
2000 O=M+12*K
2010 P=L/100
2020 Z1=INT(P/4)
2030 Z2=INT(P)
2040 Z3=INT((5*L)/4)
2050 Z4=INT(13*(O+1)/5)
2060 Z=Z4+Z3-Z2+Z1+D-1
2070 ZZ=Z-(7*INT(Z/7))+1
2080 RETURN
2090 '
2100 '.....printout
2110 LPRINT:LPRINT:LPRINT
2120 LPRINT N$;;" Reminder memo dated ";J$;;" ";DATE$
2130 LPRINT U$;
2140 FOR Z=1 TO 13
2150 LPRINT CHR$(Z+96);;") ";A$(Z);
2160 LPRINT TAB(41);CHR$(Z+109);;") ";A$(Z+13)
2170 NEXT Z:LPRINT U$
2180 GOSUB 580:CLEAR:GOTO 150
