section .text
global _start
_start:
mov eax, 15
mov ebx, 1
lb:
imul eax, ebx
inc ebx
cmp ebx,15
jl lb
mov ebx, eax
mov eax, 1
int 80h
I am new to assembly, I have this code to calculate factorial of 15, I know exit code in ebx should be between 0 and 255 but I will run this in gdb, but this isn’t working properly help and also how should i output this value in kernel, give a simple explanation I’m new
New contributor
user45 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2