asm_tutorial icon indicating copy to clipboard operation
asm_tutorial copied to clipboard

Change Win32 ExitProcess to C func exit

Open kawaii-ghost opened this issue 1 year ago • 0 comments

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 ?

kawaii-ghost avatar Apr 16 '23 10:04 kawaii-ghost