title: comparing two integers and getting attempt to execute non-instruction at 0x00400058
body: <p>I have a homework problem to compare two integers and give massages based on results.</p>
  
  <p>I keep getteing an Attempt to execute non-instruction at 0x00400058 message though.</p>
  
  <pre><code>.data
  msg1:.asciiz "Give me the first number:"
  msg2:.asciiz "Give me the second number:"
  msg3:.asciiz "The grater number is:"
  msg4:.asciiz "The smaller number is:"
  msg5:.asciiz "The two numbers are equal"
  msg6:.asciiz "The two numbers are not equal"
  
  
  .text
  .globl main
  main:
  li $v0,4
  la $a0,msg1 
  syscall
  
  
  li $v0,5
  syscall
  move $t2,$v0
  
  
  li $v0,4
  la $a0,msg2
  syscall
  
  
  li $v0,5
  syscall
  move $t3,$v0
  
  
  beq $t2,$t3,numbersEqual
  bge $t2,$t3,number1isBigger
  bge $t3,$t2,number2isBigger
  
  numbersEqual:
  li $v0,4
  la $a0,msg5
  syscall
  
  move $v0,$t2
  li $v0,1
  syscall
  
  li $v0,4
  la $a0,msg4
  syscall
  
  move $v0,$t3
  li $v0,1
  syscall
  
  nop
  
  number1isBigger:
  li $v0,4
  la $a0,msg6
  syscall
  
  li $v0,4
  la $a0,msg3
  syscall
  move $v0,$t2
  
  
  li $v0,1
  syscall
  
  
  li $v0,4
  la $a0,msg4
  syscall
  move $v0,$t3
  
  
  li $v0,1
  syscall
  
  nop
  
  
  number2isBigger:
  
  li $v0,4
  la $a0,msg6
  syscall
  
  li $v0,4
  la $a0,msg3
  syscall
  move $v0,$t3
  
  
  li $v0,1
  syscall
  
  
  li $v0,4
  la $a0,msg4
  syscall
  move $v0,$t2
  
  
  li $v0,1
  syscall
  nop
  
  exit:
      li      $v0, 10              # syscall 10 terminates program 
      syscall
  </code></pre>