;--------------------------------------------------------
; File Created by ChiponCC : aolisn inc.
; Version 3.0.4#6752 (Jan 25 2018 21:08:05) (MSVC)
; This file was generated Sat May 26 17:18:36 2018
;--------------------------------------------------------
; chipon port for the 16-bit core
;--------------------------------------------------------
;	.file	"../main.c"
	.radix dec
	.include "KF8TS3514.inc"
;--------------------------------------------------------
; external declarations
;--------------------------------------------------------
	.extern	_init_mcu
	.extern	__KF8TS3514_Get_Ver_WaterCS_
	.extern	__KF8TS3514_Init_Touch_WaterCS_
	.extern	__KF8TS3514_Touch_Process_WaterCS_
	.extern	__KF8TS3514_Lib_Set_CS_Parameter
	.extern	__R2PCL
	.extern	_TOUCH_DEBUG_TRS_DEAL
	.extern	_TOUCH_DEBUG_SEND_OUT
	.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	_C1CTL_bits
	.extern	_VDACS_bits
	.extern	_AMPCTL_bits
	.extern	_ANSEH_bits
	.extern	_ADCCTL0_bits
	.extern	_AMPDT_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	_PUR1_bits
	.extern	_PUR2_bits
	.extern	_CTCTL1_bits
	.extern	_INTEDGCTL_bits
	.extern	_VDAC_bits
	.extern	_VRES_bits
	.extern	_C1CAL_bits
	.extern	_SSCICTL0_bits
	.extern	_SSCICTL1_bits
	.extern	_SSCISTA_bits
	.extern	_SSCIADD_bits
	.extern	_SSCIMSK_bits
	.extern	_WDTPS_bits
	.extern	_C1FILTCTL_bits
	.extern	_C1FILTPRE_bits
	.extern	_CTCTL2_bits
	.extern	_T4CTL_bits
	.extern	__KF8_LIBi_channel_flag_
	.extern	__KF8_LIBc_channel_
	.extern	__KF8_LIBc_channel_Buf
	.extern	__KF8_LIBi_Date_Change_
	.extern	__KF8_LIBc_baseline_count_
	.extern	__KF8_LIBi_buff_hit_
	.extern	__KF8_LIBi_buff_baseline_
	.extern	__KF8_LIBc_touch_count_
	.extern	_CHS_AMOUNT
	.extern	_TCS_AMOUNT
	.extern	__KF8_Disturb_Protect_Circle_
	.extern	__KF8_DoubleKey_Compages_Limitable_Circle_
	.extern	__KF8_Key_Max_Pressed_Limitable_Circle_
	.extern	__KF8_BaseLine_Update_Circle_Count_For_UP_
	.extern	__KF8_BaseLine_Update_Circle_Count_For_Down_
	.extern	__KF8_Define_Disturb_Channels_Amount_
	.extern	__KF8_BasicLine_UP_Noise_Threshold_
	.extern	__KF8_BasicLine_Down_Noise_Threshold_
	.extern	__KF8_Data_Steady_Threshold_Set_
	.extern	__KF8_Inside_Reference_Channel_Disturb_Threshold_Set_
	.extern	__KF8_Inside_Reference_Channel_Declare_
	.extern	__KF8_Config_Finger_Threshold
	.extern	__KF8_Water_Monitor_
	.extern	__KF8_CONFIG_FINGER_THRESHOLD_IN_WATER_
	.extern	__KF8_TOUCH_CH_EN
	.extern	__KF8_Touch_Protect_Select_
	.extern	__KF8_HIT_UP_THRESHOLD
	.extern	_TCS_COUNT
	.extern	_OSCCAL0_OFFSET
	.extern	_OSCCAL0_MAX
	.extern	_Double_Key_SET_EN_1
	.extern	_Double_Key_SET_EN_2
	.extern	_Double_Key_SET_EN_3
	.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	_C1CTL
	.extern	_VDACS
	.extern	_AMPCTL
	.extern	_ANSEH
	.extern	_ADCDATA0H
	.extern	_ADCCTL0
	.extern	_AMPDT
	.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	_CTCTL0
	.extern	_T3H
	.extern	_PUR1
	.extern	_PUR2
	.extern	_CTCTL1
	.extern	_INTEDGCTL
	.extern	_ADCDATA3L
	.extern	_VDAC
	.extern	_VRES
	.extern	_C1CAL
	.extern	_SSCICTL0
	.extern	_SSCICTL1
	.extern	_SSCISTA
	.extern	_SSCIBUFR
	.extern	_SSCIADD
	.extern	_SSCIMSK
	.extern	_WDTPS
	.extern	_C1FILTCTL
	.extern	_C1FILTPRE
	.extern	_VRECAL2
	.extern	_VRECAL3
	.extern	_CTCTL2
	.extern	_T4L
	.extern	_T4H
	.extern	_T4REL
	.extern	_T4REH
	.extern	_T4CTL
	.extern	_RC32KCAL
	.extern	_startup
	.extern	__gsinit_startup
