Here's what happens when I get bored.
Code:
.text
main:
li $t0, 0 #initialize counter
loop:
addi $t0, $t0, 1 #add one to counter
li $a0, 4 #we want to allocate one int at a time
li $v0, 9 #syscall 9 sbrk
syscall #call
move $t1, $v0 #store value in temp
li $v0, 1 #print int v0
move $a0, $t0 #print value in t0
syscall #print
move $v0, $a0 #move value into v0
bne $v0, $zero, loop #if v0 != 0 loop
li $v0, 1 #print int v0
move $a0, $t0 #value of t0
syscall #print
jr $ra #return to caller
If you go line by line with whatever mips simulator you use, you will see that it works...BUT if you just click run it will go into an infinite loop.