资源描述:
《数字电子钟课设程序》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、ORG0000HSETBTROUMPTO_MAINSETBETOORGOOOBHSETBET1UMPTO_TOSETBPTOORGOO13HSETBPT1LJMPTO」NT1SETBEXIORGOO1BHSETBEAUMPTO_T1MOVR7,#20ORG0050HLOOPJNBML,L00P71SB1BITP3.0LCALLTO_CLOCKSB2BITP3.1L00P71:LCALLT0_0UTSB3BITP3.2SJMPLOOPMLBITOOHDATAMEQU40HTO_TO:MOVTLO,#OBOHDATADEQU
2、41HMOVTH0,#3CHDATAHEQU42HDJNZR7,LOOP1DATAM1EQU43HINCDATASDATASEQU44HMOVR7,#20CLOCKHEQU45HMOVR0,#DATASCLOCKMIEQU46HCJNE@R0,#60丄OOP2SWATCHMlEQU47HMOV@R0,#0SWATCHSEQU48HDECROSWATCHMMEQU49HINC@ROMDATAEQU4AHLOOP2:MOVR0,#DATAMIMCLKEQU4BHCJNE@R0,#60丄OOP3DAYEQU4CHMOV@R0,
3、#0DATASWEQU4DHDECRODATAGWEQU4EHINC@ROTAB:DBLOOP3:MOVR0,#DATAH3FH,06H,5BH,4FH,66H,6DH,7DH,07H,7FH,6FHCJNE@RO,#24,LOOP4MONTH:DBMOV@R0,#0OOH,2OH,1DH,2OH,1FH,2OH,1FH,2OH,2OH,1FHDECRO,2OH,1FH,2OHINC@ROTO_MAIN:MOVDATAM,#1LOOP4:MOVA,DATAMMOVDATAD,#1MOVDPTR,#MONTHMOVCLOC
4、KH,#6MOVCA,@A+DPTRMOVCLOCKMI,#30MOVDAZAMOVP3Z#OFFHMOVA,DATADMOVTMOD,#11HCJNEAQA^LOOPlMOVTLO,#OBOHMOVDATAD,#1MOVTHO,#3CHINCDATAMMOVTL1,#OFOHMOVA,DATAMMOVTH1,#OD8HCJNEA,#13,LOOP1CLRMLMOVDATAM,#1LOOP1:RETITO_T1:MOVTL1,#OFOHM0VTH1,#0D8HINCSWATCHMMMOVROZ#SWATCHMMCJNE@
5、R0,#100,LOOP10MOV@R0,#0DECROINC@ROLOOP10:MOVRO,#SWATCHSCJNE@RO,#60,LOOP11MOV@R0,#0DECROINC@ROLOOP11:MOVRO,#SWATCHMICJNE@RO,#60,LOOP12MOV@R0,#0LOOP12:RETITO」NT1:JNBSB1ZTO_SB1JNBSB2,TO_SB2JNBSB3,TO_SB3LJMPLOOP20TO_SB1:LCALLTO_K1SJMPLOOP20TO_SB2:LCALLTO_K2SJMPLOOP20
6、TO_SB3:LCALLTO_K3LOOP20:LCALLDELAYSETBEXIRETITO_K1:CLREXIMOVP3,#OFFHMOVA,SWATCHMIJNZLOOP31LCALLOUTSSSLCALLOUTSMMSJMPLOOP30LOOP31:LCALLOUTSMILCALLOUTSSGLOOP30JNBSB1ZTO_SB11JNBSB2ZTO_SB12JNBSB3,TO_SB13SJMPTO_K1TO_SB12:LCALLDELAY1JBSB2ZTO_K1SETBTRISJMPTO_K1TO_SB13:L
7、CALLDELAY1JBSB3,TO_K1JNBTR1,TO_SB133CLRTRISJMPTO_K1TO_SB133:MOVSWATCHMI,#OMOVSWATCHS,#0MOVSWATCHMM,#0UMPTO_K1TO_SB11:LCALLDELAY1JBSB1,TO_K1LOOP32:MOVP3,#0FFHLCALLOUTCHJNBSB1JO_SB111JNBSB2,TO_SB112JNBSB3,TO_SB113SJMPLOOP32T0_SB112:LCALLDELAY1JBSB2丄OOP32INCCLOCKHMO
8、VR1,#CLOCKHCJNE@R1,#24丄OOP32MOVCLOCKH,#0SJMPLOOP32TO_SB111:LCALLDELAY1JBSB1,LOOP32LOOP33:MOVP3,#0FFHLCALLOUTCMIJNBSB1,LOOP34JNBSB2,TO_SB1112JNBSB3,TO_SB1113SJM