(1) use DEBUG to write the above program segments to the memory and execute them one by one. Fill in the blanks based on the actual running conditions of the commands.
E 0021:0 0021:7 30 h, 31 H, 32 h, 33 H, 34 h, 34 h, 35 h, 36 h, 37 h
MoV ax, 0021
MoV ds, ax
MoV ax, 2200
MoV SS, ax
MoV SP 0100
MoV ax, [0]; AX = 3130
Add ax, [2]; AX = 6462
MoV BX, [4]; BX = 3534
Add Bx, [6]; BX = 6c6a
Push ax; SP = 00feh. The modified memory unit address is 2200: 00fe. The content is 6462 H.
Push BX; SP = 00fch, the modified memory unit address is 2200: 00fc content is 6c6ah
Pop ax; SP = 00feh, Ax = 6c6ah
Pop BX; SP = 0100 H, BX = 6462 H
Push [4]; SP = 00feh, the modified memory unit address is 2200: 00fe content is 3534
Push [6]; SP = 00fch, the modified memory unit address is 2200: 00fc content is 3736
The above is the result after the lab instruction is executed.
Enter the command as required and use the command.
Experiment 2 programming with machine instructions and assembly instructions
(2) observe the experiment process shown in Figure 3.19 and analyze the cause ~ 2000: will the content in F change?
Input command
Interrupt mechanism. When the debug t command executes the command to modify the SS register, the next command is also executed.
Later, I found out that the interruption process uses the current stack space to store key CPU data. Therefore, some data in your stack is not operated.
MoV SS and ax change the memory address of the stack segment register.
Assembly Lab 2