Variables are inserted into code before starting the code in procedure or maby poped in theyre place when the instruction needs one of them :confused:
Posted on 2003-03-19 03:45:20 by AceEmbler
Are you asking about passing parameters to a procedure via the stack? Usually you access the parameters indirectly by using bp after setting up a stack frame.

I found a description of the process here:
Posted on 2003-03-19 04:22:55 by Masmer

In most instances in 32 bit windows, you use the STDCALL calling convention where the parameters are pushed in reverse order and then the address of the procedure is called.

push par2 ; push 2nd parameter
push par1 ; push first parameter
call procedure ; call address

mov retval, eax ; get return value

Posted on 2003-03-19 05:41:56 by hutch--
and for calling all those c libraries, params are pushed in the correct order and after calling the function you restore the stack :)
Posted on 2003-03-19 08:38:24 by himanshu
also i think before you read the doc, you can get a little more idea reading this post :D, also you can see other ways against the use with ebp, and only use esp, in some of the post i put this link, only see the images, and the explanation, the other words are about other things :)

Have nice day.
Posted on 2003-03-19 08:57:11 by rea
copy that ;) thanks
Posted on 2003-03-19 09:27:02 by AceEmbler