124 views

The Data transfer instruction size is $64-bit$ ALU, ALU operation instruction size is $32-bit$ and branch instruction size is $16-bit$. Assume program has been loaded in the memory starting from address 3000 decimal. If an interrupt occurs during the execution of $I-6$, the return address pushed onto the stack is:

Doubt: When $I-6$ is executing, PC value will be 3030, but given answer is 3028

Previous Q: https://gateoverflow.in/1058/gate2004-63

edited | 124 views
0
data transfer instruction size=64 bit=8B

ALU instruction size=32 bit= 4B

I1: 8 B

I2: 4 B

I3: 4 B

I4: 8 B

I5: 4 B

total 28B

Halt doesnot have size

So, they considered upto I5

If halt have some size , it also need to consider
0

@srestha Ma'am , but is  mentioned interrupt occurs during execution of (I-6) HALT

and Halt is branch inst. which is of 2B

so at the time value of PC = 3030 address following the HALT instruction, and value of PC  will be pushed to stack

0
why r u taking HALT as branch?
0

@srestha

Ma'am from this Q: https://gateoverflow.in/1058/gate2004-63

"

Halt internally invokes JMP like this-

 𝓁𝟣: Jmp 𝓁𝟣

(YES, it is infinite loop)

Halt instruction (unconditionally) jumps to same address of the instruction itself. And as an user point of view, program is terminated, but as a CPU point of view, it goes in infinite loop."

0

I too think halt must have some size. As it is instruction and it must contains code in binary that tells processor what to do when it sees halt.

Explanation given in link you shared

+1 vote
2