in CO and Architecture
509 views
0 votes
0 votes

in CO and Architecture
by
509 views

1 Answer

3 votes
3 votes
Best answer
Instruction Code  Memory Address

I0

2000
I1 2001-2002
I2 2003-2004
I3 2005
I4 2006-2009
I5 2010-2011
I6 2012

when interrupt occur during execution of I5 . Interrupt will be handled after execution of current statement. 

Interrupt size = 2 Word = 64 bit = 8 Byte so Interrupt will be handled from 2012 to 2019 . So , 2019 will be the last address upto which interrput will be handled.

selected by

3 Comments

@nice explanations @ Anup patel

Pls Explain also this

in 22.2 2.23 size 32 bits

0
0

In 2.22 , Memory size is byte addressable and of 32 bit and instruction size is in words so in this question 

1 word = 4 byte

Note that When HALT instruction will occur then program counter will store the starting address of that instruction.

Here i am naming instruction as I1,I2,I3,I4,HALT (Just for easy writing)

Instruction Memory Address
I1 1000-1007
I2 1008-1011
I3 1012-1015
I4 1016-1023
HALT 1024-1027

So , during execution of HALT statement PC will have address 1024 and when interrupt will occur at this stage then program counter will Save this address in stack and return address 1024 after servicing of Interrupt.

0
0

And in 2.23 for word addressble memory address will be changel like : 

Instruction Memory Address
I1 1000-1001
I2 1002
I3 1003
I4 1004-1005
HALT 1006

Here interrupt has occured during execution of I3 so PC Will store 1004

0
0