欢迎来到天天文库
浏览记录
ID:1208419
大小:52.50 KB
页数:9页
时间:2017-11-08
《微机原理软件实验》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、实验一将键盘输入的小写字母转为大写字母一.实验目的了解小写字母和大写字母在计算机内的表示方法,并学习如何转换。二.实验内容接收键盘字符(以Ctrl+C结束),并将其中的小写字母转换为大写字母,然后进行显示。三.参考程序清单CRLFMACROMOVAH,02HMOVDL,0DHINT21HMOVAH,02HMOVDL,0AHINT21HENDMDATASEGMENTBUFDB100DUP(?)DATAENDSSTACK1SEGMENTSTADB50DUP(?)TOPEQULENGTHSTASTACK1EN
2、DSCODESEGMENTASSUMECS:CODE,DS:DATA,SS:STACK1START:MOVAX,DATAMOVDS,AXMOVES,AXMOVAX,STACK1MOVSS,AXMOVSP,TOPMOVBX,OFFSETBUFKKK:MOVSI,0GGG:MOVAH,01H第1页共2页INT21HCMPAL,03HJZPPPCMPAL,0DHJZBBBCMPAL,61HJBTTTCMPAL,7AHJATTTSUBAL,20HTTT:MOV[BX+SI],ALINCSIJMPGGGBBB:M
3、OV[BX+SI],ALMOVAL,0AHMOV[BX+SI+1],ALMOVAL,‘$’MOV[BX+SI+2],ALMOVAH,09HMOVDX,BXINT21HJMPKKKPPP:MOVAX,4C00HINT21HCODEENDSENDSTART实验二两个多位十进制数相加的实验一.实验目的1.学习数据传送和算术运算指令的用法。2.熟悉在PC机上建立、汇编、连接、调试和运行8088/8086汇编语言程序的过程。二.实验内容将两个多位十进制数相加。要求被加数均以ASCII码的形式各自顺序存放在以DAT
4、A1和DATA2为首的5个内存单元中(低位在前),结果送回DATA1处。三.参考程序清单CRLFMACROMOVAH,02HMOVDL,0DHINT21HMOVAH,02HMOVDL,0AHINT21HENDMDATASEGMENTDATA1DB33H,39H,31H,37H,34HDATA2DB36H,35H,30H,38H,32HDATAENDSSTACK1SEGMENTSTADB80HDUP(?)TOPEQULENGTHSTASTACK1ENDSCODESEGMENTASSUMECS:CODE,S
5、S:STACK1,DS:DATASTART:MOVAX,DATAMOVDS,AXMOVAX,STACK1MOVSS,AXMOVAX,TOPMOVSP,AXMOVSI,OFFSETDATA2MOVBX,05CALLDISPLCRLFMOVSI,OFFSETDATA1MOVBX,05第1页共2页CALLDISPLCRLFMOVDI,OFFSETDATA2CALLADDAMOVSI,OFFSETDATA1MOVBX,05CALLDISPLCRLFMOVAX,4C00HINT21HDISPLPROCNEARDS
6、1:MOVAH,02HMOVDL,[BX+SI-1]INT21HDECBXJNZDS1RETDISPLENDPADDAPROCNEARMOVDX,SIMOVBP,DIMOVBX,05AD1:SUBBYTEPTR[BX+SI-1],30HSUBBYTEPTR[BX+DI-1],30HDECBXJNZAD1MOVSI,DXMOVDI,BPMOVCX,05CLCAD2:MOVAL,[SI]MOVBL,[DI]ADCAL,BLAAAMOV[SI],ALINCSIINCDILOOPAD2MOVSI,DXMOVDI
7、,BPMOVBX,05AD3:ADDBYTEPTR[BX+SI-1],30HADDBYTEPTR[BX+DI-1],30HDECBXJNZAD3RETADDAENDPCODEENDSENDSTART第2页共2页实验三两个十进制数相乘的实验一.实验目的1.掌握乘法和循环指令的用法。2.熟悉在PC机上建立、汇编、连接、调试和运行,8088/8086汇编语言程序的过程。二.实验内容实现十进制数的乘法。被乘数和乘数均以ASCII码的形式存放在内存中,乘积在屏幕上显示出来。三.参考程序清单DATASEGMENTD
8、ATA1DB32H,39H,30H,35H,34HDATA2DB33HRESULTDB6DUP(?)DATAENDSSTACK1SEGMENTSTADB80HDUP(?)TOPEQULENGTHSTASTACK1ENDSCODESEGMENTASSUMECS:CODE,SS:STACK1,DS:DATA,ES:DATASTART:MOVAX,DATAMOVDS,AXMOVAX,STACK1MOVSS,AXMOVAX,TOPMOVSP,AXM
此文档下载收益归作者所有