在asm.yeah.net上找到的关于参数传递和栈结构的文章。。。整个过程解释的非常清楚。。。
Parameter Passing and Stack Frames
In this article, I hope to show how parameters are passed to
function in assembly language, as well as how they are addressed
from inside the function. I will also describe stack frames, local
stack variables, and how to use them. Finally, I will show how all
this info is useless, as your assembler can do it for you all
automatically :)
Parameter Passing Conventions
A parameter passing convention defines how arguments are passed
to a function. In the Win32 API, two different conventions are
used: stdcall and C. Stdcall is used for every API function, except
for wsprintf, which uses the C calling convention.
Sdtcall calling convention
In the sdtcall convention, function arguments are passed from
right to left. From an assembly language standpoint, this means
that the parameters are pushed onto the stack in