The Gateway to Computer Science Excellence
0 votes

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:

in CO and Architecture by Active (2.7k points)
edited by | 265 views
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

@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

why r u taking HALT as branch?


Ma'am from this Q:


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."




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

1 Answer

0 votes


by (249 points)

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
50,833 questions
57,742 answers
108,055 users