/*AC Load Control*/
#include<conio.h>
#include<dos.h>
#include<stdio.h>
void main()
{
int in,status=0x00;
while(!kbhit())
{
outportb(0x378,status);
in=inportb(0x379);
in=in&0x08;
if(status==0x00) /* If Pb is pressed*/
{
while(in==0x00)/* wait while Pb is pressed*/
{
delay(10);
in=inportb(0x379);
in=in&0x08;
}
status=status^0x01; /*Invert status old value*/
outportb(0x378,status);
}
}
outportb(0x378,0x01);
/*Turn off the fan before exiting*/
}
/* Note: Use the BACK button of your browser to return to the previous page */