;--------------------------------------------------------
; File Created by ChiponCC : aolisn inc.
; Version 3.0.4#6752 (Jul  6 2017 15:09:47) (MSVC)
; This file was generated Tue Apr 03 21:00:10 2018
;--------------------------------------------------------
; chipon port for the 16-bit core
;--------------------------------------------------------
;	.file	"../debug_touch.c"
	.radix dec
	.include "KF8TS2508.inc"
;--------------------------------------------------------
; external declarations
;--------------------------------------------------------
	.extern	_init_mcu
	.extern	_Pmw1InitFun
	.extern	_T0InitFun
	.extern	__KF8spts2w_LIBf_init_touch_
	.extern	__KF8spts2w_LIBf_touch_process_
	.extern	__KF8spts2w_Lib_SET_MCU_Parameter
	.extern	_read_data_eep_ts2w_
	.extern	_write_eep_ts2w_
	.extern	_delay_ms
	.extern	_delay_us
	.extern	__R2PCL
	.extern	_PSW_bits
	.extern	_P0_bits
	.extern	_P2_bits
	.extern	_P1_bits
	.extern	_PCH_bits
	.extern	_INTCTL_bits
	.extern	_EIF1_bits
	.extern	_EIF2_bits
	.extern	_T1CTL_bits
	.extern	_PWMCTL_bits
	.extern	_BANK_bits
	.extern	_ADSCANCTL_bits
	.extern	_VDACS_bits
	.extern	_ANSEH_bits
	.extern	_ADCCTL0_bits
	.extern	_OPTR_bits
	.extern	_IP0_bits
	.extern	_IP1_bits
	.extern	_IP2_bits
	.extern	_TR0_bits
	.extern	_TR2_bits
	.extern	_TR1_bits
	.extern	_OSCSTA_bits
	.extern	_IP3_bits
	.extern	_VRECTL_bits
	.extern	_EIE1_bits
	.extern	_EIE2_bits
	.extern	_PCTL_bits
	.extern	_OSCCTL_bits
	.extern	_ANSEL_bits
	.extern	_PUR0_bits
	.extern	_IOCL_bits
	.extern	_ADCCTL1_bits
	.extern	_P0LR_bits
	.extern	_P2LR_bits
	.extern	_P1LR_bits
	.extern	_EIE3_bits
	.extern	_EIF3_bits
	.extern	_T3CTL_bits
	.extern	_CTCTL0_bits
	.extern	_ADCINTCTL_bits
	.extern	_PUR1_bits
	.extern	_PUR2_bits
	.extern	_CTCTL1_bits
	.extern	_INTEDGCTL_bits
	.extern	_VDAC_bits
	.extern	_VRES_bits
	.extern	_SSCICTL0_bits
	.extern	_SSCICTL1_bits
	.extern	_SSCISTA_bits
	.extern	_SSCIADD_bits
	.extern	_SSCIMSK_bits
	.extern	_WDTPS_bits
	.extern	_CTCTL2_bits
	.extern	_T4CTL_bits
	.extern	__KF8_Disturb_Protect_Circle_
	.extern	__KF8_Up_BaseLine_Circle_
	.extern	__KF8_LIBi_channel_flag_
	.extern	__KF8_LIBi_Date_Change_
	.extern	__KF8_LIBc_channel_
	.extern	__KF8_LIBi_buff_hit_
	.extern	__KF8_LIBi_buff_baseline_
	.extern	__KF8_LIBi_buff_refline_
	.extern	__KF8_LIBc_touch_count_
	.extern	_Arr_erom_TS2W_
	.extern	_Flag
	.extern	_AlarmFlag
	.extern	_CurrentAdjustNum
	.extern	_KeyDownNum
	.extern	_Time20MScnt
	.extern	_V_NoWatercnt
	.extern	_AdjustOvercnt
	.extern	_NoWaterTimecnt
	.extern	_main_cnt
	.extern	_SubNum
	.extern	_AD_temp_V
	.extern	_AD_temp_I
	.extern	_AD_V
	.extern	_AD_I
	.extern	_AD_cnt
	.extern	_Power
	.extern	_LEDFre
	.extern	_CurrentShortCnt
	.extern	_I_NoWatercnt
	.extern	_cnt
	.extern	_keycnt
	.extern	_keycnttime
	.extern	_CHS_AMOUNT
	.extern	_TCS_AMOUNT
	.extern	__KF8_Inside_Reference_Channel_Disturb_Threshold_Set_
	.extern	__KF8_Disturb_Protect_Circle_Define
	.extern	__KF8_Up_BaseLine_Circle_Define
	.extern	__KF8_Inside_Reference_Channel_Order
	.extern	__KF8_Config_Finger_Threshold
	.extern	_CONFIG_NO_FINGER_THRESHOLD
	.extern	__KF8_TOUCH_CH_EN
	.extern	_T0
	.extern	_PCL
	.extern	_PSW
	.extern	_P0
	.extern	_P2
	.extern	_P1
	.extern	_PCH
	.extern	_INTCTL
	.extern	_EIF1
	.extern	_EIF2
	.extern	_T1L
	.extern	_T1H
	.extern	_T1CTL
	.extern	_PWM1L
	.extern	_PWMCTL
	.extern	_PP1
	.extern	_BANK
	.extern	_ADSCANCTL
	.extern	_VDACS
	.extern	_ANSEH
	.extern	_ADCDATA0H
	.extern	_ADCCTL0
	.extern	_OPTR
	.extern	_IP0
	.extern	_IP1
	.extern	_IP2
	.extern	_TR0
	.extern	_TR2
	.extern	_TR1
	.extern	_OSCSTA
	.extern	_IP3
	.extern	_VRECAL1
	.extern	_VRECTL
	.extern	_EIE1
	.extern	_EIE2
	.extern	_PCTL
	.extern	_OSCCTL
	.extern	_OSCCAL0
	.extern	_ANSEL
	.extern	_PP2
	.extern	_PWM2L
	.extern	_PUR0
	.extern	_IOCL
	.extern	_OSCCAL1
	.extern	_NVMDATAH
	.extern	_NVMDATAL
	.extern	_NVMADDRH
	.extern	_NVMADDRL
	.extern	_NVMCTL0
	.extern	_NVMCTL1
	.extern	_ADCDATA0L
	.extern	_ADCCTL1
	.extern	_P0LR
	.extern	_P2LR
	.extern	_P1LR
	.extern	_EIE3
	.extern	_EIF3
	.extern	_OSCCAL2
	.extern	_OSCCAL3
	.extern	_T3CTL
	.extern	_T3L
	.extern	_ADCDATA1H
	.extern	_ADCDATA1L
	.extern	_CTCTL0
	.extern	_ADCINTCTL
	.extern	_ADCDATA2H
	.extern	_ADCDATA2L
	.extern	_ADCDATA3H
	.extern	_T3H
	.extern	_PUR1
	.extern	_PUR2
	.extern	_CTCTL1
	.extern	_INTEDGCTL
	.extern	_ADCDATA3L
	.extern	_VDAC
	.extern	_VRES
	.extern	_SSCICTL0
	.extern	_SSCICTL1
	.extern	_SSCISTA
	.extern	_SSCIBUFR
	.extern	_SSCIADD
	.extern	_SSCIMSK
	.extern	_WDTPS
	.extern	_VRECAL2
	.extern	_VRECAL3
	.extern	_CTCTL2
	.extern	_T4L
	.extern	_T4H
	.extern	_T4REL
	.extern	_T4REH
	.extern	_T4CTL
	.extern	_RC32KCAL

	.extern I0R1
	.extern I0R7
	.extern I0PSW
	.extern I0PCH
	.extern I1R1
	.extern I1R7
	.extern I1PSW
	.extern I1PCH
	.extern STK11
	.extern STK10
	.extern STK09
	.extern STK08
	.extern STK07
	.extern STK06
	.extern STK05
	.extern STK04
	.extern STK03
	.extern STK02
	.extern STK01
	.extern STK00