;--------------------------------------------------------
; global declarations
;--------------------------------------------------------
	.global	_delay_us
	.global	_delay_ms
	.global	_Touch_Key_Deal_Fun
	.global	_int_fun0
	.global	_int_fun1
	.global	_main
	.global	_temp
	.global	_kf8_touch_flag
	.global	_Touch_Watch
	.global	_Key_Code

	.global I0R1
	.global I0R7
	.global I0PSW
	.global I0PCH
	.global I1R1
	.global I1R7
	.global I1PSW
	.global I1PCH
	.global STK11
	.global STK10
	.global STK09
	.global STK08
	.global STK07
	.global STK06
	.global STK05
	.global STK04
	.global STK03
	.global STK02
	.global STK01
	.global STK00

sharebank .udata
I0R1		.res 1
I0R7		.res 1
I0PSW		.res 1
I0PCH		.res 1
I1R1		.res 1
I1R7		.res 1
I1PSW		.res 1
I1PCH		.res 1
STK11	.res 1
	.type STK11, 108
STK10	.res 1
	.type STK10, 108
STK09	.res 1
	.type STK09, 108
STK08	.res 1
	.type STK08, 108
STK07	.res 1
	.type STK07, 108
STK06	.res 1
	.type STK06, 108
STK05	.res 1
	.type STK05, 108
STK04	.res 1
	.type STK04, 108
STK03	.res 1
	.type STK03, 108
STK02	.res 1
	.type STK02, 108
STK01	.res 1
	.type STK01, 108
STK00	.res 1
	.type STK00, 108

;--------------------------------------------------------
; global definitions
;--------------------------------------------------------
UD_main_0	.udata
_temp	.res	1

UD_main_1	.udata
_kf8_touch_flag	.res	1

UD_main_2	.udata
_Touch_Watch	.res	2

UD_main_3	.udata
_Key_Code	.res	1

;--------------------------------------------------------
; absolute symbol definitions
;--------------------------------------------------------
;--------------------------------------------------------
; compiler-defined variables
;--------------------------------------------------------
UDL_main_0	.udata
r0x100D	.res	1
UDL_main_1	.udata
r0x100C	.res	1
UDL_main_2	.udata
r0x100E	.res	1
UDL_main_3	.udata
r0x100F	.res	1
UDL_main_4	.udata
r0x1010	.res	1
UDL_main_5	.udata
r0x1011	.res	1
UDL_main_6	.udata
r0x1017	.res	1
UDL_main_7	.udata
r0x1016	.res	1
UDL_main_8	.udata
r0x1018	.res	1
UDL_main_9	.udata
r0x1019	.res	1
UDL_main_10	.udata
r0x1012	.res	1
UDL_main_11	.udata
r0x1013	.res	1
UDL_main_12	.udata
r0x1014	.res	1
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------
LDS_00000	.idata
_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1
	.db 0x34, 0x12, 0, 0

