.data vec: .space 16 # int vec[4]; .text # 16 bytes of storage .globl main main: la $t0, vec # reg[t0] = &vec li $t1, 5 # reg[t1] = 5 sw $t1, ($t0) # vec[0] = reg[t1] li $t1, 13 # reg[t1] = 13 sw $t1, 4($t0) # vec[1] = reg[t1] li $t1, -7 # reg[t1] = -7 sw $t1, 8($t0) # vec[2] = reg[t1] li $t2, 12 # reg[t2] = 12 li $t1, 42 # reg[t1] = 42 sw $t1, vec($t2) # vec[3] = reg[t1]