;--------------------------------------------------------
; global declarations
;--------------------------------------------------------
	.global	_TOUCH_DEBUG_SEND_OUT
	.global	_TOUCH_DEBUG_TRS_DEAL
	.global	_TOUCH_DEBUG_TRS_BAIHUALV
	.global	_TOUCH_CH_TRS_EN
	.global	_T_buf
	.global	_i_T_D
	.global	_sentbuf1
	.global	_sentbuf2
	.global	_sentbuf3
	.global	_sentbuf4
	.global	_Date_Baihualv_Get_V

;--------------------------------------------------------
; global definitions
;--------------------------------------------------------
UD_debug_touch_0	.udata
_T_buf	.res	1

UD_debug_touch_1	.udata
_i_T_D	.res	1

UD_debug_touch_2	.udata
_sentbuf1	.res	1

UD_debug_touch_3	.udata
_sentbuf2	.res	1

UD_debug_touch_4	.udata
_sentbuf3	.res	1

UD_debug_touch_5	.udata
_sentbuf4	.res	1

UD_debug_touch_6	.udata
_Date_Baihualv_Get_V	.res	2

;--------------------------------------------------------
; absolute symbol definitions
;--------------------------------------------------------
;--------------------------------------------------------
; compiler-defined variables
;--------------------------------------------------------
UDL_debug_touch_0	.udata
r0x100A	.res	1
UDL_debug_touch_1	.udata
r0x100B	.res	1
UDL_debug_touch_2	.udata
r0x1008	.res	1
UDL_debug_touch_3	.udata
r0x1009	.res	1
UDL_debug_touch_4	.udata
r0x1006	.res	1
UDL_debug_touch_5	.udata
r0x1007	.res	1
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------

ID_debug_touch_0	.idata
_TOUCH_CH_TRS_EN
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01
	.db	0x01

;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
;	.udata_ovr


func._TOUCH_DEBUG_SEND_OUT	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _TOUCH_DEBUG_SEND_OUT	;Function start
; 2 exit points
;has an exit
;functions called:
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;3 compiler assigned registers:
;   STK00
;   r0x1006
;   r0x1007
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_TOUCH_DEBUG_SEND_OUT	;Function start
; 2 exit points
;	op : =
;	.line	648; "../debug_touch.c"	CLK_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 1
;	op : =
;	.line	649; "../debug_touch.c"	DAT_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 0
;	op : SEND
;	op : CALL
;	.line	650; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : GET_VALUE_AT_ADDRESS
;	.line	653; "../debug_touch.c"	if(CLK_GET_STATE)
	BANKSEL	_P0_bits
	JB	_P0_bits, 1
	JMP	_00149_DS_
;	op : SEND
;	op : CALL
;	.line	655; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : GET_VALUE_AT_ADDRESS
;	.line	656; "../debug_touch.c"	if(!CLK_GET_STATE)
	BANKSEL	_P0_bits
	JNB	_P0_bits, 1
	JMP	_00150_DS_
;	op : RETURN
;	.line	657; "../debug_touch.c"	return;
	JMP	_00170_DS_
;	op : LABEL
;	op : GET_VALUE_AT_ADDRESS
_00149_DS_
;	.line	659; "../debug_touch.c"	else if(!CLK_GET_STATE)
	BANKSEL	_P0_bits
	JNB	_P0_bits, 1
	JMP	_00146_DS_
;	op : RETURN
;	.line	661; "../debug_touch.c"	return;
	JMP	_00170_DS_
;	op : LABEL
;	op : RETURN
_00146_DS_
;	.line	664; "../debug_touch.c"	return;
	JMP	_00170_DS_
;	op : LABEL
;	op : =
_00150_DS_
;	.line	666; "../debug_touch.c"	CLK_SET_OUT;
	BANKSEL	_TR0_bits
	CLR	_TR0_bits, 1
;	op : =
;	.line	668; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	669; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	671; "../debug_touch.c"	CLK_SET_HIGH;		//上升沿
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	672; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
;	.line	674; "../debug_touch.c"	if(!DAT_GET_STATE)
	PAGESEL	$
;	.line	676; "../debug_touch.c"	return;
	BANKSEL	_P0_bits
	JB	_P0_bits, 0
;	.line	679; "../debug_touch.c"	CLK_SET_LOW;			//下降沿
	JMP	_00170_DS_
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	.line	682; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	684; "../debug_touch.c"	DAT_SET_OUT;
	BANKSEL	_TR0_bits
	CLR	_TR0_bits, 0
