;--------------------------------------------------------
; File Created by ChiponCC : ChipON  inc.
; Version 3.0.4#6752 (Jun 11 2018 20:50:36) (MSVC)
; This file was generated Thu Jul 12 10:23:25 2018
;--------------------------------------------------------
; chipon port for the 16-bit core
;--------------------------------------------------------
;	.file	"../main.c"
	.radix dec
	.include "KF8TS2514.inc"
;--------------------------------------------------------
; external declarations
;--------------------------------------------------------
	.extern	_init_mcu
	.extern	__KF8TS25_Get_Ver_General_
	.extern	__KF8TS25_Init_Touch_General_
	.extern	__KF8TS25_Touch_Process_General_
	.extern	__KF8TS25_Touch_TEST_General_
	.extern	__KF8TS25_Lib_Set_General_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	_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_LIBi_channel_flag_
	.extern	__KF8_LIBc_channel_
	.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_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	_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
r0x100B	.res	1
UDL_main_1	.udata
r0x100A	.res	1
UDL_main_2	.udata
r0x100C	.res	1
UDL_main_3	.udata
r0x100D	.res	1
UDL_main_4	.udata
r0x100E	.res	1
UDL_main_5	.udata
r0x100F	.res	1
UDL_main_6	.udata
r0x1015	.res	1
UDL_main_7	.udata
r0x1014	.res	1
UDL_main_8	.udata
r0x1016	.res	1
UDL_main_9	.udata
r0x1017	.res	1
UDL_main_10	.udata
r0x1010	.res	1
UDL_main_11	.udata
r0x1011	.res	1
UDL_main_12	.udata
r0x1012	.res	1
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------
LDS_00000	.idata
_Touch_Key_Deal_Fun_Key_Code_Vaule_Old_1_1
	.db 0x34, 0x12

;--------------------------------------------------------
; 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	165; "../main.c"	if(T3IF)
	BANKSEL	_EIF2_bits
	JB	_EIF2_bits, 7
	JMP	_00086_DS_
;	::->op : =
;	.line	167; "../main.c"	T4CTL=0x00;	//如果使用了T4的同步计数功能，计时暂停计数，等待数值读出
	BANKSEL	_T4CTL
	CLR	_T4CTL
;	::->op : =
;	.line	168; "../main.c"	T3IF=0;		//如果为了不影响中断，可以把触摸通道处理放到主函数，在此做一个标志位，然后在主函数检测标志位进行扫描即可
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 7
;	::->op : =
;	.line	169; "../main.c"	kf8_touch_flag=1;	//触摸标志位
	MOV	R0,# 0x01
	BANKSEL	_kf8_touch_flag
	MOV	_kf8_touch_flag, R0
;	::->op : =
;	.line	170; "../main.c"	Touch_Watch=0;
	BANKSEL	_Touch_Watch
	CLR	_Touch_Watch
	BANKSEL	_Touch_Watch
	CLR	(_Touch_Watch + 1)
;	::->op : LABEL
;	::->op : ENDFUNCTION
_00086_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
_00089_DS_
;	.line	187; "../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
;   __KF8TS25_Lib_Set_General_Parameter
;   __KF8TS25_Init_Touch_General_
;   __KF8TS25_Touch_Process_General_
;   _Touch_Key_Deal_Fun
;   __KF8TS25_Init_Touch_General_
;   _init_mcu
;   _delay_ms
;   __KF8TS25_Lib_Set_General_Parameter
;   __KF8TS25_Init_Touch_General_
;   __KF8TS25_Touch_Process_General_
;   _Touch_Key_Deal_Fun
;   __KF8TS25_Init_Touch_General_
;5 compiler assigned registers:
;   STK00
;   r0x1010
;   r0x1011
;   r0x1012
;   r0x1013
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_main	;Function start
; 2 exit points
;	::->op : CALL
;	.line	196; "../main.c"	init_mcu();						//初始化MCU寄存器
	PAGESEL	_init_mcu
	CALL	_init_mcu
	PAGESEL	$
;	::->op : =
;	.line	197; "../main.c"	kf8_touch_flag=0;
	BANKSEL	_kf8_touch_flag
	CLR	_kf8_touch_flag
