#include "reg51.h"
sbit KEY0 = P3^2;
sbit KEY1 = P3^3;
sbit OUT = P0^7;
sbit LED = P0^6;
void delay_ms(int t)
{
int i;
while(t--)
{
for(i=0; i<110; i++);
}
}
void main()
{
while(1)
{
if(KEY0==0)
{
OUT=0;
LED=0;
}
else if(KEY1==0)
{
OUT=1;
LED=1;
}
delay_ms(100);
}
}