I am currently working on the hardware interrupts, so I must remap the PIC .
I've read JamesM's tutorial but he dont describe clearly ( In other words : I'm dumb ) how to remap the PIC... After I've searched on Google, I've found some descriptions about the PIC, but I'm still not sure if my PIC remap function is correct, here's the code :
Code: Select all
void remap_pic(){
outb(0x20, 0x11);
io_wait();
outb(0xA0, 0x11);
io_wait();
outb(0x21, 0x20);
io_wait();
outb(0xA1, 0x70);
io_wait();
outb(0x21, 0x04);
io_wait();
outb(0xA1, 0x02);
io_wait();
outb(0x21, 0x01);
io_wait();
outb(0xA1, 0x01);
io_wait();
outb(0x21, inb(0x21) && 0xFC);
io_wait();
outb(0xA1, 0xFF);
}
Thanks .