The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
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

asked in CO and Architecture by Active (2.6k points)
edited by | 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
return address will be 3030.

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.

But anyway return address will be address following halt.

Explanation given in link you shared

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,811 questions
54,540 answers
188,429 comments
75,596 users