GATEverse
← GATE CSE 2004

Q63

MCQ2 marks, −0.5

Consider the following program segment for a hypothetical CPU having three user registers R1,R2R_1, R_2 and R3.R_3.

InstructionOperation Instruction size(in words)MOV R1,5000R1←Memory[5000]2MOV R2,(R1)R2←Memory[(R1)]1ADD R2,R3R2←R2+R31MOV 6000,R2Memory[6000]←R22HALTMachine Halts1\begin{array}{|l|l|c|} \hline \text {Instruction} & \text{Operation }& \text{Instruction size} \\&& \text{(in words)} \\\hline \text{MOV $R_1,5000$} & \text{$R_1$} \leftarrow \text{Memory$[5000]$}& \text{$2$} \\\hline\text{MOV $R2,(R1)$} & \text{$R2$} \leftarrow \text{Memory$[(R_1)]$}& \text{$1$} \\\hline \text{ADD $R_2,R_3$} & \text{$R2$} \leftarrow \text{$R_2 + R_3$} & \text{$1$} \\\hline \text{MOV $6000,R_2$} & \text{Memory$[6000]$} \leftarrow \text{$R_2$} & \text{$2$} \\\hline \text{HALT} & \text{Machine Halts} & \text{$1$} \\\hline \end{array}

Consider that the memory is byte addressable with size 3232 bits, and the program has been loaded starting from memory location 10001000 (decimal). If an interrupt occurs while the CPU has been halted after executing the HALT instruction, the return address (in decimal) saved in the stack will be

Sign in to save attempts.

Loading…