资源描述:
《单片机原理及应用课后习题答案 雷娟版 冶金工业出版社》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、各位此为单片机原理及应用雷娟版冶金工业出版社课后3-6章课后编程题的答案。请原谅网上没有题目信息的电子档,只能以照片的方式显示题目信息,希望能给你带来方便。此书封面如下:第三章3-4:ORG0000HMAIN:MOVSP,#60HMOV30H,#24HMOV31H,#10HPUSH30HPUSH31HPOPDPLPOPDPHMOV30H,#00HMOV31H,#0FFHEND3-5ORG0000HMAIN:MOVA,#0F5HMOV30H,#9BHMOVR0,#30HADDA,#28HADDCA,@R0E
2、ND3-6ORG0000HMAIN:MOVA,#0F5HMOV30H,#9BHMOVR0,#30HADDA,#28HADDCA,@R0END3-73-8方法一:ORG0000HMAIN:MOVDPH,#26HMOVDPL,#47HMOVA,DPHMOVB,#10HDIVABMOV40H,AMOV41H,BMOVA,DPLMOVB,#10HDIVABMOV42H,AMOV43H,BEND方法二:ORG0000HMAIN:MOVDPH,#26HMOVDPL,#47HMOVA,DPLANLA,#0FHMOV43
3、H,AMOVA,DPLSWAPAANLA,#0FHMOV42H,AMOVA,DPHANLA,#0FHMOV41H,AMOVA,DPHSWAPAANLA,#0FHMOV40H,AEND3-9方法一:ORG0000HMAIN:MOVA,#0A4HMOVB,#04HMULABEND方法二:ORG0000HMAIN:MOVA,#0A4HCLRCADDA,ACCMOVR0,AMOVA,#0ADDCA,#0MOVR1,AMOVA,R0ADDA,ACCMOVR0,AMOVA,R1ADDCA,ACCMOVB,AMOVA,
4、R0END方法三:ORG0000HMAIN:MOVA,#0FFHRLCA;MOVR0,A;MOVA,#0;ADDCA,#0;MOVR1,A;MOVA,R0JNCWUJIN1MOVR1,#1CLRCWUJIN1:INCR1RLCAJNCWUJIN2INCR1WUJIN2:MOV20H,R1MOVB,20H;MOVR0,A;MOVA,R1;ADDCA,ACC;MOVB,A;MOVA,R0END3-10ORG0000HMAIN:MOVR0,#30HMOVR1,#20MOVDPTR,#3000HLOOP:MOVA
5、,@R0MOVX@DPTR,AINCR0INCDPTRDJNZR1,LOOPEND3-11ORG0000HMAIN:MOVR3,#15CJNER3,#15,JIXUJIXU:JNCLOOPSJMP$LOOP:INCR3END3-12ORG0000HMAIN:MOVR0,#00HCJNER0,#0,BUDENGMOVR1,#0SJMP$BUDENG:MOVR1,#0FFHEND3-13ORG0000HMAIN:MOVDPTR,#2010HMOVXA,@DPTRADDA,20HINCDPTRMOVX@DPTR
6、,AEND3-143-15第四章4-1ORG0000HMAIN:MOVA,60HXRLA,#0FHANLA,#0FHMOV60H,ASJMP$END4-2ORG0000HMAIN:MOVDPTR,#3000HMOVXA,@DPTRMOVR1,AMOVDPTR,#3100HMOVXA,@DPTRCLRCADDA,R1MOV50H,AMOVA,#0ADDCA,#0MOV51H,ASJMP$END4-3ORG0000HMAIN:MOVA,R0CLRCSUBBA,R1JNCDA0MOVA,R1MOVR2,ASJM
7、POVERDA0:MOVA,R0MOVR2,AOVER:SJMP$END4-4ORG0000HMAIN:MOVA,20HANLA,#80HJZZHENGMOVA,20HADDA,#20SJMPCUNZHENG:MOVA,20HCJNEA,#12,JIXUJIXU:JNCDA12MOVB,#4MULABSJMPCUNDA12:ADDA,ACCSUBBA,#10SJMPCUNCUN:MOV20H,AEND4-5ORG0000HMAIN:MOVR0,#10HMOVDPTR,#0000HMOVR2,#49LOOP
8、:MOVXA,@DPTRMOV@R0,AINCR0INCDPTRDJNZR2,LOOPSJMP$END4-6ORG0000H;参照例4-14MAIN:MOVR0,#30HMOVR2,#33MOV51H,#00HLOOP:MOVA,@R0ANLA,#80HJNZNEXTMOVA,@R0ADDA,51HMOV51H,ANEXT:INCR0DECR2CJNER2,#0,LOOPSJMP$END4-7ORG0000H;参照例4-15M