title: MIPS program is Not working Error: Symbol exit not found in the table
body: <pre><code>.text
  main:
  </code></pre>
  
  <p>check whether the second value that user entered is less than zero and if yes the exit the program </p>
  
  <pre><code>blez $t1, exit
  </code></pre>
  
  <p>Taking the first input from the user</p>
  
  <pre><code>la,$a0,InputValone
  li,$v0,4
  syscall
  
  li,$v0,5
  move $t0,$v0
  syscall
  </code></pre>
  
  <p>Taking the second input from the user</p>
  
  <pre><code>la,$a0,InputValTwo
  li $v0,4
  syscall
  
  li $v0,5
  move $v0,$t1
  syscall
  </code></pre>
  
  <p>multiply the two inputs</p>
  
  <pre><code>mul $t2,$t1,$t0
  move $t3,$t0
  
  loop:
      beq $t2,$t3, endloop    #if $t2==$t3, end the program
      add $t3,$t3,$t0     #else $t3=$t3+$t0
  
      b loop
  
      la      $a0,OutputValue
      li      $v0,4
      syscall
  
      move    $a0,$t3
      li      $v0,1
      syscall
  
  
      endloop:
  .data
      InputValone: .asciiz "Enter Your First Value : "
      InputValTwo: .asciiz "Enter Your Second Value : "
      OutputValue: .asciiz "Output is : "
  </code></pre>