;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
;	.udata_ovr
;--------------------------------------------------------
; reset vector 
;--------------------------------------------------------
STARTUP	.code 0x0000
	NOP
	PAGESEL	init_imp
	JMP		init_imp

	.global	init_imp
INIT_IMP	.code
init_imp
	PAGESEL	_startup
	CALL	_startup
	PAGESEL	__gsinit_startup
	CALL	__gsinit_startup
	PAGESEL	_main
	JMP		_main
;--------------------------------------------------------
; interrupt and initialization code
;--------------------------------------------------------
interrupt_0x04	.code	0x4
	MOV		R2,R0
	MOV		R3,BANK
	MOV		R0,PSW
	BANKSEL	I0PSW
	MOV		I0PSW,R0
	MOV		R0,PCH
	BANKSEL	I0PCH
	MOV		I0PCH,R0
	MOV		I0R1,R1
	MOV		I0R7,R7
	PAGESEL	interrupt_service_routine_0x04
	JMP		interrupt_service_routine_0x04



func._int_fun0	.code
;***
;  PostBlock Stats: dbName = I
;***
;entry:  _int_fun0	;Function start
; 0 exit points
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_int_fun0	;Function start
; 0 exit points
;	op : GET_VALUE_AT_ADDRESS
; R3 resprent for wsave,R4 resprent for ssave, R5 resprent for psave
interrupt_service_routine_0x04
;	.line	201; "../main.c"	if(T3IF)
	BANKSEL	_EIF2_bits
	JB	_EIF2_bits, 7
	JMP	_00062_DS_
;	op : =
;	.line	203; "../main.c"	T4CTL=0x00;	//如果使用了T4的同步计数功能，计时暂停计数，等待数值读出
	BANKSEL	_T4CTL
	CLR	_T4CTL
;	op : =
;	.line	204; "../main.c"	T3IF=0;		//如果为了不影响中断，可以把触摸通道处理放到主函数，在此做一个标志位，然后在主函数检测标志位进行扫描即可
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 7
;	op : =
;	.line	205; "../main.c"	kf8_touch_flag=1;	//触摸标志位
	MOV	R0,# 0x01
	BANKSEL	_kf8_touch_flag
	MOV	_kf8_touch_flag, R0
;	op : =
;	.line	206; "../main.c"	Touch_Watch=0;
	BANKSEL	_Touch_Watch
	CLR	_Touch_Watch
	BANKSEL	_Touch_Watch
	CLR	(_Touch_Watch + 1)
;	op : LABEL
;	op : ENDFUNCTION
_00062_DS_
	BANKSEL	I0R1
	MOV	R1, I0R1
	BANKSEL	I0R7
	MOV	R7, I0R7
	BANKSEL	I0PCH
	MOV	R0, I0PCH
	MOV	PCH, R0
	BANKSEL	I0PSW
	MOV	R0, I0PSW
	MOV	PSW, R0
	MOV	BANK, R3
	MOV	R0, R2
	IRET	



func._int_fun1	.code
;***
;  PostBlock Stats: dbName = I
;***
;entry:  _int_fun1	;Function start
; 0 exit points
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_int_fun1	;Function start
; 0 exit points
;	op : LABEL
;	op : ENDFUNCTION
; R3 resprent for wsave,R4 resprent for ssave, R5 resprent for psave
interrupt_service_routine_0x14
_00065_DS_
;	.line	223; "../main.c"	}
	IRET	



