title: .word directives in MIPS assembly
body: <pre><code>       .data
  VALS:  .half 0xbead, 0xface
  RES:   .space 4
      .text
      la     $t0,VALS
      lh    $t1,($t0)
      lhu    $t2,2($t0)
      sll    $t2,$t2,16
      or    $t2,$t1,$t2
      jal    AVG
      .word  -2
      .word  -6
      la    $t4,RES
         sw  $v0,($t4)
         li     $v0,10
      syscall
  AVG:   lw  $v0,($ra)
      lw    $t3,4($ra)
      add    $v0,$v0,$t3
      sra    $v0,$v0,1
      addi   $ra,$ra,8
      jr     $ra
  </code></pre>
  
  <p>In this MIPS code, what do the .word portions do?  My emulator cannot handle data directives in the text section.  What do the directives do?  And what is the point of doing .word -2 and .word -6, rather than .word -8?</p>