//--------------------------------------------------------------- // EXAMPLE EX1.C : Basic Template of a C Program // // C.P. Diduch, Dec 1999. //--------------------------------------------------------------- #include // conio.h contains prototypes for // inportb() and outportb(). //--------------------------------------------------------------- void main() { unsigned char X, Y; outportb(0x13E, 0x82); // Initialize 82C55A PPI with ports 0x138 // and 0x13C as OP ports and port 0x13A // as an IP port. X = 0x3F & inportb(0x13A); Y = X ^ 0x0F; outportb(0x13C, Y); }