INTEGER I,MONTH,YEAR,DAYS(12) INTEGER CTOI,GETARG,ISMON0,ISYEAR,WKDAY INTEGER ARG(128) INTEGER MPOS(13) INTEGER MTXT(86) INTEGER AAAAA0(30) DATA MTXT/202,225,238,245,225,242,249,0,198,229,226,242,245,225,24 *2,249,0,205,225,242,227,232,0,193,240,242,233,236,0,205,225,249,0, *202,245,238,229,0,202,245,236,249,0,193,245,231,245,243,244,0,211, *229,240,244,229,237,226,229,242,0,207,227,244,239,226,229,242,0,20 *6,239,246,229,237,226,229,242,0,196,229,227,229,237,226,229,242,0/ DATA MPOS/12,1,9,18,24,30,34,39,44,51,61,69,78/ DATA DAYS/31,28,31,30,31,30,31,31,30,31,30,31/ DATA AAAAA0/213,243,225,231,229,186,160,227,225,236,160,219,188,23 *7,239,238,244,232,190,221,160,219,188,249,229,225,242,190,221,0/ MONTH=-1 YEAR=-1 DO 10000 I=1,2 IF((GETARG(I,ARG,128).NE.-1))GOTO 10002 GOTO 10001 10002 IF((ISYEAR(ARG,YEAR).NE.-3))GOTO 10003 IF((ISMON0(ARG,MONTH,MPOS,MTXT).NE.-3))GOTO 10003 CALL ERROR(AAAAA0) 10003 CONTINUE 10000 CONTINUE 10001 IF((YEAR.NE.-1))GOTO 10004 CALL DATE(1,ARG) I=7 YEAR=CTOI(ARG,I) IF((MONTH.NE.-1))GOTO 10005 I=1 MONTH=CTOI(ARG,I) 10005 CONTINUE 10004 IF((MOD(YEAR,4).NE.0))GOTO 10006 DAYS(2)=29 GOTO 10007 10006 DAYS(2)=28 10007 IF((MONTH.EQ.-1))GOTO 10008 CALL PCAL(MTXT(MPOS(MONTH+1)),DAYS(MONTH),WKDAY(MONTH,1,YEAR),YE *AR) GOTO 10009 10008 DO 10010 MONTH=1,12 CALL PCAL(MTXT(MPOS(MONTH+1)),DAYS(MONTH),WKDAY(MONTH,1,YEAR), *YEAR) 10010 CONTINUE 10011 CONTINUE 10009 CALL SWT END SUBROUTINE PCAL(MONTH,DAYS,FIRST,YEAR) INTEGER MONTH(1) INTEGER DAYS,FIRST,YEAR INTEGER DOW,DAY,LINE INTEGER AAAAB0(19) INTEGER AAAAC0(25) INTEGER AAAAD0(4) INTEGER AAAAE0(4) DATA AAAAB0/170,238,160,160,170,243,170,177,181,244,160,170,180,23 *3,170,238,170,238,0/ DATA AAAAC0/211,245,160,205,239,160,212,245,160,215,229,160,212,23 *2,160,198,242,160,211,225,170,238,170,238,0/ DATA AAAAD0/170,163,248,0/ DATA AAAAE0/170,178,233,0/ CALL PRINT(-11,AAAAB0,MONTH,YEAR+1900) CALL PRINT(-11,AAAAC0) CALL PRINT(-11,AAAAD0,(FIRST-1)*3) LINE=0 DOW=FIRST DAY=1 GOTO 10014 10012 DOW=DOW+(1) DAY=DAY+(1) 10014 IF((DAY.GT.DAYS))GOTO 10013 CALL PRINT(-11,AAAAE0,DAY) IF((DOW.GE.7))GOTO 10015 CALL PUTCH(160,-11) GOTO 10016 10015 DOW=0 CALL PUTCH(138,-11) LINE=LINE+(1) 10016 GOTO 10012 10013 GOTO 10019 10017 LINE=LINE+(1) 10019 IF((LINE.GE.6))GOTO 10018 CALL PUTCH(138,-11) GOTO 10017 10018 RETURN END INTEGER FUNCTION ISYEAR(STR,YEAR) INTEGER STR(1) INTEGER YEAR INTEGER I,TEMP INTEGER CTOI ISYEAR=-3 IF((YEAR.EQ.-1))GOTO 10020 RETURN 10020 I=1 TEMP=CTOI(STR,I) IF((STR(I).NE.0))GOTO 10022 IF((TEMP.LT.0))GOTO 10022 IF((TEMP.GE.2000))GOTO 10022 IF((TEMP.LT.100))GOTO 10023 IF((TEMP.GE.1900))GOTO 10023 GOTO 10022 10023 GOTO 10021 10022 RETURN 10021 IF((TEMP.LT.1900))GOTO 10024 TEMP=TEMP-(1900) 10024 YEAR=TEMP ISYEAR=-2 RETURN END INTEGER FUNCTION ISMON0(STR,MONTH,POS,TXT) INTEGER STR(1),TXT(1) INTEGER MONTH,POS(1) INTEGER I INTEGER EQUIS INTEGER MAPUP ISMON0=-3 IF((MONTH.EQ.-1))GOTO 10025 RETURN 10025 CALL MAPSTR(STR,1) STR(1)=MAPUP(STR(1)) DO 10026 I=1,12 IF((EQUIS(STR,TXT(POS(I+1))).EQ.0))GOTO 10028 MONTH=I ISMON0=-2 RETURN 10028 CONTINUE 10026 CONTINUE 10027 RETURN END INTEGER FUNCTION EQUIS(S1,S2) INTEGER S1(1),S2(1) INTEGER I I=1 GOTO 10031 10029 I=I+(1) 10031 IF((S1(I).EQ.0))GOTO 10030 IF((S1(I).EQ.S2(I)))GOTO 10032 EQUIS=0 RETURN 10032 GOTO 10029 10030 EQUIS=1 RETURN END C ---- Long Name Map ---- C ismonth ismon0