func._main	.code
;***
;  PostBlock Stats: dbName = M
;***
;entry:  _main	;Function start
; 2 exit points
;has an exit
;functions called:
;   _init_mcu
;   _delay_ms
;   __KF8TS3514_Lib_Set_CS_Parameter
;   __KF8TS3514_Init_Touch_WaterCS_
;   _TOUCH_DEBUG_TRS_DEAL
;   __KF8TS3514_Touch_Process_WaterCS_
;   _Touch_Key_Deal_Fun
;   __KF8TS3514_Init_Touch_WaterCS_
;   _init_mcu
;   _delay_ms
;   __KF8TS3514_Lib_Set_CS_Parameter
;   __KF8TS3514_Init_Touch_WaterCS_
;   _TOUCH_DEBUG_TRS_DEAL
;   __KF8TS3514_Touch_Process_WaterCS_
;   _Touch_Key_Deal_Fun
;   __KF8TS3514_Init_Touch_WaterCS_
;5 compiler assigned registers:
;   STK00
;   r0x1012
;   r0x1013
;   r0x1014
;   r0x1015
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_main	;Function start
; 2 exit points
;	op : CALL
;	.line	232; "../main.c"	init_mcu();						//初始化MCU寄存器
	PAGESEL	_init_mcu
	CALL	_init_mcu
	PAGESEL	$
;	op : =
;	.line	233; "../main.c"	kf8_touch_flag=0;
	BANKSEL	_kf8_touch_flag
	CLR	_kf8_touch_flag
;	op : SEND
;	op : CALL
;	.line	234; "../main.c"	delay_ms(200);					//延时一会，防止上电误触发触摸通道
	MOV	R0,# 0xc8
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x00
	PAGESEL	_delay_ms
	CALL	_delay_ms
	PAGESEL	$
;	op : =
;	.line	235; "../main.c"	LED1=1;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 2
;	op : =
;	.line	236; "../main.c"	LED2=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 3
;	op : =
;	.line	237; "../main.c"	LED3=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 2
;	op : =
;	.line	242; "../main.c"	CTCTL1 = 0x01;		//电压源和时钟分频设置  0 4 8 C~ 4/8/16/32  xxyy yyyx   0~ Vref  1~ VDD
	MOV	R0,# 0x01
	BANKSEL	_CTCTL1
	MOV	_CTCTL1, R0
;	op : =
;	.line	243; "../main.c"	VDAC=0x90;	   		// 0.5VDD      翻转电压设定 公式0.05Vdac（N+1)    N=0--15  Vdac=VDD
	MOV	R0,# 0x90
	BANKSEL	_VDAC
	MOV	_VDAC, R0
;	op : SEND
;	op : CALL
;	.line	257; "../main.c"	_KF8TS3514_Lib_Set_CS_Parameter(2);	//功能模式，参数见kf8ts27_touch_g.h 中说明
	MOV	R0,# 0x02
	PAGESEL	__KF8TS3514_Lib_Set_CS_Parameter
	CALL	__KF8TS3514_Lib_Set_CS_Parameter
	PAGESEL	$
;	op : CALL
;	.line	258; "../main.c"	_KF8TS3514_Init_Touch_WaterCS_();		//调用电容触摸库函数的初始化
	PAGESEL	__KF8TS3514_Init_Touch_WaterCS_
	CALL	__KF8TS3514_Init_Touch_WaterCS_
	PAGESEL	$
;	op : LABEL
;	op : INLINEASM
_00072_DS_
	CWDT 
;	op : IFX
;	.line	268; "../main.c"	if(kf8_touch_flag)
	MOV	R0,# 0x00
	BANKSEL	_kf8_touch_flag
	ORL	R0, _kf8_touch_flag
	JNB	PSW, 2
	JMP	_00068_DS_
;	op : =
;	.line	270; "../main.c"	kf8_touch_flag=0;
	BANKSEL	_kf8_touch_flag
	CLR	_kf8_touch_flag
;	op : CALL
;	.line	271; "../main.c"	TOUCH_DEBUG_TRS_DEAL();	// 按键函数使用串口输出时，这里不应打开
	PAGESEL	_TOUCH_DEBUG_TRS_DEAL
	CALL	_TOUCH_DEBUG_TRS_DEAL
	PAGESEL	$
;	op : CALL
;	.line	272; "../main.c"	_KF8TS3514_Touch_Process_WaterCS_();//建议模式，因该芯片属于集控制一体，尽早退出触摸中断，影响其他中断请求。
	PAGESEL	__KF8TS3514_Touch_Process_WaterCS_
	CALL	__KF8TS3514_Touch_Process_WaterCS_
	PAGESEL	$
