void timer0() interrupt 1 { uchar count; TH0 = (65536-50000)/256; TL0 = (65536-50000)%6; count++; if(count == 20) { count = 0; sec++; if(sec == 100) { sec = 0; } } }