;--------------------------------------------------------
; File Created by ChiponCC : aolisn inc.
; Version 3.0.4#6752 (Mar  1 2016 15:13:08) (MSVC)
; This file was generated Sat May 28 15:24:53 2016
;--------------------------------------------------------
; chipon port for the 16-bit core
;--------------------------------------------------------
;	.file	"../main.c"
	.radix dec
	.include "KF8F4158.inc"
;--------------------------------------------------------
; external declarations
;--------------------------------------------------------
	.extern	_PSW_bits
	.extern	_P0_bits
	.extern	_P2_bits
	.extern	_P1_bits
	.extern	_P3_bits
	.extern	_INTCTL_bits
	.extern	_EIF1_bits
	.extern	_EIF2_bits
	.extern	_T1CTL_bits
	.extern	_T2CTL0_bits
	.extern	_PWMCTL_bits
	.extern	_BANK_bits
	.extern	_ADSCANCTL_bits
	.extern	_C1CTL_bits
	.extern	_COUT_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	_P3LR_bits
	.extern	_TR3_bits
	.extern	_EIE3_bits
	.extern	_EIF3_bits
	.extern	_PWM5CTL0_bits
	.extern	_ADCINTCTL_bits
	.extern	_PWM5CTL1_bits
	.extern	_P5ASCTL0_bits
	.extern	_PSTRCTL0_bits
	.extern	_PUR1_bits
	.extern	_PUR2_bits
	.extern	_INTEDGCTL_bits
	.extern	_PWM5OC_bits
	.extern	_T2CTL1_bits
	.extern	_C2CTL_bits
	.extern	_P5ASCTL1_bits
	.extern	_PSTRCTL1_bits
	.extern	_PWM5CTL2_bits
	.extern	_PWM5PC_bits
	.extern	_SSCICTL0_bits
	.extern	_SSCICTL1_bits
	.extern	_SSCISTA_bits
	.extern	_SSCIMSK_bits
	.extern	_WDTPS_bits
	.extern	_MULCTL_bits
	.extern	_DIVCTL_bits
	.extern	_C1FILTCTL_bits
	.extern	_C1FILTPRE_bits
	.extern	_C2FILTCTL_bits
	.extern	_C2FILTPRE_bits
	.extern	_PWM5FC_bits
	.extern	_T4CTL_bits
	.extern	_T0
	.extern	_PCL
	.extern	_PSW
	.extern	_P0
	.extern	_P2
	.extern	_P1
	.extern	_P3
	.extern	_PCH
	.extern	_INTCTL
	.extern	_EIF1
	.extern	_EIF2
	.extern	_T1L
	.extern	_T1H
	.extern	_T1CTL
	.extern	_T2L
	.extern	_T2CTL0
	.extern	_PWM1L
	.extern	_PWM1H
	.extern	_PWMCTL
	.extern	_PP1
	.extern	_BANK
	.extern	_ADSCANCTL
	.extern	_C1CTL
	.extern	_COUT
	.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	_PWM2H
	.extern	_PUR0
	.extern	_IOCL
	.extern	_OSCCAL1
	.extern	_NVMDATAH
	.extern	_NVMDATAL
	.extern	_NVMADDRH
	.extern	_NVMADDRL
	.extern	_NVMCTL0
	.extern	_NVMCTL1
	.extern	_ADCDATA0L
	.extern	_ADCCTL1
	.extern	_T2CCR0H
	.extern	_T2H
	.extern	_PP5H
	.extern	_PWM5H0
	.extern	_PWM5H1
	.extern	_P0LR
	.extern	_P2LR
	.extern	_P1LR
	.extern	_P3LR
	.extern	_TR3
	.extern	_EIE3
	.extern	_EIF3
	.extern	_OSCCAL2
	.extern	_OSCCAL3
	.extern	_ADCDATA1H
	.extern	_ADCDATA1L
	.extern	_PP5L
	.extern	_T2CCR0L
	.extern	_PWM5L0
	.extern	_PWM5L1
	.extern	_PWM5CTL0
	.extern	_ADCINTCTL
	.extern	_ADCDATA2H
	.extern	_ADCDATA2L
	.extern	_PWM5CTL1
	.extern	_P5ASCTL0
	.extern	_PSTRCTL0
	.extern	_ADCDATA3H
	.extern	_PUR1
	.extern	_PUR2
	.extern	_INTEDGCTL
	.extern	_ADCDATA3L
	.extern	_PWM5L2
	.extern	_PWM5L3
	.extern	_PWM5OC
	.extern	_T2CTL1
	.extern	_C2CTL
	.extern	_P5ASCTL1
	.extern	_PSTRCTL1
	.extern	_PWM5CTL2
	.extern	_PWM5PC
	.extern	_PWM5H2
	.extern	_PWM5H3
	.extern	_SSCICTL0
	.extern	_SSCICTL1
	.extern	_SSCISTA
	.extern	_SSCIBUFR
	.extern	_SSCIMSK
	.extern	_WDTPS
	.extern	_MULAH
	.extern	_MULAL
	.extern	_MULBH
	.extern	_MULBL
	.extern	_MULCTL
	.extern	_MULRES3
	.extern	_MULRES2
	.extern	_MULRES1
	.extern	_MULRES0
	.extern	_DIVCTL
	.extern	_DIVAH
	.extern	_DIVAL
	.extern	_DIVB
	.extern	_DIVQH
	.extern	_DIVQL
	.extern	_DIVR
	.extern	_C1FILTCTL
	.extern	_C1FILTPRE
	.extern	_C2FILTCTL
	.extern	_C2FILTPRE
	.extern	_VRECAL2
	.extern	_VRECAL3
	.extern	_PWM5FC
	.extern	_T2CCR1L
	.extern	_T2CCR1H
	.extern	_T4L
	.extern	_T4H
	.extern	_T4REL
	.extern	_T4REH
	.extern	_T4CTL
	.extern	_RC32KCAL
	.extern	_startup
	.extern	__sdcc_gsinit_startup
