; Asm codes generated by Shanghai Haier C Compiler
; HRCO, Ver: 1.0,0117

#INCLUDE       	<ES7P169C.INC>
#INCLUDE       	<OPERATION.INC>
	PUBLIC         	_send_data
	PUBLIC         	_rece_data
	PUBLIC         	_send_i
	PUBLIC         	_rece_i
	PUBLIC         	_counter
	PUBLIC         	_RAMclear
	PUBLIC         	_GPIOInit
	PUBLIC         	_isr
	PUBLIC         	_main
_isr_#T20443_7	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20450_7	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20461_8	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20468_8	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20493_9	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20494_9	EQU            	_isrDATA + 0X2		; Bank 0
_isr_#T20537_8	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20544_8	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20571_10	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20572_10	EQU            	_isrDATA + 0X2		; Bank 0
_isr_#T20613_8	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20620_8	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20637_8	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20644_8	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20716_8	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20723_8	EQU            	_isrDATA + 0X0		; Bank 0
#TMP	EQU            	?_TMP+ 0X0		; Bank 0
?_TMP_RET	EQU            	?_TMP		; Bank 0
_I2CEN_0#sh	EQU            	0X6D0		; Bank 0
_I2CRST_0#sh	EQU            	0X6D1		; Bank 0
_I2CSRIE_0#sh	EQU            	0X6F0		; Bank 0
_I2CSPIE_0#sh	EQU            	0X6F1		; Bank 0
_I2CTBIE_0#sh	EQU            	0X6F2		; Bank 0
_I2CRBIE_0#sh	EQU            	0X6F3		; Bank 0
_I2CNAIE_0#sh	EQU            	0X6F6		; Bank 0
_I2CSRIF_0#sh	EQU            	0X6F8		; Bank 0
_I2CSPIF_0#sh	EQU            	0X6F9		; Bank 0
_I2CTBIF_0#sh	EQU            	0X6FA		; Bank 0
_I2CRBIF_0#sh	EQU            	0X6FB		; Bank 0
_I2CNAIF_0#sh	EQU            	0X6FE		; Bank 0
_I2CC_0#sh	EQU            	0XDA		; Bank 0
_I2CSA_0#sh	EQU            	0XDB		; Bank 0
_I2CTB_0#sh	EQU            	0XDC		; Bank 0
_I2CRB_0#sh	EQU            	0XDD		; Bank 0
_I2CIEC_0#sh	EQU            	0XDE		; Bank 0
_I2CIFC_0#sh	EQU            	0XDF		; Bank 0
_MULA_0#sh	EQU            	(MULA - 0X6080) % 0X40 + 0xC0		; Bank 0
_MULB_0#sh	EQU            	(MULB - 0X6080) % 0X40 + 0xC0		; Bank 0
_MULL_0#sh	EQU            	(MULL - 0X6080) % 0X40 + 0xC0		; Bank 0
_MULH_0#sh	EQU            	(MULH - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVEL_0#sh	EQU            	(DIVEL - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVEM_0#sh	EQU            	(DIVEM - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVSL_0#sh	EQU            	(DIVSL - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVSH_0#sh	EQU            	(DIVSH - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVQL_0#sh	EQU            	(DIVQL - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVQM_0#sh	EQU            	(DIVQM - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVRL_0#sh	EQU            	(DIVRL - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVRH_0#sh	EQU            	(DIVRH - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVC_0#sh	EQU            	(DIVC - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVEU_0#sh	EQU            	(DIVEU - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVEH_0#sh	EQU            	(DIVEH - 0X6080) % 0X40 + 0xC0		; Bank 0
	_DESC          	GPIOInit,0X0,0X0
