How do you write code to do factorials in MIPS?

 li $t1 1 
 LOOP: mul $t1 $t1 $t0 
 addi $t0 $t0 -1 
 bgez $t0 LOOP 

Leave a Comment