
PIO-D144 User’s Manual
Version: 2.1 Date: 1999/10 Page 11
void interrupt irq_service()
{
char cc;
+;
/* 1. Read interrupt signal status */
new_int_state=inp(wBase+0x07)&0xff;
/* 2. Find the active signal */
int_c=new_int_state ^ now_int_state;
/* 3. IF PC0 is active */
if ((int_c&0x01) != 0)
{
cc=new_int_state&0x01;
if (cc !=0) +; else +;
invert=invert ^ 1;
}
/* 4. IF PC1 is active */
if ((int_c&0x02) != 0)
{
cc=new_int_state&0x02;
if (cc !=0) +; else +;
invert=invert ^ 2;
}
/* 5. IF PC2 is active */
if ((int_c&0x04) != 0)
{
cc=new_int_state&0x04;
if (cc !=0) +; else +;
invert=invert ^ 4;
}
/* 6. IF PC3 is active */
if ((int_c&0x08) != 0)
{
cc=new_int_state&0x08;
if (cc !=0) +; else +;
invert=invert ^ 8;
}
now_int_state=new_int_state;
outp(wBase+0x2a,invert);
if (wIrq>=8) outp(A2_8259,0x20);
outp(A1_8259,0x20);
}
ГК
Атлант
Инжиниринг
–
официальный
представитель
в
РФ
и
СНГ
+7(495)109-02-08 [email protected] www.bbrc.ru