GPIOInit#	CSEG           
_GPIOInit
; /*********************************************************
; *Copyright (C), 2020, Shanghai Eastsoft Microelectronics Co., Ltd
; *文件名:  iic_slave.c
; *作  者:  AE Team
; *版  本:  v1.0，编译于iDesigner(v4.2.3.166) + 工具链HRCC(v1.2.0.106)
; *日  期:  2020/07/09
; *描  述:  I2C从机模式演示
;           PB1：SCL
;           PB0：SDA
;           I2C从机通信，数据收发，发送数据存在数组send_data，接收数据存在数组rece_data。
; *备  注:  本软件仅供学习和演示使用，对用户直接引用代码所带来的风险或后果不承担任何法律责任。
; **********************************************************/
; #include <hic.h>
; #define CLRWDT()   {__Asm CWDT;}        //宏定义清狗指令
; #define SLAVE_ADDR 0x2D
; typedef unsigned char uchar;
; typedef unsigned int uint;
; uchar send_data[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
; uchar rece_data[8] = {0};
; uchar send_i = 0;
; uchar rece_i = 0;
; uchar counter = 0;
; /******************************************************
; 函数名：void RAMclear(void)
; 描  述：RAM区数据清零，RAM区地址0x0000~0x03FF
; 输入值：无
; 输出值：无
; 返回值：无
; *******************************************************/
; void RAMclear(void)
; {
;     for (IAAH=0; IAAH<=0x03; IAAH++)
;     {
;         for (IAAL=0; IAAL<0xFF; IAAL++)
;             IAD = 0x00;
;         IAD = 0x00;
;     }
; }
; /******************************************************
; 函数名：void GPIOInit(void)
; 描  述：首先初始化所有未用到的IO口为输出低电平
; 输入值：无
; 输出值：无
; 返回值：无
; *******************************************************/
; void GPIOInit(void)
; {
#line 53	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     ANSL = 0xFF;        //选择对应端口为数字IO功能
	CLR            	BKSR
;   53:(    ASGN_1,        255 ,            ,      ANSL)

; ITemplate_ASGN1_4_R
	MOVI           	0xff
	MOVA           	_ANSL_0
#line 54	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 	ANSH = 0xFF;
;   54:(    ASGN_1,        255 ,            ,      ANSH)

; ITemplate_ASGN1_4_R
	MOVI           	0xff
	MOVA           	_ANSH_0
#line 55	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     PAT = 0x00;         //所有IO设为输出低电平
;   55:(    ASGN_1,          0 ,            ,       PAT)

; ITemplate_CLR1_4_TMP
	CLR            	_PAT_0
#line 56	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     PBT = 0x00;
;   56:(    ASGN_1,          0 ,            ,       PBT)

; ITemplate_CLR1_4_TMP
	CLR            	_PBT_0
#line 57	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     PCT = 0x00;
;   57:(    ASGN_1,          0 ,            ,       PCT)

; ITemplate_CLR1_4_TMP
	CLR            	_PCT_0
#line 58	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     PA = 0x00;
;   58:(    ASGN_1,          0 ,            ,        PA)

; ITemplate_CLR1_4_TMP
	CLR            	_PA_0
#line 59	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     PB = 0x00;
;   59:(    ASGN_1,          0 ,            ,        PB)

; ITemplate_CLR1_4_TMP
	CLR            	_PB_0
#line 60	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     PC = 0x00;
;   60:(    ASGN_1,          0 ,            ,        PC)

; ITemplate_CLR1_4_TMP
	CLR            	_PC_0
#line 61	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     PBT0 = 1;       //SDA端口设为输入
;   61:(    ASGN_0,          1 ,            ,      PBT0)

; ITemplate_SET_0_TMP
	BSS            	(_PBT0_0)/8,	(_PBT0_0)%8
#line 62	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     PBT1 = 1;       //SCL端口设为输入
;   62:(    ASGN_0,          1 ,            ,      PBT1)

; ITemplate_SET_0_TMP
	BSS            	(_PBT1_0)/8,	(_PBT1_0)%8
#line 63	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; }
;   63:(       RET,            ,            ,          )

; ITemplate_RET
	RET            			; Bank 0		; ShBank 0
	_DESC          	##isr,0X1,0X0

SECTION1isr	UNINTIAL       	0		; Bank 0
	ORG            	0X93		; Bank 0
_isrDATA	RSEG           	0X4		; Bank 0
; interrupt fun entry
	PUBLIC         	SAVED_TMP
SECTION0_INT_SAVED_00	UNINTIAL       		; Bank 0
SAVED_FSR	RSEG           	0x3
SECTION0_INT_SAVED_3	UNINTIAL       		; Bank 0
SAVED_TMP	RSEG           	0x1
INT_ENTRY	CSEG           	0x04
; ITemplate_InterruptHead
_INT_ENTRY
	PUSH           	
	CLR            	PCRH
	CLR            	BKSR
	MOV            	IAAL,	0x0
	MOVA           	(SAVED_FSR) & 0X7F		; Bank 0
	MOV            	IAAH,	0x0
	MOVA           	(SAVED_FSR+0x1) & 0X7F		; Bank 0
	MOV            	(CSEG_PTR) & 0X7F,	0x0		; Bank 0
	MOVA           	(CSEG_PTR+0x2) & 0X7F		; Bank 0
	MOV            	(CSEG_PTR+0x1) & 0X7F,	0x0		; Bank 0
	MOVA           	(CSEG_PTR+0x3) & 0X7F		; Bank 0
	MOV            	(MUL_TEMP) & 0X7F,	0x0		; Bank 0
	MOVA           	(MUL_TEMP+0x2) & 0X7F		; Bank 0
	MOV            	(MUL_TEMP+0x1) & 0X7F,	0x0		; Bank 0
	MOVA           	(MUL_TEMP+0x3) & 0X7F		; Bank 0
isr#	CSEG           
_isr
; /**********************************************
; 函数名：void isr(void) interrupt 
; 描  述：中断函数
; 输入值：无
; 输出值：无
; 返回值：无
; **********************************************/
; void isr(void) interrupt
; {
#line 74	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     if(I2CIE==1 && I2CIF==1)
;   74:(    CVB_SC,      I2CIE ,            ,   #T20443)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_I2CIE_0)/8,	(_I2CIE_0)%8
	MOVI           	0x1
	SECTION        	0x1
	MOVA           	(_isr_#T20443_7) & 0X7F		; Bank 1
;   74:(    JNEQ_1,          1 ,    #T20443 ,   #L20437)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20443_7) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20437
;   74:(    CVB_SC,      I2CIF ,            ,   #T20450)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_I2CIF_0)/8,	(_I2CIF_0)%8
	MOVI           	0x1
	MOVA           	(_isr_#T20450_7) & 0X7F		; Bank 1
;   74:(    JNEQ_1,          1 ,    #T20450 ,   #L20437)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20450_7) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20437
;     {
#line 76	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;         if(I2CRBIE==1 && I2CRBIF==1)      //接收中断
;   76:(    CVB_SC,    I2CRBIE ,            ,   #T20461)

; ITemplate_CVB_UC
	MOVI           	0x0
	BSS            	BKSR,	0x4
	JBC            	(_I2CRBIE_0#sh)/8,	(_I2CRBIE_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20461_8) & 0X7F		; Bank 1
;   76:(    JNEQ_1,          1 ,    #T20461 ,   #L20455)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20461_8) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20455
;   76:(    CVB_SC,    I2CRBIF ,            ,   #T20468)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_I2CRBIF_0#sh)/8,	(_I2CRBIF_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20468_8) & 0X7F		; Bank 1
;   76:(    JNEQ_1,          1 ,    #T20468 ,   #L20455)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20468_8) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20455
;         {
#line 78	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			I2CRBIF = 0;
;   78:(    ASGN_0,          0 ,            ,   I2CRBIF)

; ITemplate_CLR_0_TMP
	BCC            	(_I2CRBIF_0#sh)/8,	(_I2CRBIF_0#sh)%8		; ShBank 1
#line 79	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;             rece_data[rece_i] = I2CRB;    //读取数据
;   79:(   CVUC_UI,     rece_i ,            ,   #T20493)

; ITemplate_CVTMS_U
	CLR            	(_isr_#T20493_9+0x1) & 0X7F		; Bank 1
	MOV            	(_rece_i) & 0X7F,	0x0		; Bank 1
	MOVA           	(_isr_#T20493_9) & 0X7F		; Bank 1
;   79:(     ADD_2,    #T20493 , (rece_data.0) ,   #T20494)

; ITemplate_ADD1_4
	MOV            	(_isr_#T20493_9) & 0X7F,	0x0		; Bank 1
	ADDI           	_rece_data
	MOVA           	(_isr_#T20494_9) & 0X7F		; Bank 1
	MOV            	(_isr_#T20493_9+0x1) & 0X7F,	0x0		; Bank 1
	ADDCI          	HIGH(_rece_data)
	MOVA           	(_isr_#T20494_9+0x1) & 0X7F		; Bank 1
;   79:(    ASGN_1,      I2CRB ,            ,  *#T20494)

; ITemplate_ASGN1_4
; ITemplate_SetFSR
	MOV            	(_isr_#T20494_9+0x1) & 0X7F,	0x0		; Bank 1
	MOVA           	IAAH
	MOV            	(_isr_#T20494_9) & 0X7F,	0x0		; Bank 1
	MOVA           	IAAL
	MOV            	_I2CRB_0#sh,	0x0		; ShBank 1
; ITemplate_SetINDF
	MOVA           	IAD
	ISTEP          	0x1
#line 80	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			rece_i++;
;   80:(     ADD_1,     rece_i ,          1 ,    rece_i)

; ITemplate_INC_1_TMP
	INC            	(_rece_i) & 0X7F		; Bank 1
#line 81	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			if(rece_i >= 8)
;   81:(    JLT_1U,     rece_i ,          8 ,   #L20455)

; ITemplate_JLT1_4U
	MOVI           	0x8
	SUB            	(_rece_i) & 0X7F,	0x0		; Bank 1
	JBS            	PSW,	0x0
	GOTO           	#L20455
#line 82	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			    rece_i = 0;
;   82:(    ASGN_1,          0 ,            ,    rece_i)

; ITemplate_CLR1_4_TMP
	CLR            	(_rece_i) & 0X7F		; Bank 1
#line 83	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;         }
;   83:(     LABEL,    #L20455 ,            ,          )

; ITemplate_LABEL
#L20455
; 		
#line 85	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 		if(I2CTBIE==1 && I2CTBIF==1)
;   85:(    CVB_SC,    I2CTBIE ,            ,   #T20537)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_I2CTBIE_0#sh)/8,	(_I2CTBIE_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20537_8) & 0X7F		; Bank 1
;   85:(    JNEQ_1,          1 ,    #T20537 ,   #L20531)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20537_8) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20531
;   85:(    CVB_SC,    I2CTBIF ,            ,   #T20544)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_I2CTBIF_0#sh)/8,	(_I2CTBIF_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20544_8) & 0X7F		; Bank 1
;   85:(    JNEQ_1,          1 ,    #T20544 ,   #L20531)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20544_8) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20531
; 		{
#line 87	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			I2CTBIF = 0;
;   87:(    ASGN_0,          0 ,            ,   I2CTBIF)

; ITemplate_CLR_0_TMP
	BCC            	(_I2CTBIF_0#sh)/8,	(_I2CTBIF_0#sh)%8		; ShBank 1
#line 88	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			I2CTB = send_data[send_i];     //将数据放到发送缓冲区
;   88:(   CVUC_UI,     send_i ,            ,   #T20571)

; ITemplate_CVTMS_U
	CLR            	(_isr_#T20571_10+0x1) & 0X7F		; Bank 1
	MOV            	(_send_i) & 0X7F,	0x0		; Bank 1
	MOVA           	(_isr_#T20571_10) & 0X7F		; Bank 1
;   88:(     ADD_2,    #T20571 , (send_data.0) ,   #T20572)

; ITemplate_ADD1_4
	MOV            	(_isr_#T20571_10) & 0X7F,	0x0		; Bank 1
	ADDI           	_send_data
	MOVA           	(_isr_#T20572_10) & 0X7F		; Bank 1
	MOV            	(_isr_#T20571_10+0x1) & 0X7F,	0x0		; Bank 1
	ADDCI          	HIGH(_send_data)
	MOVA           	(_isr_#T20572_10+0x1) & 0X7F		; Bank 1
;   88:(    ASGN_1,   *#T20572 ,            ,     I2CTB)

; ITemplate_GetRamRef
	MOV            	(_isr_#T20572_10+0x1) & 0X7F,	0x0		; Bank 1
	MOVA           	IAAH
	MOV            	(_isr_#T20572_10) & 0X7F,	0x0		; Bank 1
	MOVA           	IAAL
	MOV            	IAD,	0x0
	MOVAR          	?_TMP		; Bank 0
; ITemplate_ASGN1_4
	MOVRA          	?_TMP		; Bank 0
	MOVA           	_I2CTB_0#sh		; ShBank 1
#line 89	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			send_i++;
;   89:(     ADD_1,     send_i ,          1 ,    send_i)

; ITemplate_INC_1_TMP
	INC            	(_send_i) & 0X7F		; Bank 1
#line 90	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			if(send_i >= 8)
;   90:(    JLT_1U,     send_i ,          8 ,   #L20531)

; ITemplate_JLT1_4U
	MOVI           	0x8
	SUB            	(_send_i) & 0X7F,	0x0		; Bank 1
	JBS            	PSW,	0x0
	GOTO           	#L20531
#line 91	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			    send_i = 0;
;   91:(    ASGN_1,          0 ,            ,    send_i)

; ITemplate_CLR1_4_TMP
	CLR            	(_send_i) & 0X7F		; Bank 1
#line 92	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 		}
;   92:(     LABEL,    #L20531 ,            ,          )

; ITemplate_LABEL
#L20531
;         
#line 94	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;         if(I2CSRIE==1 && I2CSRIF==1)    //收到起始位+地址匹配+发送应答位
;   94:(    CVB_SC,    I2CSRIE ,            ,   #T20613)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_I2CSRIE_0#sh)/8,	(_I2CSRIE_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20613_8) & 0X7F		; Bank 1
;   94:(    JNEQ_1,          1 ,    #T20613 ,   #L20607)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20613_8) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20607
;   94:(    CVB_SC,    I2CSRIF ,            ,   #T20620)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_I2CSRIF_0#sh)/8,	(_I2CSRIF_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20620_8) & 0X7F		; Bank 1
;   94:(    JNEQ_1,          1 ,    #T20620 ,   #L20607)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20620_8) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20607
;         {
#line 96	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;             I2CSRIF = 0;                //清除起始位+地址匹配+发送应答位中断
;   96:(    ASGN_0,          0 ,            ,   I2CSRIF)

; ITemplate_CLR_0_TMP
	BCC            	(_I2CSRIF_0#sh)/8,	(_I2CSRIF_0#sh)%8		; ShBank 1
#line 97	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;         }
;   97:(     LABEL,    #L20607 ,            ,          )

; ITemplate_LABEL
#L20607
#line 99	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;         if(I2CSPIE==1 && I2CSPIF==1)    //停止位中断
;   99:(    CVB_SC,    I2CSPIE ,            ,   #T20637)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_I2CSPIE_0#sh)/8,	(_I2CSPIE_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20637_8) & 0X7F		; Bank 1
;   99:(    JNEQ_1,          1 ,    #T20637 ,   #L20631)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20637_8) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20631
;   99:(    CVB_SC,    I2CSPIF ,            ,   #T20644)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_I2CSPIF_0#sh)/8,	(_I2CSPIF_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20644_8) & 0X7F		; Bank 1
;   99:(    JNEQ_1,          1 ,    #T20644 ,   #L20631)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20644_8) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20631
;         {
#line 101	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;             I2CSPIF = 0;
;  101:(    ASGN_0,          0 ,            ,   I2CSPIF)

; ITemplate_CLR_0_TMP
	BCC            	(_I2CSPIF_0#sh)/8,	(_I2CSPIF_0#sh)%8		; ShBank 1
#line 102	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;             I2CRST = 1;         //复位I2C
;  102:(    ASGN_0,          1 ,            ,    I2CRST)

; ITemplate_SET_0_TMP
	BSS            	(_I2CRST_0#sh)/8,	(_I2CRST_0#sh)%8		; ShBank 1
#line 103	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;             while(I2CRST);      //等待复位完成
;  103:(     LABEL,    #L20659 ,            ,          )

; ITemplate_LABEL
#L20659
;  103:(     JNZ_0,     I2CRST ,            ,   #L20659)

; ITemplate_JNZ_0
	JBC            	(_I2CRST_0#sh)/8,	(_I2CRST_0#sh)%8		; ShBank 1
	GOTO           	#L20659
; 			//reset param
#line 106	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			I2CSA = SLAVE_ADDR<<1;      //重置从机地址
;  106:(    ASGN_1,         90 ,            ,     I2CSA)

; ITemplate_ASGN1_4_R
	MOVI           	0x5a
	MOVA           	_I2CSA_0#sh		; ShBank 1
#line 107	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;             I2CC = 0xE1;	    //I2C上拉，开漏输入输出，ACK，I2C使能;
;  107:(    ASGN_1,        225 ,            ,      I2CC)

; ITemplate_ASGN1_4_R
	MOVI           	0xe1
	MOVA           	_I2CC_0#sh		; ShBank 1
#line 108	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;             I2CIEC = 0x4F;		//使能地址匹配中断，NACK中断，停止位中断，接收空/发送非空中断
;  108:(    ASGN_1,         79 ,            ,    I2CIEC)

; ITemplate_ASGN1_4_R
	MOVI           	0x4f
	MOVA           	_I2CIEC_0#sh		; ShBank 1
#line 109	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			I2CIE = 1;          //使能I2C总中断
;  109:(    ASGN_0,          1 ,            ,     I2CIE)

; ITemplate_SET_0_TMP
	BSS            	(_I2CIE_0)/8,	(_I2CIE_0)%8
#line 110	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 		    I2CIFC = 0x00;      //清除标志位
;  110:(    ASGN_1,          0 ,            ,    I2CIFC)

; ITemplate_CLR1_4_TMP
	CLR            	_I2CIFC_0#sh		; ShBank 1
#line 112	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			send_i = 0;
;  112:(    ASGN_1,          0 ,            ,    send_i)

; ITemplate_CLR1_4_TMP
	CLR            	(_send_i) & 0X7F		; Bank 1
#line 113	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; 			counter = 0;
;  113:(    ASGN_1,          0 ,            ,   counter)

; ITemplate_CLR1_4_TMP
	CLR            	(_counter) & 0X7F		; Bank 1
#line 115	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;         }
;  115:(     LABEL,    #L20631 ,            ,          )

; ITemplate_LABEL
#L20631
#line 116	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;         if(I2CNAIE==1 && I2CNAIF==1)    //NACK中断
;  116:(    CVB_SC,    I2CNAIE ,            ,   #T20716)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_I2CNAIE_0#sh)/8,	(_I2CNAIE_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20716_8) & 0X7F		; Bank 1
;  116:(    JNEQ_1,          1 ,    #T20716 ,   #L20437)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20716_8) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20437
;  116:(    CVB_SC,    I2CNAIF ,            ,   #T20723)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_I2CNAIF_0#sh)/8,	(_I2CNAIF_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20723_8) & 0X7F		; Bank 1
;  116:(    JNEQ_1,          1 ,    #T20723 ,   #L20437)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20723_8) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20437
;         {
#line 118	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;             I2CNAIF = 0;
;  118:(    ASGN_0,          0 ,            ,   I2CNAIF)

; ITemplate_CLR_0_TMP
	BCC            	(_I2CNAIF_0#sh)/8,	(_I2CNAIF_0#sh)%8		; ShBank 1
;         }
#line 120	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     }
;  120:(     LABEL,    #L20437 ,            ,          )

; ITemplate_LABEL
#L20437
#line 121	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     I2CIF = 0;
;  121:(    ASGN_0,          0 ,            ,     I2CIF)

; ITemplate_CLR_0_TMP
	BCC            	(_I2CIF_0)/8,	(_I2CIF_0)%8
#line 122	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ; }
;  122:(     RET_I,            ,            ,          )

; ITemplate_RET_I
	SECTION        	0x0
	BCC            	BKSR,	0x4
	GOTO           	_INT_RESTORE		; Bank 0		; ShBank 0
; interrupt fun restore
INT_RESTORE	CSEG           
; ITemplate_InterruptTail
_INT_RESTORE
	NOP            	
	NOP            	
	MOV            	(CSEG_PTR+0x3) & 0X7F,	0x0		; Bank 0
	MOVA           	(CSEG_PTR+0x1) & 0X7F		; Bank 0
	MOV            	(CSEG_PTR+0x2) & 0X7F,	0x0		; Bank 0
	MOVA           	(CSEG_PTR) & 0X7F		; Bank 0
	MOV            	(MUL_TEMP+0x2) & 0X7F,	0x0		; Bank 0
	MOVA           	(MUL_TEMP) & 0X7F		; Bank 0
	MOVA           	MULA
	MOV            	(MUL_TEMP+0x3) & 0X7F,	0x0		; Bank 0
	MOVA           	(MUL_TEMP+0x1) & 0X7F		; Bank 0
	MOVA           	MULB
	MOV            	(SAVED_FSR+0x1) & 0X7F,	0x0		; Bank 0
	MOVA           	IAAH
	MOV            	(SAVED_FSR) & 0X7F,	0x0		; Bank 0
	MOVA           	IAAL
	POP            	
	RETIE          	
	_DESC          	main,0X0,0X0,GPIOInit
main#	CSEG           
_main
; /**********************************************
; 函数名：main() 
; 描  述：主函数
; 输入值：无
; 输出值：无
; 返回值：无
; **********************************************/
; void main() 
; {
;     uint i;
#line 134	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     GPIOInit();
	CLR            	BKSR
;  134:(      CALL, (GPIOInit.0) ,            ,          )

; ITemplate_CALL
	SEGMENTSEL     	_GPIOInit
	CALL           	_GPIOInit		; Bank 0		; ShBank 0
	SEGMENTSEL     	$
#line 135	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     I2CRST = 1;         //复位I2C
;  135:(    ASGN_0,          1 ,            ,    I2CRST)

; ITemplate_SET_0_TMP
	BSS            	BKSR,	0x4
	BSS            	(_I2CRST_0#sh)/8,	(_I2CRST_0#sh)%8		; ShBank 1
#line 136	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     while(I2CRST);      //等待复位完成
;  136:(     LABEL,    #L20749 ,            ,          )

; ITemplate_LABEL
#L20749
;  136:(     JNZ_0,     I2CRST ,            ,   #L20749)

; ITemplate_JNZ_0
	JBC            	(_I2CRST_0#sh)/8,	(_I2CRST_0#sh)%8		; ShBank 1
	GOTO           	#L20749
#line 137	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     I2CC = 0xE0;        //I2C上拉，开漏输入输出，ACK;
;  137:(    ASGN_1,        224 ,            ,      I2CC)

; ITemplate_ASGN1_4_R
	MOVI           	0xe0
	MOVA           	_I2CC_0#sh		; ShBank 1
#line 138	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     I2CSA = SLAVE_ADDR<<1;      //从机地址
;  138:(    ASGN_1,         90 ,            ,     I2CSA)

; ITemplate_ASGN1_4_R
	MOVI           	0x5a
	MOVA           	_I2CSA_0#sh		; ShBank 1
#line 139	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     I2CEN = 1;          //使能I2C
;  139:(    ASGN_0,          1 ,            ,     I2CEN)

; ITemplate_SET_0_TMP
	BSS            	(_I2CEN_0#sh)/8,	(_I2CEN_0#sh)%8		; ShBank 1
#line 140	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     I2CIEC = 0x4F;      //使能地址匹配中断，NACK中断，停止位中断，接收空/发送非空中断
;  140:(    ASGN_1,         79 ,            ,    I2CIEC)

; ITemplate_ASGN1_4_R
	MOVI           	0x4f
	MOVA           	_I2CIEC_0#sh		; ShBank 1
#line 141	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     I2CIE = 1;          //使能I2C总中断
;  141:(    ASGN_0,          1 ,            ,     I2CIE)

; ITemplate_SET_0_TMP
	BSS            	(_I2CIE_0)/8,	(_I2CIE_0)%8
#line 142	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     I2CIFC = 0x00;      //清除标志位
;  142:(    ASGN_1,          0 ,            ,    I2CIFC)

; ITemplate_CLR1_4_TMP
	CLR            	_I2CIFC_0#sh		; ShBank 1
#line 143	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     GIE = 1;            //打开总中断
;  143:(    ASGN_0,          1 ,            ,       GIE)

; ITemplate_SET_0_TMP
	BSS            	(_GIE_0)/8,	(_GIE_0)%8
#line 145	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     while(1)
;  145:(     LABEL,    #L20798 ,            ,          )

; ITemplate_LABEL
#L20798
;     {
#line 147	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;         CLRWDT();
; ITemplate_LABEL
;-----------Embedded Asm--------------
	CWDT
;-------------------------------------
#line 148	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\IIC\iic_slave\iic_slave.c ;     }
;  148:(       JMP,            ,            ,   #L20798)

; ITemplate_JMP
	GOTO           	#L20798

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC0	PSECT	FLAG=0X1088,ADDR=0X7FCB7
_GIE_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC1	PSECT	FLAG=0X1088,ADDR=0X7FCEE
_I2CIE_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC2	PSECT	FLAG=0X1088,ADDR=0X7FCF6
_I2CIF_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC3	PSECT	FLAG=0X1088,ADDR=0X7FD70
_PBT0_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC4	PSECT	FLAG=0X1088,ADDR=0X7FD71
_PBT1_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC5	PSECT	FLAG=0X1088,ADDR=0X306D0
_I2CEN_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC6	PSECT	FLAG=0X1088,ADDR=0X306D1
_I2CRST_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC7	PSECT	FLAG=0X1088,ADDR=0X306F0
_I2CSRIE_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC8	PSECT	FLAG=0X1088,ADDR=0X306F1
_I2CSPIE_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC9	PSECT	FLAG=0X1088,ADDR=0X306F2
_I2CTBIE_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC10	PSECT	FLAG=0X1088,ADDR=0X306F3
_I2CRBIE_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC11	PSECT	FLAG=0X1088,ADDR=0X306F6
_I2CNAIE_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC12	PSECT	FLAG=0X1088,ADDR=0X306F8
_I2CSRIF_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC13	PSECT	FLAG=0X1088,ADDR=0X306F9
_I2CSPIF_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC14	PSECT	FLAG=0X1088,ADDR=0X306FA
_I2CTBIF_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC15	PSECT	FLAG=0X1088,ADDR=0X306FB
_I2CRBIF_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c_STATIC16	PSECT	FLAG=0X1088,ADDR=0X306FE
_I2CNAIF_0	RSEG           	0X1		; Bank 0

SECTION1IC__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c18	IDATA          		0X8B		; Bank 0
_send_data	DB             	0X1,0XE4,0X2,0XE4,0X3,0XE4,0X4,0XE4,0X5,0XE4,0X6,0XE4,0X7,0XE4,0X8,0XE4		; Bank 0

SECTION1IC__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c20	IDATA          		0X83		; Bank 0
_rece_data	DB             	0X0,0XE4,0x00,0XE4,0x00,0XE4,0x00,0XE4,0x00,0XE4,0x00,0XE4,0x00,0XE4,0x00,0XE4		; Bank 0

SECTION1IC__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c22	IDATA          		0X82		; Bank 0
_send_i	DB             	0X0,0XE4		; Bank 0

SECTION1IC__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c24	IDATA          		0X81		; Bank 0
_rece_i	DB             	0X0,0XE4		; Bank 0

SECTION1IC__Users_lisq_Desktop_AN135_Examples_ES7P169C_IIC_iic_slave_iic_slave_c26	IDATA          		0X80		; Bank 0
_counter	DB             	0X0,0XE4		; Bank 0

SECTION8D__Program_Files__x86__iDesigner4_1_tools_INCLUDE_ES7P169C_h_STATIC	UNINTIAL       	0		; Bank 0
	ORG            	0XFF80		; Bank 0
_IAD_0	RSEG           	0X1		; Bank 0
	ORG            	0XFF81		; Bank 0
_IAAL_0	RSEG           	0X1		; Bank 0
	ORG            	0XFF82		; Bank 0
_IAAH_0	RSEG           	0X1		; Bank 0
	ORG            	0XFF8D		; Bank 0
_ANSH_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFA8		; Bank 0
_PA_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFA9		; Bank 0
_PB_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFAA		; Bank 0
_PC_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFAD		; Bank 0
_PAT_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFAE		; Bank 0
_PBT_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFAF		; Bank 0
_PCT_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFBC		; Bank 0
_ANSL_0	RSEG           	0X1		; Bank 0
	ORG            	0X60DA		; Bank 0
_I2CC_0	RSEG           	0X1		; Bank 0
	ORG            	0X60DB		; Bank 0
_I2CSA_0	RSEG           	0X1		; Bank 0
	ORG            	0X60DC		; Bank 0
_I2CTB_0	RSEG           	0X1		; Bank 0
	ORG            	0X60DD		; Bank 0
_I2CRB_0	RSEG           	0X1		; Bank 0
	ORG            	0X60DE		; Bank 0
_I2CIEC_0	RSEG           	0X1		; Bank 0
	ORG            	0X60DF		; Bank 0
_I2CIFC_0	RSEG           	0X1		; Bank 0
	END
