aboutsummaryrefslogtreecommitdiff
path: root/include/05.irq/idt6.c
blob: eae37fa21c5584ead0b7f280389ed7a2967d12a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
void init_pic(void)
{
    ioport_out(PIC1_COMMAND_PORT, 0x11);
    ioport_out(PIC2_COMMAND_PORT, 0x11);
    ioport_out(PIC1_DATA_PORT, 0x20);
    ioport_out(PIC2_DATA_PORT, 0x28);
    ioport_out(PIC1_DATA_PORT, 0x04);
    ioport_out(PIC2_DATA_PORT, 0x02);
    ioport_out(PIC1_DATA_PORT, 0x01);
    ioport_out(PIC2_DATA_PORT, 0x01);
    ioport_out(PIC1_DATA_PORT, 0xff);
    ioport_out(PIC2_DATA_PORT, 0xff);
    ioport_out(PIC1_DATA_PORT, 0xFC);
}