;The Num of Instruction(Size):255. The Max Address(Begin with 0):254 

                MCU  ES7P169C

A    equ    0
R    equ    1
HRAM_0X3  equ  0X3
HRAM_0X4  equ  0X4
HRAM_0X5  equ  0X5
HRAM_0X6  equ  0X6
HRAM_0X7  equ  0X7
HRAM_0X8  equ  0X8
HRAM_0X80  equ  0X80
HRAM_0X81  equ  0X81
HRAM_0X82  equ  0X82
HRAM_0X83  equ  0X83
HRAM_0X84  equ  0X84
HRAM_0X86  equ  0X86
HRAM_0X87  equ  0X87
HRAM_0X88  equ  0X88
HRAM_0X89  equ  0X89
HRAM_0X9  equ  0X9
HRAM_0XA  equ  0Xa
HRAM_0XC  equ  0Xc
HRAM_0XC0  equ  0Xc0
HRAM_0XC1  equ  0Xc1
HRAM_0XC2  equ  0Xc2
HRAM_0XC3  equ  0Xc3
HRAM_0XC4  equ  0Xc4
HRAM_0XC5  equ  0Xc5
HRAM_0XD  equ  0Xd

                ORG             0X00
HADR_0X0:
:0X0  60bc                      CALL            HADR_0XBC
:0X1  c796f000                  AJMP            HADR_0X96
                                ORG             0X3
