Page 1 of 1

Help Request: calling BIOS interrupts from protected mode

Posted: Thu Feb 03, 2005 12:00 am
by __matt__
I need to know how to safely call BIOS software interrupts (like the video interrupt, int 0x10) from protected mode. I imagine this involves setting up an IDT, which I know how to do (I just don't know *what* to put in the IDT); it might also involve remapping some IRQs, which I don't know how to do.

I'm writing a toy kernel based on the template/stub kernel provided with the Grub documentation. So far I've only added a few instructions to boot.S to set up a GDT and reload the segment registers. The assembly is in gas (AT&T) syntax; the code probably won't help anyone answer my question, but it's on my website:

http://matt.ioioio.net/kernel/

Thanks in advance for the help.

Re: Help Request: calling BIOS interrupts from protected mod

Posted: Thu Feb 03, 2005 12:00 am
by rexlunae
Look at this thread:

<a href = "http://www.osdev.org/index.html?module=bb&op=viewtopic&t=134">http://www.osdev.org/index.html?module=bb&op=viewtopic&t=134</a>

It has both an idea of how to do this and also several explainations of why you shouldn't, and it was only one page away from the front. There are probably other threads discussing this as well, it is an question that someone asks periodicly here.