Experiment 1: View CPU and memory, and program with machine instructions and assembly instructions

Source: Internet
Author: User

1. Use debug to write the following program segments to the memory and execute them one by one. Observe the changes in the CPU registers after each command is executed.

?(1) Use the e command to modify the memory unit starting from and write the machine code

(2) run the U command to view the meaning of the machine code in the memory.

(3) The initial CPU status cs = 073f, IP = 0100. Therefore, use the R command to modify the content in Cs and IP addresses.

(4) run the T command one by one



?(1) Use command a to write Assembly commands into memory

(2) run the D command to view the machine code in the memory.

(3) run the T command one by one (as shown above)

2. Write the following three commands into the memory unit starting from 2000:0 and use these three commands to calculate the 8th power of 2.

(1) Use the command to write the command into the memory unit starting from.

(2) modify the Cs and IP values and run the T command in one step.

(3) execute 16 t commands. At this time, Ax = 0100

3. view the content in the memory.

(1) run the D command to view the production date in the memory and locate the production date as 01/01/92.

(2) run the e command to modify the date and run the D command to check whether the modification failed.


4. Fill in data to the unit in which the memory starts from b8100h.

 

Change the entered data and address, and find that a pattern is controlled by two memory units. The former controls the style and the latter controls the color.

Experiment summary and experience

?No result is returned when the CPU writes data to the memory address c0000 to fffff, And the content in the unit is not changed because it is equivalent to rewriting the content of the read-only memory.

?When the Cs and IP values of the first task need to be modified, I didn't use the R command at first, but used the JMP command, and an error was returned, I found that although both the JMP command and the R command can modify the Cs and IP values, their usage is different, which also deepens my understanding of the JMP command.

 

Experiment 1: View CPU and memory, and program 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.