![Omega OME-PIO-D144 Hardware Manual Download Page 14](http://html1.mh-extra.com/html/omega/ome-pio-d144/ome-pio-d144_hardware-manual_3930423014.webp)
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);
}
OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001)
---- 12