#ArrayTest.asm #A program to demonstrate the use of arrays in #assembly language. #declare and initialize an array .data MyArray: .word 3, 2, 0, 1, 5, 7 .text main: la $t1, MyArray #load the address of the array into memory li $t2, 3 #load the index into a register add $t2, $t2, $t2 #double the index add $t2, $t2, $t2 #double it again add $t3, $t2, $t1 #add the index (offset) to the array address li $v0, 1 #print the value at MyArray[3] lw $a0, 0($t3) syscall li $v0, 10 #end program syscall