;	op : =
;	.line	687; "../debug_touch.c"	j=5;
	MOV	R0,# 0x05
	BANKSEL	r0x1006
	MOV	r0x1006, R0
;	op : =
;	.line	689; "../debug_touch.c"	for(step=0;step<5;step++)
	BANKSEL	r0x1007
	CLR	r0x1007
;	op : LABEL
;	op : <
;unsigned compare: left < lit(0x5=5), size=1
_00166_DS_
	MOV	R0,# 0x05
	BANKSEL	r0x1007
	SUB	R0, r0x1007
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00169_DS_
;	op : >
;swapping arguments (AOP_TYPEs 1/2)
;unsigned compare: left >= lit(0x5=5), size=1
;	.line	691; "../debug_touch.c"	switch(step)
	MOV	R0,# 0x05
	BANKSEL	r0x1007
	SUB	R0, r0x1007
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00158_DS_
;	op : JUMPTABLE
	MOV	R0,#high _00185_DS_
	MOV	PCH, R0
	MOV	R0,#_00185_DS_
	BANKSEL	r0x1007
	ADD	R0, r0x1007
	JNB	PSW, 0
	INC	PCH
	MOV	PCL, R0
_00185_DS_
	JMP	_00153_DS_
	JMP	_00154_DS_
	JMP	_00155_DS_
	JMP	_00156_DS_
	JMP	_00157_DS_
;	op : LABEL
;	op : =
_00153_DS_
;	.line	695; "../debug_touch.c"	j=5;   T_buf=0x04;
	MOV	R0,# 0x05
	BANKSEL	r0x1006
	MOV	r0x1006, R0
;	op : =
	MOV	R0,# 0x04
	BANKSEL	_T_buf
	MOV	_T_buf, R0
;	op : GOTO
;	.line	696; "../debug_touch.c"	}break;
	JMP	_00158_DS_
;	op : LABEL
;	op : =
_00154_DS_
;	.line	699; "../debug_touch.c"	j=8;   T_buf=sentbuf1;
	MOV	R0,# 0x08
	BANKSEL	r0x1006
	MOV	r0x1006, R0
;	op : =
	BANKSEL	_sentbuf1
	MOVZ	R0, _sentbuf1
	BANKSEL	_T_buf
	MOV	_T_buf, R0
;	op : GOTO
;	.line	700; "../debug_touch.c"	}break;
	JMP	_00158_DS_
;	op : LABEL
;	op : =
_00155_DS_
;	.line	703; "../debug_touch.c"	j=8;   T_buf=sentbuf2;
	MOV	R0,# 0x08
	BANKSEL	r0x1006
	MOV	r0x1006, R0
;	op : =
	BANKSEL	_sentbuf2
	MOVZ	R0, _sentbuf2
	BANKSEL	_T_buf
	MOV	_T_buf, R0
;	op : GOTO
;	.line	704; "../debug_touch.c"	}break;
	JMP	_00158_DS_
;	op : LABEL
;	op : =
_00156_DS_
;	.line	707; "../debug_touch.c"	j=8;   T_buf=sentbuf3;
	MOV	R0,# 0x08
	BANKSEL	r0x1006
	MOV	r0x1006, R0
;	op : =
	BANKSEL	_sentbuf3
	MOVZ	R0, _sentbuf3
	BANKSEL	_T_buf
	MOV	_T_buf, R0
;	op : GOTO
;	.line	708; "../debug_touch.c"	}break;
	JMP	_00158_DS_
;	op : LABEL
;	op : =
_00157_DS_
;	.line	711; "../debug_touch.c"	j=8;   T_buf=sentbuf4;
	MOV	R0,# 0x08
	BANKSEL	r0x1006
	MOV	r0x1006, R0
;	op : =
	BANKSEL	_sentbuf4
	MOVZ	R0, _sentbuf4
	BANKSEL	_T_buf
	MOV	_T_buf, R0
;	op : LABEL
;	op : =
_00158_DS_
;	.line	715; "../debug_touch.c"	for(i_T_D=0;i_T_D<j;i_T_D++)
	BANKSEL	_i_T_D
	CLR	_i_T_D
;	op : LABEL
;	op : <
_00162_DS_
	BANKSEL	r0x1006
	MOVZ	R0, r0x1006
	BANKSEL	_i_T_D
	SUB	R0, _i_T_D
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00165_DS_
;	op : BITWISEAND
;	.line	717; "../debug_touch.c"	if(T_buf&0x01)
	BANKSEL	_T_buf
	JB	_T_buf, 0
	JMP	_00160_DS_
;	op : =
;	.line	718; "../debug_touch.c"	DAT_SET_HIGH;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 0
;	op : GOTO
	JMP	_00161_DS_
;	op : LABEL
;	op : =
_00160_DS_
;	.line	720; "../debug_touch.c"	DAT_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 0
;	op : LABEL
;	op : =
_00161_DS_
;	.line	722; "../debug_touch.c"	CLK_SET_HIGH;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	723; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	725; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	726; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : RIGHT_OP
;	.line	728; "../debug_touch.c"	T_buf=T_buf>>1;
	CLR	PSW, 0
	BANKSEL	_T_buf
	RRC	_T_buf
;	op : +
;	.line	715; "../debug_touch.c"	for(i_T_D=0;i_T_D<j;i_T_D++)
	BANKSEL	_i_T_D
	INC	_i_T_D
;	op : GOTO
	JMP	_00162_DS_
;	op : LABEL
;	op : SEND
;	op : CALL
_00165_DS_
;	.line	731; "../debug_touch.c"	Touch_Delay2;
	MOV	R0,# 0x6e
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : +
;	.line	689; "../debug_touch.c"	for(step=0;step<5;step++)
	BANKSEL	r0x1007
	INC	r0x1007
;	op : GOTO
	JMP	_00166_DS_
