Consider the following program segment. Here $\text{R1, R2}$ and $\text{R3}$ are the general purpose registers.
$$\begin{array}{|l|l|l|c|} \hline & \text {Instruction} & \text{Operation }& \text{Instruction Size} \\ & & & \text{(no. of words)}\\\hline & \text{MOV R1,(3000)} & \text{R1} \leftarrow \text{M[3000]} & \text{$2$} \\\hline \text{LOOP:}& \text{MOV R2,(R3)} & \text{R2} \leftarrow \text{M[R3]} & \text{$1$} \\\hline & \text{ADD R2,R1} & \text{R2} \leftarrow \text{R1 + R2} & \text{$1$} \\\hline & \text{MOV (R3),R2} & \text{M[R3]} \leftarrow \text{R2} & \text{$1$} \\\hline& \text{INC R3} &\text{R3} \leftarrow \text{R3 + 1} & \text{$1$} \\\hline & \text{DEC R1} &\text{R1} \leftarrow \text{R1 – 1} & \text{$1$} \\\hline& \text{BNZ LOOP} & \text{Branch on not zero} & \text{$2$} \\\hline & \text{HALT} & \text{Stop} & \text{$1$} \\\hline\end{array}$$
Assume that the content of memory location $3000$ is $10$ and the content of the register $\text{R3}$ is $2000.$ The content of each of the memory locations from $2000$ to $2010$ is $100.$ The program is loaded from the memory location $1000.$ All the numbers are in decimal.
Assume that the memory is byte addressable and the word size is $32$ bits. If an interrupt occurs during the execution of the instruction “INC R3”, what return address will be pushed on to the stack?
- $1005$
- $1020$
- $1024$
- $1040$