;	op : CALL
;	.line	274; "../main.c"	Touch_Key_Deal_Fun();	// 按键处理，一般可采用额外变量监听按键状态的变化并执行，函数可跟随在触摸处理函数后面执行。
	PAGESEL	_Touch_Key_Deal_Fun
	CALL	_Touch_Key_Deal_Fun
	PAGESEL	$
;	op : LABEL
;	op : +
_00068_DS_
;	.line	278; "../main.c"	Touch_Watch++;
	BANKSEL	_Touch_Watch
	INC	_Touch_Watch
	JB	PSW, 2
	JMP	_00080_DS_
	BANKSEL	_Touch_Watch
	INC	(_Touch_Watch + 1)
;	op : CAST
_00080_DS_
;	.line	279; "../main.c"	if(Touch_Watch>50000)
	BANKSEL	_Touch_Watch
	MOVZ	R0, _Touch_Watch
	BANKSEL	r0x1012
	MOV	r0x1012, R0
	BANKSEL	_Touch_Watch
	MOVZ	R0, (_Touch_Watch + 1)
	BANKSEL	r0x1013
	MOV	r0x1013, R0
	BANKSEL	r0x1014
	CLR	r0x1014
;;1	CLR	r0x1015
;	op : >
;swapping arguments (AOP_TYPEs 1/2)
;signed compare: left >= lit(0xC351=50001), size=4, mask=ffffffff
	MOV	R0,# 0x00
	ADD	R0,# 0x80
	ADD	R0,# 0x80
;comparing bytes at offset 3
	JB	PSW, 2
	JMP	_00079_DS_
	MOV	R0,# 0x00
	BANKSEL	r0x1014
	SUB	R0, r0x1014
	JB	PSW, 2
	JMP	_00079_DS_
	MOV	R0,# 0xc3
	BANKSEL	r0x1013
	SUB	R0, r0x1013
	JB	PSW, 2
	JMP	_00079_DS_
	MOV	R0,# 0x51
	BANKSEL	r0x1012
	SUB	R0, r0x1012
_00079_DS_
	JB	PSW, 0
	JMP	_00072_DS_
;	op : =
;	.line	281; "../main.c"	Touch_Watch=0;
	BANKSEL	_Touch_Watch
	CLR	_Touch_Watch
	BANKSEL	_Touch_Watch
	CLR	(_Touch_Watch + 1)
;	op : CALL
;	.line	282; "../main.c"	_KF8TS3514_Init_Touch_WaterCS_();
	PAGESEL	__KF8TS3514_Init_Touch_WaterCS_
	CALL	__KF8TS3514_Init_Touch_WaterCS_
	PAGESEL	$
;	op : GOTO
	JMP	_00072_DS_
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _main



func._Touch_Key_Deal_Fun	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _Touch_Key_Deal_Fun	;Function start
; 2 exit points
;has an exit
;4 compiler assigned registers:
;   r0x100C
;   r0x100D
;   r0x100E
;   r0x100F
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_Touch_Key_Deal_Fun	;Function start
; 2 exit points
;	op : CAST
;	.line	112; "../main.c"	if(Key_Code_Vaule_Old!=_KF8_LIBi_channel_flag_)
	BANKSEL	_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1
	MOVZ	R0, _Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1
	BANKSEL	r0x100C
	MOV	r0x100C, R0
	BANKSEL	_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1
	MOVZ	R0, (_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1 + 1)
	BANKSEL	r0x100D
	MOV	r0x100D, R0
	BANKSEL	_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1
	MOVZ	R0, (_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1 + 2)
	BANKSEL	r0x100E
	MOV	r0x100E, R0
	BANKSEL	_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1
	MOVZ	R0, (_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1 + 3)
	BANKSEL	r0x100F
	MOV	r0x100F, R0
