Files
eth-summaries/semester3/spca/code-examples/01_asm/05_factorial.s
2026-01-11 16:52:34 +01:00

9 lines
229 B
ArmAsm

factorial:
jmp .COMP # Check condition
.LOOP:
imull %edx, %eax # %eax *= %edx
decl %edx # %edx--
.COMP:
cmpl $1, %edx # 1 < %edx ?
jg .LOOP # if yes, go to loop
ret