;	op : LABEL
;	op : =
_00169_DS_
;	.line	735; "../debug_touch.c"	DAT_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 0
;	op : SEND
;	op : CALL
;	.line	736; "../debug_touch.c"	Touch_Delay2;	//编程器判断需要时间
	MOV	R0,# 0x6e
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	738; "../debug_touch.c"	CLK_SET_HIGH;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	739; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : SEND
;	op : CALL
;	.line	740; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	742; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	743; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	745; "../debug_touch.c"	CLK_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 1
;	op : =
;	.line	746; "../debug_touch.c"	DAT_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 0
;	op : LABEL
;	op : ENDFUNCTION
_00170_DS_
	CRET	
; exit point of _TOUCH_DEBUG_SEND_OUT



func._TOUCH_DEBUG_TRS_DEAL	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _TOUCH_DEBUG_TRS_DEAL	;Function start
; 2 exit points
;has an exit
;functions called:
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;3 compiler assigned registers:
;   STK00
;   r0x1008
;   r0x1009
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_TOUCH_DEBUG_TRS_DEAL	;Function start
; 2 exit points
;	op : INLINEASM
	MOV R1,#High(__KF8_TOUCH_CH_EN+0)
	MOV R0,#(0)
	ADD R0,#Low(__KF8_TOUCH_CH_EN+0)
	JNB PSW,0
	INC R1
	PAGESEL __R2PCL
	CALL __R2PCL
	PAGESEL $
	ADD R0,#(_TOUCH_CH_TRS_EN+0)
	MOV R1,#0x01
	BANKSEL _TOUCH_CH_TRS_EN
	ST [R0],R1
	
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_
	MOV R0,__KF8_LIBc_channel_
	ADD R0,#Low(__KF8_TOUCH_CH_EN+0)
	MOV R1,#High(__KF8_TOUCH_CH_EN+0)
	JNB PSW,0
	INC R1
	PAGESEL __R2PCL
	CALL __R2PCL
	PAGESEL $
	ADD R0,#(_TOUCH_CH_TRS_EN+0)
	BANKSEL _TOUCH_CH_TRS_EN
	LD R1,[R0]
	XOR R1,#0x00
	JNB PSW,2
	JMP Label_x_y_z_a
	
;	op : =
;	.line	393; "../debug_touch.c"	CLK_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 1
;	op : =
;	.line	394; "../debug_touch.c"	DAT_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 0
;	op : SEND
;	op : CALL
;	.line	395; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : GET_VALUE_AT_ADDRESS
;	.line	399; "../debug_touch.c"	if(CLK_GET_STATE)
	BANKSEL	_P0_bits
	JB	_P0_bits, 1
	JMP	_00078_DS_
;	op : SEND
;	op : CALL
;	.line	401; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : GET_VALUE_AT_ADDRESS
;	.line	402; "../debug_touch.c"	if(!CLK_GET_STATE)
	BANKSEL	_P0_bits
	JNB	_P0_bits, 1
	JMP	_00079_DS_
;	op : RETURN
;	.line	403; "../debug_touch.c"	return;
	JMP	_00116_DS_
;	op : LABEL
;	op : GET_VALUE_AT_ADDRESS
_00078_DS_
;	.line	405; "../debug_touch.c"	else if(!CLK_GET_STATE)
	BANKSEL	_P0_bits
	JNB	_P0_bits, 1
	JMP	_00075_DS_
;	op : RETURN
;	.line	407; "../debug_touch.c"	return;
	JMP	_00116_DS_
;	op : LABEL
;	op : RETURN
_00075_DS_
;	.line	410; "../debug_touch.c"	return;
	JMP	_00116_DS_
;	op : LABEL
;	op : =
_00079_DS_
;	.line	412; "../debug_touch.c"	CLK_SET_OUT;
	BANKSEL	_TR0_bits
	CLR	_TR0_bits, 1
;	op : =
;	.line	414; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	415; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	417; "../debug_touch.c"	CLK_SET_HIGH;		//上升沿
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	419; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
;	.line	421; "../debug_touch.c"	if(!DAT_GET_STATE)
	PAGESEL	$
;	.line	423; "../debug_touch.c"	return;
	BANKSEL	_P0_bits
	JB	_P0_bits, 0
;	.line	426; "../debug_touch.c"	CLK_SET_LOW;			//下降沿
	JMP	_00116_DS_
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	.line	430; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	432; "../debug_touch.c"	DAT_SET_OUT;
	BANKSEL	_TR0_bits
	CLR	_TR0_bits, 0
;	op : =
;	.line	434; "../debug_touch.c"	j=5;
	MOV	R0,# 0x05
	BANKSEL	r0x1008
	MOV	r0x1008, R0
;	op : =
;	.line	436; "../debug_touch.c"	for(step=0;step<5;step++)
	BANKSEL	r0x1009
	CLR	r0x1009
;	op : LABEL
;	op : <
;unsigned compare: left < lit(0x5=5), size=1
_00108_DS_
	MOV	R0,# 0x05
	BANKSEL	r0x1009
	SUB	R0, r0x1009
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00111_DS_
;	op : >
;swapping arguments (AOP_TYPEs 1/2)
;unsigned compare: left >= lit(0x5=5), size=1
;	.line	438; "../debug_touch.c"	switch(step)
	MOV	R0,# 0x05
	BANKSEL	r0x1009
	SUB	R0, r0x1009
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00087_DS_
;	op : JUMPTABLE
	MOV	R0,#high _00138_DS_
	MOV	PCH, R0
	MOV	R0,#_00138_DS_
	BANKSEL	r0x1009
	ADD	R0, r0x1009
	JNB	PSW, 0
	INC	PCH
	MOV	PCL, R0
_00138_DS_
	JMP	_00082_DS_
	JMP	_00083_DS_
	JMP	_00084_DS_
	JMP	_00085_DS_
	JMP	_00086_DS_
;	op : LABEL
;	op : =
_00082_DS_
;	.line	442; "../debug_touch.c"	j=5;
	MOV	R0,# 0x05
	BANKSEL	r0x1008
	MOV	r0x1008, R0
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_
	MOV R0, __KF8_LIBc_channel_
	ADD R0,#Low(__KF8_TOUCH_CH_EN+0)
	MOV R1,#High(__KF8_TOUCH_CH_EN+0)
	JNB PSW,0
	INC R1
	MOV PCH,R1
	PAGESEL __R2PCL
	CALL __R2PCL
	PAGESEL $
	BANKSEL _T_buf
	MOV _T_buf,R0
	
