1、东北大学软件学院汇编实验报告3(附录二)汇编语言程序设计实验报告 实验名称循环结构与子程序设计实验班 级学 号姓 名日 期成 绩评 阅 人 软件学院一、 实验目的与意义了解和掌握加、减、乘、除指令的在程序设计中的用法和应注意的问题,了解和掌握移位指令的功能、作用和方法。了解和掌握循环控制类指令的功能、作用和方法。学会循环程序设计的方法。学习汇编语言输出输入语句的设计。二、 实验环境操作系统:windows7调试软件名称及版本号:Microsoft Visual Studio2008三、 实验的预习内容预习的主要内容:预习了加减乘除指令,移位指令,循环指令的作用及方法,学习力函数的调用,在屏幕上
2、打出指定字符和数字实验思路:将寄存器赋值,然后对寄存器进行加减乘除,移位的运算,观察寄存器的数值变化,用逐语句观察循环语句中程序执行的顺序,了解循环的作用四、 实验的步骤与调试方法实验的大致步骤:在.code中对程序进行加减乘除,移位操作,观察寄存器的变化实验中遇到的问题及调试方法:在做9*9乘法表时,由于是32位的操作系统,无法用中断来进行回车换行,最后通过给赋值,直接打出回车五 实验数据与实验结果(1) 在DEBUG系统状态下,分别编制、调试并记录以下加、减程序段的每一条指令的运行情况,查看寄存器的结果:()MOV EAX,2389 EAX = 00000955 EBX = 7FFDF00
3、0 ECX = 00000000 EDX = 00131005 ESI = 00000000 EDI = 00000000 EIP = 0013101A ESP = 002AF9B4 EBP = 002AF9BC EFL = 00000246 MOV EBX,0CEDFH EAX = 00000955 EBX = 0000CEDF ECX = 00000000 EDX = 00131005 ESI = 00000000 EDI = 00000000 EIP = 0013101F ESP = 002AF9B4 EBP = 002AF9BC EFL = 00000246 ADD EAX,EBX E
4、AX = 0000D834 EBX = 0000CEDF ECX = 00000000 EDX = 00131005 ESI = 00000000 EDI = 00000000 EIP = 00131021 ESP = 002AF9B4 EBP = 002AF9BC EFL = 00000212 () MOV EAX,2389 EAX = 00000955 EBX = 7FFDD000 ECX = 00000000 EDX = 008D1005 ESI = 00000000 EDI = 00000000 EIP = 008D101A ESP = 0028F89C EBP = 0028F8A4
5、EFL = 00000246 MOV EBX,0CEDFH EAX = 00000955 EBX = 0000CEDF ECX = 00000000 EDX = 008D1005 ESI = 00000000 EDI = 00000000 EIP = 008D101F ESP = 0028F89C EBP = 0028F8A4 EFL = 00000246 SUB EAX,EBX EAX = FFFF3A76 EBX = 0000CEDF ECX = 00000000 EDX = 008D1005 ESI = 00000000 EDI = 00000000 EIP = 008D1021 ESP
6、 = 0028F89C EBP = 0028F8A4 EFL = 00000293 () MOV EAX,2389 EAX = 00000955 EBX = 7FFD8000 ECX = 00000000 EDX = 00B31005 ESI = 00000000 EDI = 00000000 EIP = 00B3101A ESP = 002BFA7C EBP = 002BFA84 EFL = 00000246 MOV EBX,0CEDFH EAX = 00000955 EBX = 0000CEDF ECX = 00000000 EDX = 00B31005 ESI = 00000000 ED
7、I = 00000000 EIP = 00B3101F ESP = 002BFA7C EBP = 002BFA84 EFL = 00000246 ADD AH,BH EAX = 0000D755 EBX = 0000CEDF ECX = 00000000 EDX = 00B31005 ESI = 00000000 EDI = 00000000 EIP = 00B31021 ESP = 002BFA7C EBP = 002BFA84 EFL = 00000296 ADD AL,BL EAX = 0000D734 EBX = 0000CEDF ECX = 00000000 EDX = 00B310
8、05 ESI = 00000000 EDI = 00000000 EIP = 00B31023 ESP = 002BFA7C EBP = 002BFA84 EFL = 00000213 () MOV EAX,2389 EAX = 00000955 EBX = 7FFD3000 ECX = 00000000 EDX = 00FD1005 ESI = 00000000 EDI = 00000000 EIP = 00FD101A ESP = 001AFB4C EBP = 001AFB54 EFL = 00000246 MOV EBX,0CEDFH EAX = 00000955 EBX = 0000C
9、EDF ECX = 00000000 EDX = 00FD1005 ESI = 00000000 EDI = 00000000 EIP = 00FD101F ESP = 001AFB4C EBP = 001AFB54 EFL = 00000246 ADD AH,BH EAX = 0000D755 EBX = 0000CEDF ECX = 00000000 EDX = 00FD1005 ESI = 00000000 EDI = 00000000 EIP = 00FD1021 ESP = 001AFB4C EBP = 001AFB54 EFL = 00000296 ADC AL,BL EAX =
10、0000D734 EBX = 0000CEDF ECX = 00000000 EDX = 00FD1005 ESI = 00000000 EDI = 00000000 EIP = 00FD1023 ESP = 001AFB4C EBP = 001AFB54 EFL = 00000213 ()在DEBUG系统状态下,分别编制、调试并记录以下乘、除程序段的每一条指令的运行情况:()MOV AL,23 EAX = 752E1117 EBX = 7FFDF000 ECX = 00000000 EDX = 01351005 ESI = 00000000 EDI = 00000000 EIP = 0135
11、1017 ESP = 002BFADC EBP = 002BFAE4 EFL = 00000246 MOV BL,0CEH EAX = 752E1117 EBX = 7FFDF0CE ECX = 00000000 EDX = 01351005 ESI = 00000000 EDI = 00000000 EIP = 01351019 ESP = 002BFADC EBP = 002BFAE4 EFL = 00000246 MUL BL EAX = 752E1282 EBX = 7FFDF0CE ECX = 00000000 EDX = 01351005 ESI = 00000000 EDI =
12、00000000 EIP = 0135101B ESP = 002BFADC EBP = 002BFAE4 EFL = 00000A47 () MOV AX,2389 EAX = 752E0955 EBX = 7FFDE000 ECX = 00000000 EDX = 001D1005 ESI = 00000000 EDI = 00000000 EIP = 001D1019 ESP = 003EFE7C EBP = 003EFE84 EFL = 00000246 MOV BX,0CEDFH EAX = 752E0955 EBX = 7FFDCEDF ECX = 00000000 EDX = 0
13、01D1005 ESI = 00000000 EDI = 00000000 EIP = 001D101D ESP = 003EFE7C EBP = 003EFE84 EFL = 00000246 MUL BX EAX = 752E870B EBX = 7FFDCEDF ECX = 00000000 EDX = 001D078A ESI = 00000000 EDI = 00000000 EIP = 001D1020 ESP = 003EFE7C EBP = 003EFE84 EFL = 00000A47 () MOV AX,2389 EAX = 752E0955 EBX = 7FFDA000
14、ECX = 00000000 EDX = 00901005 ESI = 00000000 EDI = 00000000 EIP = 00901019 ESP = 001AF828 EBP = 001AF830 EFL = 00000246 MOV BL,0CEH EAX = 752E0955 EBX = 7FFDA0CE ECX = 00000000 EDX = 00901005 ESI = 00000000 EDI = 00000000 EIP = 0090101B ESP = 001AF828 EBP = 001AF830 EFL = 00000246 DIV BL EAX = 752E7
15、B0B EBX = 7FFDA0CE ECX = 00000000 EDX = 00901005 ESI = 00000000 EDI = 00000000 EIP = 0090101D ESP = 001AF828 EBP = 001AF830 EFL = 00000246 () MOV AX,2389 EAX = 75630955 EBX = 7FFD6000 ECX = 00000000 EDX = 00B51005 ESI = 00000000 EDI = 00000000 EIP = 00B51019 ESP = 0028FAAC EBP = 0028FAB4 EFL = 00000246 MOV DX,0856 EAX = 75630955 EBX = 7FFD6000 ECX = 00000000 EDX = 00B50358 ESI = 00000000 EDI = 000
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1