interrupt confusion! please clarify

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.
Tom

Re:interrupt confusion! please clarify

Post by Tom »

You don't need v86. You can have a 100% PMode OS ( what i'm doing, mabe ).

I would really like v86 in my OS but it's too hard right now. ( For me )
Friend

Re:interrupt confusion! please clarify

Post by Friend »

In PMode Interrupts should NOT be disabled, they can be but you must eventually set them up if you want to respond to any of the system exceptions that can happen, also if you want to write a floppy disk driver you will need to setup IRQ6, IRQ1 is for the keyboard driver and so on, the keyboard IRQ is definately a must for a decent and efficient multi-tasking system.

PMode gives you access to the full 4GB of address space, and is far better than real mode.

You need to read the intel docs again and again and again until you catch on to these things, it took me a while before I caught on, but you will eventually.

So to wrap it up

1. To enter Pmode you must disable Interrupts by 'cli'
2. Once you have setup Pmode you, IMHO must setup a valid IDT and re-enable interrupts
by 'sti', this IDT must contain handlers for the INT0-31, these are the system exception
interrupts, the IDT should also contain handlers for the hardware IRQ0-15, this is not a
must for a running system, but to do anything useful you will need them, the IRQ's
must be remapped so they do not interfere with the system exceptions.
3. PMode allows access to the full 4GB address space
4. Read the intel docs over and over again until you understand.

Hope this helps.
elias

Re:interrupt confusion! please clarify

Post by elias »

i didnt even know about the intel docs, but want to read them. can you tell me the URL?
Friend

Re:interrupt confusion! please clarify

Post by Friend »

Post Reply