4.1k views

Consider the following sequence of micro-operations.

  MBR ← PC  MAR ← X  PC ← Y  Memory ← MBR

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

1. Instruction fetch
2. Operand fetch
3. Conditional branch
4. Initiation of interrupt service
edited | 4.1k views
0
What is the purpose of MAR <--Y?
+2

What is the purpose of MAR <--Y?

I think if we want to fetch some data from different location. For example information related to interrupt.

Here PC value is being stored in memory which is done when either CALL RETURN involved or there is Interrupt. As, we will have to come back to execute current instruction.

So, options (A), (B) are clearly incorrect.

Option (C) is incorrect because conditional branch does not require to save PC contents.

Option (D) is correct as it matches the generic Interrupt Cycle :

$\begin{array}{lcl} \rlap{\text{Interrupt Cycle:}}\\ t_1:&\text{MBR}&\leftarrow(\text{PC})\\ t_2:&\text{MAR}&\leftarrow(\text{save-address})\\ &\text{PC}&\leftarrow(\text{routine-address})\\ t_3:&\text{Memory}&\leftarrow(\text{MBR})\\ \end{array}$

edited by
+14

basic rules which holds true for any cycle :

0
First and fourth clearly says that the control flow is not sequential and the value of PC is stored in the MBR (memory), so that the control can again come back to the address where it left the execution. Also in conditional branch we need to update PC but in instruction it is not mentioned. So therefore interrupt only.
0

@Himanshu1  @Arjun Sir Can you pls ellaborate more about, the cases of branch instruction in which, we have to store the pc contents ,

(or provide a good source for it )

0
This is clearly given in Hamacher (probably any other standard CO book too)

whenever the word fetch is used instruction register was associated as there is no instruction reg. so (A) is not our answer.

- operand fetch says you have to get operand from the memory and place it into the memory data register so source should be the memory and destination should be memory data register so there no such operation is given so (B) is not our ans.

- in conditional branch or Unconditional branch you are able to place new value into the program counter but here it is doing one extra thing it is placing the old value of program counter into the memory so (C) is not our ans.

so our ans is (D)

edited
PC holds the value of the next instruction to be executed we store the value of PC to the MBR and then to the memory .We are saving the value of PC in memory and new address value(routine address) is loaded in to the PC as interrupt is there as we have already save the PC in to the memory then why we are adding another address in to the PC. This can be done only in the Interrupt Services.

option (d) is correct
option d.

1
2