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的更多相关文章

  1. 为C# as 类型转换及Assembly.LoadFrom埋坑!

    背景: 不久前,我发布了一个调试工具:发布:.NET开发人员必备的可视化调试工具(你值的拥有) 效果是这样的: 之后,有小部分用户反映,工具用不了(没反应或有异常)~~~ 然后,建议小部分用户换个电脑 ...

  2. 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 ...

  3. An error occurred during the installation of assembly 'Microsoft.VC90.CRT……的问题

    有一段时间没有用到AnkhSvn了,今天工作需要安装了一下.结果安装到一半就无法继续了,提示An error occurred during the installation of assembly ...

  4. Beennan的内嵌汇编指导(译)Brennan's Guide to Inline Assembly

    注:写在前面,这是一篇翻译文章,本人的英文水平很有限,但内嵌汇编是学习操作系统不可少的知识,本人也常去查看这方面的内容,本文是在做mit的jos实验中的一篇关于内嵌汇编的介绍.关于常用的内嵌汇编(AT ...

  5. MAC上安装 HLA(High Level Assembly)

    1.安装HLA 最新版的hla汇编器可在这里下载,支持MacOs,Linux,Windows平台 2.安装步骤 将下载好的hla程序包放在Mac根目录下 最重要的一步是设置好环境变量,打开Mac根目录 ...

  6. .NET 程序集Assembly使用

    概述 一直以来,我们都在用C#编写程序,编写程序的时候,我们用到继承.多态.接口以及泛型,我们也都明白子类可以继承抽象类,并能够重写父类的抽象方法,可是大家是否想过,如下几个问题: 1.凡树必有根和叶 ...

  7. configuration error-could not load file or assembly crystaldecisions.reportappserver.clientdoc

    IIS启动网站后报错: configuration error Could not load file or assembly 'crystaldecisions.reportappserver.cl ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. 魅族pro 7详细打开Usb调试模式的方法

    经常我们使用安卓手机链上Pc的时候,或者使用的有些APP比如我们公司营销小组经常使用的APP引号精灵,之前老版本就需要开启usb开发者调试模式下使用,现经常新版本不需要了,如果手机没有开启usb开发者 ...

  2. L1-063 吃鱼还是吃肉

      国家给出了 8 岁男宝宝的标准身高为 130 厘米.标准体重为 27 公斤:8 岁女宝宝的标准身高为 129 厘米.标准体重为 25 公斤. 现在你要根据小宝宝的身高体重,给出补充营养的建议. 输 ...

  3. Pycharm 远程调试

    上传后发现成图片了,很模糊.可以看我在百度盘分享pdf文件. https://pan.baidu.com/s/1bYVcAq40SRFtn8qXCPH6TQ

  4. Git clone出现SSL certificate problem

    1 可以在cmd下,设置 git config --global http.sslVerify false git clone  XXX 即可. 2 TortoiseGit设置 打开TortoiseG ...

  5. shell中特殊位置参数变量

    shell中特殊位置参数变量:$0.$n.$#.$*.$@ $0:获取当前执行shell脚本文件名,如果执行脚本包含路径,那么就包括脚本路径 $n:获取当前执行shell脚本的第n个参数值.n=1.. ...

  6. maven管理jar,pom.xml导入spring依赖

    <properties> <junit.version>4.12</junit.version> <spring.version>4.3.9.RELEA ...

  7. selenium中切换浏览器不同tab 的操作

    from selenium import webdriverimport timedriver=webdriver.Chrome()driver.get('http://ui.imdsx.cn/uit ...

  8. python小白的自述

    python语言作为目前受用面比较广泛的一种语言,具有简单易学,功能强大的特点.初次接触python完全是由于好奇心,正是因为python的出现,才让我觉得编程不是那么的神秘了.不过作为一个编程小白来 ...

  9. RNA-seq 数据文件处理

    http://www.fungenomics.com/article/30 [专题]基因组学技术专题(二)-- 为什么说FPKM/RPKM是错的 下载数据 wget是linux下一个从网络上自动下载文 ...

  10. 查询MySQL数据库中表结构的几种方法

    什么是表结构?表结构就是定义数据表文件名,确定数据表包含哪些字段,各字段的字段名.字段类型.及宽度,并将这些数据输入到计算机当中. 查询方法:以表‘employees’为例子 1.describe(d ...