$MOD51
JMP start
	ORG 0bh
	CLR tcon.4
	RETI
	ORG 20h
start:
	MOV R1,#0e1h
	MOV tmod,#01h
	SETB ie.7			
	SETB ie.1
	CLR P2.1
	main_program:
	MOV R0,#14h
	SETB P2.1
	first_time:
		MOV TL0, #low(not(50000-1))
		MOV TH0, #high(not(50000-1))
		SETB tcon.4
		carry_first:
			JNB tcon.5, carry_first
		DJNZ R0, first_time
		MOV R0,#14h
		CLR P2.1
	second_time:
		MOV TL0, #low(not(50000-1))
		MOV TH0, #high(not(50000-1))
		SETB tcon.4
		carry_second:
			JNB tcon.5, carry_second
		DJNZ R0,second_time
		MOV R0,#14h
	DJNZ R1,main_program
END