title: mips , multiplication of array's elements
body: <p>I have a problem with my code.  I have an array <code>matrix1</code> and my objective is to print another array <code>matrix2</code>.  The element of the second array is <code>matrix1[i]* i</code>. 
  The problem with my code is that the procedure of multiplication was only applied on the first number.</p>
  
  <p>For example:</p>
  
  <p>first array : 2 6 16 10<br>
  second array must be : 2 12 54 40<br>
  but it's : 2 4 6 8</p>
  
  <p>Here's my code</p>
  
  <pre><code>multing:
  bgt $t0,$s0,jump     #t0=i , $s0=dimention
  lw $t1,0($a1)        #a1=address of first array , t1=matrix[i]
  mul $t2,$t1,$t0      #t2=t1*t0
  sw $t2,0($a2)        #store the element
  addi $t0,$t0,1       #i=i+1
  addi $a1,$a1,4       #next address in first array
  addi $a2,$a2,4       #next address in second array
  b multing            #repeat loop
  </code></pre>