;	op : EQ_OP
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	BANKSEL	r0x100C
	XOR	R0, r0x100C
	JB	PSW, 2
	JMP	_00058_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	BANKSEL	r0x100D
	XOR	R0, r0x100D
	JB	PSW, 2
	JMP	_00058_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	BANKSEL	r0x100E
	XOR	R0, r0x100E
	JB	PSW, 2
	JMP	_00058_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
;	.line	114; "../main.c"	Key_Code_Vaule_Old=_KF8_LIBi_channel_flag_;
	BANKSEL	r0x100F
	XOR	R0, r0x100F
	JNB	PSW, 2
	JMP	_00047_DS_
_00058_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	BANKSEL	_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1
	MOV	_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1, R0
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	BANKSEL	_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1
	MOV	(_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1 + 1), R0
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	BANKSEL	_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1
	MOV	(_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1 + 2), R0
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	BANKSEL	_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1
	MOV	(_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1 + 3), R0
;	op : EQ_OP
;	.line	120; "../main.c"	if(_KF8_LIBi_channel_flag_==Key_CT1)		//CT1
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x02
	JB	PSW, 2
	JMP	_00043_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00043_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00043_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00043_DS_
;	op : =
;	.line	123; "../main.c"	Key_Code=9;
	MOV	R0,# 0x09
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	op : =
;	.line	124; "../main.c"	LED1=1;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 2
;	op : =
;	.line	125; "../main.c"	LED2=0;
	BANKSEL	_P1LR_bits
	CLR	_P1LR_bits, 3
;	op : =
;	.line	126; "../main.c"	LED3=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 2
;	op : GOTO
	JMP	_00047_DS_
;	op : LABEL
;	op : EQ_OP
_00043_DS_
;	.line	128; "../main.c"	else if(_KF8_LIBi_channel_flag_==Key_CT2)		//CT2
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x04
	JB	PSW, 2
	JMP	_00040_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00040_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00040_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00040_DS_
;	op : =
;	.line	130; "../main.c"	Key_Code=3;
	MOV	R0,# 0x03
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	op : =
;	.line	131; "../main.c"	LED1=0;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 2
;	op : =
;	.line	132; "../main.c"	LED2=0;
	BANKSEL	_P1LR_bits
	CLR	_P1LR_bits, 3
;	op : =
;	.line	133; "../main.c"	LED3=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 2
;	op : GOTO
	JMP	_00047_DS_
;	op : LABEL
;	op : EQ_OP
_00040_DS_
;	.line	135; "../main.c"	else if(_KF8_LIBi_channel_flag_==Key_CT3)		//CT3
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x08
	JB	PSW, 2
	JMP	_00037_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00037_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00037_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00037_DS_
;	op : =
;	.line	137; "../main.c"	Key_Code=4;
	MOV	R0,# 0x04
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	op : =
;	.line	138; "../main.c"	LED1=1;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 2
;	op : =
;	.line	139; "../main.c"	LED2=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 3
;	op : =
;	.line	140; "../main.c"	LED3=0;
	BANKSEL	_P1LR_bits
	CLR	_P1LR_bits, 2
;	op : GOTO
	JMP	_00047_DS_
;	op : LABEL
;	op : EQ_OP
_00037_DS_
;	.line	142; "../main.c"	else if(_KF8_LIBi_channel_flag_==Key_CT4)		//CT4
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x10
	JB	PSW, 2
	JMP	_00034_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00034_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00034_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00034_DS_
;	op : =
;	.line	144; "../main.c"	Key_Code=5;
	MOV	R0,# 0x05
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	op : =
;	.line	145; "../main.c"	LED1=0;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 2
;	op : =
;	.line	146; "../main.c"	LED2=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 3
;	op : =
;	.line	147; "../main.c"	LED3=0;
	BANKSEL	_P1LR_bits
	CLR	_P1LR_bits, 2
;	op : GOTO
	JMP	_00047_DS_
