Here is my instructions:
Set a “Result” register value equal to the result of the behavior described here:
index0 = a10[0];
index1 = a10[1];
Result = Result + a10[ index0 ] + a10[ index1 ] * a10[ index1 ];
Here is what I have so far
MOV R11 #11;
loop
SUBS R11 #1; counts down from 10, to run the loop 10 times. Did counting down because its more efficient.
MOV R1, [R2, #4]; index 1
MOV R0, R2; index 0
MOV R5, [R1]; R5 = a10[1]
MOV R6, [R0]; R6 = a10[0]
ADD R3, R3, R5; Result = Result + a10[a10[0]]
MUL R4, R1, R6; R4 = a10[a10[1]] * a10[a10[1]]
ADD R7, R3, R4; R7 = Result + a10[a10[0]] + a10[a10[1]] * a10[a10[1]]
B loop