# # Part 1A Computer Fundamentals # # tick1.s (Robert Mullins) # # Write a program that reverses the order of the elements in our array, i.e. # A[0]=A[9], A[1]=A[8], ... A[9]=A[0] # # The program should output 51, 10, 46, 23, ..... # .text .globl main main: la $t0, Aaddr # load address of our array into register $t0 ##### reverse the order of the elements in the array A #### # # your assembler 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"