;--------------------------------------------------------
; global declarations
;--------------------------------------------------------
	.global	_iic_data_fun
	.global	_delay_ms
	.global	_int_fun0
	.global	_int_fun1
	.global	_init_mcu
	.global	_main
	.global	_time
	.global	_time1
	.global	_Freq
	.global	_Temp
	.global	_ADDR
	.global	_DATA
	.global	_DATAcnt
	.global	_ON
	.global	_datatemp
	.global	_i
	.global	_j
	.global	_flag
	.global	_Erom_add
	.global	_Arr_erom
	.global	_Arr_erom2

	.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
_datatemp	.res	32

UD_main_1	.udata
_Erom_add	.res	2

UD_main_2	.udata
_Arr_erom	.res	32

UD_main_3	.udata
_Arr_erom2	.res	8

;--------------------------------------------------------
; absolute symbol definitions
;--------------------------------------------------------
;--------------------------------------------------------
; compiler-defined variables
;--------------------------------------------------------
UDL_main_0	.udata
r0x102F	.res	1
UDL_main_1	.udata
r0x102E	.res	1
UDL_main_2	.udata
r0x1030	.res	1
UDL_main_3	.udata
r0x1031	.res	1
UDL_main_4	.udata
r0x1032	.res	1
UDL_main_5	.udata
r0x1033	.res	1
UDL_main_6	.udata
r0x1034	.res	1
UDL_main_7	.udata
r0x102C	.res	1
UDL_main_8	.udata
r0x102D	.res	1
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------

ID_main_0	.idata
_time
	.db	0x00, 0x00


ID_main_1	.idata
_time1
	.db	0x00, 0x00


ID_main_2	.idata
_Freq
	.db	0x00, 0x00


ID_main_3	.idata
_Temp
	.db	0x00


ID_main_4	.idata
_ADDR
	.db	0x00


ID_main_5	.idata
_DATA
	.db	0x00


ID_main_6	.idata
_DATAcnt
	.db	0x00


ID_main_7	.idata
_ON
	.db	0x00


ID_main_8	.idata
_i
	.db	0x01


ID_main_9	.idata
_j
	.db	0x01


ID_main_10	.idata
_flag
	.db	0x00

;--------------------------------------------------------
; 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	__sdcc_gsinit_startup
	CALL	__sdcc_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
;1 compiler assigned register :
;   r0x1034
;; 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	66; "../main.c"	if(T0IF)
	BANKSEL	_INTCTL_bits
	JB	_INTCTL_bits, 2
	JMP	_00021_DS_
;	op : =
;	.line	68; "../main.c"	T0IF = 0;
	BANKSEL	_INTCTL_bits
	CLR	_INTCTL_bits, 2
;	op : =
;	.line	69; "../main.c"	T0 = 0X9C;
	MOV	R0,# 0x9c
	BANKSEL	_T0
	MOV	_T0, R0
