.data msg1:.asciiz "There numbers are equal .\n" msg2:.asciiz "There numbers are not equal.\n" .text main: addi $t0,$zero,21 addi $t1,$zero,21 beq $t0,$t1,numberEqual li $v0,4 la $a0,msg2 syscall li $v0,10 syscall numberEqual: li $v0,4 la $a0,msg1 syscall li $v0,10 syscall
.data msg1 :.asciiz "num1 is less than num2" msg2 :.asciiz "num1 is bigger than num2" .text main: addi $t0,$zero,7 addi $t1,$zero,5 slt $s0,$t0,$t1 beq $s0,$zero,printBiggerthan li $v0,4 la $a0,msg1 syscall li $v0,10 syscall printBiggerthan: li $v0,4 la $a0,msg2 syscall li $v0,10 syscall
.data msg1 : .asciiz "A is bigger than B\n" .text main: addi $s0,$zero,18 addi $s1,$zero,14 bgt $s0,$s1,printBigger li $v0,10 syscall printBigger: li $v0,4 la $a0,msg1 syscall
.data msg1 : .asciiz "A is bigger than 0 \n" .text main: addi $s0,$zero,13 bgtz $s0,printPositive li $v0,10 syscall printPositive: li $v0,4 la $a0,msg1 syscall