Page 1 of 1

Real-mode interrupts in pmode

Posted: Tue Jul 16, 2002 11:00 pm
by Khumba
Hello, I was wondering if I could get my pmode kernel to use real-mode interrupts if I preserved the locations of the few interrupts I need (10, 13, 16) and loaded them to my IDT. Is this possible?

RE:Real-mode interrupts in pmode

Posted: Tue Jul 16, 2002 11:00 pm
by Khumba
As long as I put my kernel above the standard 640KB?

RE:Real-mode interrupts in pmode

Posted: Tue Jul 16, 2002 11:00 pm
by carbonBased
Nope.

You _cannot_ run real-mode code in protected mode, period (well... some code will work (eg, port IO)).

Real-mode code relys on a completely different segmentation model then protected mode.

What you can do is save the real-mode IDT, and map it into a v86 mode task, then perform your ints and return the values on the stack.

Jeff

RE:Real-mode interrupts in pmode

Posted: Tue Jul 16, 2002 11:00 pm
by Khumba
Ok, thanks!