asm_tutorial
asm_tutorial copied to clipboard
Change Win32 ExitProcess to C func exit
Calling C runtime function must also terminated by C runtime itself (exit). Calling printf and then call ExitProcess without CRT function leads to hang because that does not let the C runtime terminate as gracefully.
First argument also passed in RCX
, RAX
is used as return value. Did you mean add rsp, 32; pop rbp; xor eax, eax; ret
?