interrupt in PMode

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

interrupt in PMode

Post 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?!
Tim

Re:interrupt in PMode

Post 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).
K.J.

Re:interrupt in PMode

Post by K.J. »

Sorta off topic, but is that tutorial going to be finished soon?

K.J.
drizzt

Re:interrupt in PMode

Post 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?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:interrupt in PMode

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

Re:interrupt in PMode

Post by Tim »

Sorta off topic, but is that tutorial going to be finished soon?
It's been finished for a couple of months. :)
Post Reply