;	::->op : SEND
;	::->op : CALL
;	.line	198; "../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	202; "../main.c"	CTCTL1 = 0x41;		//电压源和时钟分频设置  0 4 8 C~ 4/8/16/32  xxyy yyyx   0~ Vref  1~ VDD
	MOV	R0,# 0x41
	BANKSEL	_CTCTL1
	MOV	_CTCTL1, R0
;	::->op : =
;	.line	203; "../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	217; "../main.c"	_KF8TS25_Lib_Set_General_Parameter(2);	//功能模式，参数见kf8ts25_touch_g.h 中说明
	MOV	R0,# 0x02
	PAGESEL	__KF8TS25_Lib_Set_General_Parameter
	CALL	__KF8TS25_Lib_Set_General_Parameter
	PAGESEL	$
;	::->op : CALL
;	.line	218; "../main.c"	_KF8TS25_Init_Touch_General_();		//调用电容触摸库函数的初始化
	PAGESEL	__KF8TS25_Init_Touch_General_
	CALL	__KF8TS25_Init_Touch_General_
	PAGESEL	$
;	::->op : LABEL
;	::->op : INLINEASM
_00096_DS_
	CWDT 
;	::->op : IFX
;	.line	228; "../main.c"	if(kf8_touch_flag)
	MOV	R0,# 0x00
	BANKSEL	_kf8_touch_flag
	ORL	R0, _kf8_touch_flag
	JNB	PSW, 2
	JMP	_00092_DS_
;	::->op : =
;	.line	230; "../main.c"	kf8_touch_flag=0;
	BANKSEL	_kf8_touch_flag
	CLR	_kf8_touch_flag
;	::->op : CALL
;	.line	232; "../main.c"	_KF8TS25_Touch_Process_General_();//建议模式，因该芯片属于集控制一体，尽早退出触摸中断，影响其他中断请求。
	PAGESEL	__KF8TS25_Touch_Process_General_
	CALL	__KF8TS25_Touch_Process_General_
	PAGESEL	$
;	::->op : LABEL
;	::->op : CALL
_00092_DS_
;	.line	236; "../main.c"	Touch_Key_Deal_Fun();
	PAGESEL	_Touch_Key_Deal_Fun
	CALL	_Touch_Key_Deal_Fun
	PAGESEL	$
;	::->op : +
;	.line	239; "../main.c"	Touch_Watch++;
	BANKSEL	_Touch_Watch
	INC	_Touch_Watch
	JB	PSW, 2
	JMP	_00104_DS_
	BANKSEL	_Touch_Watch
	INC	(_Touch_Watch + 1)
;	::->op : CAST
_00104_DS_
;	.line	240; "../main.c"	if(Touch_Watch>50000)
	BANKSEL	_Touch_Watch
	MOVZ	R0, _Touch_Watch
	BANKSEL	r0x1010
	MOV	r0x1010, R0
	BANKSEL	_Touch_Watch
	MOVZ	R0, (_Touch_Watch + 1)
	BANKSEL	r0x1011
	MOV	r0x1011, R0
	BANKSEL	r0x1012
	CLR	r0x1012
;;1	CLR	r0x1013
;	::->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	_00103_DS_
	MOV	R0,# 0x00
	BANKSEL	r0x1012
	SUB	R0, r0x1012
	JB	PSW, 2
	JMP	_00103_DS_
	MOV	R0,# 0xc3
	BANKSEL	r0x1011
	SUB	R0, r0x1011
	JB	PSW, 2
	JMP	_00103_DS_
	MOV	R0,# 0x51
	BANKSEL	r0x1010
	SUB	R0, r0x1010
_00103_DS_
	JB	PSW, 0
	JMP	_00096_DS_
;	::->op : =
;	.line	242; "../main.c"	Touch_Watch=0;
	BANKSEL	_Touch_Watch
	CLR	_Touch_Watch
	BANKSEL	_Touch_Watch
	CLR	(_Touch_Watch + 1)
;	::->op : CALL
;	.line	243; "../main.c"	_KF8TS25_Init_Touch_General_();
	PAGESEL	__KF8TS25_Init_Touch_General_
	CALL	__KF8TS25_Init_Touch_General_
	PAGESEL	$
;	::->op : GOTO
	JMP	_00096_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:
;   r0x100A
;   r0x100B
;   r0x100C
;   r0x100D
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_Touch_Key_Deal_Fun	;Function start
; 2 exit points
;	::->op : CAST
;	.line	86; "../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	r0x100A
	MOV	r0x100A, 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	r0x100B
	MOV	r0x100B, R0
	MOV	R0,# 0x00
	BANKSEL	r0x100B
	JNB	r0x100B, 7
	MOV	R0,# 0xff
	BANKSEL	r0x100C
	MOV	r0x100C, R0
	BANKSEL	r0x100D
	MOV	r0x100D, R0
;	::->op : EQ_OP
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	BANKSEL	r0x100A
	XOR	R0, r0x100A
	JB	PSW, 2
	JMP	_00082_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	BANKSEL	r0x100B
	XOR	R0, r0x100B
	JB	PSW, 2
	JMP	_00082_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	BANKSEL	r0x100D
	XOR	R0, r0x100D
	JB	PSW, 2
	JMP	_00082_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
;	.line	88; "../main.c"	Key_Code_Vaule_Old=_KF8_LIBi_channel_flag_;
	BANKSEL	r0x100C
	XOR	R0, r0x100C
	JNB	PSW, 2
	JMP	_00065_DS_
_00082_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
;	::->op : EQ_OP
;	.line	90; "../main.c"	if(_KF8_LIBi_channel_flag_==Key_CT0)		//CT0
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x01
	JB	PSW, 2
	JMP	_00061_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00061_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00061_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00061_DS_
;	::->op : =
;	.line	92; "../main.c"	Key_Code=1;
	MOV	R0,# 0x01
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00061_DS_
;	.line	94; "../main.c"	else 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	_00058_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00058_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00058_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00058_DS_
;	::->op : =
;	.line	96; "../main.c"	Key_Code=2;
	MOV	R0,# 0x02
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00058_DS_
;	.line	98; "../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	_00055_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00055_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00055_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00055_DS_
;	::->op : =
;	.line	100; "../main.c"	Key_Code=3;
	MOV	R0,# 0x03
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00055_DS_
;	.line	102; "../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	_00052_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00052_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00052_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00052_DS_
;	::->op : =
;	.line	104; "../main.c"	Key_Code=4;
	MOV	R0,# 0x04
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00052_DS_
;	.line	106; "../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	_00049_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00049_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00049_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00049_DS_
;	::->op : =
;	.line	108; "../main.c"	Key_Code=5;
	MOV	R0,# 0x05
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00049_DS_
;	.line	110; "../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	_00046_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00046_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 2)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00046_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 3)
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00046_DS_
;	::->op : =
;	.line	112; "../main.c"	Key_Code=6;
	MOV	R0,# 0x06
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00046_DS_
;	.line	114; "../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	_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	116; "../main.c"	Key_Code=7;
	MOV	R0,# 0x07
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00043_DS_
;	.line	118; "../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	_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	120; "../main.c"	Key_Code=8;
	MOV	R0,# 0x08
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00040_DS_
;	.line	122; "../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	_00037_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x01
	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	124; "../main.c"	Key_Code=9;
	MOV	R0,# 0x09
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00037_DS_
;	.line	126; "../main.c"	else if(_KF8_LIBi_channel_flag_==Key_CT9)		//CT9
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00034_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x02
	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	128; "../main.c"	Key_Code=10;
	MOV	R0,# 0x0a
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00034_DS_
;	.line	130; "../main.c"	else if(_KF8_LIBi_channel_flag_==Key_CT10)		//CT10
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00031_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x04
	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	132; "../main.c"	Key_Code=11;
	MOV	R0,# 0x0b
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00031_DS_
;	.line	134; "../main.c"	else if(_KF8_LIBi_channel_flag_==Key_CT11)		//CT11
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00028_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x08
	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	136; "../main.c"	Key_Code=12;
	MOV	R0,# 0x0c
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00028_DS_
;	.line	138; "../main.c"	else if(_KF8_LIBi_channel_flag_==Key_CT12)		//CT12
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, __KF8_LIBi_channel_flag_
	XOR	R0,# 0x00
	JB	PSW, 2
	JMP	_00025_DS_
	BANKSEL	__KF8_LIBi_channel_flag_
	MOVZ	R0, (__KF8_LIBi_channel_flag_ + 1)
	XOR	R0,# 0x10
	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	140; "../main.c"	Key_Code=12;
	MOV	R0,# 0x0c
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : EQ_OP
_00025_DS_
;	.line	142; "../main.c"	else if(_KF8_LIBi_channel_flag_==Key_CT13)		//CT13
	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,# 0x20
	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	144; "../main.c"	Key_Code=12;
	MOV	R0,# 0x0c
	BANKSEL	_Key_Code
	MOV	_Key_Code, R0
