by@__dAi00
WA
614ms
section .data section .text global _start write: push ebp mov ebp, esp mov edx, 1 mov ecx, ebp add ecx, 8 mov ebx, 1 mov eax, 4 int 0x80 leave ret pi: push ebp mov ebp, esp mov eax, [ebp+8] cmp eax, 10 jl NO mov edx, 0 mov ecx, 10 div ecx push edx push eax call pi mov eax, [esp+4] ; mod NO: add eax, 0x30 push eax call write leave ret _start: push ebp mov ebp, esp push 8989 call pi leave ret
07 22 28 25 34 85 68 32 38 54 98 08
8989
Segmentation fault (core dumped)