mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-01-12 01:58:24 +00:00
9 lines
229 B
ArmAsm
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 |