Note: The exe function command 17. font is required for Link assembly.
I 've been busy and lazy for a long time... Uncomfortable.
Experiment 2 (1) first write the following Assembly command:
The values of each register must be written below, which is directly shown in the figure and not given.
Here we can see that SS is 2200 and SP is 0100. Because their values are modified, the modified memory address is SS: SP, And the stack
The content is also given in two ways. In the first direct analysis, we can get push ax, push BX, that is, push the values in the ax and BX registers to the stack from the graph
C0fc, 6021 respectively. The other method is to directly use the D command for viewing. We can see that the values modified by push [4] and push [6] are 30f0 and 2f31 respectively (note that this is represented by the small-end method ):
(2)
Enter the following Assembly command:
Here we can see that after the T command, we can use the D command to view the SS address of the stack and find that the content is modified. There is a section in it that contains the value of CS: IP,
That is, the memory address of the Assembly command required for the execution of the T command, but the previous section does not know what it is.
Lab 3
After the code is written, the code is compiled and linked to the. exe file:
Then perform one-step debugging. Note that the p command is directly used here in int 21. Because int 21 is a system function, we do not need to check it, nor do we care about it.
The values of each register are all in the figure, so we won't write them out here.
View the PSP value and share a starting address with the code snippet.
Compile lab 2 and 3