arg = 5
.text
.globl _start
_start:
movl $arg, %eax
factorial:
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
cmpl $1, %eax
je end_factorial
decl %eax
pushl %eax
call factorial
movl 8(%ebp), %ebx
mull %ebx
mull %eax
end_factorial:
movl %ebp, %esp
popl %ebp
ret
movl %eax, %ebx
movl $1, %eax
int $0x80
Witam, mam taki kod jak wyżej i po uruchomieniu programu komunikat:
Segmentation falut
Proszę o pomoc w rozwiązaniu tego problemu