;	op : GOTO
;	.line	461; "../debug_touch.c"	}break;
	JMP	_00087_DS_
;	op : LABEL
;	op : =
_00083_DS_
;	.line	465; "../debug_touch.c"	j=8;
	MOV	R0,# 0x08
	BANKSEL	r0x1008
	MOV	r0x1008, R0
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_
	CLR PSW,0
	RLCR __KF8_LIBc_channel_
	BANKSEL __KF8_LIBi_buff_baseline_
	ADD R0,#(__KF8_LIBi_buff_baseline_+0)
	LD R1,[R0]
	BANKSEL _T_buf
	MOV _T_buf,R1
	
;	op : GOTO
;	.line	480; "../debug_touch.c"	}break;
	JMP	_00087_DS_
;	op : LABEL
;	op : =
_00084_DS_
;	.line	484; "../debug_touch.c"	j=8;
	MOV	R0,# 0x08
	BANKSEL	r0x1008
	MOV	r0x1008, R0
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_
	CLR PSW,0
	RLCR __KF8_LIBc_channel_
	BANKSEL __KF8_LIBi_buff_baseline_
	ADD R0,#(__KF8_LIBi_buff_baseline_+1)
	LD R1,[R0]
	BANKSEL _T_buf
	MOV _T_buf,R1
	
;	op : GOTO
;	.line	500; "../debug_touch.c"	}break;
	JMP	_00087_DS_
;	op : LABEL
;	op : =
_00085_DS_
;	.line	504; "../debug_touch.c"	j=8;
	MOV	R0,# 0x08
	BANKSEL	r0x1008
	MOV	r0x1008, R0
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_
	CLR PSW,0
	RLCR __KF8_LIBc_channel_
	BANKSEL __KF8_LIBi_buff_hit_
	ADD R0,#(__KF8_LIBi_buff_hit_+0)
	LD R1,[R0]
	BANKSEL _T_buf
	MOV _T_buf,R1
	
;	op : GOTO
;	.line	519; "../debug_touch.c"	}break;
	JMP	_00087_DS_
;	op : LABEL
;	op : =
_00086_DS_
;	.line	523; "../debug_touch.c"	j=8;
	MOV	R0,# 0x08
	BANKSEL	r0x1008
	MOV	r0x1008, R0
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_
	CLR PSW,0
	RLCR __KF8_LIBc_channel_
	BANKSEL __KF8_LIBi_buff_hit_
	ADD R0,#(__KF8_LIBi_buff_hit_+1)
	LD R1,[R0]
	BANKSEL _T_buf
	MOV _T_buf,R1
	
;	op : LABEL
;	op : =
_00087_DS_
;	.line	541; "../debug_touch.c"	for(i_T_D=0;i_T_D<j;i_T_D++)
	BANKSEL	_i_T_D
	CLR	_i_T_D
;	op : LABEL
;	op : <
_00104_DS_
	BANKSEL	r0x1008
	MOVZ	R0, r0x1008
	BANKSEL	_i_T_D
	SUB	R0, _i_T_D
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00107_DS_
;	op : BITWISEAND
;	.line	543; "../debug_touch.c"	if(T_buf&0x01)
	BANKSEL	_T_buf
	JB	_T_buf, 0
	JMP	_00089_DS_
;	op : =
;	.line	544; "../debug_touch.c"	DAT_SET_HIGH;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 0
;	op : GOTO
	JMP	_00090_DS_
;	op : LABEL
;	op : =
_00089_DS_
;	.line	546; "../debug_touch.c"	DAT_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 0
;	op : LABEL
;	op : =
_00090_DS_
;	.line	548; "../debug_touch.c"	CLK_SET_HIGH;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	549; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	551; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	552; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : RIGHT_OP
;	.line	554; "../debug_touch.c"	T_buf=T_buf>>1;
	CLR	PSW, 0
	BANKSEL	_T_buf
	RRC	_T_buf
;	op : +
;	.line	541; "../debug_touch.c"	for(i_T_D=0;i_T_D<j;i_T_D++)
	BANKSEL	_i_T_D
	INC	_i_T_D
;	op : GOTO
	JMP	_00104_DS_
;	op : LABEL
;	op : SEND
;	op : CALL
_00107_DS_
;	.line	557; "../debug_touch.c"	Touch_Delay2;
	MOV	R0,# 0x6e
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : +
;	.line	436; "../debug_touch.c"	for(step=0;step<5;step++)
	BANKSEL	r0x1009
	INC	r0x1009
;	op : GOTO
	JMP	_00108_DS_
;	op : LABEL
;	op : =
_00111_DS_
;	.line	561; "../debug_touch.c"	DAT_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 0
;	op : SEND
;	op : CALL
;	.line	562; "../debug_touch.c"	Touch_Delay2;	//编程器判断需要时间
	MOV	R0,# 0x6e
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	564; "../debug_touch.c"	CLK_SET_HIGH;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	565; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : SEND
;	op : CALL
;	.line	566; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : SEND
;	op : CALL
;	.line	567; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : GET_VALUE_AT_ADDRESS
;	.line	570; "../debug_touch.c"	if(DAT_GET_STATE)
	BANKSEL	_P0_bits
	JB	_P0_bits, 0
	JMP	_00102_DS_
;	op : =
;	.line	572; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : =
;	.line	573; "../debug_touch.c"	T_buf=0;
	BANKSEL	_T_buf
	CLR	_T_buf
;	op : SEND
;	op : CALL
;	.line	574; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	575; "../debug_touch.c"	for(i_T_D=0;i_T_D<6;i_T_D++)
	BANKSEL	_i_T_D
	CLR	_i_T_D
;	op : LABEL
;	op : <
;unsigned compare: left < lit(0x6=6), size=1
_00112_DS_
	MOV	R0,# 0x06
	BANKSEL	_i_T_D
	SUB	R0, _i_T_D
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00103_DS_
;	op : =
;	.line	577; "../debug_touch.c"	CLK_SET_HIGH;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	578; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : EQ_OP
;	.line	580; "../debug_touch.c"	if(i_T_D!=5)
	BANKSEL	_i_T_D
	MOVZ	R0, _i_T_D
