GATE 2007 CS – Question 73
R1, R2, R3 are general-purpose registers. Program below is loaded at memory1000; instruction word counts shown. M[3000]=10, R3=2000; each M[2000] through M[2010] initially100. All numbers decimal.
MOV R1,(3000) ; R1←M[3000] ;2 words
LOOP: MOV R2,(R3) ; R2←M[R3] ;1 word
ADD R2,R1 ; R2←R1+R2 ;1 word
MOV (R3),R2 ; M[R3]←R2 ;1 word
INC R3 ; R3←R3+1 ;1 word
DEC R1 ; R1←R1−1 ;1 word
BNZ LOOP ; branch ifnotzero ;2 words
HALT ; stop ;1 wordInstead assume byte addressing and32-bit words. An interrupt occurs during INC R3. What return address is pushed onto the stack?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (C) 1024
Explanation
We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort