//will check balaji sir program 
void init_port(void);
void outport(char);
void show_digits( void);
void delay1(int);

void setup() {
  init_port();
  show_digits();
}

void show_digits()
{
  int i;
  char digit[10] = {0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};
  while(1)
  {
    for(i=0; i<10; i++)
    {
      outport(~digit[i]);
      delay1(400);
    }
  }
}
void init_port()
{
  char *portb_dir  = (char *)0x24;
  char *portd_dir  = (char *)0x2A;
  *portb_dir = 0x0F;
  *portd_dir = 0xF0;
}

void outport( char out_data)
{
  char *portb_data = (char *)0x25; 
  char *portd_data = (char *)0x2B; 
  *portb_data = out_data >> 4;
  *portd_data = out_data << 4;
}

void delay1(int count)
{
  volatile long i;
  while(count)
  {
    for(i=0; i<1000; i++);
    count--;
  }
}

void loop() {

}