(完整版)基于单片机的万年历毕业论文 下载本文

MOV 57H,#04H SETB F0 LJMP S_PLAY Y53:

MOV 57H,#04H SETB F0 LJMP S_PLAY Y52:

MOV 56H,#29H ; MOV A,R6 JB ACC.2,Y54 MOV 56H,#30H Y54:

MOV 57H,#04H CLR F0 LJMP S_PLAY Y51:

MOV A,R2 ;R2 MOV R0,A LCALL D_BCD MOV 56H,A MOV 57H,#05H CLR F0 LJMP S_PLAY RY5:

前一个月不是闰月 中为日的值

CJNE R2,#00H,RY51

MOV 56H,#29H ;R2中为0,则为前一个月 MOV A,R6 ;的最后一天 JB ACC.1,RY52 MOV 56H,#30H RY52:

MOV 57H,#05H CLR F0 LJMP S_PLAY RY51:

MOV A,R2 ;R2中为日的值 MOV R0,A LCALL D_BCD MOV 56H,A MOV 57H,#05H SETB F0 LJMP S_PLAY Y6:

CJNE R2,#00H,Y61

LCALL CHECKRE ;查前一个月是否为闰月 CJNE A,#05H,Y62

MOV 56H,#29H ;前一个月是闰月 MOV A,R4 ;R2中为0,则为前一个月 ANL A,#0FH ;的最后一天 JNZ Y63

MOV 56H,#30H MOV 57H,#05H SETB F0 LJMP S_PLAY Y63:

MOV 57H,#05H SETB F0 LJMP S_PLAY Y62:

MOV 56H,#29H ; MOV A,R6 JB ACC.1,Y64 MOV 56H,#30H Y64:

MOV 57H,#05H CLR F0 LJMP S_PLAY Y61:

MOV A,R2 ;R2 MOV R0,A LCALL D_BCD MOV 56H,A MOV 57H,#06H CLR F0 LJMP S_PLAY

前一个月不是闰月 中为日的值

RY6:

CJNE R2,#00H,RY61

MOV 56H,#29H ;R2中为0,则为前一个月 MOV A,R6 ;的最后一天 JB ACC.0,RY62 MOV 56H,#30H RY62:

MOV 57H,#06H CLR F0 LJMP S_PLAY RY61:

MOV A,R2 ;R2中为日的值 MOV R0,A LCALL D_BCD MOV 56H,A MOV 57H,#06H SETB F0 LJMP S_PLAY Y7:

CJNE R2,#00H,Y71

LCALL CHECKRE ;查前一个月是否为闰月 CJNE A,#06H,Y72

MOV 56H,#29H ;前一个月是闰月 MOV A,R4 ;R2中为0,则为前一个月 ANL A,#0FH ;的最后一天