Here's the general procedure. A true array is contiguous in memory. Set the accumulator value ($v0, in this instance) to zero. Set an index register to the first element, add that element to the accumulator, increment the index, repeat for the entire length of the array (nRows * nColumns).