#include<reg52.h>
typedef unsigned int u16;
typedef unsigned char u8;
sbit LED1=P1^0;
sbit LED2=P2^0;
void delay_ms(u16 n)
{
u8 i;
while(n--)
{
i = 111;
while(i--);
}
}
void main()
{
while(1)
{
LED1=0;
LED2=1;
delay_ms(500);
LED1=1;
LED2=0;
delay_ms(500);
}
}