Push/Pop segmentation fault at Assembly x86
问题 I'm using elf64 to compile my assembly x86 code: I've this sub-routine: printNumber: mov EAX, EDX ; EDX contain some value like "35" mov ESI, 10 ; to divide by 10 MOV ECX,0 ; counter whileDiv: cmp EAX, 0 je endWhileDiv xor rdx, rdx ; clean RDX idiv ESI ; EAX=EAX/10 and EDX = EAX%10 push rdx ; this line generate a segmentation fault add ECX, 1; count how many items i has added into stack jmp whileDiv endWhileDiv: ret I'm trying to push all digits of a number into my stack using push, but i'm