#include <reg52.h>
#define uchar  unsigned char
#define uint  unsigned int
sbit led0 = P0^0;
sbit led1 = P0^1;
sbit led2 = P0^2;
sbit led3 = P0^3;
sbit led4 = P0^4;
sbit led5 = P0^5;
sbit led6 = P0^6;
sbit led7 = P0^7;

void delay (void)
  {
   uchar a,b;
   for(a=0;a<200;a++)
   for(b=0;b<200;b++);
  }

void main (void)
{
     		while(1)
	{
	   uchar i;
		for(i=0;i<8;i++)
		{
         led0 = 0;
	      delay();
	      led0 = 1;
	      delay();

         led1 = 0;
	      delay();
	      led1 = 1;
	      delay();

         led2 = 0;
	      delay();
    	   led2 = 1;
	      delay();
      
         led3 = 0;
	      delay();
	      led3 = 1;
	      delay();

        led4 = 0;
	     delay();
	     led4 = 1;
	     delay();

        led5 = 0;
	     delay();
	     led5 = 1;
	     delay();

        led6 = 0;
	     delay();
	     led6 = 1;
	     delay();

        led7 = 0;
	     delay();
	     led7 = 1;
	     delay();
		  }

  	 }

 }
