title: If greater than or equal in MIPS
body: <p>Prompt for and input two integers “a” and “b” using syscalls</p>
  
  <p>Display one of the following statements depending on if a>b, or a=b or a
  
  <ul>
  <li><p>You entered a greater than b  </p></li>
  <li><p>You entered an equal to b     </p></li>
  <li><p>You entered a less than b     </p></li>
  </ul>
  
  <p>I have to get this prompt and I tried so hard to get it done. This is where I'm stucked, I'd really appreciate your help.</p>
  
  <pre><code>    .data  
  p1: .asciiz "Please enter the first number ? "  
  p2: .asciiz " Please enter the second number? "  
  ans1: .asciiz " \nYou entered a greater than b "  
  ans2: .asciiz " \nYou entered a equal to b "  
  ans3: .asciiz " \nYou entered a less than b "  
  
  
          .text
          .globl main
  
  main:    
      li $v0, 4     #system call code for print_str  
      la $a0, p1  #address of string to print  
      syscall     #print the first prompt  
  
  
      li $v0, 5   #system call code for read_int
      syscall     #read first integer
      move $t1, $v0   #store it till later
  
      li $v0, 4   #system call code for print_str
      la $a0, p2  #address of string to print
      syscall     #prints the second prompt
  
      li $v0, 5   #system call code for read_int
      syscall     #read first integer
      move $t2, $v0   #store it till later
  
      slt $t1,$s1,$s0      # checks if $s0 &gt; $s1
      beq $t1,1,label1 
  </code></pre>
  
  <p>I really don't know how to use branch statements, and it's really confusing. I would like to know how to fix it.</p>