:0X3  6800                      GOTO            HADR_0X0
:0X4  c180                      PUSH
:0X5  e787                      CLR             HRAM_0X87
:0X6  e783                      CLR             HRAM_0X83
:0X7  5081                      MOV             HRAM_0X81,      A
:0X8  e600                      MOVA            (SAVED_FSR)&7f                        ;(SAVED_FSR)&7f: Bank 0    Addr: 0    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
:0X9  5082                      MOV             HRAM_0X82,      A
:0Xa  e601                      MOVA            (SAVED_FSR+1)&7f                      ;(SAVED_FSR+1)&7f: Bank 0    Addr: 1    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
:0Xb  500f                      MOV             (CSEG_PTR)&7f,  A                     ;(CSEG_PTR)&7f: Bank 0    Addr: 15     
:0Xc  e611                      MOVA            (CSEG_PTR+2)&7f                       ;(CSEG_PTR+2)&7f: Bank 0    Addr: 17     
:0Xd  5010                      MOV             (CSEG_PTR+1)&7f,                A     ;(CSEG_PTR+1)&7f: Bank 0    Addr: 16     
:0Xe  e612                      MOVA            (CSEG_PTR+3)&7f                       ;(CSEG_PTR+3)&7f: Bank 0    Addr: 18     
:0Xf  500b                      MOV             (MUL_TEMP)&7f,  A                     ;(MUL_TEMP)&7f: Bank 0    Addr: 11     
:0X10  e60d                     MOVA            (MUL_TEMP+2)&7f                      ;(MUL_TEMP+2)&7f: Bank 0    Addr: 13     
:0X11  500c                     MOV             (MUL_TEMP+1)&7f,                A    ;(MUL_TEMP+1)&7f: Bank 0    Addr: 12     
:0X12  e60e                     MOVA            (MUL_TEMP+3)&7f                      ;(MUL_TEMP+3)&7f: Bank 0    Addr: 14     
:0X13  5007                     MOV             HRAM_0X7,       A
:0X14  e603                     MOVA            HRAM_0X3
:0X15  5008                     MOV             HRAM_0X8,       A
:0X16  e604                     MOVA            HRAM_0X4
:0X17  5009                     MOV             HRAM_0X9,       A
:0X18  e605                     MOVA            HRAM_0X5
:0X19  500a                     MOV             HRAM_0XA,       A
:0X1a  e606                     MOVA            HRAM_0X6
;
;/**********************************************
;函数名：void isr(void) interrupt 
;描  述：接收中断服务程序
;输入值：无
;输出值：无
;返回值：无
;**********************************************/
;void isr(void) interrupt
;{
;    if (RBIE == 1 && RBIF == 1)     //SPI接收中断
:0X1b  e500                     MOVI            0X0
:0X1c  a483                     BSS             HRAM_0X83,      4
:0X1d  99c2                     JBC             HRAM_0XC2,      1
:0X1e  e501                     MOVI            0X1
:0X1f  ea01                     SECTION         0X1
:0X20  e60c                     MOVA            HRAM_0XC
:0X21  500c                     MOV             HRAM_0XC,       A
:0X22  e301                     XORI            0X1
:0X23  9284                     JBS             HRAM_0X84,      2
:0X24  684a                     GOTO            HADR_0X4A
:0X25  e500                     MOVI            0X0
:0X26  99c3                     JBC             HRAM_0XC3,      1
:0X27  e501                     MOVI            0X1
:0X28  e60c                     MOVA            HRAM_0XC
:0X29  500c                     MOV             HRAM_0XC,       A
:0X2a  e301                     XORI            0X1
:0X2b  9284                     JBS             HRAM_0X84,      2
:0X2c  684a                     GOTO            HADR_0X4A
;    {
;		RBIF = 0;                   //清接收中断标志
:0X2d  a9c3                     BCC             HRAM_0XC3,      1
;
;        rxbuf[rxcnt++] = SPIRBR;
:0X2e  e58e                     MOVI            _rxbuf
:0X2f  5e00                     ADD             (_rxcnt)&7f,    A                    ;(_rxcnt)&7f: Bank 0    Addr: 0     
:0X30  e60c                     MOVA            HRAM_0XC
:0X31  e500                     MOVI            (_rxbuf)>>8
:0X32  1401                     ADDC            (_rxcnt+1)&7f,  A                    ;(_rxcnt+1)&7f: Bank 0    Addr: 1     
:0X33  e60d                     MOVA            HRAM_0XD
:0X34  500d                     MOV             HRAM_0XD,       A
:0X35  e682                     MOVA            HRAM_0X82
:0X36  500c                     MOV             HRAM_0XC,       A
:0X37  e681                     MOVA            HRAM_0X81
:0X38  50c4                     MOV             HRAM_0XC4,      A
:0X39  e680                     MOVA            HRAM_0X80
:0X3a  c201                     ISTEP           0X1
:0X3b  5500                     INC             (_rxcnt)&7f,    R                    ;(_rxcnt)&7f: Bank 0    Addr: 0     
:0X3c  9284                     JBS             HRAM_0X84,      2
:0X3d  683f                     GOTO            HADR_0X3F
:0X3e  5501                     INC             (_rxcnt+1)&7f,  R                    ;(_rxcnt+1)&7f: Bank 0    Addr: 1     
HADR_0X3F:
;
;        if (rxcnt > RXBUF_SIZE - 1)
:0X3f  5001                     MOV             (_rxcnt+1)&7f,  A                    ;(_rxcnt+1)&7f: Bank 0    Addr: 1     
:0X40  ce00                     SUBI            0X0
:0X41  9284                     JBS             HRAM_0X84,      2
:0X42  6845                     GOTO            HADR_0X45
:0X43  5000                     MOV             (_rxcnt)&7f,    A                    ;(_rxcnt)&7f: Bank 0    Addr: 0     
:0X44  ce07                     SUBI            0X7
HADR_0X45:
:0X45  9884                     JBC             HRAM_0X84,      0
:0X46  6849                     GOTO            HADR_0X49
;            rxcnt = 0;
:0X47  e700                     CLR             (_rxcnt)&7f                          ;(_rxcnt)&7f: Bank 0    Addr: 0     
:0X48  e701                     CLR             (_rxcnt+1)&7f                        ;(_rxcnt+1)&7f: Bank 0    Addr: 1     
HADR_0X49:
;
;        CLRWDT();
:0X49  c18b                     CWDT
HADR_0X4A:
;    }
:0X4a  e500                     MOVI            0X0
:0X4b  98c2                     JBC             HRAM_0XC2,      0
:0X4c  e501                     MOVI            0X1
:0X4d  e60c                     MOVA            HRAM_0XC
:0X4e  500c                     MOV             HRAM_0XC,       A
:0X4f  e301                     XORI            0X1
:0X50  9284                     JBS             HRAM_0X84,      2
:0X51  6878                     GOTO            HADR_0X78
:0X52  e500                     MOVI            0X0
:0X53  98c3                     JBC             HRAM_0XC3,      0
:0X54  e501                     MOVI            0X1
:0X55  e60c                     MOVA            HRAM_0XC
:0X56  500c                     MOV             HRAM_0XC,       A
:0X57  e301                     XORI            0X1
:0X58  9284                     JBS             HRAM_0X84,      2
:0X59  6878                     GOTO            HADR_0X78
;	{
;		TBIF = 0;                   //清发送中断标志
:0X5a  a8c3                     BCC             HRAM_0XC3,      0
;
;	    SPITBW = txbuf[txcnt++];
:0X5b  e584                     MOVI            _txbuf
:0X5c  5e02                     ADD             (_txcnt)&7f,    A                    ;(_txcnt)&7f: Bank 0    Addr: 2     
:0X5d  e60c                     MOVA            HRAM_0XC
:0X5e  e500                     MOVI            (_txbuf)>>8
:0X5f  1403                     ADDC            (_txcnt+1)&7f,  A                    ;(_txcnt+1)&7f: Bank 0    Addr: 3     
:0X60  e60d                     MOVA            HRAM_0XD
:0X61  500d                     MOV             HRAM_0XD,       A
:0X62  e682                     MOVA            HRAM_0X82
:0X63  500c                     MOV             HRAM_0XC,       A
:0X64  e681                     MOVA            HRAM_0X81
:0X65  5080                     MOV             HRAM_0X80,      A
:0X66  2007                     MOVAR           ?_TMP                                ;?_TMP: Bank 0    Addr: 7     
:0X67  7807                     MOVRA           ?_TMP                                ;?_TMP: Bank 0    Addr: 7     
:0X68  e6c5                     MOVA            HRAM_0XC5
:0X69  5502                     INC             (_txcnt)&7f,    R                    ;(_txcnt)&7f: Bank 0    Addr: 2     
:0X6a  9284                     JBS             HRAM_0X84,      2
:0X6b  686d                     GOTO            HADR_0X6D
:0X6c  5503                     INC             (_txcnt+1)&7f,  R                    ;(_txcnt+1)&7f: Bank 0    Addr: 3     
HADR_0X6D:
;
;        if (txcnt > TXBUF_SIZE - 1)
:0X6d  5003                     MOV             (_txcnt+1)&7f,  A                    ;(_txcnt+1)&7f: Bank 0    Addr: 3     
:0X6e  ce00                     SUBI            0X0
:0X6f  9284                     JBS             HRAM_0X84,      2
:0X70  6873                     GOTO            HADR_0X73
:0X71  5002                     MOV             (_txcnt)&7f,    A                    ;(_txcnt)&7f: Bank 0    Addr: 2     
:0X72  ce07                     SUBI            0X7
HADR_0X73:
:0X73  9884                     JBC             HRAM_0X84,      0
:0X74  6877                     GOTO            HADR_0X77
;            txcnt = 0;
:0X75  e702                     CLR             (_txcnt)&7f                          ;(_txcnt)&7f: Bank 0    Addr: 2     
:0X76  e703                     CLR             (_txcnt+1)&7f                        ;(_txcnt+1)&7f: Bank 0    Addr: 3     
HADR_0X77:
;
;        CLRWDT();
:0X77  c18b                     CWDT
HADR_0X78:
;	}
:0X78  af9a                     BCC             (_SPI_GIEIF_0)>>3,              7    ;(_SPI_GIEIF_0)>>3: Bank 511    Addr: 65434    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;}
:0X79  ea00                     SECTION         0X0
:0X7a  ac83                     BCC             HRAM_0X83,      4
:0X7b  687c                     GOTO            HADR_0X7C
HADR_0X7C:
:0X7c  ffff                     NOP
:0X7d  ffff                     NOP
:0X7e  5003                     MOV             HRAM_0X3,       A
:0X7f  e607                     MOVA            HRAM_0X7
:0X80  5004                     MOV             HRAM_0X4,       A
:0X81  e608                     MOVA            HRAM_0X8
:0X82  5005                     MOV             HRAM_0X5,       A
:0X83  e609                     MOVA            HRAM_0X9
:0X84  5006                     MOV             HRAM_0X6,       A
:0X85  e60a                     MOVA            HRAM_0XA
:0X86  5012                     MOV             (CSEG_PTR+3)&7f,                A    ;(CSEG_PTR+3)&7f: Bank 0    Addr: 18     
:0X87  e610                     MOVA            (CSEG_PTR+1)&7f                      ;(CSEG_PTR+1)&7f: Bank 0    Addr: 16     
:0X88  5011                     MOV             (CSEG_PTR+2)&7f,                A    ;(CSEG_PTR+2)&7f: Bank 0    Addr: 17     
:0X89  e60f                     MOVA            (CSEG_PTR)&7f                        ;(CSEG_PTR)&7f: Bank 0    Addr: 15     
:0X8a  500d                     MOV             (MUL_TEMP+2)&7f,                A    ;(MUL_TEMP+2)&7f: Bank 0    Addr: 13     
:0X8b  e60b                     MOVA            (MUL_TEMP)&7f                        ;(MUL_TEMP)&7f: Bank 0    Addr: 11     
:0X8c  e688                     MOVA            HRAM_0X88
:0X8d  500e                     MOV             (MUL_TEMP+3)&7f,                A    ;(MUL_TEMP+3)&7f: Bank 0    Addr: 14     
:0X8e  e60c                     MOVA            (MUL_TEMP+1)&7f                      ;(MUL_TEMP+1)&7f: Bank 0    Addr: 12     
:0X8f  e689                     MOVA            HRAM_0X89
:0X90  5001                     MOV             (SAVED_FSR+1)&7f,               A    ;(SAVED_FSR+1)&7f: Bank 0    Addr: 1    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
:0X91  e682                     MOVA            HRAM_0X82
:0X92  5000                     MOV             (SAVED_FSR)&7f, A                    ;(SAVED_FSR)&7f: Bank 0    Addr: 0    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
:0X93  e681                     MOVA            HRAM_0X81
:0X94  c181                     POP
:0X95  c189                     RETIE
HADR_0X96:
;
;/**********************************************
;函数名：void main(void) 
;描  述：主函数
;输入值：无
;输出值：无
;返回值：无
;**********************************************/
;void main(void) 
;{
;//    RAMclear();
;    GPIOInit();
:0X96  e783                     CLR             HRAM_0X83
:0X97  ec00                     PAGE            (_GPIOInit)>>11
:0X98  60e3                     CALL            HADR_0XE3
:0X99  ec00                     PAGE            (_0)>>11
;    Init_spi();
:0X9a  ec00                     PAGE            (_Init_spi)>>11
:0X9b  60f2                     CALL            HADR_0XF2
:0X9c  ec00                     PAGE            (_1)>>11
;    RBIE = 1;       //打开接收中断
:0X9d  a483                     BSS             HRAM_0X83,      4
:0X9e  a1c2                     BSS             HRAM_0XC2,      1
;    TBIE = 1;       //打开发送中断
:0X9f  a0c2                     BSS             HRAM_0XC2,      0
;    SPI_GIEIE = 1;  //打开SPI中断
:0Xa0  a799                     BSS             (_SPI_GIEIE_0)>>3,              7    ;(_SPI_GIEIE_0)>>3: Bank 511    Addr: 65433    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;    SPI_GIEIF = 0;  //清中断标志
:0Xa1  af9a                     BCC             (_SPI_GIEIF_0)>>3,              7    ;(_SPI_GIEIF_0)>>3: Bank 511    Addr: 65434    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;    GIE = 1;        //打开总中断
:0Xa2  a796                     BSS             (_GIE_0)>>3,    7                    ;(_GIE_0)>>3: Bank 511    Addr: 65430    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;    REN = 1;        //打开接收
:0Xa3  a3c1                     BSS             HRAM_0XC1,      3
;    SPIEN = 1;      //SPI使能
:0Xa4  a0c1                     BSS             HRAM_0XC1,      0
HADR_0XA5:
;    while(1)
:0Xa5  c18b                     CWDT
;    }
:0Xa6  68a5                     GOTO            HADR_0XA5
HADR_0XA7:
:0Xa7  5f86                     ADD             HRAM_0X86,      R
:0Xa8  e403                     RETIA           0X3
:0Xa9  e480                     RETIA           0X80
:0Xaa  e402                     RETIA           0X2
:0Xab  e400                     RETIA           0X0
:0Xac  e400                     RETIA           0X0
:0Xad  e484                     RETIA           0X84
:0Xae  e408                     RETIA           0X8
:0Xaf  e401                     RETIA           0X1
:0Xb0  e412                     RETIA           0X12
:0Xb1  e423                     RETIA           0X23
:0Xb2  e434                     RETIA           0X34
:0Xb3  e445                     RETIA           0X45
:0Xb4  e456                     RETIA           0X56
:0Xb5  e467                     RETIA           0X67
:0Xb6  e478                     RETIA           0X78
:0Xb7  e482                     RETIA           0X82
:0Xb8  e402                     RETIA           0X2
:0Xb9  e400                     RETIA           0X0
:0Xba  e400                     RETIA           0X0
:0Xbb  e400                     RETIA           0X0
HADR_0XBC:
:0Xbc  e783                     CLR             HRAM_0X83
:0Xbd  e500                     MOVI            (#_CINIT)>>8
:0Xbe  e687                     MOVA            HRAM_0X87
:0Xbf  e500                     MOVI            0X0
:0Xc0  e607                     MOVA            ?_TMP                                ;?_TMP: Bank 0    Addr: 7     
:0Xc1  5007                     MOV             ?_TMP,          A                    ;?_TMP: Bank 0    Addr: 7     
:0Xc2  ec00                     PAGE            (#_CINIT)>>11
:0Xc3  60a7                     CALL            HADR_0XA7
:0Xc4  e608                     MOVA            ?_TMP+1                              ;?_TMP+1: Bank 0    Addr: 8     
:0Xc5  5108                     MOV             ?_TMP+1,        R                    ;?_TMP+1: Bank 0    Addr: 8     
:0Xc6  9a84                     JBC             HRAM_0X84,      2
:0Xc7  c183                     RET
HADR_0XC8:
:0Xc8  5507                     INC             ?_TMP,          R                    ;?_TMP: Bank 0    Addr: 7     
:0Xc9  5007                     MOV             ?_TMP,          A                    ;?_TMP: Bank 0    Addr: 7     
:0Xca  ec00                     PAGE            (#_CINIT)>>11
:0Xcb  60a7                     CALL            HADR_0XA7
:0Xcc  e609                     MOVA            ?_TMP+2                              ;?_TMP+2: Bank 0    Addr: 9     
:0Xcd  5507                     INC             ?_TMP,          R                    ;?_TMP: Bank 0    Addr: 7     
:0Xce  5007                     MOV             ?_TMP,          A                    ;?_TMP: Bank 0    Addr: 7     
:0Xcf  ec00                     PAGE            (#_CINIT)>>11
:0Xd0  60a7                     CALL            HADR_0XA7
:0Xd1  e60a                     MOVA            ?_TMP+3                              ;?_TMP+3: Bank 0    Addr: 10     
:0Xd2  60d6                     CALL            HADR_0XD6
:0Xd3  5708                     JDEC            HRAM_0X8,       R
:0Xd4  68c8                     GOTO            HADR_0XC8
:0Xd5  c183                     RET
HADR_0XD6:
:0Xd6  5009                     MOV             ?_TMP+2,        A                    ;?_TMP+2: Bank 0    Addr: 9     
:0Xd7  e681                     MOVA            HRAM_0X81
:0Xd8  e500                     MOVI            0X0
:0Xd9  e682                     MOVA            HRAM_0X82
:0Xda  5507                     INC             ?_TMP,          R                    ;?_TMP: Bank 0    Addr: 7     
:0Xdb  5007                     MOV             ?_TMP,          A                    ;?_TMP: Bank 0    Addr: 7     
:0Xdc  ec00                     PAGE            (#_CINIT)>>11
:0Xdd  60a7                     CALL            HADR_0XA7
:0Xde  e680                     MOVA            HRAM_0X80
:0Xdf  5509                     INC             ?_TMP+2,        R                    ;?_TMP+2: Bank 0    Addr: 9     
:0Xe0  570a                     JDEC            HRAM_0XA,       R
:0Xe1  68d6                     GOTO            HADR_0XD6
:0Xe2  c183                     RET
HADR_0XE3:
;/*********************************************************
;*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)
;{
;    ANSL = 0xFF;        //选择对应端口为数字IO功能
:0Xe3  e783                     CLR             HRAM_0X83
:0Xe4  e5ff                     MOVI            0XFF
:0Xe5  e6bc                     MOVA            _ANSL_0                              ;_ANSL_0: Bank 511    Addr: 65468    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;	ANSH = 0xFF;
:0Xe6  e5ff                     MOVI            0XFF
:0Xe7  e68d                     MOVA            _ANSH_0                              ;_ANSH_0: Bank 511    Addr: 65421    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;    PAT = 0x00;         //所有IO设为输出低电平
:0Xe8  e7ad                     CLR             _PAT_0                               ;_PAT_0: Bank 511    Addr: 65453    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;    PBT = 0x00;
:0Xe9  e7ae                     CLR             _PBT_0                               ;_PBT_0: Bank 511    Addr: 65454    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;    PCT = 0x00;
:0Xea  e7af                     CLR             _PCT_0                               ;_PCT_0: Bank 511    Addr: 65455    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;    PA = 0x00;
:0Xeb  e7a8                     CLR             _PA_0                                ;_PA_0: Bank 511    Addr: 65448    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;    PB = 0x00;
:0Xec  e7a9                     CLR             _PB_0                                ;_PB_0: Bank 511    Addr: 65449    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;    PC = 0x00;
:0Xed  e7aa                     CLR             _PC_0                                ;_PC_0: Bank 511    Addr: 65450    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;    PAT6 = 1;       //主机NSS设为输入
:0Xee  a6ad                     BSS             (_PAT6_0)>>3,   6                    ;(_PAT6_0)>>3: Bank 511    Addr: 65453    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;    PBT4 = 1;       //主机SCK设为输入
:0Xef  a4ae                     BSS             (_PBT4_0)>>3,   4                    ;(_PBT4_0)>>3: Bank 511    Addr: 65454    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;    PBT5 = 1;       //主机MOSI设为输入
:0Xf0  a5ae                     BSS             (_PBT5_0)>>3,   5                    ;(_PBT5_0)>>3: Bank 511    Addr: 65454    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\SPI\spi_slave\debug\spi_slave.obj 
;}
:0Xf1  c183                     RET
HADR_0XF2:
;
;/**********************************************
;函数名：void Init_spi(void)
;描  述：SPI初始化程序
;输入值：无
;输出值：无
;返回值：无
;**********************************************/
;void Init_spi(void)
;{
;    SPIRST = 1;     //复位SPI
:0Xf2  e783                     CLR             HRAM_0X83
:0Xf3  a483                     BSS             HRAM_0X83,      4
:0Xf4  a1c1                     BSS             HRAM_0XC1,      1
HADR_0XF5:
;    while(SPIRST);
:0Xf5  99c1                     JBC             HRAM_0XC1,      1
:0Xf6  68f5                     GOTO            HADR_0XF5
;    SPICON0 = 0xF0;     //CKS = Fosc/16，清空发送器、接收器
:0Xf7  e5f0                     MOVI            0XF0
:0Xf8  e6c0                     MOVA            HRAM_0XC0
;    SPICON1 &= ~(3<<6);
:0Xf9  50c1                     MOV             HRAM_0XC1,      A
:0Xfa  e23f                     ANDI            0X3F
:0Xfb  e6c1                     MOVA            HRAM_0XC1
;    SPICON1 |= 0<<6;      //0:上升沿发送（先），下降沿接收（后）；
;    MS = 1;     //0：主机模式，1：从机模式
:0Xfc  a2c1                     BSS             HRAM_0XC1,      2
;}
:0Xfd  ac83                     BCC             HRAM_0X83,      4
:0Xfe  c183                     RET

                                END
