资源描述:
《51单片机汇编时钟程序》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、MIAODATA50HFENGDATA51HSHIDATA52HMC1DATA53HMC2DATA54HFC1DATA55HFC2DATA56HSC1DATA57HSC2DATA58HORG0000HSJMPSTARTORG000BHAJMPZHONGDUANORG0030HSTART:MOVSP,#60HMOVMIAO,#50MOVFENG,#59MOVSHI,#23MOVDPTR,#TABMOV30H,#0MOVTMOD,#01HMOVTH0,#3CHMOVTL0,#0B0HSETBET0SE
2、TBTR0SETBEAMAIN:CALLKEYCALLPROCESSCALLDISPLAYSJMPMAINKEY:JNBP3.4,SHIC1JNBP3.5,SHIC2JNBP3.6,FENGC1JNBP3.7,FENGC2FAN:RETSHIC1:CALLDELAYJBP3.4,FANJNBP3.4,$INCSHIMOVA,SHICJNEA,#24,C1MOVSHI,#00C1:RETSHIC2:CALLDELAYJBP3.5,FANJNBP3.5,$DECSHIMOVA,SHICJNEA,#25
3、5,C3MOVSHI,#23C3:RETFENGC1:CALLDELAYJBP3.6,FANJNBP3.6,$INCFENGMOVA,FENGCJNEA,#60,C2MOVFENG,#00C2:RETFENGC2:CALLDELAYJBP3.7,FANJNBP3.7,$DECFENGMOVA,FENGCJNEA,#255,C4MOVFENG,#59C4:RETPROCESS:MOVA,MIAOMOVB,#10DIVABMOVMC1,AMOVMC2,BMOVA,FENGMOVB,#10DIVABMO
4、VFC1,AMOVFC2,BMOVA,SHIMOVB,#10DIVABMOVSC1,AMOVSC2,BRETDISPLAY:MOVA,SC1MOVCA,@A+DPTRSETBP2.6MOVP0,ACLRP2.6NOPMOVP0,#0FFHSETBP2.7MOVP0,#0FEHCLRP2.7CALLDELAYMOVA,SC2MOVCA,@A+DPTRSETBP2.6MOVP0,ACLRP2.6NOPMOVP0,#0FFHSETBP2.7MOVP0,#0FDHCLRP2.7CALLDELAYMOVA,
5、FC1MOVCA,@A+DPTRSETBP2.6MOVP0,ACLRP2.6NOPMOVP0,#0FFHSETBP2.7MOVP0,#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