title: Mips how to store user input string
body: <p>I used to think I knew how to do this. But then I actually tried to do it. Here's the program I wrote but the Berkeley S*** simulator for mac said there was a syntax error on the last line. What did I do wrong?</p>
  
  <pre><code>       .text
         .globl __start
      __start:
          la $a0,ask
          li $v0,4
          syscall
  
          li $v0,8
          syscall
  
          la $t0,buffer
          move $t0,$v0
          syscall
  
          la $a0,ret
          li $v0,4
          syscall
  
          move $a0,$t0
          li $v0,4
          syscall
  
          .data
        ask:  .asciiz "Enter string: "
        ret:  .asciiz "You wrote: "
        buffer:   .space 100
  </code></pre>