ive created a simple loop that should calculate "number 1" to the power of "number 2"
for some reason it will only do the loop 3 times despite being told to go round "number 2" times
number 1 and 2 are user input numbers, but are set with a default
addi $s6,$zero, 100 # default Value for num 1
addi $s7,$zero, 200 # default Value for num 2
mul $t1, $s6, $s6
add $t0, $zero, 1
loop3:
addi $t0, $t0, 1 # generating numbers in register $t0
mul $t2, $t1, $s6 # compute the sum
add $t3, $zero, $t2 # move it top reg t3
blt $t0, $s7, loop3 # if t0 less than s7 then go to loop.
addi $v0, $zero, 1
add $a0, $zero, $t3
syscall #Print ans
any help on where this is going wrong would be appreciated
for some reason it will only do the loop 3 times despite being told to go round "number 2" times
number 1 and 2 are user input numbers, but are set with a default
addi $s6,$zero, 100 # default Value for num 1
addi $s7,$zero, 200 # default Value for num 2
mul $t1, $s6, $s6
add $t0, $zero, 1
loop3:
addi $t0, $t0, 1 # generating numbers in register $t0
mul $t2, $t1, $s6 # compute the sum
add $t3, $zero, $t2 # move it top reg t3
blt $t0, $s7, loop3 # if t0 less than s7 then go to loop.
addi $v0, $zero, 1
add $a0, $zero, $t3
syscall #Print ans
any help on where this is going wrong would be appreciated