Task 1
Use the e command to modify the data from 0021 to: F to 30 h, 31 H, 32 h, 33 H, 34 h, 35 h, 36 h, and 37 h. The modified code should be written correctly.
MoV ax, 0021
MoV ds, ax
MoV ax, 2200
Mox ss, ax
MoV SP 0100
MoV ax, [0]; AX = 3130 H
Add ax, [2]; AX = 6462 H
MoV BX, [4], BX = 3534 H
Add Bx, [6]; BX = 6c6ah
Push ax; SP = 00feh. The modified memory unit address is 2200: 00fe, And the content is 6462 H.
Push BX; SP = 00fch. The modified memory unit address is 2200: 00fc and the content is 6c6ah.
Task 2
Record the 7-line command input using the command, use the e command to modify the value from to 200: F, and view the modified part. Run the D command to view the commands in one step.
Observe the change in the value of the Register and consider the cause.
Experiment conclusion:
MoV ax, 2000;
H is stored in the register
MoV SS, ax;
H is stored in the stack segment register
MoV sp, 10;
The function of the first three lines of Assembly commands is to indicate the top of the initialization stack,
Stack top is 2000; 0010
Stack bottom: 2000; 000e
Experiment summary and experience:
The number of errors in the second experiment is much less. During the lab exploration process, many results may be different from the expectation, or you may not understand why such a result is displayed.
You need to learn more about how to use various commands.
This experiment involves the interrupt mechanism, which changes the operations of data in the stack.
Experiment 2 machine instruction and assembly instruction Programming