;	op : +
;	.line	70; "../main.c"	time++;
	BANKSEL	_time
	INC	_time
	JB	PSW, 2
	JMP	_00095_DS_
	BANKSEL	_time
	INC	(_time + 1)
;	op : +
_00095_DS_
;	.line	71; "../main.c"	time1++;
	BANKSEL	_time1
	INC	_time1
	JB	PSW, 2
	JMP	_00096_DS_
	BANKSEL	_time1
	INC	(_time1 + 1)
;	op : >
_00096_DS_
;	.line	72; "../main.c"	if(time>Freq)
	BANKSEL	_time
	MOVZ	R0, (_time + 1)
	BANKSEL	_Freq
	SUB	R0, (_Freq + 1)
;comparing bytes at offset 1
	JB	PSW, 2
	JMP	_00039_DS_
	BANKSEL	_time
	MOVZ	R0, _time
	BANKSEL	_Freq
	SUB	R0, _Freq
_00039_DS_
	JNB	PSW, 0
	JMP	_00017_DS_
;	op : =
;	.line	74; "../main.c"	time=0;
	BANKSEL	_time
	CLR	_time
	BANKSEL	_time
	CLR	(_time + 1)
;	op : IFX
;	.line	75; "../main.c"	if(ON)LED4=!LED4;
	MOV	R0,# 0x00
	BANKSEL	_ON
	ORL	R0, _ON
	JNB	PSW, 2
	JMP	_00017_DS_
;	op : GET_VALUE_AT_ADDRESS
;	op : !
;	op : =
	BANKSEL	_P2LR_bits
	JB	_P2LR_bits, 0
	JMP	_00040_DS_
	BANKSEL	_P2LR_bits
	CLR	_P2LR_bits, 0
	JMP	_00017_DS_
_00040_DS_
	BANKSEL	_P2LR_bits
	SET	_P2LR_bits, 0
;	op : LABEL
;	op : >
;swapping arguments (AOP_TYPEs 1/3)
;unsigned compare: left >= lit(0xC9=201), size=2
_00017_DS_
;	.line	77; "../main.c"	if(time1>200)
	MOV	R0,# 0x00
	BANKSEL	_time1
	SUB	R0, (_time1 + 1)
;comparing bytes at offset 1
	JB	PSW, 2
	JMP	_00042_DS_
	MOV	R0,# 0xc9
	BANKSEL	_time1
	SUB	R0, _time1
_00042_DS_
	JB	PSW, 0
	JMP	_00021_DS_
;	op : =
;	.line	79; "../main.c"	time1=0;
	BANKSEL	_time1
	CLR	_time1
	BANKSEL	_time1
	CLR	(_time1 + 1)
;	op : GET_VALUE_AT_ADDRESS
;	op : !
;	op : =
;	.line	80; "../main.c"	LED3=!LED3;
	BANKSEL	_P2LR_bits
	JB	_P2LR_bits, 1
	JMP	_00043_DS_
	BANKSEL	_P2LR_bits
	CLR	_P2LR_bits, 1
	JMP	_00021_DS_
_00043_DS_
	BANKSEL	_P2LR_bits
	SET	_P2LR_bits, 1
;	op : LABEL
;	op : GET_VALUE_AT_ADDRESS
_00021_DS_
;	.line	84; "../main.c"	if(SSCIIF)
	BANKSEL	_EIF2_bits
	JB	_EIF2_bits, 0
	JMP	_00030_DS_
;	op : =
;	.line	86; "../main.c"	SSCIIF=0;
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 0
;	op : GET_VALUE_AT_ADDRESS
;	.line	96; "../main.c"	if(SSCIRW==0)				//从模式接收数据
	BANKSEL	_SSCISTA_bits
	JNB	_SSCISTA_bits, 2
	JMP	_00026_DS_
;	op : =
;	.line	98; "../main.c"	Temp=SSCIBUFR;
	BANKSEL	_SSCIBUFR
	MOVZ	R0, _SSCIBUFR
	BANKSEL	_Temp
	MOV	_Temp, R0
;	op : GET_VALUE_AT_ADDRESS
;	.line	99; "../main.c"	if(SSCIDA)				//接收到的是数据
	BANKSEL	_SSCISTA_bits
	JB	_SSCISTA_bits, 5
	JMP	_00023_DS_
