Assemble several interesting experiments

Source: Internet
Author: User

Lab 1:

Enter the following command, I first use the a command to enter, and with the T command for single-step debugging.

It can be found that the AX,BX has changed under different commands, and the IP value is constantly increasing depending on the length of the input instruction. Later I used the G command to perform a single execution (the result is the same as one step).

It is important to note that the final range of G should be the address at the end of the command, not the next address.

Then I tried using the e command.

First disassembly looked down and found no problem.

However, when I try to use the G command to complete a one-time execution is a problem, when I executed to the second-to-last address is a success, and execution to the final address but there is a state of death, I tried to use different methods have failed, do not know why, help the big guy.

Lab 2:

Use 3 instructions to complete 2 of the 8-square calculation. Here I'm using the 7-time JMP command to complete the calculation. Remember to change the initial value of CS and IP as we wrote from 2000:0, not from the default address.

Then use T to start the single-step debugging, because the first to perform 2 moves and additions, the following jmp each time to execute 2 times, a total of 7 times in jmp, so the total to execute the T command 16 times to get the desired results.

Here you can see that the 16 binary of AX is converted to 0100 to 10, which is 2 of the 8 square 16.

Lab 3:

Here to find the production date in FFF00H~FFFFFH. So I used the D command to start looking up from fff0:0 and found an interesting phenomenon.

With these graphs, you can see that in each segment the address from fff0 to FFFF appears in the 00x0 01/01/92 this value (x is 0~f) and the last of the segment address has such a relationship with the X in 00x0 the last one is defined as Y (that is, Fffy) y+x=16 The address of the 00x0 will appear 01/01/92. Then I tried to modify the value, and found that it was not possible to modify the success.

Lab 4:

Try to modify the values in a contiguous b8100 of memory, and the situation arises.

And then I change it somewhere else and that doesn't happen.

Later, the book found that the memory cell address from the A0000~BFFFF are video memory addresses, there will be some patterns.

Summarize:

After these experiments, we have a preliminary understanding of some of the instructions in the compilation, and also realized the convenience of the compilation to the memory modification. Here are a few more questions.

1. Experiment 1: However, when I try to use the G command to complete a one-time execution is a problem, when I executed to the second-to-last address is successful, and the execution to the final address but there is a state of death, I tried to use a different method failed, do not know why, help the big guy.

2. Experiment 2: There is a problem here, because JMP will execute indefinitely, so how can you abort the program.

3. Experiment 3: There is also a question, if this is the date of production, why the number of/92. As we all know, one months at most only 31 days. Did I get the wrong one or what?

Assemble several interesting experiments

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.