Calling window functions in ASM (push / pop question)

I want to call the Sleep function on ASM. So I wrote the following:

push 5000
call Sleep

Although everything went well, I had the idea that every time I pushed a value on the stack, I should also pop up (otherwise it will be cluttered later in the program?). Should I appear? How can I do it?

+3
source share
1 answer

Almost all Win32 API functions use a calling convention __stdcall, where the called function is responsible for expressing the argument (s) from the stack. Therefore, in the case Sleep()you do not need to do anything other than what you showed.

+5
source

Source: https://habr.com/ru/post/1717106/


All Articles