;	.line	582; "../debug_touch.c"	T_buf=T_buf>>1;
	XOR	R0,# 0x05
	JNB	PSW, 2
	JMP	_00099_DS_
	CLR	PSW, 0
	BANKSEL	_T_buf
	RRC	_T_buf
;	op : GET_VALUE_AT_ADDRESS
;	.line	583; "../debug_touch.c"	if(DAT_GET_STATE)
	BANKSEL	_P0_bits
	JB	_P0_bits, 0
	JMP	_00100_DS_
;	op : |
;	.line	584; "../debug_touch.c"	T_buf=T_buf|0x10;
	BANKSEL	_T_buf
	SET	_T_buf, 4
;	op : GOTO
	JMP	_00100_DS_
;	op : LABEL
;	op : <
;unsigned compare: left < lit(0x10=16), size=1
_00099_DS_
;	.line	588; "../debug_touch.c"	if(T_buf<16)   //传输错误的，防下非影响其他数据
	MOV	R0,# 0x10
	BANKSEL	_T_buf
	SUB	R0, _T_buf
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00100_DS_
;	op : GET_VALUE_AT_ADDRESS
;	.line	590; "../debug_touch.c"	if(DAT_GET_STATE)
	BANKSEL	_P0_bits
	JB	_P0_bits, 0
	JMP	_00094_DS_
;	op : INLINEASM
	BANKSEL _T_buf
	MOV R0,_T_buf
	ADD R0,#(_TOUCH_CH_TRS_EN+0)
	MOV R1,#0x01
	BANKSEL _TOUCH_CH_TRS_EN
	ST [R0],R1
	
;	op : GOTO
	JMP	_00100_DS_
;	op : LABEL
;	op : INLINEASM
_00094_DS_
	BANKSEL _T_buf
	MOV R0,_T_buf
	ADD R0,#(_TOUCH_CH_TRS_EN+0)
	MOV R1,#0x00
	BANKSEL _TOUCH_CH_TRS_EN
	ST [R0],R1
	
;	op : LABEL
;	op : =
_00100_DS_
;	.line	616; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	617; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : +
;	.line	575; "../debug_touch.c"	for(i_T_D=0;i_T_D<6;i_T_D++)
	BANKSEL	_i_T_D
	INC	_i_T_D
;	op : GOTO
	JMP	_00112_DS_
;	op : LABEL
;	op : =
_00102_DS_
;	.line	622; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	623; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : LABEL
;	op : =
_00103_DS_
;	.line	626; "../debug_touch.c"	CLK_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 1
;	op : =
;	.line	627; "../debug_touch.c"	DAT_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 0
;	op : INLINEASM
Label_x_y_z_a:
	
;	op : LABEL
;	op : ENDFUNCTION
_00116_DS_
;	.line	635; "../debug_touch.c"	if(1);
	CRET	
; exit point of _TOUCH_DEBUG_TRS_DEAL



func._TOUCH_DEBUG_TRS_BAIHUALV	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _TOUCH_DEBUG_TRS_BAIHUALV	;Function start
; 2 exit points
;has an exit
;functions called:
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;   _delay_us
;3 compiler assigned registers:
;   STK00
;   r0x100A
;   r0x100B
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_TOUCH_DEBUG_TRS_BAIHUALV	;Function start
; 2 exit points
;	op : INLINEASM
	MOV R1,#High(__KF8_TOUCH_CH_EN+0)
	MOV R0,#(0)
	ADD R0,#Low(__KF8_TOUCH_CH_EN+0)
	JNB PSW,0
	INC R1
	PAGESEL __R2PCL
	CALL __R2PCL
	PAGESEL $
	ADD R0,#(_TOUCH_CH_TRS_EN+0)
	MOV R1,#0x01
	BANKSEL _TOUCH_CH_TRS_EN
	ST [R0],R1
	
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_
	MOV R0,__KF8_LIBc_channel_
	ADD R0,#Low(__KF8_TOUCH_CH_EN+0)
	MOV R1,#High(__KF8_TOUCH_CH_EN+0)
	JNB PSW,0
	INC R1
	PAGESEL __R2PCL
	CALL __R2PCL
	PAGESEL $
	ADD R0,#(_TOUCH_CH_TRS_EN+0)
	BANKSEL _TOUCH_CH_TRS_EN
	LD R1,[R0]
	XOR R1,#0x00
	JNB PSW,2
	JMP Label_x_y_z_a_1
	
;	op : =
;	.line	68; "../debug_touch.c"	CLK_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 1
;	op : =
;	.line	69; "../debug_touch.c"	DAT_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 0
;	op : SEND
;	op : CALL
;	.line	70; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : GET_VALUE_AT_ADDRESS
;	.line	74; "../debug_touch.c"	if(CLK_GET_STATE)
	BANKSEL	_P0_bits
	JB	_P0_bits, 1
	JMP	_00007_DS_
;	op : SEND
;	op : CALL
;	.line	76; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : GET_VALUE_AT_ADDRESS
;	.line	77; "../debug_touch.c"	if(!CLK_GET_STATE)
	BANKSEL	_P0_bits
	JNB	_P0_bits, 1
	JMP	_00008_DS_
;	op : RETURN
;	.line	78; "../debug_touch.c"	return;
	JMP	_00045_DS_
;	op : LABEL
;	op : GET_VALUE_AT_ADDRESS
_00007_DS_
;	.line	80; "../debug_touch.c"	else if(!CLK_GET_STATE)
	BANKSEL	_P0_bits
	JNB	_P0_bits, 1
	JMP	_00004_DS_
;	op : RETURN
;	.line	82; "../debug_touch.c"	return;
	JMP	_00045_DS_
;	op : LABEL
;	op : RETURN
_00004_DS_
;	.line	85; "../debug_touch.c"	return;
	JMP	_00045_DS_
;	op : LABEL
;	op : =
_00008_DS_
;	.line	87; "../debug_touch.c"	CLK_SET_OUT;
	BANKSEL	_TR0_bits
	CLR	_TR0_bits, 1
;	op : =
;	.line	89; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	90; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	92; "../debug_touch.c"	CLK_SET_HIGH;		//上升沿
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	94; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
;	.line	96; "../debug_touch.c"	if(!DAT_GET_STATE)
	PAGESEL	$
