#include <reg52.h>
#define uchar  unsigned  char
#define uint unsigned int
#define led   P0

uchar table[] ={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};  //1101 1111

void delay ()
{
      uchar a,b;
		for(a=0;a<200;a++)
		for(b=0;b<200;b++);
}
void main (void)
{
    uchar i;
    while(1)
	 {
            for(i=0;i<8;i++)
		{
          led = table[i];
			 delay();
		}

	 }
}
