; fastest INC for 16-bit value located in TL2/TH2:
; it needs to be configured/preset as follow:
	ORL	P1,#00000011b		; count up
	MOV	T2CON,#00001110b	; external event counter
	MOV	T2MOD,#00000001b	; direction control via T2EX
	MOV	RCAP2H,#0x00		; overflow
	MOV	RCAP2L,#0x00		;	  reload value
; start value
	MOV	TH2,#0x12
	MOV	TL2,#0x34

; here all you need to increment TH2/TL2
	CLR	P1.0
	SETB	P1.0
; ----

; fastest DEC for 16-bit value located in TL2/TH2:
; it needs to be configured/preset as follow:
	SETB	P1.0			; T2 pin
	CLR	P1.1			; count down
	MOV	T2CON,#00001110b	; external event counter
	MOV	T2MOD,#00000001b	; direction control via T2EX
	MOV	RCAP2H,#0xFF		; overflow
	MOV	RCAP2L,#0xFF		;	  reload value
; start value
	MOV	TH2,#0x12
	MOV	TL2,#0x34
; ----

; here all you need to decrement TH2/TL2
	CLR	P1.0
	SETB	P1.0