title: Mips function return a number
body: <p>I've been trying to learn how to program with Assembly MIPS32 on Mars.
  I got a question though, i want to make a function (i don't know if that is how its called) that returns an integer.
  Basically i would like to make a method that asks the user to insert a number and add that number with another one that was previously requested
  This is what i came up with but i don't know how to return the value to $s2</p>
  
  <pre><code>New:    
      la $a0, prompt2 # Print string "Input: "
      li $v0,4 
      syscall
  
      li $v0,5 #Read int x
      syscall 
  
      jr $ra  
  
  Add:
      j New
  
      add $s1, $s1, $s2 #add Int $s1 and $s2 and save them to $s1
      j loop
  </code></pre>
  
  <p>if anyone has any suggestions or fixes please respond.
  Thanks in advance</p>