Question

Consider the following sequence of micro-operations.

MBR←PC\text{MBR} \leftarrow \text{PC}
MAR←X\text{MAR} \leftarrow X
PC←Y\text{PC} \leftarrow Y
Memory←MBR\text{Memory} \leftarrow \text{MBR}

Which one of the following is a possible operation performed by this sequence?

Choose one option
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:

  1. 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).
  2. MAR <- X: The address XX (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).
  3. PC <- Y: The program counter is updated with address YY, which is the starting address of the Interrupt Service Routine (ISR) or interrupt handler.
  4. Memory <- MBR: The saved PC value in MBR is written into main memory at the location pointed to by MAR.

This exact sequence preserves the return address and branches control to an interrupt vector address YY. Therefore, this sequence performs the initiation of interrupt service.

Final answer

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.