How can I view what is happening in the lower parts of the EAX register in VS2008?
I am doing s开发者_开发问答ome assembly homework and thought the best way to get my head around what is going on is to watch what happens in the registers as the program runs. In Visual Studio You can view the registers but I am doing an operation that only changes things in the lower 8-bits of one of my registers so im not sure what I should be looking at. Can anyone help me out?
Here's the question and the code I'm running:
What will be the hexadecimal value of the destination operand after each of the following instructions execute in sequence?
TITLE MASM Template (main.asm)
INCLUDE Irvine32.inc
.data var1 SBYTE -4, -2, 3, 1
.code main PROC
call Clrscr
mov al, var1 mov ah, [var1+3]
exit main ENDP
END main
Im pretty sure the answer is -4 after the first statement and 1 after the second statement but I want to see it in the registers.
and the register window i have to look as in VS:
The ah
and al
registers are just aliases for the lower two bytes of eax
, and so you can just monitor the eax
entry in the register window. In your example, ah
is 0x36
and al
is 0x65
. You might also need mov al, [var1]
to get the value at that address, but I am not sure about that.
精彩评论