;	op : =
;	.line	101; "../main.c"	DATA=Temp;
	BANKSEL	_Temp
	MOVZ	R0, _Temp
	BANKSEL	_DATA
	MOV	_DATA, R0
;	op : +
;	.line	102; "../main.c"	datatemp[i]=DATA;
	BANKSEL	_i
	MOV	R0, _i
	ADD	R0,# (_datatemp + 0)
	BANKSEL	r0x1034
	MOV	r0x1034, R0
;	op : =
	BANKSEL	_DATA
	MOVZ	R0, _DATA
	BANKSEL	r0x1034
	MOV	R1, r0x1034
	BANKSEL	_datatemp
	ST	[R1], R0
;	op : +
;	.line	103; "../main.c"	i++;
	BANKSEL	_i
	INC	_i
;	op : GOTO
	JMP	_00030_DS_
;	op : LABEL
;	op : =
_00023_DS_
;	.line	108; "../main.c"	ADDR=Temp;
	BANKSEL	_Temp
	MOVZ	R0, _Temp
	BANKSEL	_ADDR
	MOV	_ADDR, R0
;	op : =
;	.line	109; "../main.c"	i=1;
	MOV	R0,# 0x01
	BANKSEL	_i
	MOV	_i, R0
;	op : =
;	.line	110; "../main.c"	j=1;
	MOV	R0,# 0x01
	BANKSEL	_j
	MOV	_j, R0
;	op : GOTO
	JMP	_00030_DS_
;	op : LABEL
;	op : +
_00026_DS_
;	.line	115; "../main.c"	SSCIBUFR=datatemp[j];
	BANKSEL	_j
	MOV	R0, _j
	ADD	R0,# (_datatemp + 0)
	BANKSEL	r0x1034
	MOV	r0x1034, R0
;	op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x1034
	MOV	R1, r0x1034
	BANKSEL	_datatemp
	LD	R0, [R1]
	BANKSEL	_SSCIBUFR
	MOV	_SSCIBUFR, R0
;	op : +
;	.line	116; "../main.c"	j++;
	BANKSEL	_j
	INC	_j
;	op : =
;	.line	117; "../main.c"	SSCICKP=1;
	BANKSEL	_SSCICTL0_bits
	SET	_SSCICTL0_bits, 4
;	op : LABEL
;	op : ENDFUNCTION
_00030_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
_00045_DS_
;	.line	126; "../main.c"	}
	IRET	



func._main	.code
;***
;  PostBlock Stats: dbName = M
;***
;entry:  _main	;Function start
; 2 exit points
;has an exit
;functions called:
;   _init_mcu
;   _iic_data_fun
;   _init_mcu
;   _iic_data_fun
;1 compiler assigned register :
;   r0x102D
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_main	;Function start
; 2 exit points
;	op : CALL
;	.line	194; "../main.c"	init_mcu();
	PAGESEL	_init_mcu
	CALL	_init_mcu
	PAGESEL	$
;	op : =
;	.line	195; "../main.c"	LED4=1;
	BANKSEL	_P2LR_bits
	SET	_P2LR_bits, 0
;	op : =
;	.line	196; "../main.c"	for(i = 0; i < 32; i++)              //给数组2进行赋值，
	BANKSEL	_i
	CLR	_i
;	op : LABEL
;	op : <
;unsigned compare: left < lit(0x20=32), size=1
_00083_DS_
	MOV	R0,# 0x20
	BANKSEL	_i
	SUB	R0, _i
;comparing bytes at offset 0
	JNB	PSW, 0
	JMP	_00081_DS_
;	op : +
;	.line	198; "../main.c"	datatemp[i] = 0xff;
	BANKSEL	_i
	MOV	R0, _i
	ADD	R0,# (_datatemp + 0)
	BANKSEL	r0x102D
	MOV	r0x102D, R0
;	op : =
	MOV	R0,# 0xff
	BANKSEL	r0x102D
	MOV	R1, r0x102D
	BANKSEL	_datatemp
	ST	[R1], R0
;	op : +
;	.line	196; "../main.c"	for(i = 0; i < 32; i++)              //给数组2进行赋值，
	BANKSEL	_i
	INC	_i
;	op : GOTO
	JMP	_00083_DS_
;	op : LABEL
;	op : SEND
;	op : CALL
_00081_DS_
;	.line	202; "../main.c"	iic_data_fun(DATA);
	BANKSEL	_DATA
	MOVZ	R0, _DATA
	PAGESEL	_iic_data_fun
	CALL	_iic_data_fun
	PAGESEL	$
