RosettaCodeData/Task/Factorial/Apple/factorial-2.apple
2025-08-11 18:05:26 -07:00

16 lines
252 B
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

> :asm [(*)/ₒ 1 ( 1 x 1)]
mov x6, x0
mov x0, #0x1
mov x2, #0x1
eor x1, x1, x1
cmp x1, x6
b.GE apple_1
apple_0:
mul x0, x0, x2
add x2, x2, #0x1
add x1, x1, #0x1
cmp x1, x6
b.LT apple_0
apple_1:
ret