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

#INCLUDE       	<ES7P169C.INC>
#INCLUDE       	<OPERATION.INC>
	PUBLIC         	_rxbuf
	PUBLIC         	_rxcnt
	PUBLIC         	_txbuf
	PUBLIC         	_txcnt
	PUBLIC         	_RAMclear
	PUBLIC         	_GPIOInit
	PUBLIC         	_Init_spi
	PUBLIC         	_isr
	PUBLIC         	_main
_isr_#T20491_9	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20498_9	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20525_10	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20566_9	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20573_9	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20602_12	EQU            	_isrDATA + 0X0		; Bank 0
#TMP	EQU            	?_TMP+ 0X0		; Bank 0
?_TMP_RET	EQU            	?_TMP		; Bank 0
_SPIEN_0#sh	EQU            	0X608		; Bank 0
_SPIRST_0#sh	EQU            	0X609		; Bank 0
_MS_0#sh	EQU            	0X60A		; Bank 0
_REN_0#sh	EQU            	0X60B		; Bank 0
_TBIE_0#sh	EQU            	0X610		; Bank 0
_RBIE_0#sh	EQU            	0X611		; Bank 0
_TBIF_0#sh	EQU            	0X618		; Bank 0
_RBIF_0#sh	EQU            	0X619		; Bank 0
_SPICON0_0#sh	EQU            	0XC0		; Bank 0
_SPICON1_0#sh	EQU            	0XC1		; Bank 0
_SPIRBR_0#sh	EQU            	0XC4		; Bank 0
_SPITBW_0#sh	EQU            	0XC5		; 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
; *文件名:  spi_slave.c
; *作  者:  AE Team
; *版  本:  v1.0，编译于iDesigner(v4.2.3.166) + 工具链HRCC(v1.2.0.106)
; *日  期:  2020/12/28
; *描  述:  SPI从机模式演示
;           PA6：NSS
;           PB4：SCK
;           PB5：MOSI
;           PB6：MISO
;           从机中断方式读写数据，向主机写数组txbuf中的数据，读主机的数据存在数组rxbuf中。
; *备  注:  本软件仅供学习和演示使用，对用户直接引用代码所带来的风险或后果不承担任何法律责任。
; **********************************************************/
; #include <hic.h>
; #define CLRWDT()   {__Asm CWDT;}        //宏定义清狗指令
; #define RXBUF_SIZE 8       //宏定义接收缓冲区长度
; #define TXBUF_SIZE 8       //宏定义发送缓冲区长度
; typedef unsigned char uchar;
; typedef unsigned int uint;
; uchar rxbuf[RXBUF_SIZE];
; uint rxcnt = 0;
; uchar txbuf[TXBUF_SIZE] = {0x01, 0x12, 0x23, 0x34, 0x45, 0x56, 0x67, 0x78};
; uint txcnt = 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 56	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     ANSL = 0xFF;        //选择对应端口为数字IO功能
	CLR            	BKSR
;   56:(    ASGN_1,        255 ,            ,      ANSL)

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

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

; ITemplate_CLR1_4_TMP
	CLR            	_PAT_0
#line 59	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     PBT = 0x00;
;   59:(    ASGN_1,          0 ,            ,       PBT)

; ITemplate_CLR1_4_TMP
	CLR            	_PBT_0
#line 60	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     PCT = 0x00;
;   60:(    ASGN_1,          0 ,            ,       PCT)

; ITemplate_CLR1_4_TMP
	CLR            	_PCT_0
#line 61	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     PA = 0x00;
;   61:(    ASGN_1,          0 ,            ,        PA)

; ITemplate_CLR1_4_TMP
	CLR            	_PA_0
#line 62	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     PB = 0x00;
;   62:(    ASGN_1,          0 ,            ,        PB)

; ITemplate_CLR1_4_TMP
	CLR            	_PB_0
#line 63	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     PC = 0x00;
;   63:(    ASGN_1,          0 ,            ,        PC)

; ITemplate_CLR1_4_TMP
	CLR            	_PC_0
#line 64	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     PAT6 = 1;       //主机NSS设为输入
;   64:(    ASGN_0,          1 ,            ,      PAT6)

; ITemplate_SET_0_TMP
	BSS            	(_PAT6_0)/8,	(_PAT6_0)%8
