Assembly Experiment5
Answer to the experiment(1),(2),(3),(4)
Experiment(5):
Screenshots&Results:
from the command u
we can know that
a : 076A
b :076B
c1 :076C
elements in c1 before adding a and b
after adding a and b
076C:0000~076C:0007: 02 04 06 08 0A 0C 0E 10
just double the elements in a (also a+b)
Experiment(6):
Screenshots&Results:
disassemblig:
we can know that
a:076A
b:076C
elements in b before push elements into stack b
the last two elements: 6c 70 is the address of the stack b (076C)
elements instack b after pushing elements into b
obviouly, the answer is right
Review of this experiment:
From this experiment, we get the method to design the program by ourselves, especially under the circuma=stance that the several segments are given.
Also, we need to know which way to add a number into a register is more fast, for example, when expressing (bx)+=1 in assembly language, we use ( inc bx ) instead of ( add bx,1), because when you disassemblying the code, you will find that the former statement cost 2 words, but the latter cost 3 words. But, it doesn't work when the number getting bigger, for example, if you want to express (bx)+=2 or more, using ( add bx,2 ) is faster.
Another important method is that we need to focus on the changes of the elements in the segments during executing step by step, only by dong this dull work, you can easily find your protential mistakes.
However , the most important recipe I get during this experiment is that, because there are only 4 special segments in 8086CPU (DS, ES, SS, CS) , which means that you should use them properly after thinking. And, if you need to reuse one of these segments, you should protect the former data in the segments by using (push segment) and (pop segment) to preserve and recover the data in the segment before.
Assembly Experiment5的更多相关文章
- 为C# as 类型转换及Assembly.LoadFrom埋坑!
背景: 不久前,我发布了一个调试工具:发布:.NET开发人员必备的可视化调试工具(你值的拥有) 效果是这样的: 之后,有小部分用户反映,工具用不了(没反应或有异常)~~~ 然后,建议小部分用户换个电脑 ...
- ASP.NET Core: You must add a reference to assembly mscorlib, version=4.0.0.0
ASP.NET Core 引用外部程序包的时候,有时会出现下面的错误: The type 'Object' is defined in an assembly that is not referenc ...
- An error occurred during the installation of assembly 'Microsoft.VC90.CRT……的问题
有一段时间没有用到AnkhSvn了,今天工作需要安装了一下.结果安装到一半就无法继续了,提示An error occurred during the installation of assembly ...
- Beennan的内嵌汇编指导(译)Brennan's Guide to Inline Assembly
注:写在前面,这是一篇翻译文章,本人的英文水平很有限,但内嵌汇编是学习操作系统不可少的知识,本人也常去查看这方面的内容,本文是在做mit的jos实验中的一篇关于内嵌汇编的介绍.关于常用的内嵌汇编(AT ...
- MAC上安装 HLA(High Level Assembly)
1.安装HLA 最新版的hla汇编器可在这里下载,支持MacOs,Linux,Windows平台 2.安装步骤 将下载好的hla程序包放在Mac根目录下 最重要的一步是设置好环境变量,打开Mac根目录 ...
- .NET 程序集Assembly使用
概述 一直以来,我们都在用C#编写程序,编写程序的时候,我们用到继承.多态.接口以及泛型,我们也都明白子类可以继承抽象类,并能够重写父类的抽象方法,可是大家是否想过,如下几个问题: 1.凡树必有根和叶 ...
- configuration error-could not load file or assembly crystaldecisions.reportappserver.clientdoc
IIS启动网站后报错: configuration error Could not load file or assembly 'crystaldecisions.reportappserver.cl ...
- Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its de
页面加载时出现这个错误: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Cul ...
- How to make your assembly more secure from referencing by unauthorized bits
Now the security has a trend to become more and more important in our daily work, hence I did some r ...
随机推荐
- L1-064 估值一亿的AI核心代码
以上图片来自新浪微博. 本题要求你实现一个稍微更值钱一点的 AI 英文问答程序,规则是: 无论用户说什么,首先把对方说的话在一行中原样打印出来: 消除原文中多余空格:把相邻单词间的多个空格换成 1 个 ...
- .NET界面控件DevExpress发布v18.2.8|附下载
DevExpress Universal Subscription(又名DevExpress宇宙版或DXperience Universal Suite)是全球使用广泛的.NET用户界面控件套包,De ...
- C++ Coroutine简明教程
在C++里,一个函数如果其函数体实现中包含co_await.co_yield.co_return中任何一个关键字,那么这个函数就是一个coroutine.其中: co_await:挂起当前的corou ...
- Problem 10: Summation of primes
def primeslist(max): ''' 求max值以内的质数序列 ''' a = [True]*(max+1) a[0],a[1]=False,False for index in rang ...
- linux中sed命令批量修改
sed命令下批量替换文件内容 格式: sed -i "s/查找字段/替换字段/g" `grep 查找字段 -rl 路径` 文件名 -i 表示inplace edit,就地修改文件 ...
- MySQL存储过程中实现执行动态SQL语句
sql语句中的任何部分都可以作为参数. DROP PROCEDURE if exists insertdata; delimiter //CREATE PROCEDURE insertdata(IN ...
- zabbix添加IIS网站计数器(并发连接数)详解
环境:windows server 2012 前提:IIS上要添加好配置 1,在被监控主机,powershell输入perfmon.msc 2,点击添加按钮 3,在下拉菜单中点击小箭头 ...
- Delphi非官方的补丁
http://git.kngstr.com/KngStr/delphi-fixes 使用方法 方法一: 1. 拷贝需要的补丁文件到你的工程目录 2. 拷贝编译的时候缺少或错误的文件到你的工程目录 优缺 ...
- commons-dbcp2 新版本2.6使用连接池在关闭服务器的时候会有内存溢出的BUG....
这是异常信息.本人使用的mysql8.0数据库驱动版本mysql-connector-java Version 8.0.11,发生这种情况的原因主要是Dbcp2的XBasicDataSource在关闭 ...
- XShell转发数据库端口
隧道添加 源主机为本地 目标主机为需要转发的主机