title: In MIPS/SPIM, whats the difference between li and lw?
body: <p>After realizing how lost I am with assembly language and using MIPS, I decided to start from the basics and actually understand it.</p>
  
  <p>Obviously MIPS code has specific purposes, but a lot of the stuff seems to do similar things and I'm having a hard time understanding some of the differences.</p>
  
  <p>What is the difference between loading immediate.. (li) and loading a word.. (lw)? I'm not even sure what a "word" is. Or what the following does:</p>
  
  <pre><code>li $t0,y
  lw $t0,0($t0)
  </code></pre>
  
  <p>Is it loading y into the register $t0 in the first line? And then loading 0($t0) as y?</p>
  
  <p>Sorry, this is probably a really dumb question. If anyone could just explain what those two lines are doing and the difference between li/lw, i'd greatly appreciate it. Thanks!</p>