in CO and Architecture edited by
381 views
1 vote
1 vote

 Q i have doubt that if  interrupt occurs on that instruction then value pushed in to stack after exeuting current instruction ...i think 

in CO and Architecture edited by
381 views

4 Comments

Yes the interrupt cycle occurs once the instruction cycle of current instruction is completed. Once execution of current instruction is completed then PC register is incremented to point to next instruction and this value in PC is pushed into stack.Since this will be the return address after servicing the interrupt.

In short, the address of next instruction is pushed into stack before servicing the interrupt
2
2
yes ..plz see Q.7   I1: 1000 - 1007

                            I2:  1008 - 1011

                            I3:  1012 - 1015

                            I4:  1016 -  1023

                            I5:  1024 - 1027    so interrupt occurs   basically it will pushed in to stack 1028 but answer is 1024....
0
0
The address of last instruction I.e. halt instruction =1000 + (2+1+1+2)*(32/8) since word size is 32 bits and it is given that cells are byte addressable = 1000 + 24 = 1024.

But it is halt instruction and we know halt means it will keep looping in this line only. So next address is the address itself of halt instruction. The control wont be transferred to other line of code.

Hence the address which is going to be pushed into stack is the next instruction address after halt instruction which is halt instruction itself. Hence the answer is 1024 only.

In fact no instruction in the above code has address 1028.
0
0
thks for clearing my doubt...
0
0

Please log in or register to answer this question.

Related questions