hi there. I'm just curious about the local that masm provide. how much memory of stack is it available to programmer? push ebp mov ebp, esp add esp, ??? <---- what will the question mark be if i try to reserve 2 byte? and why is it that i see sub esp, ??? whenever i debug other app? such as notepad.exe? any more info you can give me on this topic?
The stack grows downwards, if you want to reserve local space on the stack you have to substract esp with the number of bytes you need. In your example, you have to do
sub esp, 2