资源描述:
《中南民族大学 微机原理实验答案.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、中南民族大学微机原理实验答案实验一第二题在debug中实现在屏幕上显示“”A1000100:movcx,0aMovdl,30Movah,20106:int21hIncdlLoop0106Int20h第三题用int21h中的2号功能在屏幕上显示“9”a1000100:movcx,9movdl,31h0104:pushcxxorcx,cxmovcl,dlsubcl,30h010c:movah,2int21hloop010cincdlpopcxloop0100movax,4c00hint21hint20h第四题用九号功能在屏幕上显示‘’A1000100:db‘’0106:Movdx,0100mova
2、h,9hint21hInt20h实验二第三题修改程序,在第一行连续显示4个“Hello,World!”每个以空格分开。namehellossegsegmentstackdb64dup(0)ssegendsdsegsegmentmessdb'helloWorld!','','$'dsegendscsegsegmentassumecs:cseg,ds:dseg,ss:sseg,es:dsegmainprocfarbegin:movax,dsegmovds,axmoves,axmovah,9movcx,4s1:movdx,offsetmessint21hloops1movax,4c00hint21h
3、mainendpcsegendsendbegin第四题namehellossegsegmentstackdb64dup(0)ssegendsdsegsegmentmessdb'helloWorld!','0ah,0dh,'$'dsegendscsegsegmentassumecs:cseg,ds:dseg,ss:sseg,es:dsegmainprocfarbegin:movax,dsegmovds,axmoves,axmovah,9movcx,20s1:movdx,offsetmessint21hloops1movax,4c00hint21hmainendpcsegendsendbegin实
4、验三第二题codesegmentassumecs:codecon8255equ0ff2bhpb8255equ0ff29hpa8255equ0ff28hpc8255equ0ff2ahorg4200hstart:moval,88hmovdx,con8255outdx,almovdx,pc8255L0:inal,dxmovcl,4rolal,cloutdx,alJmpL0codeendsendstart第三题codesegmentassumecs:codecon8255equ0ff2bhpb8255equ0ff29hpa8255equ0ff28horg4100hstart:movdx,con8255
5、moval,80houtdx,almovdx,pa8255L0:moval,0houtdx,alcalldelaymoval,0ffhoutdx,alcalldelayjmpL0hltdelay:pushcxmovcx,005hL3:movbx,8000hL2:decbxjnzL2loopL3popcxretcodeendsendstart第四题codesegmentassumecs:codecon8255equ0ff2bhpb8255equ0ff29hpa8255equ0ff28horg4200hstart:moval,80hmovdx,con8255outdx,almovdx,pb8255
6、L0:moval,0ffhmovcx,08hL1:clcrclal,1outdx,alcalldelayloopL1movcx,08hL2:stcrcral,1outdx,alcalldelayloopL2jmpL0delay:pushcxmovcx,005hL3:movbx,8000hL4:decbxjnzL4loopL3popcxretcodeendsendstart实验四3codesegmentassumecs:codecon8255equ0ff2bhpb8255equ0ff29hpa8255equ0ff28hp8259com0equ0ff80hp8259com1equ0ff81hint
7、q3equinterrupt3org4400hstart:moval,80hmovdx,con8255outdx,almovax,offsetinterruptmovds:[002ch],axmovax,0000hmovds:[002eh],axmoval,13hmovdx,p8259com0outdx,almoval,08hmovdx,p8259com1outdx,almoval,09houtd