Why is the value of EDX overwritten when making call to printf?
问题 I've written a simple assembly program: section .data str_out db "%d ",10,0 section .text extern printf extern exit global main main: MOV EDX, ESP MOV EAX, EDX PUSH EAX PUSH str_out CALL printf SUB ESP, 8 ; cleanup stack MOV EAX, EDX PUSH EAX PUSH str_out CALL printf SUB ESP, 8 ; cleanup stack CALL exit I am the NASM assembler and the GCC to link the object file to an executable on linux. Essentially, this program is first putting the value of the stack pointer into register EDX, it is then