2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
5 * PURPOSE: Programmable Interrupt Controller emulation
6 * (Interrupt Controller Adapter (ICA) in Windows terminology)
7 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
13 /* INCLUDES *******************************************************************/
17 /* DEFINES ********************************************************************/
19 #define PIC_MASTER_CMD 0x20
20 #define PIC_MASTER_DATA 0x21
21 #define PIC_SLAVE_CMD 0xA0
22 #define PIC_SLAVE_DATA 0xA1
25 #define PIC_ICW1_ICW4 (1 << 0)
26 #define PIC_ICW1_SINGLE (1 << 1)
27 #define PIC_ICW4_8086 (1 << 0)
28 #define PIC_ICW4_AEOI (1 << 1)
30 #define PIC_OCW2_NUM_MASK 0x07
31 #define PIC_OCW2_EOI (1 << 5)
32 #define PIC_OCW2_SL (1 << 6)
34 #define PIC_OCW3 (1 << 3)
35 #define PIC_OCW3_READ_ISR 0x0B
39 BOOLEAN Initialization
;
41 BYTE IntRequestRegister
;
42 BYTE InServiceRegister
;
46 BOOLEAN CascadeRegisterSet
;
52 /* FUNCTIONS ******************************************************************/
54 VOID
PicInterruptRequest(BYTE Number
);
55 BYTE
PicGetInterrupt(VOID
);
57 VOID
PicInitialize(VOID
);