title: MIPS: writing on file, encoding problems
body: <p>whenever I'm trying to write something on a file. I want the user to write the string that will be then saved into this file instead of having one previously prepared. But, when I do this, every word saved into the file ends with <code>^@</code> so my usual text editor (gedit) won't read it for encoding reasons (but that's not a problem, emacs does the work successfully) and those characters marks somehow the end of the text (even if there's other following).</p>
  
  <p>How can I remove it? </p>
  
  <pre><code>.data
  fout: .asciiz "text.txt"
  buffer: .space 100
  cont: .asciiz "reading file... "
  stringname: .space 10
  nl: .asciiz "\n"
  
  .text 
  
  main:
  
  create:
  
  #input a name
  move $s6, $v0
  li $v0, 8
  la $a0, stringname
  li $a1, 5
  syscall
  
  #open
  li $v0, 13
  la $a0, fout
  li $a1, 9
  li $a2, 0
  syscall
  move $s6, $v0
  
  #write on file
  li $v0, 15
  move $a0, $s6
  la $a1, stringname
  li $a2, 5
  syscall
  
  #close
  li $v0, 16
  move $a0, $s6
  syscall
  
  exit:
      li $v0, 10
      syscall
  </code></pre>