Page 1 of 1

Interrupt Handler.

Posted: Thu Jul 31, 2008 3:41 am
by huxuelei
Hi, I have written the interrupt handler followed the instruction at jamesmolloy.co.uk.
But I always got this information
[CPU0] iret: retrun CS selector null
from bochs.

Which case could cause the cs selector to be null?

Re: Interrupt Handler.

Posted: Thu Jul 31, 2008 3:45 am
by Korona
Make sure that you remove the correct number of arguments from the stack before the iret instruction is executed.

Re: Interrupt Handler.

Posted: Thu Jul 31, 2008 7:18 am
by jal
huxuelei wrote:Which case could cause the cs selector to be null?
cs is taken from the stack, so it pops 0 of the stack where it expects a valid cs. So either your stack pointer is messed up, or, like Korona pointed out, you have some pushes or pops too much somewhere.


JAL