Page 1 of 1
interrupts in pmode
Posted: Sat Sep 07, 2002 4:41 pm
by CoolnessItself
Are there any ways to use interrupts in pmode? any way around it?
Re:interrupts in pmode
Posted: Sat Sep 07, 2002 9:14 pm
by Tom
there's a way to use ints in Pmode it's called v86 mode, but it's complicated, and i'm still trying to get it to work
Re:interrupts in pmode
Posted: Mon Sep 09, 2002 3:52 am
by drizzt
There is another way, even if I think that V86 is the best way. Go to my previous topic in this site:
PMode interrupt again
http://www.mega-tokyo.com/forum/index.p ... eadid=1290
Re:interrupts in pmode
Posted: Mon Sep 09, 2002 4:25 pm
by CoolnessItself
Thanks, but according to that, paging is not possible. Is it possible to make a mix of the two?
Re:interrupts in pmode
Posted: Tue Sep 10, 2002 2:00 am
by Pype.Clicker
you can't have paging unless you're in protected/virtual mode. BTW, i don't recommand the real mode interrupts as it means the system is completely locked during the service (hum, like Win95, reading the floppy will completely freeze the GUI
)
Re:interrupts in pmode
Posted: Tue Sep 10, 2002 3:20 am
by drizzt
Yes pype... the best way is to write drivers from himself, without using BIOS ints, but it's very difficult, especially because there is not enough documentation... :'(
Re:interrupts in pmode
Posted: Tue Sep 10, 2002 3:55 am
by Pype.Clicker
using bios&v86 mode seems safer (though more complicated) than using real mode switch back because when in v86 mode, IRQs are still handled by kernel (and thus you can go on with multitasking while the BIOS is waiting for an interrupt) -- but you still can't detect when the BIOS start to wait for its IRQ (thus losing some CPU cycles)...
I guess the best way to go is to learn from Linux drivers
Re:interrupts in pmode
Posted: Tue Sep 10, 2002 4:09 am
by drizzt
CoolnessItself wrote:
Thanks, but according to that, paging is not possible. Is it possible to make a mix of the two?
I think paging is possible... because you are in protected mode. You temporaly switch to real mode only when a int occurs, then you come back to protected mode.
So you could write your IRQ and interrupt handlers without calling BIOS ints, but switching to real mode only when it is necessary... for your video & disk drivers for example, that are very difficult to write from himself...
In this way you have a protected mode code with a little help from the BIOS...
But as I said it's not the best way... as pype I think V86 is the best way even if is more complicated than using real mode switching...