Just for info, If nothing is mentioned in question about instruction and address size, It will be safe to assume every Instruction and every Address as 1 WORD long. But in this question it is mentioned clearly.
MOV could be in any one below syntax.
Syntax:- MOV destination,source
The possible combinations of operands are as follows :
destination
|
source
|
example
|
register
|
register
|
mov Rd,Rs
|
register
|
immediate
|
mov Rd,10#
|
register
|
memory
|
mov Rd,(mem add)
|
MOV copies the data from the source to the destination. The data can be either a byte or a word.
Mov R1, #10 R1<--- 10. This moves Constant 10 value to register R1 without memory reference [Syntax 2]
Mov R2, (R3) R2 <--- M[(R3)]. This moves data from M[(R3)] memory location present in R3 to R2. This takes 1 memory reference.
Mov (R3), R2 M[(R3)] <--- R2. This moves content of register R2 to memory location pointed by R3. This takes 1 memory reference.
But above 2 instruction are present inside loop which loops R1=10 times. starting from 10, decrementing by 1 on every iteration.
So total memory reference = { 2(MOV) × (1 word access/ MOV) } * 10 (times iteration) = 20 memory accesses.