;	.line	98; "../debug_touch.c"	return;
	BANKSEL	_P0_bits
	JB	_P0_bits, 0
;	.line	101; "../debug_touch.c"	CLK_SET_LOW;			//下降沿
	JMP	_00045_DS_
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	.line	105; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	107; "../debug_touch.c"	DAT_SET_OUT;
	BANKSEL	_TR0_bits
	CLR	_TR0_bits, 0
;	op : =
;	.line	109; "../debug_touch.c"	j=5;
	MOV	R0,# 0x05
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : =
;	.line	111; "../debug_touch.c"	for(step=0;step<5;step++)
	BANKSEL	r0x100B
	CLR	r0x100B
;	op : LABEL
;	op : <
;unsigned compare: left < lit(0x5=5), size=1
_00037_DS_
	MOV	R0,# 0x05
	BANKSEL	r0x100B
	SUB	R0, r0x100B
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00040_DS_
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_
	CLR PSW,0
	RLCR __KF8_LIBc_channel_
	BANKSEL __KF8_LIBi_Date_Change_
	ADD R0,#(__KF8_LIBi_Date_Change_+0)
	LD R1,[R0]
	BANKSEL _Date_Baihualv_Get_V
	MOV _Date_Baihualv_Get_V,R1
	INC R0
	BANKSEL __KF8_LIBi_Date_Change_
	LD R1,[R0]
	BANKSEL _Date_Baihualv_Get_V
	MOV _Date_Baihualv_Get_V+1,R1
	
;	op : >
;swapping arguments (AOP_TYPEs 1/2)
;unsigned compare: left >= lit(0x5=5), size=1
;	.line	131; "../debug_touch.c"	switch(step)
	MOV	R0,# 0x05
	BANKSEL	r0x100B
	SUB	R0, r0x100B
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00016_DS_
;	op : JUMPTABLE
	MOV	R0,#high _00067_DS_
	MOV	PCH, R0
	MOV	R0,#_00067_DS_
	BANKSEL	r0x100B
	ADD	R0, r0x100B
	JNB	PSW, 0
	INC	PCH
	MOV	PCL, R0
_00067_DS_
	JMP	_00011_DS_
	JMP	_00012_DS_
	JMP	_00013_DS_
	JMP	_00014_DS_
	JMP	_00015_DS_
;	op : LABEL
;	op : =
_00011_DS_
;	.line	135; "../debug_touch.c"	j=5;
	MOV	R0,# 0x05
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : INLINEASM
	BANKSEL __KF8_LIBc_channel_
	MOV R0, __KF8_LIBc_channel_
	ADD R0,#Low(__KF8_TOUCH_CH_EN+0)
	MOV R1,#High(__KF8_TOUCH_CH_EN+0)
	JNB PSW,0
	INC R1
	MOV PCH,R1
	PAGESEL __R2PCL
	CALL __R2PCL
	PAGESEL $
	BANKSEL _T_buf
	MOV _T_buf,R0
	
;	op : GOTO
;	.line	154; "../debug_touch.c"	}break;
	JMP	_00016_DS_
;	op : LABEL
;	op : =
_00012_DS_
;	.line	158; "../debug_touch.c"	j=8;
	MOV	R0,# 0x08
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : INLINEASM
	BANKSEL _Date_Baihualv_Get_V
	MOV R1,_Date_Baihualv_Get_V
	JB _Date_Baihualv_Get_V+1,7
	JMP $+2
	CPL R1
	INC R1
	BANKSEL _T_buf
	MOV _T_buf,R1
	
;	op : GOTO
;	.line	173; "../debug_touch.c"	}break;
	JMP	_00016_DS_
;	op : LABEL
;	op : =
_00013_DS_
;	.line	177; "../debug_touch.c"	j=8;
	MOV	R0,# 0x08
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : INLINEASM
	BANKSEL _Date_Baihualv_Get_V
	MOV R1,_Date_Baihualv_Get_V+1
	JB R1,7
	JMP Show_temp_DS_000
	CPL R1
	MOV R0,_Date_Baihualv_Get_V
	CPL R0
	INC R0
	JNB PSW,2
	INC R1
Show_temp_DS_000:
	BANKSEL _T_buf
	MOV _T_buf,R1
	
;	op : GOTO
;	.line	200; "../debug_touch.c"	}break;
	JMP	_00016_DS_
;	op : LABEL
;	op : =
_00014_DS_
;	.line	204; "../debug_touch.c"	j=8;
	MOV	R0,# 0x08
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : INLINEASM
	BANKSEL _Date_Baihualv_Get_V
	MOV R1,_Date_Baihualv_Get_V
	JB _Date_Baihualv_Get_V+1,7
	JMP $+2
	CPL R1
	INC R1
	BANKSEL _T_buf
	MOV _T_buf,R1
	
;	op : GOTO
;	.line	219; "../debug_touch.c"	}break;
	JMP	_00016_DS_
;	op : LABEL
;	op : =
_00015_DS_
;	.line	223; "../debug_touch.c"	j=8;
	MOV	R0,# 0x08
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : INLINEASM
	BANKSEL _Date_Baihualv_Get_V
	MOV R1,_Date_Baihualv_Get_V+1
	JB R1,7
	JMP Show_temp_DS_001
	CPL R1
	MOV R0,_Date_Baihualv_Get_V
	CPL R0
	INC R0
	JNB PSW,2
	INC R1
	INC R1
Show_temp_DS_001:
	BANKSEL _T_buf
	MOV _T_buf,R1
	
;	op : LABEL
;	op : =
_00016_DS_
;	.line	250; "../debug_touch.c"	for(i_T_D=0;i_T_D<j;i_T_D++)
	BANKSEL	_i_T_D
	CLR	_i_T_D
;	op : LABEL
;	op : <
_00033_DS_
	BANKSEL	r0x100A
	MOVZ	R0, r0x100A
	BANKSEL	_i_T_D
	SUB	R0, _i_T_D
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00036_DS_
;	op : BITWISEAND
;	.line	252; "../debug_touch.c"	if(T_buf&0x01)
	BANKSEL	_T_buf
	JB	_T_buf, 0
	JMP	_00018_DS_
