10 ' DATER PROGRAM
20 ' As printed in Portable Companion June 1983
30 '
40 ' Modified by Jim Ryan, MILWaukee Osborne
50 ' Group (MILWOG) to check for previous date
60 ' and prompts for a change.
70 '
80 DATA "January ","February ","March ","April ","May ","June "
90 DATA "July ","August ","September","October ","November ","December "
100 D=PEEK(80):M=PEEK(81):Y=PEEK(91):PRINT CHR$(26);
110 IF (D<1 OR D>31) OR (M<1 OR M>12) OR (Y<81 OR Y>85) THEN 200
120 PRINT "Today's date is......";M;"/";D;"/";Y
130 PRINT "Press C to change, (RETURN) if OK";
140 Q$=INKEY$:IF Q$="" THEN 140 ELSE 150
150 IF Q$=CHR$(13) THEN 230
160 IF Q$="C" OR Q$="c" THEN 170 ELSE 140
170 PRINT:PRINT
180 INPUT "Enter today's date as MM/DD/YY ==>";DT$
190 M=VAL(LEFT$(DT$,2)):IF M<1 OR M>12 THEN 180
200 D=VAL(MID$(DT$,4,2)):IF D<1 OR D>31 THEN 180
210 Y=VAL(RIGHT$(DT$,2)):IF Y<82 OR Y>85 THEN 180
220 POKE 80,D:POKE 81,M:POKE 91,Y:PRINT:GOTO 120
230 FOR I=1 TO M:READ M$:NEXT I
240 FOR I=1 TO 9:POKE 81+I,ASC(MID$(M$,I,1)):NEXT I
250 PRINT:PRINT"Date set....."
260 SYSTEM ' This can be changed to whatever