title: MIPS printing out an address instead of the value at that address
body: <p>So I've written code that takes in a string from the user which is in the format where the first character is a non numeric one and the rest are numbers. My code removes the first character and stores the remaining numbers in a variable. Now I'm attempting to add a constant (example 5) to the remaining numbers and print them out. I'm unsure whats going wrong. </p>
  
  <pre><code>.data
  
      string: .asciiz      "Enter a string:\n"
      string1: .asciiz         "The value +5 is:\n"
      inputString: .space 20
      outInt: .word 0
      int5: .word 5
      addedInt: .word 0
  
  
  .text
  
  main:
  
      #print initial string to console insruction 4
      li  $v0, 4
      la  $a0, string
      syscall
  
      #get first string from user
      li  $v0, 8
      la  $a0, inputString
      li  $a1, 8      #a1 contains max length of string to be entered
      la  $t0, ($a0)
      syscall
  
      addiu   $t0, $t0, 1 #remove first letter
  
      li  $v0, 4      #prints out remaining numbers without leading character
      la  $a0, ($t0)
      syscall
  
      sw  $a0, outInt #store new word in outInt 
  
  
      lw  $t0, outInt #print out outInt to check if its correct
      la  $a0, ($t0)
      syscall
  
      lw  $t1, int5
      add $t2, $t0, $t1   #add 5 to the remaining numbers
  
      sw  $t2, addedInt   #store result
      li  $v0, 4
      la  $a0, string1    #print the value + 5 string
      syscall
  
      li  $v0, 1  #output a number (not a string)
      lw  $a0,  addedInt
  
  
      syscall
  
      jr $ra
  </code></pre>
  
  <p>The output when I enter the string "X123" is:</p>
  
  <p>Enter a string:</p>
  
  <p>X123</p>
  
  <p>123</p>
  
  <p>123</p>
  
  <p>The value +5 is:</p>
  
  <p>268501033</p>