# load.s # slti: set less than immediate: compare t0 with 1 # MIPS program written to illustrate signed and unsigned test # Alternately uncomment the slti and sltiu instructions # OR do both to see how t1 differs as a result of the comparison # Susan Haller # 2/17/03 .data .text .globl main main: # do addi $t0,$t0, -3 # t0 = large value or small slti $t1,$t0,1 # t1 = t0 < 1 sltiu $t1,$t0,1 # t1 = t0 < 1 ble $t1,$t0,main # until (t1 <= t0) li $v0, 10 syscall # system call(exit)