$MOD52 ; This includes 8052 definitions for the Metalink assembler
ORG 0000H
RESET:LJMP MAIN
ORG 000BH
LJMP ITOP
ORG 1000H
MAIN:MOV SP,#60H
MOV B,#14H
MOV TMOD,#01H
MOV TL0,#0B0H
MOV TH0,#3CH
SETB ET0
SETB EA
SETB TR0
HERE:SJMP HERE
ITOP:
MOV TL0,#0B0H
MOV TH0,#3CH
DJNZ B,RETURN
LJMP USER
RETURN:RETI
USER:CPL P1.0
MOV B,#14H
RETI
END
//延时程序
void delay(unsigned int count)
{
unsigned char i;
while(count--!=0)
for(i=0;i<120;i++);
}
delay(1000);//延时1s