2,836 views
1 votes
1 votes

Consider that the memory is byte addressable with size 16 bits, and the program has been loaded starting from memory location (2000)10. What will be the return address saved in the stack, if an interrupt occurs while the CPU has been halted after executing the HALT instruction?

1 Answer

0 votes
0 votes

Byte addressable with 16 bits.

Thus, 1 word = 2 bytes.

After 5 instructions, it must be

2000+2*2+2*2+1*2+1*2+2*2 = 2016

As an interrupt occurs executing the HALT instruction, the return address (in decimal) saved in the stack will be the address of the halt instruction.

Reference :

http://www.geeksforgeeks.org/gate-gate-cs-2004-question-63/

Related questions

0 votes
0 votes
0 answers
2
0 votes
0 votes
1 answer
3
2 votes
2 votes
2 answers
4
Na462 asked Oct 21, 2018
1,682 views