@ fact.s /* function to calculate the factorial of a number */ .global fact fact: sub r1, r0, #1 .top: cmp r1, #0 beq .done mul r0, r1, r0 sub r1, r1, #1 b .top .done: mov pc, lr