# # Part 1A Computer Fundamentals # # tick2.s (Robert Mullins) # # Write a program which sorts the array A and prints out the sorted array # .text .globl main main: la $t0, Aaddr # load address of our array into register $t0 #### sort our array A #### # # Your assembly code goes here # ##### display the contents of our array ##### li $t1, 10 loop: lw $a0, 0($t0) add $t0, $t0, 4 li $v0, 1 # print integer syscall li $v0, 4 la $a0, newln # print new line character syscall sub $t1, $t1, 1 bnez $t1, loop li $v0, 10 syscall # exit .data Aaddr: .word 56, 78, 99, 33, 16, 3, 23, 46, 10, 51 newln: .asciiz "\n"