void main(void)
{
   TMOD |= 0x01;
   ET0 = 0;

   Simple_Delay_N_Fifty(10);

   z = IsLeapYear(2004);
   if(z == 1)
   {
      WriteCommandLCD(0x20, 1);  //execute command
      WriteCommandLCD(0x0F, 1);  //execute command
   }

   while(1)
   {
      speakerRoutine(10,5);
   }
}

int IsLeapYear( int y )
{
   if( ((y % 4) == 0) && ((y % 100) != 0) || ((y % 400) == 0) )
      return( 1 );
   else
      return( 0 );
}