资源描述:
《微机原理及应用实验报告》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、微机原理及应用实验报告班级:姓名:学号:中南大学机电工程学院精密测控实验室otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevicto
2、ryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCountypartyCommitteeSecretary,Ministersand11实验二软件程序设计1.实验目的:1、掌握MCS-51单片机指令系统及用汇编语言编程技巧;2、了解和熟悉用M
3、CS-51单片机仿真开发机调试程序的方法。2.实验内容:1、编写排序程序并上机调试通过。已知8031内部RAM60H~69H单元中,依次存放了FFH,99H,77H,CCH,33H,DDH,88H,BBH,44H,EEH,它们均为无符号数,编程将它们按递减次序排序,即最大数放在60H中,最小数放在69H中。2.、编写多字节加法程序并上机调试通过。8031内部RAM20H~22H单元中,存放了3字节被加数(低字节在前),在2AH~2CH单元中存放3字节加数(低字节在前),求两数之和,并将结果存入以20H为起始地址的区域中(低字节在
4、前)。3.实验设备名称、型号:台式微型计算机MCS-51仿真开发机THKSCM-2A4.画出软件程序流程图,写出上机调试通过的汇编语言程序清单:程序1、编写排序程序并上机调试通过。已知8031内部RAM60H~69H单元中,依次存放了FFH,99H,77H,CCH,33H,DDH,88H,BBH,44H,EEH,它们均为无符号数,编程将它们按递减次序排序,即最大数放在60H中,最小数放在69H中。解:本设计采用冒泡排序法,使用双重循环,并在内循环中进行比较如果合乎从大到小的顺序则不动,否则两两交换,这样比较下去,比较9次后,最小
5、的那个数就会沉底,在下一次比较时将减少一次比较次数。如果一次比较完毕,没有发生交换,说明已经按照从大到小的顺序排列了。则可以退出循环,结束程序。程序结构框图和程序代码如下:otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganiz
6、ation,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCountypartyCommitteeSecretary,Ministersand11othe
7、rstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOff
8、iceoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCo