;--------------------------------------------------------
; 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 20:59:00 2018
;--------------------------------------------------------
; chipon port for the 16-bit core
;--------------------------------------------------------
;	.file	"../main.c"
	.radix dec
	.include "KF8S1025.inc"
;--------------------------------------------------------
; external declarations
;--------------------------------------------------------
	.extern	_init_mcu
	.extern	__KF8spsw_LIBf_init_touch_
	.extern	__KF8spsw_LIBf_touch_process_
	.extern	__KF8spsw_Lib_SET_MCU_Parameter
	.extern	_read_data_eep_tsw_
	.extern	_write_eep_tsw_
	.extern	__R2PCL
	.extern	_TOUCH_DEBUG_TRS_DEAL
	.extern	_TOUCH_DEBUG_TRS_BAIHUALV
	.extern	_TOUCH_DEBUG_SEND_OUT
	.extern	_PSW_bits
	.extern	_P0_bits
	.extern	_P2_bits
	.extern	_P1_bits
	.extern	_P3_bits
	.extern	_INTCTL_bits
	.extern	_EIF1_bits
	.extern	_T1CTL_bits
	.extern	_T2CTL_bits
	.extern	_PWMCTL_bits
	.extern	_CMCTL1_bits
	.extern	_ADCCTL0_bits
	.extern	_OPTR_bits
	.extern	_TR0_bits
	.extern	_TR2_bits
	.extern	_TR1_bits
	.extern	_TR3_bits
	.extern	_EIE1_bits
	.extern	_PCTL_bits
	.extern	_OSCCTL_bits
	.extern	_ANSEL_bits
	.extern	_PUR_bits
	.extern	_IOCL_bits
	.extern	_BADDRH_bits
	.extern	_ADCCTL1_bits
	.extern	_T3L_bits
	.extern	_CTCTL_bits
	.extern	_OSCLDOCAL_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_SW_
	.extern	_sentbuf1
	.extern	_sentbuf2
	.extern	_sentbuf3
	.extern	_sentbuf4
	.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	_P3
	.extern	_PCH
	.extern	_INTCTL
	.extern	_EIF1
	.extern	_T1L
	.extern	_T1H
	.extern	_T1CTL
	.extern	_T2
	.extern	_T2CTL
	.extern	_PWM1L
	.extern	_PWM1H
	.extern	_PWMCTL
	.extern	_PP1
	.extern	_CMCTL1
	.extern	_VRECAL
	.extern	_ADCDATAH
	.extern	_ADCCTL0
	.extern	_OPTR
	.extern	_TR0
	.extern	_TR2
	.extern	_TR1
	.extern	_TR3
	.extern	_EIE1
	.extern	_PCTL
	.extern	_OSCCTL
	.extern	_OSCCAL0
	.extern	_ANSEL
	.extern	_PP2
	.extern	_PWM2L
	.extern	_PWM2H
	.extern	_PUR
	.extern	_IOCL
	.extern	_OSCCAL1
	.extern	_BADDRH
	.extern	_BADDRL
	.extern	_EECTL1
	.extern	_EECTL2
	.extern	_ADCDATAL
	.extern	_ADCCTL1
	.extern	_T3L
	.extern	_CTCTL
	.extern	_T2CCR
	.extern	_OSCLDOCAL
	.extern	_T1U
	.extern	_startup
;--------------------------------------------------------
; global declarations
;--------------------------------------------------------
	.global	_delay_us
	.global	_delay_ms
	.global	__gsinit_startup
	.global	_INT_FUN
	.global	_Water_Judge
	.global	_main
	.global	_touch_process_flag
	.global	_Touch_Watch
	.global	_No_Water_Flag
	.global	_waterbuf1
	.global	_waterbuf2
	.global	_waterbuf3
	.global	__KF8_LIBi_channel_flag_Old

	.global STK12
	.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
STK12	.res 1
	.type STK12, 108
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
_touch_process_flag	.res	1

UD_main_1	.udata
_Touch_Watch	.res	2

UD_main_2	.udata
_No_Water_Flag	.res	1

UD_main_3	.udata
_waterbuf1	.res	1

UD_main_4	.udata
_waterbuf2	.res	1

UD_main_5	.udata
_waterbuf3	.res	1

UD_main_6	.udata
__KF8_LIBi_channel_flag_Old	.res	2

;--------------------------------------------------------
; absolute symbol definitions
;--------------------------------------------------------
;--------------------------------------------------------
; compiler-defined variables
;--------------------------------------------------------
UDL_main_0	.udata
r0x1035	.res	1
UDL_main_1	.udata
r0x1034	.res	1
UDL_main_2	.udata
r0x1036	.res	1
UDL_main_3	.udata
r0x1037	.res	1
UDL_main_4	.udata
r0x1038	.res	1
UDL_main_5	.udata
r0x1039	.res	1
UDL_main_6	.udata
r0x1043	.res	1
UDL_main_7	.udata
r0x1042	.res	1
UDL_main_8	.udata
r0x1044	.res	1
UDL_main_9	.udata
r0x1045	.res	1
UDL_main_10	.udata
r0x103A	.res	1
UDL_main_11	.udata
r0x103B	.res	1
UDL_main_12	.udata
r0x103C	.res	1
UDL_main_13	.udata
r0x103D	.res	1
UDL_main_14	.udata
r0x103E	.res	1
UDL_main_15	.udata
r0x103F	.res	1
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------
;--------------------------------------------------------
; 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
;--------------------------------------------------------
c_interrupt	.code	0x4
	MOV		R3,R0
	MOV		R4,PSW
	MOV		R5,PCH
	MOV		R2,R1
	PAGESEL	interrupt_service_routine
	JMP		interrupt_service_routine



func._INT_FUN	.code
;***
;  PostBlock Stats: dbName = I
;***
;entry:  _INT_FUN	;Function start
; 0 exit points
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_INT_FUN	;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
;	.line	69; "../main.c"	if(T1IF||CTIF)
	JNB	_EIF1_bits, 0
	JMP	_00024_DS_
;	op : GET_VALUE_AT_ADDRESS
	JB	_EIF1_bits, 7
	JMP	_00027_DS_
;	op : LABEL
;	op : =
_00024_DS_
;	.line	71; "../main.c"	T1IF=0;
	CLR	_EIF1_bits, 0
;	op : =
;	.line	72; "../main.c"	CTIF=0;
	CLR	_EIF1_bits, 7
;	op : =
;	.line	73; "../main.c"	Touch_Watch=0;
	BANKSEL	_Touch_Watch
	CLR	_Touch_Watch
	BANKSEL	_Touch_Watch
	CLR	(_Touch_Watch + 1)
;	op : =
;	.line	74; "../main.c"	touch_process_flag = 0xff;
	MOV	R0,# 0xff
	BANKSEL	_touch_process_flag
	MOV	_touch_process_flag, R0
;	op : LABEL
;	op : ENDFUNCTION
_00027_DS_
	MOV	R1, R2
	MOV	PCH, R5
	MOV	PSW, R4
	MOV	R0, R3
	IRET	



func._main	.code
;***
;  PostBlock Stats: dbName = M
;***
;entry:  _main	;Function start
; 2 exit points
;has an exit
;functions called:
;   _init_mcu
;   _delay_ms
;   __KF8spsw_Lib_SET_MCU_Parameter
;   __KF8spsw_LIBf_init_touch_
;   __KF8spsw_LIBf_touch_process_
;   _Water_Judge
;   __KF8spsw_LIBf_init_touch_
;   __R2PCL
;   _write_eep_tsw_
;   _init_mcu
;   _delay_ms
;   __KF8spsw_Lib_SET_MCU_Parameter
;   __KF8spsw_LIBf_init_touch_
;   __KF8spsw_LIBf_touch_process_
;   _Water_Judge
;   __KF8spsw_LIBf_init_touch_
;   __R2PCL
;   _write_eep_tsw_
;9 compiler assigned registers:
;   STK00
;   r0x103A
;   r0x103B
;   r0x103C
;   r0x103D
;   r0x103E
;   r0x103F
;   r0x1040
;   r0x1041
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_main	;Function start
; 2 exit points
;	op : CALL
;	.line	145; "../main.c"	init_mcu();
	PAGESEL	_init_mcu
	CALL	_init_mcu
	PAGESEL	$
;	op : SEND
;	op : CALL
;	.line	146; "../main.c"	delay_ms(1000);	 //等待电源稳定
	MOV	R0,# 0xe8
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x03
	PAGESEL	_delay_ms
	CALL	_delay_ms
	PAGESEL	$
;	op : =
;	.line	149; "../main.c"	CMCTL1 = 0x50;
	MOV	R0,# 0x50
	MOV	_CMCTL1, R0
;	op : INLINEASM
	CWDT 
;	op : SEND
;	op : CALL
;	.line	152; "../main.c"	_KF8spsw_Lib_SET_MCU_Parameter(0);	//功能模式，参数见kf8spsw_lib_touch.h 中说明
	MOV	R0,# 0x00
	PAGESEL	__KF8spsw_Lib_SET_MCU_Parameter
	CALL	__KF8spsw_Lib_SET_MCU_Parameter
	PAGESEL	$
;	op : CALL
;	.line	153; "../main.c"	_KF8spsw_LIBf_init_touch_();		//调用电容触摸库函数的初始化
	PAGESEL	__KF8spsw_LIBf_init_touch_
	CALL	__KF8spsw_LIBf_init_touch_
	PAGESEL	$
;	op : LABEL
;	op : INLINEASM
_00065_DS_
	CWDT 
;	op : IFX
;	.line	158; "../main.c"	if(touch_process_flag)
	MOV	R0,# 0x00
	BANKSEL	_touch_process_flag
	ORL	R0, _touch_process_flag
	JNB	PSW, 2
	JMP	_00061_DS_
;	op : =
;	.line	160; "../main.c"	touch_process_flag = 0;
	BANKSEL	_touch_process_flag
	CLR	_touch_process_flag
;	op : CALL
;	.line	162; "../main.c"	_KF8spsw_LIBf_touch_process_();
	PAGESEL	__KF8spsw_LIBf_touch_process_
	CALL	__KF8spsw_LIBf_touch_process_
	PAGESEL	$
;	op : CALL
;	.line	163; "../main.c"	Water_Judge();
	PAGESEL	_Water_Judge
	CALL	_Water_Judge
	PAGESEL	$
;	op : LABEL
;	op : +
_00061_DS_
;	.line	166; "../main.c"	Touch_Watch++;
	BANKSEL	_Touch_Watch
	INC	_Touch_Watch
	JB	PSW, 2
	JMP	_00081_DS_
	BANKSEL	_Touch_Watch
	INC	(_Touch_Watch + 1)
;	op : CAST
_00081_DS_
;	.line	167; "../main.c"	if(Touch_Watch>=50000) // 可细调粗略时间
	BANKSEL	_Touch_Watch
	MOVZ	R0, _Touch_Watch
	BANKSEL	r0x103A
	MOV	r0x103A, R0
	BANKSEL	_Touch_Watch
	MOVZ	R0, (_Touch_Watch + 1)
	BANKSEL	r0x103B
	MOV	r0x103B, R0
	BANKSEL	r0x103C
	CLR	r0x103C
	BANKSEL	r0x103D
	CLR	r0x103D
;	op : <
;signed compare: left < lit(0xC350=50000), 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	r0x103C
	SUB	R0, r0x103C
	JB	PSW, 2
	JMP	_00079_DS_
	MOV	R0,# 0xc3
	BANKSEL	r0x103B
	SUB	R0, r0x103B
	JB	PSW, 2
	JMP	_00079_DS_
	MOV	R0,# 0x50
	BANKSEL	r0x103A
	SUB	R0, r0x103A
_00079_DS_
	JB	PSW, 0
	JMP	_00076_DS_
;	op : =
;	.line	169; "../main.c"	Touch_Watch=0;
	BANKSEL	_Touch_Watch
	CLR	_Touch_Watch
	BANKSEL	_Touch_Watch
	CLR	(_Touch_Watch + 1)
;	op : CALL
;	.line	170; "../main.c"	_KF8spsw_LIBf_init_touch_();
	PAGESEL	__KF8spsw_LIBf_init_touch_
	CALL	__KF8spsw_LIBf_init_touch_
	PAGESEL	$
;	op : LABEL
;	op : =
_00076_DS_
;	.line	175; "../main.c"	for(i=0;i<CHS_AMOUNT;i++)
	BANKSEL	r0x103A
	CLR	r0x103A
;	op : LABEL
;	op : =
;gen_assign from CODESPACE
_00067_DS_
	MOV	R1,# high (_CHS_AMOUNT+0)
	MOV	R0,# low (_CHS_AMOUNT+0)
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x103B
	MOV	r0x103B, R0
