Search for question
Question

8) Translate the following code into a C program and explain what it does.

loop

done

MOV r2, #1

MOV r1, #1

CMP r1, re

BGT done

MUL r2, r1, r2

ADD r1, r1, #1

B loop

MOV re, r2