ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
1.3 KiB

  1. 10 REM PERPETUAL GREGORIAN CALENDAR
  2. 12 REM 4-13-2020 changed line 28 IF Y<100 1900 to 2000
  3. 14 DIM C$(42), D$(31), E(12)
  4. 16 FOR I=1 TO 31: READ D$(I): NEXT I
  5. 18 FOR I=1 TO 12: READ E(I): NEXT I
  6. 20 DATA " 1"," 2"," 3"," 4"," 5"," 6"," 7"," 8"," 9"," 10"
  7. 22 DATA " 11"," 12"," 13"," 14"," 15"," 16"," 17"," 18"," 19"," 20"
  8. 24 DATA " 21"," 22"," 23"," 24"," 25"," 26"," 27"," 28"," 29"," 30"," 31"
  9. 26 DATA 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
  10. 28 PRINT: INPUT "MONTH, 4 DIGIT YEAR";M,Y: IF Y<100 THEN Y=Y+2000
  11. 30 PRINT: PRINT " SU MO TU WE TH FR SA": PRINT
  12. 32 J=367*Y-INT(7*(Y+INT((M+9)/12))/4)+INT(275*M/9)+1721031
  13. 34 K=0: IF M<=2 THEN K=-1
  14. 36 J=J-INT(3*(INT((Y+K)/100)+1)/4)
  15. 38 K=E(M): IF M<>2 THEN 48
  16. 40 W=INT(Y-100*INT(Y/100)): X=INT(Y-4*INT(Y/4)): Z=INT(Y-400*INT(Y/400))
  17. 42 IF X<>0 THEN 48
  18. 44 IF W=0 AND Z<>0 THEN 48
  19. 46 K=29
  20. 48 X=J-7*INT(J/7)
  21. 50 FOR I=1 TO 42: C$(I)=" ": NEXT I
  22. 52 FOR I=1 TO K: C$(I+X)=D$(I): NEXT I
  23. 54 FOR I=1 TO 6: J=7*I
  24. 56 PRINT C$(J-6);C$(J-5);C$(J-4);C$(J-3);C$(J-2);C$(J-1);C$(J)
  25. 58 NEXT I
  26. 60 PRINT: INPUT "ANOTHER";A$: IF (A$="Y" or A$="y") THEN 28
  27. 62 END
  28. 63 REM ---------------------------------------------------------------
  29. 64 REM APPEARED IN ASTRONOMICAL COMPUTING, SKY & TELESCOPE, JULY, 1985
  30. 65 REM ---------------------------------------------------------------