652 views
0 votes
0 votes

1 Answer

1 votes
1 votes
memory references means contact with memory for some operation either fetching data or storing data (in desi terms)

Suppose in this  : R1<=m[3000] ; Here direct memory referecence is used & in direct memory referece 1 memory reference is used [to fetch data from given memory address]

Indirect use 2 memory reference [one to find address of memory address where data is stored and second is to fetch data from memory location].

in this question ;

1 Memory reference will be used for R1<=m[3000] ; i.e line number 1. This line will assign value of 10 in R1.

Now consider loop : When you go inside loop for 1st time -

1 Memory Reference in R2<=M[R3] (Direct Memory Reference )

1 Memory Reference in M[R3]<=R2 (Direct Memory Reference).

This loop will run till value of R1 not reach to 0 i.e 10 times and in each loop there will be 2 memory references.

So total memory Reference = 10(No. of Memory Referece in loop)+Memory Reference Outside loop

=10(2)+1

=21

So 21 would be Answer

Related questions

0 votes
0 votes
0 answers
2
eyeamgj asked Dec 28, 2018
195 views
An address space is specified by 24bit and the correspondence memory space is 16 bit. How many words are there in address space ANSWER IS GIVEN AS 1M BUT I AM GETTING 1 ...