# text segment (code) .text .globl __start __start: # execution starts here la $s0, X lw $t0, 0($s0) # lw $t0, X lw $t1, 4($s0) beq $t0, $t1, equal la $a0,msg1 # print msg1 li $v0,4 syscall beq $0, $0, exit # unconditional branch equal: la $a0,msg2 # print msg2 li $v0,4 syscall exit: li $v0,10 syscall # ends the program # data segment .data X: .word 15 Y: .word 255 msg1: .asciiz "$t0 is not equal to $t1\n" msg2: .asciiz "$t0 is equal to $t1\n"