;	op : GOTO
	JMP	_00081_DS_
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _main



func._init_mcu	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _init_mcu	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_init_mcu	;Function start
; 2 exit points
;	op : =
;	.line	147; "../main.c"	OSCCTL = 0x70;           //32M
	MOV	R0,# 0x70
	BANKSEL	_OSCCTL
	MOV	_OSCCTL, R0
;	op : INLINEASM
	NOP 
;	op : INLINEASM
	NOP 
;	op : =
;	.line	152; "../main.c"	TR0 = 0X06;              //0000 0110
	MOV	R0,# 0x06
	BANKSEL	_TR0
	MOV	_TR0, R0
;	op : =
;	.line	153; "../main.c"	TR1 = 0X03;              //0000 0011 P10为SCK，P11为SDA
	MOV	R0,# 0x03
	BANKSEL	_TR1
	MOV	_TR1, R0
;	op : =
;	.line	154; "../main.c"	TR2 = 0X00;              //0000 0000
	BANKSEL	_TR2
	CLR	_TR2
;	op : =
;	.line	155; "../main.c"	TR3 = 0X00;				 //0000 0000
	BANKSEL	_TR3
	CLR	_TR3
;	op : =
;	.line	157; "../main.c"	P0LR = 0X38;             //0011 1000
	MOV	R0,# 0x38
	BANKSEL	_P0LR
	MOV	_P0LR, R0
;	op : =
;	.line	158; "../main.c"	P1LR = 0X03;             //0000 0000
	MOV	R0,# 0x03
	BANKSEL	_P1LR
	MOV	_P1LR, R0
;	op : =
;	.line	159; "../main.c"	P2LR = 0x33;             //0011 0001
	MOV	R0,# 0x33
	BANKSEL	_P2LR
	MOV	_P2LR, R0
;	op : =
;	.line	160; "../main.c"	P3LR = 0X50;			 //0101 0000
	MOV	R0,# 0x50
	BANKSEL	_P3LR
	MOV	_P3LR, R0
;	op : =
;	.line	163; "../main.c"	SSCIEN=0;				//关闭I2C模块，初始化完之后再打开
	BANKSEL	_SSCICTL0_bits
	CLR	_SSCICTL0_bits, 5
;	op : =
;	.line	165; "../main.c"	SSCIADD=IICADDL;
	MOV	R0,# 0x5a
	BANKSEL	_SSCIMSK
	MOV	_SSCIMSK, R0
;	op : =
;	.line	170; "../main.c"	SSCICTL0=0X06;			//7位地址模式
	MOV	R0,# 0x06
	BANKSEL	_SSCICTL0
	MOV	_SSCICTL0, R0
;	op : =
;	.line	172; "../main.c"	SSCICTL1=0X00;
	BANKSEL	_SSCICTL1
	CLR	_SSCICTL1
;	op : =
;	.line	173; "../main.c"	SSCISTA=0X00;
	BANKSEL	_SSCISTA
	CLR	_SSCISTA
;	op : =
;	.line	175; "../main.c"	SSCIEN=1;
	BANKSEL	_SSCICTL0_bits
	SET	_SSCICTL0_bits, 5
;	op : =
;	.line	177; "../main.c"	SSCIIE=1;				//打开I2C中断
	BANKSEL	_EIE2_bits
	SET	_EIE2_bits, 0
;	op : =
;	.line	178; "../main.c"	SSCIIF=0;				//清零I2C中断标志
	BANKSEL	_EIF2_bits
	CLR	_EIF2_bits, 0
;	op : =
;	.line	181; "../main.c"	OPTR = 0X83;     //16分频，4us计数1，
	MOV	R0,# 0x83
	BANKSEL	_OPTR
	MOV	_OPTR, R0
;	op : =
;	.line	182; "../main.c"	T0 = 0X06;      //1ms定时
	MOV	R0,# 0x06
	BANKSEL	_T0
	MOV	_T0, R0
;	op : =
;	.line	183; "../main.c"	T0IE = 1;
	BANKSEL	_INTCTL_bits
	SET	_INTCTL_bits, 5
;	op : =
;	.line	184; "../main.c"	T0IF = 0;
	BANKSEL	_INTCTL_bits
	CLR	_INTCTL_bits, 2
