
	
	addi	r2, r0, 1000	// r2 holds size of A[]
addi	r3, r0, 20	// r3 holds base address of A[]

addi	r4, r0, 0	// r4 = i = 0
init:
bge	r4, r2, endinit	// if (r4 >= r2) goto endinit
add	r5, r3, r4	// memlocation = base address + offset	
st_d	0(r5), r4	// A[i] = i
	
addi	r4, r4, 1	// i++
j	init		// goto init
endinit:	  


addi	r4, r0, 0	// r4 = i = 0
move:
bge	r4, r2, endmove	// if(r4 >= r2) goto endmove
add	r5, r3, r4	// memlocation = base address + offset
ld_d	r6, 0(r5)	// r6 = A[i]
addi	r6, r6, 1	// r6 = A[i] + 1
st_d	0(r5), r6	// A[i] = r6

addi	r4, r4, 1	// i++
j	move		//goto move
endmove:

exit