#line 65	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     PBT4 = 1;       //主机SCK设为输入
;   65:(    ASGN_0,          1 ,            ,      PBT4)

; ITemplate_SET_0_TMP
	BSS            	(_PBT4_0)/8,	(_PBT4_0)%8
#line 66	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     PBT5 = 1;       //主机MOSI设为输入
;   66:(    ASGN_0,          1 ,            ,      PBT5)

; ITemplate_SET_0_TMP
	BSS            	(_PBT5_0)/8,	(_PBT5_0)%8
#line 67	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ; }
;   67:(       RET,            ,            ,          )

; ITemplate_RET
	RET            			; Bank 0		; ShBank 0
	_DESC          	Init_spi,0X0,0X0
Init_spi#	CSEG           
_Init_spi
; /**********************************************
; 函数名：void Init_spi(void)
; 描  述：SPI初始化程序
; 输入值：无
; 输出值：无
; 返回值：无
; **********************************************/
; void Init_spi(void)
; {
#line 78	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     SPIRST = 1;     //复位SPI
	CLR            	BKSR
;   78:(    ASGN_0,          1 ,            ,    SPIRST)

; ITemplate_SET_0_TMP
	BSS            	BKSR,	0x4
	BSS            	(_SPIRST_0#sh)/8,	(_SPIRST_0#sh)%8		; ShBank 1
#line 79	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     while(SPIRST);
;   79:(     LABEL,    #L20443 ,            ,          )

; ITemplate_LABEL
#L20443
;   79:(     JNZ_0,     SPIRST ,            ,   #L20443)

; ITemplate_JNZ_0
	JBC            	(_SPIRST_0#sh)/8,	(_SPIRST_0#sh)%8		; ShBank 1
	GOTO           	#L20443
#line 80	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     SPICON0 = 0xF0;     //CKS = Fosc/16，清空发送器、接收器
;   80:(    ASGN_1,        240 ,            ,   SPICON0)

; ITemplate_ASGN1_4_R
	MOVI           	0xf0
	MOVA           	_SPICON0_0#sh		; ShBank 1
#line 81	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     SPICON1 &= ~(3<<6);
;   81:(    BAND_1,         63 ,    SPICON1 ,   SPICON1)

; ITemplate_BAND1_4
	MOV            	_SPICON1_0#sh,	0x0		; ShBank 1
	ANDI           	0x3f
	MOVA           	_SPICON1_0#sh		; ShBank 1
;     SPICON1 |= 0<<6;      //0:上升沿发送（先），下降沿接收（后）；
#line 83	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     MS = 1;     //0：主机模式，1：从机模式
;   83:(    ASGN_0,          1 ,            ,        MS)

; ITemplate_SET_0_TMP
	BSS            	(_MS_0#sh)/8,	(_MS_0#sh)%8		; ShBank 1
#line 84	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ; }
;   84:(       RET,            ,            ,          )

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

SECTION1isr	UNINTIAL       	0		; Bank 0
	ORG            	0X8C		; Bank 0
_isrDATA	RSEG           	0X2		; 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 95	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     if (RBIE == 1 && RBIF == 1)     //SPI接收中断
;   95:(    CVB_SC,       RBIE ,            ,   #T20491)

; ITemplate_CVB_UC
	MOVI           	0x0
	BSS            	BKSR,	0x4
	JBC            	(_RBIE_0#sh)/8,	(_RBIE_0#sh)%8		; ShBank 1
	MOVI           	0x1
	SECTION        	0x1
	MOVA           	(_isr_#T20491_9) & 0X7F		; Bank 1
;   95:(    JNEQ_1,          1 ,    #T20491 ,   #L20485)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20491_9) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20485
;   95:(    CVB_SC,       RBIF ,            ,   #T20498)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_RBIF_0#sh)/8,	(_RBIF_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20498_9) & 0X7F		; Bank 1
;   95:(    JNEQ_1,          1 ,    #T20498 ,   #L20485)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20498_9) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20485
;     {
#line 97	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ; 		RBIF = 0;                   //清接收中断标志
;   97:(    ASGN_0,          0 ,            ,      RBIF)

; ITemplate_CLR_0_TMP
	BCC            	(_RBIF_0#sh)/8,	(_RBIF_0#sh)%8		; ShBank 1
#line 99	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;         rxbuf[rxcnt++] = SPIRBR;
;   99:(     ADD_2,  (rxbuf.0) ,      rxcnt ,   #T20525)

; ITemplate_ADD1_4
	MOVI           	_rxbuf
	ADD            	(_rxcnt) & 0X7F,	0x0		; Bank 1
	MOVA           	(_isr_#T20525_10) & 0X7F		; Bank 1
	MOVI           	HIGH(_rxbuf)
	ADDC           	(_rxcnt+0x1) & 0X7F,	0x0		; Bank 1
	MOVA           	(_isr_#T20525_10+0x1) & 0X7F		; Bank 1
;   99:(    ASGN_1,     SPIRBR ,            ,  *#T20525)

; ITemplate_ASGN1_4
; ITemplate_SetFSR
	MOV            	(_isr_#T20525_10+0x1) & 0X7F,	0x0		; Bank 1
	MOVA           	IAAH
	MOV            	(_isr_#T20525_10) & 0X7F,	0x0		; Bank 1
	MOVA           	IAAL
	MOV            	_SPIRBR_0#sh,	0x0		; ShBank 1
; ITemplate_SetINDF
	MOVA           	IAD
	ISTEP          	0x1
;   99:(     ADD_2,      rxcnt ,          1 ,     rxcnt)

; ITemplate_INC_2_TMP
	INC            	(_rxcnt) & 0X7F		; Bank 1
	JBS            	PSW,	0x2
	GOTO           	#L20694
	INC            	(_rxcnt+0x1) & 0X7F		; Bank 1
#L20694
#line 101	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;         if (rxcnt > RXBUF_SIZE - 1)
;  101:(    JLE_2U,      rxcnt ,          7 ,   #L20541)

; ITemplate_JLE1_4U
	MOV            	(_rxcnt+0x1) & 0X7F,	0x0		; Bank 1
	SUBI           	0x0
	JBS            	PSW,	0x2
	GOTO           	#L20695
	MOV            	(_rxcnt) & 0X7F,	0x0		; Bank 1
	SUBI           	0x7
#L20695
	JBC            	PSW,	0x0
	GOTO           	#L20541
#line 102	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;             rxcnt = 0;
;  102:(    ASGN_2,          0 ,            ,     rxcnt)

; ITemplate_CLR1_4_TMP
	CLR            	(_rxcnt) & 0X7F		; Bank 1
	CLR            	(_rxcnt+0x1) & 0X7F		; Bank 1
;  102:(     LABEL,    #L20541 ,            ,          )

; ITemplate_LABEL
#L20541
#line 104	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;         CLRWDT();
; ITemplate_LABEL
;-----------Embedded Asm--------------
	CWDT
;-------------------------------------
#line 105	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     }
;  105:(     LABEL,    #L20485 ,            ,          )

; ITemplate_LABEL
#L20485
#line 107	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ; 	if(TBIE == 1 && TBIF == 1)      //SPI发送中断
;  107:(    CVB_SC,       TBIE ,            ,   #T20566)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_TBIE_0#sh)/8,	(_TBIE_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20566_9) & 0X7F		; Bank 1
;  107:(    JNEQ_1,          1 ,    #T20566 ,   #L20560)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20566_9) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20560
;  107:(    CVB_SC,       TBIF ,            ,   #T20573)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_TBIF_0#sh)/8,	(_TBIF_0#sh)%8		; ShBank 1
	MOVI           	0x1
	MOVA           	(_isr_#T20573_9) & 0X7F		; Bank 1
;  107:(    JNEQ_1,          1 ,    #T20573 ,   #L20560)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20573_9) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20560
; 	{
#line 109	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ; 		TBIF = 0;                   //清发送中断标志
;  109:(    ASGN_0,          0 ,            ,      TBIF)

; ITemplate_CLR_0_TMP
	BCC            	(_TBIF_0#sh)/8,	(_TBIF_0#sh)%8		; ShBank 1
#line 111	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ; 	    SPITBW = txbuf[txcnt++];
;  111:(     ADD_2,  (txbuf.0) ,      txcnt ,   #T20602)

; ITemplate_ADD1_4
	MOVI           	_txbuf
	ADD            	(_txcnt) & 0X7F,	0x0		; Bank 1
	MOVA           	(_isr_#T20602_12) & 0X7F		; Bank 1
	MOVI           	HIGH(_txbuf)
	ADDC           	(_txcnt+0x1) & 0X7F,	0x0		; Bank 1
	MOVA           	(_isr_#T20602_12+0x1) & 0X7F		; Bank 1
;  111:(    ASGN_1,   *#T20602 ,            ,    SPITBW)

; ITemplate_GetRamRef
	MOV            	(_isr_#T20602_12+0x1) & 0X7F,	0x0		; Bank 1
	MOVA           	IAAH
	MOV            	(_isr_#T20602_12) & 0X7F,	0x0		; Bank 1
	MOVA           	IAAL
	MOV            	IAD,	0x0
	MOVAR          	?_TMP		; Bank 0
; ITemplate_ASGN1_4
	MOVRA          	?_TMP		; Bank 0
	MOVA           	_SPITBW_0#sh		; ShBank 1
;  111:(     ADD_2,      txcnt ,          1 ,     txcnt)

; ITemplate_INC_2_TMP
	INC            	(_txcnt) & 0X7F		; Bank 1
	JBS            	PSW,	0x2
	GOTO           	#L20696
	INC            	(_txcnt+0x1) & 0X7F		; Bank 1
#L20696
#line 113	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;         if (txcnt > TXBUF_SIZE - 1)
;  113:(    JLE_2U,      txcnt ,          7 ,   #L20616)

; ITemplate_JLE1_4U
	MOV            	(_txcnt+0x1) & 0X7F,	0x0		; Bank 1
	SUBI           	0x0
	JBS            	PSW,	0x2
	GOTO           	#L20697
	MOV            	(_txcnt) & 0X7F,	0x0		; Bank 1
	SUBI           	0x7
#L20697
	JBC            	PSW,	0x0
	GOTO           	#L20616
#line 114	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;             txcnt = 0;
;  114:(    ASGN_2,          0 ,            ,     txcnt)

; ITemplate_CLR1_4_TMP
	CLR            	(_txcnt) & 0X7F		; Bank 1
	CLR            	(_txcnt+0x1) & 0X7F		; Bank 1
;  114:(     LABEL,    #L20616 ,            ,          )

; ITemplate_LABEL
#L20616
#line 116	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;         CLRWDT();
; ITemplate_LABEL
;-----------Embedded Asm--------------
	CWDT
;-------------------------------------
#line 117	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ; 	}
;  117:(     LABEL,    #L20560 ,            ,          )

; ITemplate_LABEL
#L20560
#line 119	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     SPI_GIEIF = 0;  //清中断标志
;  119:(    ASGN_0,          0 ,            , SPI_GIEIF)

; ITemplate_CLR_0_TMP
	BCC            	(_SPI_GIEIF_0)/8,	(_SPI_GIEIF_0)%8
#line 120	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ; }
;  120:(     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,Init_spi
main#	CSEG           
_main
; /**********************************************
; 函数名：void main(void) 
; 描  述：主函数
; 输入值：无
; 输出值：无
; 返回值：无
; **********************************************/
; void main(void) 
; {
; //    RAMclear();
#line 132	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     GPIOInit();
	CLR            	BKSR
;  132:(      CALL, (GPIOInit.0) ,            ,          )

; ITemplate_CALL
	SEGMENTSEL     	_GPIOInit
	CALL           	_GPIOInit		; Bank 0		; ShBank 0
	SEGMENTSEL     	$
#line 133	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     Init_spi();
;  133:(      CALL, (Init_spi.0) ,            ,          )

; ITemplate_CALL
	SEGMENTSEL     	_Init_spi
	CALL           	_Init_spi		; Bank 0		; ShBank 0
	SEGMENTSEL     	$
#line 134	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     RBIE = 1;       //打开接收中断
;  134:(    ASGN_0,          1 ,            ,      RBIE)

; ITemplate_SET_0_TMP
	BSS            	BKSR,	0x4
	BSS            	(_RBIE_0#sh)/8,	(_RBIE_0#sh)%8		; ShBank 1
#line 135	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     TBIE = 1;       //打开发送中断
;  135:(    ASGN_0,          1 ,            ,      TBIE)

; ITemplate_SET_0_TMP
	BSS            	(_TBIE_0#sh)/8,	(_TBIE_0#sh)%8		; ShBank 1
#line 136	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     SPI_GIEIE = 1;  //打开SPI中断
;  136:(    ASGN_0,          1 ,            , SPI_GIEIE)

; ITemplate_SET_0_TMP
	BSS            	(_SPI_GIEIE_0)/8,	(_SPI_GIEIE_0)%8
#line 137	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     SPI_GIEIF = 0;  //清中断标志
;  137:(    ASGN_0,          0 ,            , SPI_GIEIF)

; ITemplate_CLR_0_TMP
	BCC            	(_SPI_GIEIF_0)/8,	(_SPI_GIEIF_0)%8
#line 138	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     GIE = 1;        //打开总中断
;  138:(    ASGN_0,          1 ,            ,       GIE)

; ITemplate_SET_0_TMP
	BSS            	(_GIE_0)/8,	(_GIE_0)%8
#line 139	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     REN = 1;        //打开接收
;  139:(    ASGN_0,          1 ,            ,       REN)

; ITemplate_SET_0_TMP
	BSS            	(_REN_0#sh)/8,	(_REN_0#sh)%8		; ShBank 1
#line 140	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     SPIEN = 1;      //SPI使能
;  140:(    ASGN_0,          1 ,            ,     SPIEN)

; ITemplate_SET_0_TMP
	BSS            	(_SPIEN_0#sh)/8,	(_SPIEN_0#sh)%8		; ShBank 1
#line 141	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     while(1)
;  141:(     LABEL,    #L20690 ,            ,          )

; ITemplate_LABEL
#L20690
;     {
#line 143	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;         CLRWDT();
; ITemplate_LABEL
;-----------Embedded Asm--------------
	CWDT
;-------------------------------------
#line 144	C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\spi_slave.c ;     }
;  144:(       JMP,            ,            ,   #L20690)

; ITemplate_JMP
	GOTO           	#L20690

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

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC1	PSECT	FLAG=0X1088,ADDR=0X7FCCF
_SPI_GIEIE_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC2	PSECT	FLAG=0X1088,ADDR=0X7FCD7
_SPI_GIEIF_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC3	PSECT	FLAG=0X1088,ADDR=0X7FD6E
_PAT6_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC4	PSECT	FLAG=0X1088,ADDR=0X7FD74
_PBT4_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC5	PSECT	FLAG=0X1088,ADDR=0X7FD75
_PBT5_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC6	PSECT	FLAG=0X1088,ADDR=0X30608
_SPIEN_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC7	PSECT	FLAG=0X1088,ADDR=0X30609
_SPIRST_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC8	PSECT	FLAG=0X1088,ADDR=0X3060A
_MS_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC9	PSECT	FLAG=0X1088,ADDR=0X3060B
_REN_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC10	PSECT	FLAG=0X1088,ADDR=0X30610
_TBIE_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC11	PSECT	FLAG=0X1088,ADDR=0X30611
_RBIE_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC12	PSECT	FLAG=0X1088,ADDR=0X30618
_TBIF_0	RSEG           	0X1		; Bank 0

SECTION8C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC13	PSECT	FLAG=0X1088,ADDR=0X30619
_RBIF_0	RSEG           	0X1		; Bank 0

SECTION1IC__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c15	IDATA          		0X80		; Bank 0
_rxcnt	DB             	0X0,0XE4,0X0,0XE4		; Bank 0

SECTION1IC__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c17	IDATA          		0X84		; Bank 0
_txbuf	DB             	0X1,0XE4,0X12,0XE4,0X23,0XE4,0X34,0XE4,0X45,0XE4,0X56,0XE4,0X67,0XE4,0X78,0XE4		; Bank 0

SECTION1IC__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c19	IDATA          		0X82		; Bank 0
_txcnt	DB             	0X0,0XE4,0X0,0XE4		; Bank 0

SECTION1C__Users_lisq_Desktop_AN135_Examples_ES7P169C_SPI_spi_slave_spi_slave_c_STATIC	UNINTIAL       	0		; Bank 0
	ORG            	0X8E		; Bank 0
_rxbuf	RSEG           	0X8		; 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            	0X60C0		; Bank 0
_SPICON0_0	RSEG           	0X1		; Bank 0
	ORG            	0X60C1		; Bank 0
_SPICON1_0	RSEG           	0X1		; Bank 0
	ORG            	0X60C4		; Bank 0
_SPIRBR_0	RSEG           	0X1		; Bank 0
	ORG            	0X60C5		; Bank 0
_SPITBW_0	RSEG           	0X1		; Bank 0
	END
