writing functions in assembler

(assuming NASM x86) Use call in order to call the function and ret to return from the function. What occurs when you type call is that the address of the next instruction is pushed into the stack. When ret is hit, it will pop that address off the stack and jmp to it. Calling convention dictates that the EAX register should contain the return value. Also note that the __cdecl calling … Read more