Last active
April 19, 2025 02:15
-
-
Save fu-sen/4777a1cc2fa498428600fb020ff1b9e1 to your computer and use it in GitHub Desktop.
Calendar | MSX-BASIC https://msxjpn.jimdofree.com/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0/%E3%82%AB%E3%83%AC%E3%83%B3%E3%83%80%E3%83%BC/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Calendar | MSX-BASIC | |
' Copyright (c) 2025 BALLOON | FU-SEN | |
' The MIT License (MIT) - https://mit.balloon.net.eu.org/#2025 | |
100 DIM D(12) | |
110 INPUT "Year ";Y | |
120 INPUT "Month";M | |
130 FOR I=1 TO 12 | |
140 READ D(I) | |
150 NEXT I | |
160 IF Y MOD 4=0 AND (Y MOD 100<>0 OR Y MOD 400=0) THEN D(2)=D(2)+1 | |
170 IF M<3 THEN Y=Y-1:M=M+12 | |
180 I=INT(Y+INT(Y/4)-INT(Y/100)+INT(Y/400)+INT((13*M+8)/5)+1) MOD 7 | |
190 IF M>12 THEN M=M-12 | |
200 PRINT "SunMonTueWedThuFriSat" | |
210 PRINT STRING$(3*I,32); | |
220 FOR J=1 TO D(M) | |
230 PRINT USING "###";J; | |
240 I=I+1 | |
250 IF I=7 THEN PRINT:I=0 | |
260 NEXT J | |
270 DATA 31,28,31,30,31,30 | |
280 DATA 31,31,30,31,30,31 |
Author
fu-sen
commented
Jan 22, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment