Enabling interrupts causes int 8 and then int 13 repeatedly?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
jrhetf4xb
Member
Member
Posts: 38
Joined: Fri May 16, 2014 11:50 am
Location: Bulgaria

Re: Enabling interrupts causes int 8 and then int 13 repeate

Post by jrhetf4xb »

So for a noob like me this means I won't be able to do it? :mrgreen:
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
Last edited by jrhetf4xb on Wed Nov 19, 2014 12:18 pm, edited 1 time in total.
Practice makes perfect.
User avatar
iansjack
Member
Member
Posts: 4707
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Enabling interrupts causes int 8 and then int 13 repeate

Post 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.
User avatar
SpyderTL
Member
Member
Posts: 1074
Joined: Sun Sep 19, 2010 10:05 pm

Re: Enabling interrupts causes int 8 and then int 13 repeate

Post 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).
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
User avatar
Kazinsal
Member
Member
Posts: 559
Joined: Wed Jul 13, 2011 7:38 pm
Libera.chat IRC: Kazinsal
Location: Vancouver
Contact:

Re: Enabling interrupts causes int 8 and then int 13 repeate

Post 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...
Post Reply