1 votes 1 votes Q i have doubt that if interrupt occurs on that instruction then value pushed in to stack after exeuting current instruction ...i think CO and Architecture made-easy-booklet co-and-architecture interrupts + – Hradesh patel asked Oct 1, 2016 • edited Mar 4, 2019 by akash.dinkar12 Hradesh patel 376 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply Habibkhan commented Oct 1, 2016 reply Follow Share 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 votes 2 votes Hradesh patel commented Oct 1, 2016 reply Follow Share 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 votes 0 votes Habibkhan commented Oct 1, 2016 reply Follow Share 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 votes 0 votes Hradesh patel commented Oct 1, 2016 reply Follow Share thks for clearing my doubt... 0 votes 0 votes Please log in or register to add a comment.