;	op : LABEL
;	op : EQ_OP
_00034_DS_
;	.line	149; "../main.c"	else if(_KF8_LIBi_channel_flag_==Key_CT5)		//CT5
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x20
	JB	PSW, 2
	JMP	_00031_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00031_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00031_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00031_DS_
;	op : =
;	.line	151; "../main.c"	Key_Code=6;
	MOV	R0,# 0x06
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	op : =
;	.line	152; "../main.c"	LED1=1;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 2
;	op : =
;	.line	153; "../main.c"	LED2=0;
	BANKSEL	_P1LR_bits
	CLR	_P1LR_bits, 3
;	op : =
;	.line	154; "../main.c"	LED3=0;
	BANKSEL	_P1LR_bits
	CLR	_P1LR_bits, 2
;	op : GOTO
	JMP	_00047_DS_
;	op : LABEL
;	op : EQ_OP
_00031_DS_
;	.line	156; "../main.c"	else if(_KF8_LIBi_channel_flag_==Key_CT6)		//CT6
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x40
	JB	PSW, 2
	JMP	_00028_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00028_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00028_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00028_DS_
;	op : =
;	.line	158; "../main.c"	Key_Code=7;
	MOV	R0,# 0x07
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	op : =
;	.line	159; "../main.c"	LED1=0;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 2
;	op : =
;	.line	160; "../main.c"	LED2=0;
	BANKSEL	_P1LR_bits
	CLR	_P1LR_bits, 3
;	op : =
;	.line	161; "../main.c"	LED3=0;
	BANKSEL	_P1LR_bits
	CLR	_P1LR_bits, 2
;	op : GOTO
	JMP	_00047_DS_
;	op : LABEL
;	op : EQ_OP
_00028_DS_
;	.line	164; "../main.c"	else if(_KF8_LIBi_channel_flag_==Key_CT7)		//CT7
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x80
	JB	PSW, 2
	JMP	_00025_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00025_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00025_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00025_DS_
;	op : =
;	.line	166; "../main.c"	Key_Code=8;
	MOV	R0,# 0x08
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	op : =
;	.line	167; "../main.c"	LED1=1;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 2
;	op : =
;	.line	168; "../main.c"	LED2=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 3
;	op : =
;	.line	169; "../main.c"	LED3=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 2
;	op : GOTO
	JMP	_00047_DS_
;	op : LABEL
;	op : EQ_OP
_00025_DS_
;	.line	171; "../main.c"	else if(_KF8_LIBi_channel_flag_==Key_CT8)		//CT8
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00022_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x01
	JB	PSW, 2
	JMP	_00022_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00022_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00022_DS_
;	op : =
;	.line	173; "../main.c"	Key_Code=9;
	MOV	R0,# 0x09
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	op : =
;	.line	174; "../main.c"	LED1=0;
	BANKSEL	_P0LR_bits
	CLR	_P0LR_bits, 2
;	op : =
;	.line	175; "../main.c"	LED2=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 3
;	op : =
;	.line	176; "../main.c"	LED3=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 2
;	op : GOTO
	JMP	_00047_DS_
;	op : LABEL
;	op : =
_00022_DS_
;	.line	182; "../main.c"	Key_Code=0;
	BANKSEL	_Key_Code
	CLR	_Key_Code
;	op : =
;	.line	183; "../main.c"	LED1=1;
	BANKSEL	_P0LR_bits
	SET	_P0LR_bits, 2
;	op : =
;	.line	184; "../main.c"	LED2=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 3
;	op : =
;	.line	185; "../main.c"	LED3=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 2
;	op : LABEL
;	op : ENDFUNCTION
_00047_DS_
	CRET	
; exit point of _Touch_Key_Deal_Fun



func._delay_us	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _delay_us	;Function start
; 2 exit points
;has an exit
;5 compiler assigned registers:
;   r0x1016
;   STK00
;   r0x1017
;   r0x1018
;   r0x1019
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_delay_us	;Function start
; 2 exit points
;	op : RECEIVE
;	.line	48; "../main.c"	void delay_us(uint us_data)
	BANKSEL	r0x1016
	MOV	r0x1016, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x1017
	MOV	r0x1017, R0