;	op : <
	BANKSEL	r0x103B
	MOVZ	R0, r0x103B
	BANKSEL	r0x103A
	SUB	R0, r0x103A
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00070_DS_
;	op : LEFT_OP
;	.line	177; "../main.c"	_KF8_LIBi_buff_baseline_[i]=_KF8_LIBi_buff_hit_[i];
	CLR	PSW, 0
	BANKSEL	r0x103A
	RLCR	r0x103A
	BANKSEL	r0x103B
	MOV	r0x103B, R0
;	op : +
	MOV	R0,# (__KF8_LIBi_buff_baseline_ + 0)
	BANKSEL	r0x103B
	ADD	r0x103B, R0
;	op : LEFT_OP
	CLR	PSW, 0
	BANKSEL	r0x103A
	RLCR	r0x103A
	BANKSEL	r0x103D
	MOV	r0x103D, R0
;	op : +
	MOV	R0,# (__KF8_LIBi_buff_hit_ + 0)
	BANKSEL	r0x103D
	ADD	r0x103D, R0
;	op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x103D
	MOV	R1, r0x103D
	BANKSEL	__KF8_LIBi_buff_hit_
	LD	R0, [R1]
	BANKSEL	r0x103E
	MOV	r0x103E, R0
	INC	R1
	BANKSEL	__KF8_LIBi_buff_hit_
	LD	R0, [R1]
	BANKSEL	r0x103F
	MOV	r0x103F, R0
;	op : =
	BANKSEL	r0x103E
	MOVZ	R0, r0x103E
	BANKSEL	r0x103B
	MOV	R1, r0x103B
	BANKSEL	__KF8_LIBi_buff_baseline_
	ST	[R1], R0
	INC	R1
	BANKSEL	r0x103F
	MOVZ	R0, r0x103F
	BANKSEL	__KF8_LIBi_buff_baseline_
	ST	[R1], R0
;	op : LEFT_OP
;	.line	178; "../main.c"	_KF8_LIBi_buff_refline_[i]=_KF8_LIBi_buff_hit_[i];
	CLR	PSW, 0
	BANKSEL	r0x103A
	RLCR	r0x103A
	BANKSEL	r0x103B
	MOV	r0x103B, R0
;	op : +
	MOV	R0,# (__KF8_LIBi_buff_refline_ + 0)
	BANKSEL	r0x103B
	ADD	r0x103B, R0
;	op : LEFT_OP
	CLR	PSW, 0
	BANKSEL	r0x103A
	RLCR	r0x103A
	BANKSEL	r0x103D
	MOV	r0x103D, R0
;	op : +
	MOV	R0,# (__KF8_LIBi_buff_hit_ + 0)
	BANKSEL	r0x103D
	ADD	r0x103D, R0
;	op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x103D
	MOV	R1, r0x103D
	BANKSEL	__KF8_LIBi_buff_hit_
	LD	R0, [R1]
	BANKSEL	r0x103E
	MOV	r0x103E, R0
	INC	R1
	BANKSEL	__KF8_LIBi_buff_hit_
	LD	R0, [R1]
	BANKSEL	r0x103F
	MOV	r0x103F, R0
;	op : =
	BANKSEL	r0x103E
	MOVZ	R0, r0x103E
	BANKSEL	r0x103B
	MOV	R1, r0x103B
	BANKSEL	__KF8_LIBi_buff_refline_
	ST	[R1], R0
	INC	R1
	BANKSEL	r0x103F
	MOVZ	R0, r0x103F
	BANKSEL	__KF8_LIBi_buff_refline_
	ST	[R1], R0
;	op : LEFT_OP
;	.line	179; "../main.c"	Arr_erom_SW_[2*i+1]=(unsigned char)(_KF8_LIBi_buff_hit_[i]>>8);
	CLR	PSW, 0
	BANKSEL	r0x103A
	RLCR	r0x103A
	BANKSEL	r0x103B
	MOV	r0x103B, R0
;	op : +
	BANKSEL	r0x103B
	INC	r0x103B
;	op : +
	MOV	R0,# (_Arr_erom_SW_ + 0)
	BANKSEL	r0x103B
	ADD	r0x103B, R0
;	op : LEFT_OP
	CLR	PSW, 0
	BANKSEL	r0x103A
	RLCR	r0x103A
	BANKSEL	r0x103D
	MOV	r0x103D, R0
;	op : +
	MOV	R0,# (__KF8_LIBi_buff_hit_ + 0)
	BANKSEL	r0x103D
	ADD	r0x103D, R0
