title: Print MIPS Register Contents
body: <p>I am trying to print an unsigned integer value from a MIPS register as ASCII text to the console.</p>
  
  <p>In other words, let's pretend $a0 has "0x4ab3c823" in it. I want to print out "4ab3c823" to console in xSPIM.</p>
  
  <p>Here is my attempt. I keep getting the decimal values, not the ASCII. It's only a snipped of the entire program, so I cut out the rest.</p>
  
  <pre><code>.data
  printspace:   .space 8
  .text
  printHex:
      move    $t0,$a0
      la      $a0,printspace  #Save address of 8 blank bytes to $a0
      sw      $t0,0($a0)      #Copys the integer I want to print to $a0's address in memory
      li      $v0 1
      syscall
  
      jr      $ra
  </code></pre>