title: MIPS saving address of array to a variable
body: <pre><code>.data
  
      Stackarray: .word 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 
      TopStack: .word 0
      BottomStack: .word 0
  
  .text
  
      la $s0, Stackarray  # stores the beginning of array into $s0
      la $a1, 4($s0)      # stores address of second element of array into $a1
      sw $a1, TopStack
  </code></pre>
  
  <p>TopStack is supposed to hold the value of an address, but when I print TopStack it comes up with a huge number: "268500996". 
  I'm just trying to verify whether TopStack holds the value of the address of the second element of the array. The true value should be "10010004"</p>