Consider the following program segment on a hypothetical processor .
I have this question in my course CS201. Suppose this processor has 32 bits Load/Store operations, ALU operations is 16 bits and Branch instruction is 16 bits. Program has been loaded in the memory with a starting address of 3000 (which is in decimal) .
Assuming Byte addressing, If the interrupt occurred during the execution of halt instruction, then the return address pushed onto the stack will be ?
My Try :
I referred this link
http://x86.renejeschke.de/html/file_module_x86_id_134.html
According to this link, The return address saved on the stack must be of instruction after the HALT instruction, which gives me the saved address as
3000 + 4 + 2 + 2 + 2 + 4 + 2 + 2 = 3018
Hence, Stack saves 3018 .
But, I don't have the answer with me, so I can't confirm it.
Am I going Right ?