;	op : =
;	.line	253; "../debug_touch.c"	DAT_SET_HIGH;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 0
;	op : GOTO
	JMP	_00019_DS_
;	op : LABEL
;	op : =
_00018_DS_
;	.line	255; "../debug_touch.c"	DAT_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 0
;	op : LABEL
;	op : =
_00019_DS_
;	.line	257; "../debug_touch.c"	CLK_SET_HIGH;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	258; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	260; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	261; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : RIGHT_OP
;	.line	263; "../debug_touch.c"	T_buf=T_buf>>1;
	CLR	PSW, 0
	BANKSEL	_T_buf
	RRC	_T_buf
;	op : +
;	.line	250; "../debug_touch.c"	for(i_T_D=0;i_T_D<j;i_T_D++)
	BANKSEL	_i_T_D
	INC	_i_T_D
;	op : GOTO
	JMP	_00033_DS_
;	op : LABEL
;	op : SEND
;	op : CALL
_00036_DS_
;	.line	266; "../debug_touch.c"	Touch_Delay2;
	MOV	R0,# 0x6e
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : +
;	.line	111; "../debug_touch.c"	for(step=0;step<5;step++)
	BANKSEL	r0x100B
	INC	r0x100B
;	op : GOTO
	JMP	_00037_DS_
;	op : LABEL
;	op : =
_00040_DS_
;	.line	270; "../debug_touch.c"	DAT_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 0
;	op : SEND
;	op : CALL
;	.line	271; "../debug_touch.c"	Touch_Delay2;	//编程器判断需要时间
	MOV	R0,# 0x6e
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	273; "../debug_touch.c"	CLK_SET_HIGH;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	274; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : SEND
;	op : CALL
;	.line	275; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : SEND
;	op : CALL
;	.line	276; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : GET_VALUE_AT_ADDRESS
;	.line	279; "../debug_touch.c"	if(DAT_GET_STATE)
	BANKSEL	_P0_bits
	JB	_P0_bits, 0
	JMP	_00031_DS_
;	op : =
;	.line	281; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : =
;	.line	282; "../debug_touch.c"	T_buf=0;
	BANKSEL	_T_buf
	CLR	_T_buf
;	op : SEND
;	op : CALL
;	.line	283; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : =
;	.line	284; "../debug_touch.c"	for(i_T_D=0;i_T_D<6;i_T_D++)
	BANKSEL	_i_T_D
	CLR	_i_T_D
;	op : LABEL
;	op : <
;unsigned compare: left < lit(0x6=6), size=1
_00041_DS_
	MOV	R0,# 0x06
	BANKSEL	_i_T_D
	SUB	R0, _i_T_D
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00032_DS_
;	op : =
;	.line	286; "../debug_touch.c"	CLK_SET_HIGH;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	287; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : EQ_OP
;	.line	289; "../debug_touch.c"	if(i_T_D!=5)
	BANKSEL	_i_T_D
	MOVZ	R0, _i_T_D
;	.line	291; "../debug_touch.c"	T_buf=T_buf>>1;
	XOR	R0,# 0x05
	JNB	PSW, 2
	JMP	_00028_DS_
	CLR	PSW, 0
	BANKSEL	_T_buf
	RRC	_T_buf
;	op : GET_VALUE_AT_ADDRESS
;	.line	292; "../debug_touch.c"	if(DAT_GET_STATE)
	BANKSEL	_P0_bits
	JB	_P0_bits, 0
	JMP	_00029_DS_
;	op : |
;	.line	293; "../debug_touch.c"	T_buf=T_buf|0x10;
	BANKSEL	_T_buf
	SET	_T_buf, 4
;	op : GOTO
	JMP	_00029_DS_
;	op : LABEL
;	op : <
;unsigned compare: left < lit(0x10=16), size=1
_00028_DS_
;	.line	297; "../debug_touch.c"	if(T_buf<16)   //传输错误的，防下非影响其他数据
	MOV	R0,# 0x10
	BANKSEL	_T_buf
	SUB	R0, _T_buf
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00029_DS_
;	op : GET_VALUE_AT_ADDRESS
;	.line	299; "../debug_touch.c"	if(DAT_GET_STATE)
	BANKSEL	_P0_bits
	JB	_P0_bits, 0
	JMP	_00023_DS_
;	op : INLINEASM
	BANKSEL _T_buf
	MOV R0,_T_buf
	ADD R0,#(_TOUCH_CH_TRS_EN+0)
	MOV R1,#0x01
	BANKSEL _TOUCH_CH_TRS_EN
	ST [R0],R1
	
;	op : GOTO
	JMP	_00029_DS_
;	op : LABEL
;	op : INLINEASM
_00023_DS_
	BANKSEL _T_buf
	MOV R0,_T_buf
	ADD R0,#(_TOUCH_CH_TRS_EN+0)
	MOV R1,#0x00
	BANKSEL _TOUCH_CH_TRS_EN
	ST [R0],R1
	
;	op : LABEL
;	op : =
_00029_DS_
;	.line	325; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	326; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : +
;	.line	284; "../debug_touch.c"	for(i_T_D=0;i_T_D<6;i_T_D++)
	BANKSEL	_i_T_D
	INC	_i_T_D
;	op : GOTO
	JMP	_00041_DS_
;	op : LABEL
;	op : =
_00031_DS_
;	.line	331; "../debug_touch.c"	CLK_SET_LOW;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 1
;	op : SEND
;	op : CALL
;	.line	332; "../debug_touch.c"	Touch_Delay1;
	MOV	R0,# 0x05
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_us
	CALL	_delay_us
	PAGESEL	$
;	op : LABEL
;	op : =
_00032_DS_
;	.line	335; "../debug_touch.c"	CLK_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 1
;	op : =
;	.line	336; "../debug_touch.c"	DAT_SET_IN;
	BANKSEL	_TR0_bits
	SET	_TR0_bits, 0
;	op : INLINEASM
Label_x_y_z_a_1:
	
;	op : LABEL
;	op : ENDFUNCTION
_00045_DS_
	CRET	
; exit point of _TOUCH_DEBUG_TRS_BAIHUALV


;	code size estimation:
;	  571+  192 =   763 instructions ( 1910 byte)


	.end