;	::->op : GOTO
	JMP	_00065_DS_
;	::->op : LABEL
;	::->op : =
_00022_DS_
;	.line	149; "../main.c"	Key_Code=0;
	BANKSEL	_Key_Code
	CLR	_Key_Code
;	::->op : LABEL
;	::->op : ENDFUNCTION
_00065_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:
;   r0x1014
;   STK00
;   r0x1015
;   r0x1016
;   r0x1017
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_delay_us	;Function start
; 2 exit points
;	::->op : RECEIVE
;	.line	54; "../main.c"	void delay_us(uint us_data)
	BANKSEL	r0x1014
	MOV	r0x1014, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x1015
	MOV	r0x1015, R0
;	::->op : =
;	::->op : LABEL
;	::->op : =
_00014_DS_
;	.line	56; "../main.c"	while(us_data--);
	BANKSEL	r0x1015
	MOVZ	R0, r0x1015
	BANKSEL	r0x1016
	MOV	r0x1016, R0
	BANKSEL	r0x1014
	MOVZ	R0, r0x1014
	BANKSEL	r0x1017
	MOV	r0x1017, R0
;	::->op : -
	MOV	R0,# 0xff
	BANKSEL	r0x1015
	ADD	r0x1015, R0
	JNB	PSW, 0
	JMP	_00105_DS_
	BANKSEL	r0x1014
	DEC	r0x1014
;	::->op : IFX
_00105_DS_
	BANKSEL	r0x1016
	MOVZ	R0, r0x1016
	BANKSEL	r0x1017
	ORL	R0, r0x1017
	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:
;   r0x100A
;   STK00
;   r0x100B
;   r0x100C
;   r0x100D
;   r0x100E
;   r0x100F
;; Starting PostCode block
;	::->op : LABEL
;	::->op : FUNCTION
_delay_ms	;Function start
; 2 exit points
;	::->op : RECEIVE
;	.line	35; "../main.c"	void delay_ms(uint ms_data)
	BANKSEL	r0x100A
	MOV	r0x100A, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x100B
	MOV	r0x100B, R0
;	::->op : =
;	::->op : LABEL
;	::->op : =
_00004_DS_
;	.line	38; "../main.c"	while(ms_data--)
	BANKSEL	r0x100B
	MOVZ	R0, r0x100B
	BANKSEL	r0x100C
	MOV	r0x100C, R0
	BANKSEL	r0x100A
	MOVZ	R0, r0x100A
	BANKSEL	r0x100D
	MOV	r0x100D, R0
;	::->op : -
	MOV	R0,# 0xff
	BANKSEL	r0x100B
	ADD	r0x100B, R0
	JNB	PSW, 0
	JMP	_00106_DS_
	BANKSEL	r0x100A
	DEC	r0x100A
;	::->op : IFX
_00106_DS_
	BANKSEL	r0x100C
	MOVZ	R0, r0x100C
	BANKSEL	r0x100D
	ORL	R0, r0x100D
	JNB	PSW, 2
	JMP	_00007_DS_
;	::->op : INLINEASM
	CWDT 
;	::->op : =
;	.line	42; "../main.c"	while(j--)
	MOV	R0,# 0xc8
	BANKSEL	r0x100C
	MOV	r0x100C, R0
	BANKSEL	r0x100D
	CLR	r0x100D
;	::->op : LABEL
;	::->op : =
_00001_DS_
	BANKSEL	r0x100C
	MOVZ	R0, r0x100C
	BANKSEL	r0x100E
	MOV	r0x100E, R0
	BANKSEL	r0x100D
	MOVZ	R0, r0x100D
	BANKSEL	r0x100F
	MOV	r0x100F, R0
;	::->op : -
	MOV	R0,# 0xff
	BANKSEL	r0x100C
	ADD	r0x100C, R0
	JNB	PSW, 0
	JMP	_00107_DS_
	BANKSEL	r0x100D
	DEC	r0x100D
;	::->op : IFX
_00107_DS_
	BANKSEL	r0x100E
	MOVZ	R0, r0x100E
	BANKSEL	r0x100F
	ORL	R0, r0x100F
	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:
;	  431+  150 =   581 instructions ( 1462 byte)


	.end
