资源描述:
《微机原理课程设计---学生成绩名次表设计》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、微机原理课程设计姓名:班级:生医0801学号:3080505038日期:2011-01-09、一.设计题目学生成绩名次表设计二.设计要求为进一步熟悉排序方法,编写程序,将0-100之间的30个成绩存入首址为1000H的存储区中。1000H+i表示学号为i的学生成绩。编写程序使得在2000H开始的区域排出名次表。2000H+i为学号i的学生的名次。三.设计程序DATASEGMENTSTUNUMEQU10MESS1DB'qingyicishuru1-10haoxueshengdechengji:',0DH,0AH,'$'MESS2DB'1-10haox
2、ueshengdemingciyiciwei:',0DH,0AH,'$'ORG1000HCHENGJIDB30DUP(?)ORG2000HMINGCIDB30DUP(?)DATAENDSCODESEGMENTASSUMECS:CODE,DS:DATASTART:MOVAX,DATAMOVDS,AX;chushihuaMOVAH,09HMOVDX,OFFSETMESS1INT21H;xianshitishixinxiMOVSI,OFFSETCHENGJI;chengjibiaoshouzhiMOVCX,STUNUM;xueshengshusongru
3、CXUUU:CALLSHURU;diaoyongshuruzichengcu,shuzhisongDXMOV[SI],DL;cunruchengjibiaohuanchongquINCSI;zhixiangxiayidanyuanLOOPUUUMOVCX,STUNUM;xueshengshusongCXMOVDI,OFFSETMINGCI;mingcibiaoshouzhiVVV:CALLBIJIAO;diaoyongbijiaozichengxuMOVAL,STUNUM;xueshengshusongALSUBAL,CLINCAL;jisuanm
4、ingciMOVBX,DXMOV[DI+BX],AL;jiDXxuehaoduiyingmingciLOOPVVVMOVAH,09HLEADX,MESS2INT21H;xianshitishixinxiMOVCX,STUNUMMOVSI,OFFSETMINGCIWWW:MOVAL,[SI]CALLXIANSHIPUSHDXPUSHAXMOVAH,02MOVDL,20HINT21H;xianshikonggePOPAXPOPDXINCSILOOPWWWMOVAX,4C00HINT21HBIJIAOPROCNEARPUSHCXMOVCX,STUNUMM
5、OVAL,00HMOVBX,OFFSETCHENGJIMOVSI,BXCCC:CMPAL,[SI]JAEJJJMOVAL,[SI]MOVDX,SISUBDX,BXJJJ:INCSILOOPCCCADDBX,DXMOVBYTEPTR[BX],00HPOPCXRETBIJIAOENDPXIANSHIPROCNEARPUSHCXMOVBL,ALMOVDL,BLMOVCL,04ROLDL,CLANDDL,0FHCALLXIANSHI1MOVDL,BLANDDL,0FHCALLXIANSHI1POPCXRETXIANSHIENDPXIANSHI1PROCNE
6、ARADDDL,30HCMPDL,3AHJBDDDADDDL,27HDDD:MOVAH,02HINT21HRETXIANSHI1ENDPSHURUPROCNEARPUSHCXXORDX,DXGGG:MOVAH,01HINT21HCMPAL,0DHJZPPPMOVCL,04SHLDX,CLXORAH,AHADDDX,AXJMPGGGPPP:PUSHDXMOVAH,02HMOVDL,0AHINT21HPOPDXPOPCXRETSHURUENDPCODEENDSENDSTART四.设计流程图一.设计题目小写字母转换成大写字母一.设计要求为了解小写字母和大
7、写字母在计算机内的表示方法,并学习如何进行转换。编写程序,接收键盘字符,并将其中N小写字母转变为大写字母,然后显示在屏幕上。二.设计程序DATASEGMENTMESS1DB'qingshuruzifuchuan!',0DH,0AH,'$'BUFDB80DUP('$')DATAENDSCODESEGMENTASSUMECS:CODE,DS:DATASTART:MOVAX,DATAMOVDS,AXMOVBX,OFFSETBUF;BXzhixianghuanchongqushouzhiMOVAH,09HLEADX,MESS1INT21HKKK:MOVSI
8、,0000H;SIqing0SB:MOVAH,01HINT21HCMPAL,0DHJZpppCMPAL,61H;97(a)