;	op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x103D
	MOV	R1, r0x103D
	BANKSEL	__KF8_LIBi_buff_hit_
	LD	R0, [R1]
	BANKSEL	r0x103E
	MOV	r0x103E, R0
	INC	R1
	BANKSEL	__KF8_LIBi_buff_hit_
	LD	R0, [R1]
	BANKSEL	r0x103D
	MOV	r0x103D, R0
	BANKSEL	r0x103F
	MOV	r0x103F, R0
;	op : RIGHT_OP
;;103	MOVZ	R0, r0x103F
;;1	CLR	r0x1040
;	op : CAST
;;102	MOVZ	R0, r0x103D
;	op : =
;;101	MOVZ	R0, r0x103E
	BANKSEL	r0x103D
	MOVZ	R0, r0x103D
	BANKSEL	r0x103E
	MOV	r0x103E, R0
	BANKSEL	r0x103B
	MOV	R1, r0x103B
	BANKSEL	_Arr_erom_SW_
	ST	[R1], R0
;	op : LEFT_OP
;	.line	180; "../main.c"	Arr_erom_SW_[2*i+0]=(unsigned char)(_KF8_LIBi_buff_hit_[i]);
	CLR	PSW, 0
	BANKSEL	r0x103A
	RLCR	r0x103A
	BANKSEL	r0x103B
	MOV	r0x103B, R0
;	op : +
	MOV	R0,# (_Arr_erom_SW_ + 0)
	BANKSEL	r0x103B
	ADD	r0x103B, R0
;	op : LEFT_OP
	CLR	PSW, 0
	BANKSEL	r0x103A
	RLCR	r0x103A
	BANKSEL	r0x103D
	MOV	r0x103D, R0
;	op : +
	MOV	R0,# (__KF8_LIBi_buff_hit_ + 0)
	BANKSEL	r0x103D
	ADD	r0x103D, R0
;	op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x103D
	MOV	R1, r0x103D
	BANKSEL	__KF8_LIBi_buff_hit_
	LD	R0, [R1]
	BANKSEL	r0x103E
	MOV	r0x103E, R0
	INC	R1
	BANKSEL	__KF8_LIBi_buff_hit_
	LD	R0, [R1]
;;1	MOV	r0x1041, R0
;	op : CAST
;;100	MOVZ	R0, r0x103E
;	op : =
;;99	MOVZ	R0, r0x103D
	BANKSEL	r0x103E
	MOVZ	R0, r0x103E
	BANKSEL	r0x103D
	MOV	r0x103D, R0
	BANKSEL	r0x103B
	MOV	R1, r0x103B
	BANKSEL	_Arr_erom_SW_
	ST	[R1], R0
;	op : +
;	.line	175; "../main.c"	for(i=0;i<CHS_AMOUNT;i++)
	BANKSEL	r0x103A
	INC	r0x103A
;	op : GOTO
	JMP	_00067_DS_
;	op : LABEL
;	op : CALL
_00070_DS_
;	.line	182; "../main.c"	write_eep_tsw_();
	PAGESEL	_write_eep_tsw_
	CALL	_write_eep_tsw_
	PAGESEL	$
;	op : GOTO
	JMP	_00065_DS_
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _main



func._Water_Judge	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _Water_Judge	;Function start
; 2 exit points
;has an exit
;3 compiler assigned registers:
;   r0x1034
;   r0x1035
;   r0x1036
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_Water_Judge	;Function start
; 2 exit points
;	op : BITWISEAND
;	.line	87; "../main.c"	if(_KF8_LIBi_channel_flag_&0x0400)// CT10 上面盘
	BANKSEL	(__KF8_LIBi_channel_flag_ + 1)
	JB	(__KF8_LIBi_channel_flag_ + 1), 2
	JMP	_00031_DS_
;	op : =
;	.line	89; "../main.c"	waterbuf1=1;
	MOV	R0,# 0x01
	BANKSEL	r0x1034
	MOV	r0x1034, R0
;	op : GOTO
	JMP	_00032_DS_
;	op : LABEL
;	op : =
_00031_DS_
;	.line	93; "../main.c"	waterbuf1=0;
	BANKSEL	r0x1034
	CLR	r0x1034
