title: MIPS Assembly - lui $t0, 4097?
body: <p>Can someone explain me how does <code>lui</code> works, what does "<code>4097</code>" stand for, what does adding <code>8</code> to <code>$t0</code> mean?</p>
  
  <pre><code>.data        0x10010000
      blank:   .asciiz " "  # 4097
      newline: .asciiz "\n" # 4097 + 2
  
      #input_start
      Alength: .word 13
      Aarray:  .word 130, 202, 30, 4440, 530, 532, 33, 204, 8, 524, 8933, 92, 10
      #input_end
  
  .text
      lui $t0, 4097
      ori $a0, $t0, 8  # address of A[]
      lw  $a1, 4($t0)  # load length
  </code></pre>