#include
sbit beep=P1^5 ;
#define jp P1
unsigned char n;
void kqzd();unsigned int abc[16]={65235,65198,65157,65110,65085,65030,64968,64934,64860,64778,64685,64634,64524,64399,64289,64167}; void main()
{ kqzd();
while(1)
{
TR0=1; }
}
void kqzd()
{
TMOD=0x01;
TH0=65235/256;
TL0=65235%256;
EA=1;
ET0=1;
}
void zd0() interrupt 1 {
jp=0x0f;
if(jp!=0x0f)
{ jp=0x0F;
switch(jp)
{
case(0x07): n=0;break; case(0x0b): n=1;break;
case(0x0d): n=2;break; case(0x0e): n=3;break; } jp=0xF0;
switch(jp)
{
case(0x70): n=n;break;
case(0xb0): n=n+4;break; case(0xd0): n=n+8;break;
case(0xe0): n=n+12;break;
}
TH0=abc[n]/256;
TL0=abc[n]%256;
beep=~beep; TR0=0;
}
}