;	op : =
;	op : LABEL
;	op : =
_00014_DS_
;	.line	50; "../main.c"	while(us_data--);
	BANKSEL	r0x1017
	MOVZ	R0, r0x1017
	BANKSEL	r0x1018
	MOV	r0x1018, R0
	BANKSEL	r0x1016
	MOVZ	R0, r0x1016
	BANKSEL	r0x1019
	MOV	r0x1019, R0
;	op : -
	MOV	R0,# 0xff
	BANKSEL	r0x1017
	ADD	r0x1017, R0
	JNB	PSW, 0
	JMP	_00081_DS_
	BANKSEL	r0x1016
	DEC	r0x1016
;	op : IFX
_00081_DS_
	BANKSEL	r0x1018
	MOVZ	R0, r0x1018
	BANKSEL	r0x1019
	ORL	R0, r0x1019
	JB	PSW, 2
	JMP	_00014_DS_
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _delay_us



func._delay_ms	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _delay_ms	;Function start
; 2 exit points
;has an exit
;7 compiler assigned registers:
;   r0x100C
;   STK00
;   r0x100D
;   r0x100E
;   r0x100F
;   r0x1010
;   r0x1011
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_delay_ms	;Function start
; 2 exit points
;	op : RECEIVE
;	.line	29; "../main.c"	void delay_ms(uint ms_data)
	BANKSEL	r0x100C
	MOV	r0x100C, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x100D
	MOV	r0x100D, R0
;	op : =
;	op : LABEL
;	op : =
_00004_DS_
;	.line	32; "../main.c"	while(ms_data--)
	BANKSEL	r0x100D
	MOVZ	R0, r0x100D
	BANKSEL	r0x100E
	MOV	r0x100E, R0
	BANKSEL	r0x100C
	MOVZ	R0, r0x100C
	BANKSEL	r0x100F
	MOV	r0x100F, R0
;	op : -
	MOV	R0,# 0xff
	BANKSEL	r0x100D
	ADD	r0x100D, R0
	JNB	PSW, 0
	JMP	_00082_DS_
	BANKSEL	r0x100C
	DEC	r0x100C
;	op : IFX
_00082_DS_
	BANKSEL	r0x100E
	MOVZ	R0, r0x100E
	BANKSEL	r0x100F
	ORL	R0, r0x100F
	JNB	PSW, 2
	JMP	_00007_DS_
;	op : INLINEASM
	CWDT 
;	op : =
;	.line	36; "../main.c"	while(j--)
	MOV	R0,# 0xc8
	BANKSEL	r0x100E
	MOV	r0x100E, R0
	BANKSEL	r0x100F
	CLR	r0x100F
;	op : LABEL
;	op : =
_00001_DS_
	BANKSEL	r0x100E
	MOVZ	R0, r0x100E
	BANKSEL	r0x1010
	MOV	r0x1010, R0
	BANKSEL	r0x100F
	MOVZ	R0, r0x100F
	BANKSEL	r0x1011
	MOV	r0x1011, R0
;	op : -
	MOV	R0,# 0xff
	BANKSEL	r0x100E
	ADD	r0x100E, R0
	JNB	PSW, 0
	JMP	_00083_DS_
	BANKSEL	r0x100F
	DEC	r0x100F
;	op : IFX
_00083_DS_
	BANKSEL	r0x1010
	MOVZ	R0, r0x1010
	BANKSEL	r0x1011
	ORL	R0, r0x1011
	JNB	PSW, 2
	JMP	_00004_DS_
;	op : INLINEASM
	CWDT 
;	op : GOTO
	JMP	_00001_DS_
;	op : LABEL
;	op : ENDFUNCTION
_00007_DS_
	CRET	
; exit point of _delay_ms


;	code size estimation:
;	  353+  155 =   508 instructions ( 1326 byte)


	.end
