title: Getting Error: Unknown system call 20. Assembly Code
body: <p>This is a program in MIPS assembly run through QTSpim which takes the given numbers in a quadratic function and displays the parabola.  This is one of my first low-level programs and im not a good programmer in any form.<br>
  So when I run the program it says Unknown system call: 20.  Which is the number I am entering for the upper bound of the range.  The numbers i have been using to test are 1,-1,-6 for the coefficients, -10,10 for the x axis, and -10,20 for the y.  It should display a parabola however it is only displaying the X and Y axis.  This is a step forward however because yesterday it wouldnt display anything. HELP!</p>
  
  <pre><code>.text
  .globl main
  main:
      la $a0,prompt1           # display "Enter the coeficiants of the quadratic: "
      li $v0,4
      syscall
  
      li $v0,5                 # enter A -&gt; v0
      syscall
      move $t0,$v0             # t0 &lt;--- v0
  
      li $v0,5                 # enter B -&gt; v0
      syscall
      move $t1,$v0             # t1 &lt;--- v0
  
      li $v0, 5                # enter C -&gt; v0
      syscall
      move $t2,$v0             # t2 &lt;--- v0
  
      la $a0,prompt2           # display "Enter the lower (first) and upper (second) bounds of the domain: "
      li $v0, 4
      syscall
  
      li $v0, 5                # enter lower bound -&gt; v0
      syscall
      move $t3, $v0            # t3 &lt;--- v0
  
      li $v0, 5                # enter upper bound -&gt; v0
      syscall
      move $t4, $v0            # t4 &lt;--- v0
  
      la $a0, prompt3          # display "Enter the lower (first) and upper (second) bounds of the range: "
      li $v0, 4
      syscall
  
      li $v0, 5                # enter lower bound -&gt; v0
      syscall
      move $t6, $v0            # t6 &lt;--- v0
  
      li $v0, 5                # enter upper bound -&gt; v0
      syscall
      move $t7, $v0            # t7 &lt;--- v0
  
      move $t8, $t7            # t8 &lt;--- t7
      syscall
  
  step10: move $t9, $t3            # t9 &lt;--- t3
      syscall
  
  step11: mul $t5,$t3,$t0          # t0 * t3 -&gt; t5
      add $t5,$t1,$t5          # t5 + t1 -&gt; t5
      mul $t5,$t5,$t3          # t5 * t3 -&gt; t5
      add $t5,$t5,$t2          # t5 + t2 -&gt; t5
  
      beq $t8, $t5, point      # if y = f(x) goto point marker
  
      beqz $t9, yaxis          # if x = 0 goto yaxis
  
      beqz $t8, xaxis          # if y = 0 goto xaxis
  
      la $a0,space             # display " "
      li $v0,4
      syscall
  
  step16: beq $t9, $t4, newl       # if x = x-max goto newl
  
      add $t9, $t9, 1          # $t9 += 1
  
      j step11
  
  step18: beq $t8, $t6, EOP        # if y = y-min end program
  
      sub $t8, $t8, 1          # $t8 -= 1
  
      j step10
  
  EOP:    li $v0,10                # EOP
      syscall
  
  newl:   la $a0,endl              # display "\n"
      li $v0,4
      syscall        
      j step18
  
  point:  la $a0,star              # display "*"
      li $v0,4
      syscall
      j step16
  
  yaxis:  la $a0,bar               # display "|"
      li $v0,4
      syscall
      j step16
  
  xaxis:  la $a0,hyph              # display "-"
      li $v0,4
      syscall
      j step16
  
  
      .data
  prompt1: .asciiz "Enter the coeficiants of the quadratic: "
  prompt2: .asciiz "Enter the lower (first) and upper (second) bounds of the domain: "
  prompt3: .asciiz "Enter the lower (first) and upper (second) bounds of the range: "
  bar:     .asciiz "|"
  star:    .asciiz "*"
  hyph:    .asciiz "-"
  space:   .asciiz " "
  endl:    .asciiz "\n"
  </code></pre>