This file contains 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
; uMON85 SBC8085 MICRO MONITOR | |
; | |
; DEFAULT VALUE | |
LINSIZ EQU 26 ; SIZE OF LINE BUFFER | |
; | |
; RESET VECTOR | |
ORG 0000H | |
RESET: LXI SP,STKBTM ; スタック設定 | |
JMP MAIN ; MAINから開始 | |
; |
This file contains 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
main(j,y,m,c){ | |
scanf("%d%d",&y,&m); | |
c=" &#&%&%&&%&%&"[m]-7+(m==2&!(y%4||!(y%100)&&y%400)); | |
if(++m<4)y--,m+=12; | |
for(y=-y-y/4+y/100-y/400-2.6*m,y%=7;y++<c;)printf(y<1?" ":"%2d%c",y,j++%7&&y<c?32:10); | |
} |
This file contains 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
:200100001E5DCDAB01D56B621B3E04CD9801193E19CD9801B7ED523E04CD980119EBCD96AB | |
:20012000014FD12601D5061F7CFE02201505057BE60320163E64CD980120107BE603280B59 | |
:20014000180887878784E60820010579CD9301804F1E6DCDAB01D124BC30CA79904FAF9162 | |
:2001600067247CFE01FCD001FA8001162F14D60A30FBF57AFE3020023E20CDD201F1C63A1F | |
:20018000CDD2017CB82841116101D581CD93012837183D5F16003E07E5677B5C21FFFF2325 | |
:2001A0009330FC15F29F0183EBE1C9E5C5210000541A13D630380C444D292909294F0600C1 | |
:1F01C0000918EEEB7BC1E1C93E0DCDD2013E0A113E20F5E5C50E025FCD0500C1E1F1C962 | |
:00000001FF |
This file contains 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
BDOS EQU 0005H ; BDOS 番地 | |
CONOUT EQU 2 ; コンソール出力 | |
ARG1 EQU 005DH ; FCB+1 | |
ARG2 EQU 006DH ; FCB2+1 | |
CR EQU 0DH ; 復帰 | |
LF EQU 0AH ; 改行 | |
ORG 100H |
This file contains 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
10 IN.Y;IN.M;O=100;F=400;W=Y+(Y-1)/4-(Y-1)/O+(Y-1)/F;F.I=1T.M | |
20 D=31-(I=2)*(3-(Y/4*4=Y)+(Y/O*O=Y)-(Y/F*F=Y))-(I=4)-(I=6)-(I=9)-(I=11) | |
30 W=W+D;N.I;W=W-D;W=W-W/7*7;F.I=1-WT.D;IF(I<1)PR." ",;G.50 | |
40 PR.#2,I, | |
50 IF((I+W)/7*7=(I+W))+(I=D)PR.;G.70 | |
60 PR." ", | |
70 N.I |