What is the difference between call and jmp they both execute a function ?
Also what does the push command do ?
basic asm question
Re:basic asm question
The instruction "jmp" just jumps to the specified address. "call" only calls it, that means it jumpts to it's address, and returns to the old address when a "ret" instruction is issued. This is managed by saving the EIP on the stack and loading EIP with the address to jump to. When the "ret" is issued, EIP is loaded with the value on the stack.
The "push" instruction copies a value on the stack, that is on the memory location of SS:ESP.
The "push" instruction copies a value on the stack, that is on the memory location of SS:ESP.
Re:basic asm question
Well, you'll really need to get familiar with it as a programmer. Have a google search.
Simply said, the stack is just a memory region where programs can store and retrieve variables for a short time. When calling a procedure, for example, you push() the parameters to the function on the stack and the function gets them by pop()ing them.
However, do a google search, that's really necessary.
Simply said, the stack is just a memory region where programs can store and retrieve variables for a short time. When calling a procedure, for example, you push() the parameters to the function on the stack and the function gets them by pop()ing them.
However, do a google search, that's really necessary.