Question
Consider the following sequence of micro-operations.
Which one of the following is a possible operation performed by this sequence?
Official answer and solution
- Official answer
- D
- From
- Official GATE 2013 answer key
Solution
Identify the purpose of saving the program counter (PC) to memory and updating PC with a new target address Y.
Let us trace the given sequence of micro-operations step by step:
MBR <- PC: The current value of the program counter (holding the return address of the next instruction) is placed into the memory buffer register (MBR).MAR <- X: The address (which specifies where the return address should be saved, such as the stack top or a designated interrupt return-address memory word) is loaded into the memory address register (MAR).PC <- Y: The program counter is updated with address , which is the starting address of the Interrupt Service Routine (ISR) or interrupt handler.Memory <- MBR: The savedPCvalue inMBRis written into main memory at the location pointed to byMAR.
This exact sequence preserves the return address and branches control to an interrupt vector address . Therefore, this sequence performs the initiation of interrupt service.
D
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2013 Computer Science and Information Technology (CS)
- Question
- 28 of 65, printed as CS Q.28
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.