不理解这个代码,可以给我解释一下吗

#include <reg51.h>
#define uint unsigned int
#define uchar unsigned char
sbit vered=P0^0;
sbit veyellow=P0^1;
sbit vegreen=P0^2;
sbit nsred=P0^3;
sbit nsyellow=P0^4;
sbit nsgreen=P0^5;
uint count,second;
void delay(uint x)
{
uint a,b;
for(a=x;a>0;a--)
for(b=113;b>0;b--);
}
void main()
{
IE=0x82;
TMOD=0x01;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
TR0=1;
while(1)
{
P0=0x00;
while(second<=20)
{
vered=1;
nsgreen=1;
}
P0=0x00;
while((second>20)&(second<=25))
{
vered=1;
nsyellow=nsyellow;
delay(200);
}
P0=0x00;
while((second>25)&(second<=65))
{
vegreen=1;
nsred=1;
}
P0=0x00;
while((second>65)&(second<=70))
{
nsred=1;
veyellow=
veyellow;
delay(200);
}
P0=0x00;
if(second>70)
second=0;
}
}
void t0() interrupt 1
{
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
count++;
if(count==20)
{
second++;
count=0;
}
}

定时器开启了一个中断 ,在中断里对秒进行计数。
主程序根据秒的值,对LED进行不同的点亮方式。