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:
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: http://www.cs.wpi.edu/~jburge/courses/c02/cs2011/lectures/Lecture16.PDF
I found a description of the process here: http://www.cs.wpi.edu/~jburge/courses/c02/cs2011/lectures/Lecture16.PDF
Ace,
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.
Regards,
hutch@movsd.com
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
Regards,
hutch@movsd.com
and for calling all those c libraries, params are pushed in the correct order and after calling the function you restore the stack :)
also i think before you read the doc, you can get a little more idea reading this posthttp://www.asmcommunity.net/board/index.php?topic=11425 :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.
Have nice day.
copy that ;) thanks