/* ----------------------------------------------------------- */ /* demo 3 : count high pulse of CN1_PC0 */ /* (initial Low & active High) */ /* step 1 : run demo3.exe */ /* ----------------------------------------------------------- */ #include "PIO.H" #define A1_8259 0x20 #define A2_8259 0xA0 #define EOI 0x20 WORD init_low(); static void interrupt irq_service(); int COUNT,irqmask,now_int_state; WORD wBase,wIrq; int main() { int i,j; WORD wBoards,wRetVal; WORD wSubVendor,wSubDevice,wSubAux,wSlotBus,wSlotDevice; char c; DWORD dwVal; clrscr(); PIO_DriverInit(&wBoards,0x80,0x01,0x50); printf("\n(1) Threr are %d PIO-D168 Cards in this PC",wBoards); if ( wBoards==0 ) { putch(0x07); putch(0x07); putch(0x07); printf("(1) There are no PIO-D168 card in this PC !!!\n"); exit(0); } printf("\n(2) Show the Configuration Space of all PIO-D168:"); for(i=0; i=8) outp(A2_8259,0x20); outp(A1_8259,0x20); }