This preview shows page 1. Sign up to view the full content.
Unformatted text preview: li $v0, 4 la $a0, result $ syscall #printout result li $v0, 1 move $a0, $s0 #transfer output to a0 syscall #printout output # quit: j quit #quit program # power: p li $s0, 1 #when power equal 0 beq $t1, $zero, exit move $s0, $t0 #when power equal 1 li $s1, 1 beq $t1, $s1, exit addi $t1, $t1, -1 a loop: mult $s0, $t0 #when power > 1 mflo $s0 addi $t1, $t1, -1 bne $t1, $zero, loop $ exit: jr $ra...
View Full Document
This note was uploaded on 12/02/2009 for the course CDA 3101 taught by Professor Small during the Spring '08 term at University of Florida.
- Spring '08