;	op : LABEL
;	op : BITWISEAND
_00032_DS_
;	.line	96; "../main.c"	if(_KF8_LIBi_channel_flag_&0x0200) // CT9 中间盘
	BANKSEL	(__KF8_LIBi_channel_flag_ + 1)
	JB	(__KF8_LIBi_channel_flag_ + 1), 1
	JMP	_00034_DS_
;	op : =
;	.line	98; "../main.c"	waterbuf2=1;
	MOV	R0,# 0x01
	BANKSEL	r0x1035
	MOV	r0x1035, R0
;	op : GOTO
	JMP	_00035_DS_
;	op : LABEL
;	op : =
_00034_DS_
;	.line	102; "../main.c"	waterbuf2=0;
	BANKSEL	r0x1035
	CLR	r0x1035
;	op : LABEL
;	op : BITWISEAND
_00035_DS_
;	.line	105; "../main.c"	if(_KF8_LIBi_channel_flag_&0x0100) // CT8  下面盘
	BANKSEL	(__KF8_LIBi_channel_flag_ + 1)
	JB	(__KF8_LIBi_channel_flag_ + 1), 0
	JMP	_00037_DS_
;	op : =
;	.line	107; "../main.c"	waterbuf3=1;
	MOV	R0,# 0x01
	BANKSEL	r0x1036
	MOV	r0x1036, R0
;	op : GOTO
	JMP	_00038_DS_
;	op : LABEL
;	op : =
_00037_DS_
;	.line	111; "../main.c"	waterbuf3=0;
	BANKSEL	r0x1036
	CLR	r0x1036
;	op : LABEL
;	op : IFX
_00038_DS_
;	.line	115; "../main.c"	if(waterbuf1==0&&waterbuf2==0)				// 上中 均无水时无水
	MOV	R0,# 0x00
	BANKSEL	r0x1034
	ORL	R0, r0x1034
	JB	PSW, 2
	JMP	_00040_DS_
;	op : IFX
	MOV	R0,# 0x00
	BANKSEL	r0x1035
	ORL	R0, r0x1035
	JB	PSW, 2
	JMP	_00040_DS_
;	op : =
;	.line	117; "../main.c"	No_Water_Flag=1;
	MOV	R0,# 0x01
	BANKSEL	_No_Water_Flag
	MOV	_No_Water_Flag, R0
;	op : LABEL
;	op : EQ_OP
_00040_DS_
;	.line	120; "../main.c"	if(waterbuf1==1&&waterbuf2==1&&waterbuf3==1)//  上中下有水时有水
	BANKSEL	r0x1034
	MOVZ	R0, r0x1034
	XOR	R0,# 0x01
	JB	PSW, 2
	JMP	_00082_DS_
;	op : EQ_OP
	BANKSEL	r0x1035
	MOVZ	R0, r0x1035
	XOR	R0,# 0x01
	JB	PSW, 2
	JMP	_00082_DS_
;	op : EQ_OP
	BANKSEL	r0x1036
	MOVZ	R0, r0x1036
;	.line	122; "../main.c"	No_Water_Flag=0;
	XOR	R0,# 0x01
;	.line	125; "../main.c"	if(No_Water_Flag)
	JB	PSW, 2
	JMP	_00082_DS_
	BANKSEL	_No_Water_Flag
	CLR	_No_Water_Flag
_00082_DS_
	MOV	R0,# 0x00
	BANKSEL	_No_Water_Flag
	ORL	R0, _No_Water_Flag
	JNB	PSW, 2
	JMP	_00047_DS_
;	op : =
;	.line	127; "../main.c"	DEBUG_LED_OUT=1;
	SET	_P2_bits, 0
;	op : =
;	.line	128; "../main.c"	WATER_FLAG_OUT=1;
	SET	_P1_bits, 7
;	op : GOTO
	JMP	_00049_DS_
;	op : LABEL
;	op : =
_00047_DS_
;	.line	132; "../main.c"	DEBUG_LED_OUT=0;
	CLR	_P2_bits, 0
;	op : =
;	.line	133; "../main.c"	WATER_FLAG_OUT=0;
	CLR	_P1_bits, 7
;	op : LABEL
;	op : ENDFUNCTION
_00049_DS_
	CRET	
; exit point of _Water_Judge



