在Visual Studio 2010中逐步执行汇编语言函数

时间:2013-04-15 23:00:51

标签: visual-studio-2010 masm

我正在尝试在Visual Studio 2010中逐步执行汇编函数,但每当调试器到达ret语句时,都会显示一个窗口,其中包含“无源可用”文本,然后调试器就会退出该程序。甚至可以在Visual Studio调试器中包含函数调用时运行x86汇编语言程序吗?

.686p
.model flat,stdcall
.stack 2048
.data
ExitProcess proto, exitcode:dword
.code

start:

jumpIfEqual PROC var1:DWORD, var2:DWORD, jmpAddress:DWORD
    mov eax,var1
    cmp eax,var2
    jne skip
    pop eax
    push jmpAddress
    skip:
    ret ;this statement opens up a window in Visual Studio with the text "no source available", and then the program simply exits
jumpIfEqual ENDP

push OFFSET jumpIfEqual ;call the function
mov eax, 5 ;set the parameters for the function
push eax
push eax
call jumpIfEqual

invoke  ExitProcess, 0
end start

0 个答案:

没有答案