Page 1 of 1

pic identification

Posted: Sun May 31, 2009 6:30 am
by Hellboy
Hi all,
I have a question :
how to identify the programmable interrupt controler in my computer? is there any instruction for ?is it possible to handle all pic in the same way?

Re: pic identification

Posted: Sun May 31, 2009 7:28 am
by Combuster
By the powers of the PC standard, the PIC is omnipresent and a universal constant.

In all seriousness, each chipset has a PIC emulated somewhere, but as they all work by definition in the same way there is little reason to go checking off all possibilities.

Re: pic identification

Posted: Sun May 31, 2009 7:32 am
by kop99
if you are using intel cpu, then following is a little help.
http://www.thesatya.com/8259.html

And google about 8259.

Re: pic identification

Posted: Sun May 31, 2009 1:40 pm
by Masterkiller
Remap an interrupt IVT of interrupt of 0x08 (IRQ0 = programable interrupt controller called 18.2 per second); Mask the IRQ0 through PIC at port 0x21; Wait ~1sec, if no interrupt called continue executing as you have PIC, if interrupt called, your interrupt handler must tell the main execution that you do not have an PIC. Return 0x08 INT handler to its original value.

Re: pic identification

Posted: Sun May 31, 2009 8:04 pm
by Brendan
Hi,
Masterkiller wrote:Remap an interrupt IVT of interrupt of 0x08 (IRQ0 = programable interrupt controller called 18.2 per second); Mask the IRQ0 through PIC at port 0x21; Wait ~1sec, if no interrupt called continue executing as you have PIC, if interrupt called, your interrupt handler must tell the main execution that you do not have an PIC. Return 0x08 INT handler to its original value.
If you can't be sure if there's PIC chips, then you can't be sure there's a PIT chip either (or that it boots an OS in any way you're used to)...

If there's no PIC then the computer isn't a "PC compatible" and you'd need to port your OS to the different architecture (even if the different architecture happens to use x86 CPUs).


Cheers,

Brendan