我是初学者学习某个程序集的时候,在函数调用之前保留ESP寄存器时,如果通过加或减操作,它会影响吗?很难解释,考虑以下在功能调用后保留esp的初学者学习程序集
mov esi, esp
sub esp, 12 // on 32bit OS this would mean that there are 3 arguments to the function
// push, function call etc
cmp esi, esp // should be the same
或
mov esi, esp
// push, function call etc
add esp, 12
cmp esi, esp // should be the same
此外,如果由于某种原因失败CMP,是安全的做法MOV ESP,ESI重新调整堆栈?
感谢
编辑:另外怎么来的,我需要像sprintf的调用做到这一点,但消息框似乎解决ESP给我吗?我怎么知道什么功能需要这个,哪些不需要?
非常丰富的谢谢 – Daniel 2010-03-12 01:06:26