func._delay_us	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _delay_us	;Function start
; 2 exit points
;has an exit
;5 compiler assigned registers:
;   r0x1042
;   STK00
;   r0x1043
;   r0x1044
;   r0x1045
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_delay_us	;Function start
; 2 exit points
;	op : RECEIVE
;	.line	53; "../main.c"	void delay_us(uint us_data)
	BANKSEL	r0x1042
	MOV	r0x1042, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x1043
	MOV	r0x1043, R0
;	op : =
;	op : LABEL
;	op : =
_00016_DS_
;	.line	55; "../main.c"	while(us_data--)
	BANKSEL	r0x1043
	MOVZ	R0, r0x1043
	BANKSEL	r0x1044
	MOV	r0x1044, R0
	BANKSEL	r0x1042
	MOVZ	R0, r0x1042
	BANKSEL	r0x1045
	MOV	r0x1045, R0
;	op : -
	MOV	R0,# 0xff
	BANKSEL	r0x1043
	ADD	r0x1043, R0
	JNB	PSW, 0
	JMP	_00083_DS_
	BANKSEL	r0x1042
	DEC	r0x1042
;	op : IFX
_00083_DS_
	BANKSEL	r0x1044
	MOVZ	R0, r0x1044
	BANKSEL	r0x1045
	ORL	R0, r0x1045
	JNB	PSW, 2
	JMP	_00019_DS_
;	op : INLINEASM
	CWDT 
;	op : GOTO
	JMP	_00016_DS_
;	op : LABEL
;	op : ENDFUNCTION
_00019_DS_
	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:
;   r0x1034
;   STK00
;   r0x1035
;   r0x1036
;   r0x1037
;   r0x1038
;   r0x1039
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_delay_ms	;Function start
; 2 exit points
;	op : RECEIVE
;	.line	34; "../main.c"	void delay_ms(uint ms_data)
	BANKSEL	r0x1034
	MOV	r0x1034, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x1035
	MOV	r0x1035, R0
;	op : =
;	op : LABEL
;	op : =
_00006_DS_
;	.line	37; "../main.c"	while(ms_data--)
	BANKSEL	r0x1035
	MOVZ	R0, r0x1035
	BANKSEL	r0x1036
	MOV	r0x1036, R0
	BANKSEL	r0x1034
	MOVZ	R0, r0x1034
	BANKSEL	r0x1037
	MOV	r0x1037, R0
;	op : -
	MOV	R0,# 0xff
	BANKSEL	r0x1035
	ADD	r0x1035, R0
	JNB	PSW, 0
	JMP	_00084_DS_
	BANKSEL	r0x1034
	DEC	r0x1034
;	op : IFX
_00084_DS_
	BANKSEL	r0x1036
	MOVZ	R0, r0x1036
	BANKSEL	r0x1037
	ORL	R0, r0x1037
	JNB	PSW, 2
	JMP	_00009_DS_
;	op : INLINEASM
	CWDT 
;	op : =
;	.line	41; "../main.c"	while(j--)
	MOV	R0,# 0xc8
	BANKSEL	r0x1036
	MOV	r0x1036, R0
	BANKSEL	r0x1037
	CLR	r0x1037
;	op : LABEL
;	op : =
_00003_DS_
	BANKSEL	r0x1036
	MOVZ	R0, r0x1036
	BANKSEL	r0x1038
	MOV	r0x1038, R0
	BANKSEL	r0x1037
	MOVZ	R0, r0x1037
	BANKSEL	r0x1039
	MOV	r0x1039, R0
;	op : -
	MOV	R0,# 0xff
	BANKSEL	r0x1036
	ADD	r0x1036, R0
	JNB	PSW, 0
	JMP	_00085_DS_
	BANKSEL	r0x1037
	DEC	r0x1037
;	op : IFX
_00085_DS_
	BANKSEL	r0x1038
	MOVZ	R0, r0x1038
	BANKSEL	r0x1039
	ORL	R0, r0x1039
	JNB	PSW, 2
	JMP	_00006_DS_
;	op : INLINEASM
	CWDT 
;	op : GOTO
	JMP	_00003_DS_
;	op : LABEL
;	op : ENDFUNCTION
_00009_DS_
	CRET	
; exit point of _delay_ms



func.__gsinit_startup	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  __gsinit_startup	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
__gsinit_startup	;Function start
; 2 exit points
;	op : LABEL
;	op : ENDFUNCTION
;	.line	27; "../main.c"	}
	CRET	
; exit point of __gsinit_startup


;	code size estimation:
;	  283+  136 =   419 instructions ( 1110 byte)


	.end
