资源描述:
《8031实现AD转换的程序》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、ORG2000HAJMPMAINORG200BHAJMPMT3ORG2013HAJMPEXCHORG201BHAJMPCHAORG203CHMAIN:MOVA,#0FFHMOVP2,#8FHMOVX@R0,AMOVP2,#9FHMOVX@R0,AMOVP2,#0AFHMOVX@R0,AMOVP2,#0BFHMOVX@R0,AMOVP2,#0CFHMOVX@R0,AMOV30H,#00HMOV31H,#00HMOV32H,#00HMOVSP,#66HJBP1.3,CNJBP1.4,VPRG1AJMPTPRGVPRG1:A
2、JMPVPRGCN:JBP1.4,CPRGNPRG:MOVTMOD,#0DHMT1:MOVTH0,#00HMOVTL0,#00HSETBTR0MOVR2,#78HT1D2S:MOVR3,#05HTM:MOVR4,#0F9HTMM:NOPNOPDJNZR4,TMMDJNZR3,TMNOPNOPDJNZR2,T1D2SCLRTR0CLRCMOVA,TH0RRCAMOVB,AMOVA,TL0RRCAMOV33H,ACLRCMOVA,BRRCAMOVB,AMOVA,33HRRCAMOV33H,AMOV30H,#00HMOV31
3、H,#00HMOV32H,#00HACALLADD10MOVB,33HACALLADD10ACALLLED10AJMPMT1CPRG:MOVTMOD,#6DHMOVTH0,#00HMOVTL0,#00HSETBTR0MOVTH1,#0FFHMOVTL1,#0FFHSETBEASETBET1SETBTR1CC:NOPAJMPCCCHA:CLRTR1CLRTR0MOVA,TL0MOV20H,AMOVA,TH0MOV21H,AMOVTL0,#00HMOVTH0,#00HSETBTR0MOV30H,#00HMOV31H,#00
4、HMOV32H,#00HMOV33H,#00HCLRCMOVA,21HRRCAMOVB,AMOVA,20HRRCAMOV33H,AACALLADD10MOVB,33H]ACALLADD10ACALLLEDSETBTR1RETISAM:MOVP2,#0DFHMOVX@R0,AMOVR7,#1EHAD:DJNZR7,ADMOVXA,@R0RETVPRG:MOVR1,#35HMOVR6,#0AHVSA:ACALLSAMMOV@R1,AINCR1ACALLT10MSDJNZR6,VSAMOVR0,#36HMOVR2,#09HQ
5、Q:MOVA,@R0CJNEA,35H,YYAJMPNEXTYY:JCNEXTXCHA,35HMOV@R0,ANEXT:INCR0DJNZR2,QQMOVR2,#08HMOVR0,#37HQQQ:MOVA,@R0CJNEA,36H,YYYAJMPNNEXTNNEXT:INCR0DJNZR2,QQQMOV36H,#00HMOVR0,#38HMOVR2,#07HADD08:MOVA,@R0ADDA,37HMOV37H,AMOVA,36HADDCA,#00HMOV36H,AINCR0DJNZR2,ADD08MOV30H,#0
6、0HMOV31H,#00HMOV32H,#00HMOVB,36HACALLADD10MOVB,37HACALLADD10MOVA,30HANLA,#0FHCJNEA,#04H,SSWYAJMPLED100SSWY:JCLED100MOVA,30HADDA,#10HDAAMOV30H,AMOVA,31HADDCA,#00HDAAMOV31H,ALED100:MOVP2,#0AFHMOVA,31HSWAPAANLA,#0FHJNZVBMOVA,#0FFHMOVX@R0,AAJMPVSVB:ACALLOUTVS:MOVP2,
7、#0BFHMOVA,31HANLA,#0FHACALLOUTDMOVA,30HSWAPAANLA,#0FHMOVP2,#0CFHACALLOUTMOVR6,#59HT08:ACALLT10MSDJNZR6,T08AJMPVPRGTPRG:SETBIT1MOVA,P1ANLA,#07HMOVB,#03HMULABADDA,#40HMOVR7,ACJNEA,#4CH,TPRGWMOV20H,#00HMOV21H,#00HMOV22H,#00HMOV23H,#00HAJMPTEXTTPRGW:JNCTPRGMOVR1,AMO
8、V@R1,#00HINCR1MOV@R1,#OOHINCR1MOV@R1,#OOHACALLLEDGZ11:MOVTMOD,#0DHMOVTH0,#0FFHMOVTLO,#0FFHSETBTR0SETBET0SETBEX1SETBEAMT2:MOVA,R7CJNEA,#4CH,MT2AJMPTEXTMT3:MOVA,R7MOVR1