《计组实验报告基础汇编语言程序设计实验.docx》由会员分享,可在线阅读,更多相关《计组实验报告基础汇编语言程序设计实验.docx(9页珍藏版)》请在第一文库网上搜索。
1、基础汇编语言程序设计实验【实验目的】1. 了解教学计算机的指令格式、指令编码、选择的寻址方式和每一条指令的具体功能,为进一步学习运算器组成和控制器设计打好基础。2. 了解汇编语言的语句与机器语言的指令之间的对应关系,了解伪指令在汇编过程中的作用。3. 学习教学机监控程序的功能、监控命令的使用方法,体会软件系统在计算机组成中的地位和作用。【实验内容】1 .学习联机使用TH-UN1ON+教学实验系统和仿真终端软件PCEC.2 .使用监控程序的R命令显示/修改寄存器内容、D命令显示存储器内容、E命令修改存储器内容。3 .使用A命令写一小段汇编程序,U命令反汇编刚输入的程序,用G命令连续运行该程序,用
2、T、P命令单步运行并观察程序单步执行情况;【实验内容】1 .用R命令查看寄存器内容或修改寄存器的内容D在命令行提示符状态下输入:RZ;显示寄存器的内容注:寄存器的内容在运行程序或执行命令后会发生变化。2)在命令行提示符状态下输入:RRO/;修改寄存器RO的内容,被修改的寄存器与所赋值之间可以无空格,也可有一个或数个空格2 .用D命令显示存储器内容在命令行提示符状态下输入:D2000/3 .用E命令修改存储器内容在命令行提示符状态下输入:E2000/4 .用D命令显示这几个单元的内容D2000/可以看到这六个地址单元的内容变为OooOI11122223333444455555 .用A命令键入一段
3、汇编源程序,主要是向累加器送入数据和进行运算,执行程序并观察运行结果。1)在命令行提示符状态下输入:A2000/;表示该程序从200OH(内存RAM区的起始地址)地址开始2)用U命令反汇编刚输入的程序在命令行提示符状态下输入:U2000/在相应的地址会得到输入的指令及其操作码3)用G命令运行前面键入的源程序G2000/4)用P或T命令,单步执行这段程序,观察指令执行结果在命令行提示符状态下输入:T2000Z12023:MVRDR2,OOOA2023:MVRDR0,00302024:OUT802025:DECR22026:JRZ202E2027:PUSHRO2028:IN812029:SHRRO
4、202A:JRNC2028202B:P0PRO202C:INCRO202D:JR2024202E:RET202F:/2(2100)MVRDR2,OO1AMVRDRO,0041(2104)OUT80DECR2JRZ210EPUSHRO(2108)IN81SHRROJRNC2108POPROINCROJR2104(210E)RET【实验结果】1屏幕上输出。到9十个数字符a20402040:MVRDr2.00302042:MVRDr3.00392044:d2040204088200030883000390000FFFF0000FFFF.0.0.920480020FDFA0000FFFF0000FFF
5、F0000FFFF20500000FFFF0000FF7F0018FFFE0001FFFFI20580003FF7F0000FFFF0000FFFF008CFFFF.I20600200FFFF0000FFF70080FFFF00C0FFFF20680004FFFF0000FFFF0000FFFF0000FFF320700022FFFF0400FFFF0000FFFF000AFF77.w20780000FFFF0100FFFF0000FFFF0000FFBD20800088FFFF0000FFFF0000F7FF0000FFFB20880000FFFE8004FFFF0000FFFF0000FF
6、FF20900030FF5B0000FFFF0000FFFF0000FFFF.0.20980400FFFF0000FFFF0000FFFF0006FF59.Y20A00000FFFF0009FFFF0008FFFD0030FFFF0.20A80010FFFF4000FFFF0004FFFF0000FFFC20B00001FF3F0000BFFF0000FFFFOOO1EFBF24V-V3VOQQVVV?WVVI111VVVVI111.USD20480020FDFA0000FFFF0000FFFF0000FFFF20500000FFFF0000FF7F0018FFFE0001FFFF.I2058
7、0004FF7F0000FFFF0000FFFF0080FFFFI20600200FFFF0000FFF70080FFFFOOCOFFFF20680004FFFF0000FFFF0000FFFF0000FFF320700022FFFF0400FFFF0000FFFFOOOAFF77.W20780000FFFF0100FFFF0000FFFF0000FFBD20800088FFFF0000FFFF0000F7FF0000FFFB20880000FFFE8004FFFF0000FFFF0000FFFF20900030FF5B0000FFFF0000FFFF0000FFFF.0.20980400FF
8、FFOOOOFFFFOOOOFFFF0006FF59Y20A0OOOOFFFF0009FFFF0008FFFD0030FFFFO.20A8OO1OFFFF4000FFFF0004FFFFOOOOFFFC.,20B0OOOIFF3FOOOOBFFFOOOOFFFF0001EFBF.?tec-2008CrtmonitorVersion3.02007.10ComputerArcitectur1ab.JsinghuaUniversityCopyrightJasonHed204020400000FFFF0000FFFF0000FFFF0000FFFF20480020FFFA0000FFFF0000FFF
9、F0000FFFF20500000FFFF0000FF7F0018FFFE0000FFFF.I20580003FF7F0000FFFF0000FFFF0080FFFFI20600000FFFF0000FFF70080FFFFOOCOFFFF20680004FFFFOOOOFFFFOOOOFFFFOOOOFFFB20700022FFFFOOOOFFFFOOOOFFFFOOOAFF771W2078OOOOFFFFOOOOFFFFOOOOFFFFOOOOFFBD20800008FFFFOOOOFFFFOOOOF7FFOOOOFFFB2088OOOOFFFE0004FFFFOOOOFFFFOOOOFF
10、FF20900021FFDBOOOOFFFF0008FFFFOOOOFFFF.!2098OOOOFFFFOOOOFFFFOOOOFFFF0006FF5B20A0OOOOFFFF0009FFFF0008FFFD0030FFFFO.20A8OO1OFFFF4000FFFF0004FFFFOOOOFFFC.20B0OOO1FF7FOOOOFFFFOOOOFFFF0001FFBFI1断电后的显示:Z.U4tV.P1V1I4,VUUU2042:MVRDr3,00392044:d2040204088200030883000390000FFFF0000FFFF.0.0.9.20480020FDFA0000F
11、FFF0000FFFF0000FFFF20500000FFFF0000FF7F0018FFFE0001FFFF.I.20580003FF7F0000FFFF0000FFFF008CFFFFI20600200FFFFOOOOFFF70080FFFFOOCOFFFF20680004FFFFOOOOFFFFOOOOFFFFOOOOFFF320700022FFFF0400FFFFOOOOFFFFOOOAFF77.W2078OOOOFFFF0100FFFFOOOOFFFFOOOOFFBD20800088FFFFOOOOFFFFOOOOF7FFOOOOFFFB2088OOOOFFFE8004FFFFOOOOFFFFOOOOFFFF20900030FF5BOOOOFFFFOOOOFFFFOOOOFFFF,0.20980400FFFFOOOOFFFFOOOOFFFF0006FF59Y20A0OOOOFFFF0009FFFF0008FFFD0030FFFF0.20A8OO1OFFFF4000FFFF0004FFF