资源描述:
《计算机111班《汇编语言设计》_课程设计_指导书》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Z计算机111)班《汇编语言程序设计》课程设计指导书一、课程设计的目的本课程设计是在学完教学大纲规定的全部内容、完成所有实践环节的基础上,旨在深化学生学习的汇编语言课程基本知识,进一步掌握汇编语言程序设计方法,提高分析问题、解决问题的综合应用能力。二、课程设计内容(1)课题①:磁盘文件管理系统要求:功能菜单的编制;向磁盘文件中写入信息;从磁盘文件中读出信息并显示。参考程序:datasegmentmenudb0dh,0ah,'********************************************',0dh,0ahdb'*menu*',0dh,0ahdb'*--
2、----------------------------------------*',0dh,0ahdb'*1.Createfile*',0dh,0ahdb'*2.Writetofile*',0dh,0ahdb'*3.Readfile*',0dh,0ahdb'*4.Quit*',0dh,0ahdb'*------------------------------------------*',0dh,0ahdb'*Choice(1--4)*',0dh,0ahdb'********************************************',0dh,0ah,'$'pa
3、thnamedb'D:IBMPC.TXT',00handledw?buffer1db60,0,60dup(?)buffer2db60,0,60dup(?)huanhangdb'',0dh,0ah,'$'chosedb0dh,0ah,'Pleaseenterthedigitalfrom1-4!',0dh,0ah,'$'enterydb0dh,0ah,'Enterwhatyouwanttowritetothefile!(Thelengthofthestringsisunder60)',0dh,0ah,'$'str_ok1db0dh,0ah,'Createfilesuccessf
4、ully!',0dh,0ah,'$'str_ok2db0dh,0ah,'Wtitetofilesuccessfully!',0dh,0ah,'$'str_ok3db0dh,0ah,'Readfromfilesuccessfully!',0dh,0ah,'$'str_error1db'Createfileerror!$'str_error2db'Openfileerror!$'str_error3db'Writetofileerror!$'str_error4db'Readfileerror!$'str_error5db'Exitfromfileerror!$'dataends
5、~21~codesegmentassumecs:code,ds:data~21~mainprocfarstart:movax,datamovds,axmovax,0600hcallmecallchoiceretmainendpmeprocnearmovah,9leadx,menuint21hmeendpchoiceprocnearmovah,1int21hcmpal,31hjenext1cmpal,32hjenext2cmpal,33hjenext3cmpal,34hjenext4jmpbacknext1:callcreathnext2:callentrynext3:mova
6、h,9leadx,huanhangint21hcallreadnext4:movax,4c00hint21hback:movah,9leadx,choseint21hcallmeretchoiceendpcreathprocnearmovah,3chleadx,pathnamemovcx,0int21hjcerror1movhandle,axjmpexiterror1:movah,9leadx,str_error1int21hjmpexit1exit:movah,9leadx,str_ok1int21hexit1:callchoicecreathendpentryprocne
7、armovah,9leadx,enteryint21hleadx,buffer1movah,0ahint21hsubch,chmovcl,buffer1+1adddx,2callwrithretentryendpwrithprocnearmovah,3dhleadx,pathnamemoval,1int21hjcerror2movhandle,axmovah,40hleadx,buffer1+2~21~movbx,handlemovcx,60int21hjcerror3movah,3ehmovbx,ha