;	op : =
;	.line	187; "../main.c"	AIE = 1;		//打开总中断
	BANKSEL	_INTCTL_bits
	SET	_INTCTL_bits, 7
;	op : =
;	.line	188; "../main.c"	PUIE=1;			//使能所有未屏蔽的外设中断
	BANKSEL	_INTCTL_bits
	SET	_INTCTL_bits, 6
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _init_mcu



func._iic_data_fun	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _iic_data_fun	;Function start
; 2 exit points
;has an exit
;1 compiler assigned register :
;   r0x102C
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_iic_data_fun	;Function start
; 2 exit points
;	op : RECEIVE
;	.line	128; "../main.c"	void iic_data_fun(uchar control_data)
	BANKSEL	r0x102C
	MOV	r0x102C, R0
;	op : EQ_OP
;	.line	130; "../main.c"	switch(control_data)
	BANKSEL	r0x102C
	MOVZ	R0, r0x102C
	XOR	R0,# 0x55
	JNB	PSW, 2
	JMP	_00055_DS_
	BANKSEL	r0x102C
	MOVZ	R0, r0x102C
	XOR	R0,# 0xaa
	JNB	PSW, 2
	JMP	_00054_DS_
	BANKSEL	r0x102C
	MOVZ	R0, r0x102C
	XOR	R0,# 0xe1
	JNB	PSW, 2
	JMP	_00047_DS_
	BANKSEL	r0x102C
	MOVZ	R0, r0x102C
	XOR	R0,# 0xe2
	JNB	PSW, 2
	JMP	_00048_DS_
	BANKSEL	r0x102C
	MOVZ	R0, r0x102C
	XOR	R0,# 0xe3
	JNB	PSW, 2
	JMP	_00049_DS_
	BANKSEL	r0x102C
	MOVZ	R0, r0x102C
	XOR	R0,# 0xe4
	JNB	PSW, 2
	JMP	_00050_DS_
	BANKSEL	r0x102C
	MOVZ	R0, r0x102C
	XOR	R0,# 0xe5
	JNB	PSW, 2
	JMP	_00051_DS_
	BANKSEL	r0x102C
	MOVZ	R0, r0x102C
	XOR	R0,# 0xe6
	JNB	PSW, 2
	JMP	_00052_DS_
	BANKSEL	r0x102C
	MOVZ	R0, r0x102C
	XOR	R0,# 0xe7
	JNB	PSW, 2
	JMP	_00053_DS_
	JMP	_00058_DS_
_00047_DS_
;	.line	132; "../main.c"	case 0XE1:Freq=100;break;
	MOV	R0,# 0x64
	BANKSEL	_Freq
	MOV	_Freq, R0
	BANKSEL	_Freq
	CLR	(_Freq + 1)
;	op : GOTO
	JMP	_00058_DS_
;	op : LABEL
;	op : =
_00048_DS_
;	.line	133; "../main.c"	case 0XE2:Freq=200;break;
	MOV	R0,# 0xc8
	BANKSEL	_Freq
	MOV	_Freq, R0
	BANKSEL	_Freq
	CLR	(_Freq + 1)
;	op : GOTO
	JMP	_00058_DS_
;	op : LABEL
;	op : =
_00049_DS_
;	.line	134; "../main.c"	case 0XE3:Freq=300;break;
	MOV	R0,# 0x2c
	BANKSEL	_Freq
	MOV	_Freq, R0
	MOV	R0,# 0x01
	BANKSEL	_Freq
	MOV	(_Freq + 1), R0
;	op : GOTO
	JMP	_00058_DS_
;	op : LABEL
;	op : =
_00050_DS_
;	.line	135; "../main.c"	case 0XE4:Freq=400;break;
	MOV	R0,# 0x90
	BANKSEL	_Freq
	MOV	_Freq, R0
	MOV	R0,# 0x01
	BANKSEL	_Freq
	MOV	(_Freq + 1), R0
;	op : GOTO
	JMP	_00058_DS_
;	op : LABEL
;	op : =
_00051_DS_
;	.line	136; "../main.c"	case 0XE5:Freq=500;break;
	MOV	R0,# 0xf4
	BANKSEL	_Freq
	MOV	_Freq, R0
	MOV	R0,# 0x01
	BANKSEL	_Freq
	MOV	(_Freq + 1), R0
;	op : GOTO
	JMP	_00058_DS_
