#include
bit flag;
sbit p10=P1^0;
void it0p() interrupt 1
{
TR0=0;
flag=1;
}
void it1p() interrupt 3
{
p10=~p10;
}
void ptom2()
{
TMOD=0x26;
TL0=0xff;
TH0=0xff;
ET0=1;
TL1=0x06;
TH1=0x06;
flag=0;
EA=1;
TR0=1;
}
main()
{
SP=0x60;
while(1)
{
ptom2();
while(flag==0);
ET1=1;
TR1=1;
}
}