im in a class learning assembly using mips. I am working on sorting an array of numbers and i think that I have the method working correctly, but just a bit of trouble. I do
.data
value: .word 0x3
Array: .word 0x14, 0x12, 0x13, 0x05
.text
.globl main
main: la $a0, Array
lw $t3,value
l1: lw $t0, 0($a0)
lw $t1, 4($a0) blt $t1, $t0, swap addi $a0, $a0, 4 addi $t3,$t3,-1 bne $t3,$zero,l1 jr $ra
swap: sw $t0, 4($a0)
sw $t1, 0($a0) j l1