Addressing Modes- Q15

+2 votes

The memory locations 3000, 3001,3020,1 have data values 10, 6020,16 and 2 respectively before the following program is executed.
MOVI Rs, 1 ; Move immediate
LOAD Rd, 3000(Rs) ; Load from memory
SUBI Rd, 3000 ; Subtract immediate
STOREI 0(Rd), 20 ; Store immediate
Which of the statements below is TRUE after the program is executed ?

(A) Rd contains value 6021
(B) Rd contains value 6020
(C) Memory location 3020 contains value 20
(D) Rs contains value 2

asked Jun 4 in Computer Organization by gbmentor (54,290 points)
reshown Jun 5 by gbmentor

3 Answers

0 votes
 
Best answer

\\ M[3000]=10\\ M[3001]=6020\\ M[3020]=16\\ M[1]=2\\ \\ Rs=1\ because\ of\ immediate\ AM \\ Rd=M[3000+Rs]=M[3000+1]=M[3001]=6020\\ Rd=6020-3000=3020\\ M[0+Rd]\leftarrow 20=M[3020]\leftarrow 20

Therefore ans should be C

answered Jun 5 by tskushagra-guptacse (11,400 points)
selected Jun 5 by getgatebook
0 votes
If you carefully examine it it will be answer C
answered Jun 5 by soumyadeeppro20 (1,720 points)
0 votes
C ) memory location 3020 contains value 20
answered Jun 5 by tsnikhilsharmagate2018 (19,690 points)
Answer:
...