Programming with machine instructions and assembly instructions

Source: Internet
Author: User

4.

1.

 

 

Experiment conclusion

2.

.

After two single-step operations in Experiment 2, we found that mov ax, 2000; MoV SS, ax; MoV sp, and 10 operations were run. The results returned when only the first three operations are written and run are the same.

Shows the data in the memory area when no operation is performed.

The data in the corresponding memory area after two single-step operations is the same as the original value.

Ax, the IP value is the same as the value in memory unit 2000:0006 and 2000: 000a

Through various debugging, observation of registers and memory values, and reading textbooks

In the single-step debugging process, the computer may perform the stack operation. In this process, the computer first presses the 058d data stack and then the Cs and IP address in sequence.

5. Experiment Summary

In this experiment, I learned how Stack operations are performed, how to use SS and SP to define stack space, and how to use Pop and push to perform stack and inbound operations.

When the operation of the stack is sp = sp-2, when the operation of the stack is sp = SP + 2.

Q: Why does stack pressure occur in Experiment 2?

 

Programming with machine instructions and assembly instructions

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.