# Writing a factorial function in ARM assembly language

I am required to write a factorial function in ARM assembly language that takes an integer $n$ as input and returns the value of $n!$. However, I can only use the $4$ basic arithmetic operations $+ - * /$ (so no if-else or loop or recursion). Can anyone suggest a hint to do that? I can only do if I am allowed to use if-else or recursion.

• Any other available operations? Read, write, compare etc.? – Evil Oct 10 '16 at 4:30
• Think about how you would define the factorial function recursively as a mathematical function, then implement that. But "How do I code X in language Y?" is off-topic at Computer Science. – David Richerby Oct 10 '16 at 7:54