;	op : LABEL
;	op : =
_00052_DS_
;	.line	137; "../main.c"	case 0XE6:Freq=600;break;
	MOV	R0,# 0x58
	BANKSEL	_Freq
	MOV	_Freq, R0
	MOV	R0,# 0x02
	BANKSEL	_Freq
	MOV	(_Freq + 1), R0
;	op : GOTO
	JMP	_00058_DS_
;	op : LABEL
;	op : =
_00053_DS_
;	.line	138; "../main.c"	case 0XE7:Freq=700;break;
	MOV	R0,# 0xbc
	BANKSEL	_Freq
	MOV	_Freq, R0
	MOV	R0,# 0x02
	BANKSEL	_Freq
	MOV	(_Freq + 1), R0
;	op : GOTO
	JMP	_00058_DS_
;	op : LABEL
;	op : =
_00054_DS_
;	.line	139; "../main.c"	case 0XAA:ON=0;LED4=1;break;
	BANKSEL	_ON
	CLR	_ON
;	op : =
	BANKSEL	_P2LR_bits
	SET	_P2LR_bits, 0
;	op : GOTO
	JMP	_00058_DS_
;	op : LABEL
;	op : =
_00055_DS_
;	.line	140; "../main.c"	case 0X55:ON=1;Freq=0;break;
	MOV	R0,# 0x01
	BANKSEL	_ON
	MOV	_ON, R0
;	op : =
	BANKSEL	_Freq
	CLR	_Freq
	BANKSEL	_Freq
	CLR	(_Freq + 1)
;	op : LABEL
;	op : ENDFUNCTION
_00058_DS_
;	.line	142; "../main.c"	}
	CRET	
; exit point of _iic_data_fun



func._delay_ms	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _delay_ms	;Function start
; 2 exit points
;has an exit
;7 compiler assigned registers:
;   r0x102E
;   STK00
;   r0x102F
;   r0x1030
;   r0x1031
;   r0x1032
;   r0x1033
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_delay_ms	;Function start
; 2 exit points
;	op : RECEIVE
;	.line	50; "../main.c"	void delay_ms(uint ms_data)
	BANKSEL	r0x102E
	MOV	r0x102E, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x102F
	MOV	r0x102F, R0
;	op : =
;	op : LABEL
;	op : =
_00004_DS_
;	.line	53; "../main.c"	while(ms_data--)
	BANKSEL	r0x102F
	MOVZ	R0, r0x102F
	BANKSEL	r0x1030
	MOV	r0x1030, R0
	BANKSEL	r0x102E
	MOVZ	R0, r0x102E
	BANKSEL	r0x1031
	MOV	r0x1031, R0
;	op : -
	MOV	R0,# 0xff
	BANKSEL	r0x102F
	ADD	r0x102F, R0
	JNB	PSW, 0
	JMP	_00093_DS_
	BANKSEL	r0x102E
	DEC	r0x102E
;	op : IFX
_00093_DS_
	BANKSEL	r0x1030
	MOVZ	R0, r0x1030
	BANKSEL	r0x1031
	ORL	R0, r0x1031
	JNB	PSW, 2
	JMP	_00007_DS_
;	op : =
;	.line	56; "../main.c"	while(j--)
	MOV	R0,# 0x7c
	BANKSEL	r0x1030
	MOV	r0x1030, R0
	BANKSEL	r0x1031
	CLR	r0x1031
;	op : LABEL
;	op : =
_00001_DS_
	BANKSEL	r0x1030
	MOVZ	R0, r0x1030
	BANKSEL	r0x1032
	MOV	r0x1032, R0
	BANKSEL	r0x1031
	MOVZ	R0, r0x1031
	BANKSEL	r0x1033
	MOV	r0x1033, R0
;	op : -
	MOV	R0,# 0xff
	BANKSEL	r0x1030
	ADD	r0x1030, R0
	JNB	PSW, 0
	JMP	_00094_DS_
	BANKSEL	r0x1031
	DEC	r0x1031
;	op : IFX
_00094_DS_
	BANKSEL	r0x1032
	MOVZ	R0, r0x1032
	BANKSEL	r0x1033
	ORL	R0, r0x1033
	JNB	PSW, 2
	JMP	_00004_DS_
;	op : GOTO
	JMP	_00001_DS_
;	op : LABEL
;	op : ENDFUNCTION
_00007_DS_
	CRET	
; exit point of _delay_ms


;	code size estimation:
;	  262+  135 =   397 instructions ( 1064 byte)


	.end
