When to loop in Assembly-MIPS string concatenation?

You are using beqz for the tests, but you want to use bnez (which is actually a macro for bne x, $zero, label, but both SPIM and MARS should support it). You want to loop when the value is not equal to zero; right now, you are looping only if it is zero.
For More Information Please Refer:

You May Also Like to Read: