Page 1 of 1
interrupt in PMode
Posted: Mon Aug 26, 2002 4:11 am
by drizzt
I've always programmed in real mode... now I want to learn more about PMode, but what's the simple way to use BIOS interrupt?! In this forum I've found many info about IDT, V86 mode, etc. but I don't know from where to start...
What you suggest me? (Info, tutorial, sample...) Thanx!
PS I've also Alexei A. Frounze tutorials... are they OK to begin?!
Re:interrupt in PMode
Posted: Mon Aug 26, 2002 6:56 am
by Tim
You will only be ready to use V86 mode once you have got a good protected mode environment up and running. Once you have learned that, you will not need to ask how to do it (but see
http://osdev.berlios.de/v86.html).
Re:interrupt in PMode
Posted: Mon Aug 26, 2002 4:10 pm
by K.J.
Sorta off topic, but is that tutorial going to be finished soon?
K.J.
Re:interrupt in PMode
Posted: Tue Aug 27, 2002 3:31 am
by drizzt
So the only way to use BIOS interrupt in PMode is V86 Mode... but i've a question...
the problem of the BIOS interrupt is that they are written for real mode... so, for example, to restore the PC (cs:eip) is used the instruction IRET and not IRETD.
But couldn't I define an IDT where for every interrupt is called a procedure that do this:
1) push segment registers (ds, es, fs, gs)
2) set an opportune code selector
3) call the old BIOS ISR
4) restore segment registers
5) IRETD.
In this manner I could use BIOS interrupt in PMode... or not? ??? is it wrong?
Re:interrupt in PMode
Posted: Tue Aug 27, 2002 6:18 am
by Pype.Clicker
problem is that bios code ignores you're in pmode, and that it could do some pointers arithmetics (usually, it could contain some far jmp using inlined 0xc000 segment value, etc.)
VBE3 bios is an exemple of abstraction of realmode/pmode by the use of a selectors table (will we use 0xb800 or VIDEO_SELECTOR to access the textmode video buffer ?), but it's far from being generalized ...
Re:interrupt in PMode
Posted: Tue Aug 27, 2002 7:01 am
by Tim
Sorta off topic, but is that tutorial going to be finished soon?
It's been finished for a couple of months.