title: MIPS Assembly - how to only accept integers between 1 and 15?
body: <p>was wondering what instruction i would need to do to make sure the integers inputted from the user using PCspim would make sure only numbers 1-15 can be entered and if not display an error message?</p>
  
  <p>i have read the instructions such as SLT but i dont quite understand the definition -
  ""If $s is less than $t, $d is set to one. It gets zero otherwise."" i dont want to print zero....</p>
  
  <p>is there a way to efficiently do a greater than 1 but less than 15?</p>
  
  <p>i would do </p>
  
  <pre><code>    beq $t0, 1, add_num      #if content in $t0 = 1, branch to add numbers
      beq $t0, 2, add_num
      beq $t0, 3, add_num
      beq $t0, 4, add_num
      beq $t0, 5, add_num  etc...right up to 15. but this is soo inefficient
  </code></pre>