• Assembly Experiment4


    AIMS & PREPARATIONS of THIS EXPERIMENT:

    SCREENSHOTS of THIS EXPERIMENT:

    1.

     

    change 0403h to 0441h

    Now, I find myself made a mistake:

    the former code:

    see, only ( inc bx ) for one time

    it include 16*2 byte unit, so (bx)=(bx)+1 should twice

    after:

    now :

    change 0403h to 0410h

     2. task code:

    using d command :

    I find that ,in 0:23F, there is no number !

    so I changed 63 to 64

    then compile, link, run and debug

    using d command:

    now the task is finished !

    3.experiment 4(3) on the book, page 121

    copy the code from beginning to ( mov ax, 4c00h ) to internal memory

    certainly, the first step is move the current cs address to register ds for the beginning of the program

    however, we don't konw the length of the whole program

    so give register cx a radom number to test ( use command u in debug to check the length )

    we can see that the program is from (076A:0000) to (076A:0016)

    the length is 0017H

     so we correct the program's code:

     

     

    using d command in debug.exe

    actually, the statements are copied in (0000:0200) to (0000:0217) occupy 0017H units

     SUMMARY & REVIEW of THIS EXPERIMENT :

     In this experiment, we learned how to use loop and [bx] to realize circulation.

    Because of grasping the methid to use masm,link and debug, the experiment is easy to carry on.

    But what is most sigificant in this experiment is the handling of byte unit, in the experiment task1 and 2, we may easily confused by the using of command (inc) owing to the difference of word unit and byte unit. In this case, double (inc bx) is needed.

  • 相关阅读:
    Vs code 通用插件
    VS Code 使用小技巧
    vscode: Visual Studio Code 常用快捷键
    AngularJS 和 Electron 构建桌面应用
    设计模式(四)简单工厂模式
    java必备——经典的Hibernate
    操作系统之分页分段介绍
    Js 标签云
    Android多线程分析之中的一个:使用Thread异步下载图像
    033 调整数组顺序使奇数位于偶数前面(keep it up)
  • 原文地址:https://www.cnblogs.com/mrorangerabbit/p/9977835.html
Copyright © 2020-2023  润新知