Page 2 of 2
Re: Enabling interrupts causes int 8 and then int 13 repeate
Posted: Wed Nov 19, 2014 12:07 pm
by jrhetf4xb
So for a noob like me this means I won't be able to do it?
Btw, is it normal for my interrupt request handler to be called repetitively with int no.32? It does so at a slow rate of roughly about 10 times per second...
EDIT:
this channel of the timer is set to generate an IRQ0 18.222 times per second.
Alright, so this is the PIT
Never mind then
Re: Enabling interrupts causes int 8 and then int 13 repeate
Posted: Wed Nov 19, 2014 12:11 pm
by iansjack
But you don't want to jump over the instruction that caused the exception, do you? Either you take some action to prevent it or you terminate the process - you can't really just ignore it and have undefined behaviour.
Re: Enabling interrupts causes int 8 and then int 13 repeate
Posted: Wed Nov 19, 2014 2:21 pm
by SpyderTL
I'm just letting my divide by zero exceptions loop forever, and lock up the system, for now. At least until I get around to implementing a proper OS-level exception handler.
The same goes for invalid instruction exceptions. Other, more serious exceptions just cause a triple fault and reset the machine, which is also fine, for now.
You aren't likely to run into a divide by zero exception or invalid instruction exception on a regular basis, so as long as you can step through your OS with a debugger, like BOCHS, on the rare occasion that the machine does lock up, you should be fine.
Just put "Handle Exceptions!" on your TODO list..
If you want to save yourself some time debugging, just write a custom interrupt handler for each of these exceptions, and have it clear the screen and write a static message to the screen (or show an image if you are graphics mode).
Re: Enabling interrupts causes int 8 and then int 13 repeate
Posted: Thu Nov 20, 2014 3:16 pm
by Kazinsal
SpyderTL wrote:Other, more serious exceptions just cause a triple fault and reset the machine, which is also fine, for now.
Until you inevitably end up with an easily solvable GPF from your GDT or IDT, causing a lovely spontaneous reboot...