;The Num of Instruction(Size):206. The Max Address(Begin with 0):205 

                MCU  ES7P169C

A    equ    0
R    equ    1
HRAM_0X10  equ  0X10
HRAM_0X11  equ  0X11
HRAM_0X12  equ  0X12
HRAM_0X13  equ  0X13
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_0X9F  equ  0X9f
HRAM_0XA  equ  0Xa
HRAM_0XA0  equ  0Xa0
HRAM_0XD4  equ  0Xd4
HRAM_0XD5  equ  0Xd5
HRAM_0XD6  equ  0Xd6
HRAM_0XD7  equ  0Xd7
HRAM_0XD8  equ  0Xd8
HRAM_0XF  equ  0Xf

                ORG             0X00
HADR_0X0:
:0X0  609b                      CALL            HADR_0X9B
:0X1  c750f000                  AJMP            HADR_0X50
                                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:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
:0X9  5082                      MOV             HRAM_0X82,      A
:0Xa  e601                      MOVA            (SAVED_FSR+1)&7f                      ;(SAVED_FSR+1)&7f: Bank 0    Addr: 1    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.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             0X8,            A
:0X16  e604                     MOVA            HRAM_0X4
:0X17  5009                     MOV             0X9,            A
:0X18  e605                     MOVA            0X5
:0X19  500a                     MOV             0XA,            A
:0X1a  e606                     MOVA            HRAM_0X6
;}
;
;/**********************************************
;函数名：void isr(void) interrupt
;描  述：中断服务程序
;输入值：无
;输出值：无
;返回值：无
;**********************************************/
;#ifdef IT_SR
;void isr(void) interrupt
;{
;    if (RX1IE == 1 && RX1IF == 1)
:0X1b  e500                     MOVI            0X0
:0X1c  999f                     JBC             HRAM_0X9F,      1
:0X1d  e501                     MOVI            0X1
:0X1e  ea01                     SECTION         0X1
:0X1f  e613                     MOVA            HRAM_0X13
:0X20  5013                     MOV             HRAM_0X13,      A
:0X21  e301                     XORI            0X1
:0X22  9284                     JBS             HRAM_0X84,      2
:0X23  6833                     GOTO            HADR_0X33
:0X24  e500                     MOVI            0X0
:0X25  99a0                     JBC             HRAM_0XA0,      1
:0X26  e501                     MOVI            0X1
:0X27  e613                     MOVA            HRAM_0X13
:0X28  5013                     MOV             HRAM_0X13,      A
:0X29  e301                     XORI            0X1
:0X2a  9284                     JBS             HRAM_0X84,      2
:0X2b  6833                     GOTO            HADR_0X33
;    {
;        rxbuf = RX1B;
:0X2c  a483                     BSS             HRAM_0X83,      4
:0X2d  50d4                     MOV             HRAM_0XD4,      A
:0X2e  e614                     MOVA            (_rxbuf)&7f                          ;(_rxbuf)&7f: Bank 0    Addr: 20     
HADR_0X2F:
;
;        while (!TRMT1);
:0X2f  91d7                     JBS             HRAM_0XD7,      1
:0X30  682f                     GOTO            HADR_0X2F
;
;        TX1B = rxbuf;
:0X31  5014                     MOV             (_rxbuf)&7f,    A                    ;(_rxbuf)&7f: Bank 0    Addr: 20     
:0X32  e6d6                     MOVA            HRAM_0XD6
HADR_0X33:
;    }
;}
:0X33  ea00                     SECTION         0X0
:0X34  ac83                     BCC             HRAM_0X83,      4
:0X35  6836                     GOTO            HADR_0X36
HADR_0X36:
:0X36  ffff                     NOP
:0X37  ffff                     NOP
:0X38  5003                     MOV             HRAM_0X3,       A
:0X39  e607                     MOVA            HRAM_0X7
:0X3a  5004                     MOV             HRAM_0X4,       A
:0X3b  e608                     MOVA            HRAM_0X8
:0X3c  5005                     MOV             HRAM_0X5,       A
:0X3d  e609                     MOVA            HRAM_0X9
:0X3e  5006                     MOV             HRAM_0X6,       A
:0X3f  e60a                     MOVA            HRAM_0XA
:0X40  5012                     MOV             (CSEG_PTR+3)&7f,                A    ;(CSEG_PTR+3)&7f: Bank 0    Addr: 18     
:0X41  e610                     MOVA            (CSEG_PTR+1)&7f                      ;(CSEG_PTR+1)&7f: Bank 0    Addr: 16     
:0X42  5011                     MOV             (CSEG_PTR+2)&7f,                A    ;(CSEG_PTR+2)&7f: Bank 0    Addr: 17     
:0X43  e60f                     MOVA            (CSEG_PTR)&7f                        ;(CSEG_PTR)&7f: Bank 0    Addr: 15     
:0X44  500d                     MOV             (MUL_TEMP+2)&7f,                A    ;(MUL_TEMP+2)&7f: Bank 0    Addr: 13     
:0X45  e60b                     MOVA            (MUL_TEMP)&7f                        ;(MUL_TEMP)&7f: Bank 0    Addr: 11     
:0X46  e688                     MOVA            HRAM_0X88
:0X47  500e                     MOV             (MUL_TEMP+3)&7f,                A    ;(MUL_TEMP+3)&7f: Bank 0    Addr: 14     
:0X48  e60c                     MOVA            (MUL_TEMP+1)&7f                      ;(MUL_TEMP+1)&7f: Bank 0    Addr: 12     
:0X49  e689                     MOVA            HRAM_0X89
:0X4a  5001                     MOV             (SAVED_FSR+1)&7f,               A    ;(SAVED_FSR+1)&7f: Bank 0    Addr: 1    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
:0X4b  e682                     MOVA            HRAM_0X82
:0X4c  5000                     MOV             (SAVED_FSR)&7f, A                    ;(SAVED_FSR)&7f: Bank 0    Addr: 0    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
:0X4d  e681                     MOVA            HRAM_0X81
:0X4e  c181                     POP
:0X4f  c189                     RETIE
HADR_0X50:
;
;/**********************************************
;函数名：void main(void)
;描  述：主函数
;输入值：无
;输出值：无
;返回值：无
;**********************************************/
;void main(void)
;{
;    unsigned char *ptr = str;
:0X50  e783                     CLR             HRAM_0X83
:0X51  e500                     MOVI            (_str)>>8
:0X52  ea01                     SECTION         0X1
:0X53  e610                     MOVA            HRAM_0X10
:0X54  e580                     MOVI            _str
:0X55  e60f                     MOVA            HRAM_0XF
;//    RAMclear();
;    GPIOInit();
:0X56  ec00                     PAGE            (_GPIOInit)>>11
:0X57  60c2                     CALL            HADR_0XC2
:0X58  ec00                     PAGE            (_0)>>11
;    PBT5 = 0;       //TX输出
:0X59  adae                     BCC             (_PBT5_0)>>3,   5                    ;(_PBT5_0)>>3: Bank 511    Addr: 65454    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
;    PBT6 = 1;       //RX输入
:0X5a  a6ae                     BSS             (_PBT6_0)>>3,   6                    ;(_PBT6_0)>>3: Bank 511    Addr: 65454    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
;    RX1LEN = 0;     //8位数据接收格式
:0X5b  a483                     BSS             HRAM_0X83,      4
:0X5c  aed5                     BCC             HRAM_0XD5,      6
;    TX1LEN = 0;     //8位数据发送格式
:0X5d  aed7                     BCC             HRAM_0XD7,      6
;    BRGH1 = 0;      //波特率低速模式：波特率=Fosc/(64*(BRR<7:0>+1))
:0X5e  add7                     BCC             HRAM_0XD7,      5
;    BR1R = 0x19;    //波特率=16MHz/(64*(25+1))≈9600bps
:0X5f  e519                     MOVI            0X19
:0X60  e6d8                     MOVA            HRAM_0XD8
;
;#ifdef IT_SR
;    RX1IE = 1;       //接收中断
:0X61  a19f                     BSS             (_RX1IE_0)>>3,  1                    ;(_RX1IE_0)>>3: Bank 511    Addr: 65439    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
;    GIE = 1;        //打开总中断
:0X62  a796                     BSS             (_GIE_0)>>3,    7                    ;(_GIE_0)>>3: Bank 511    Addr: 65430    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
;#endif
;    RX1EN = 1;       //打开接收
:0X63  a7d5                     BSS             HRAM_0XD5,      7
;    TX1EN = 1;       //打开发送
:0X64  a7d7                     BSS             HRAM_0XD7,      7
HADR_0X65:
;
;    while (*ptr)        //发送："www.essemi.com"
:0X65  ea01                     SECTION         0X1
:0X66  5010                     MOV             HRAM_0X10,      A
:0X67  e682                     MOVA            HRAM_0X82
:0X68  500f                     MOV             HRAM_0XF,       A
:0X69  e681                     MOVA            HRAM_0X81
:0X6a  5080                     MOV             HRAM_0X80,      A
:0X6b  2007                     MOVAR           ?_TMP                                ;?_TMP: Bank 0    Addr: 7     
:0X6c  ea00                     SECTION         0X0
:0X6d  5007                     MOV             (?_TMP)&7f,     A                    ;(?_TMP)&7f: Bank 0    Addr: 7     
:0X6e  9a84                     JBC             HRAM_0X84,      2
:0X6f  6885                     GOTO            HADR_0X85
HADR_0X70:
;    {
;        while (!TRMT1);
:0X70  91d7                     JBS             HRAM_0XD7,      1
:0X71  6870                     GOTO            HADR_0X70
;
;        TX1B = *(ptr++);
:0X72  ea01                     SECTION         0X1
:0X73  5010                     MOV             HRAM_0X10,      A
:0X74  e612                     MOVA            HRAM_0X12
:0X75  500f                     MOV             HRAM_0XF,       A
:0X76  e611                     MOVA            HRAM_0X11
:0X77  5012                     MOV             HRAM_0X12,      A
:0X78  e682                     MOVA            HRAM_0X82
:0X79  5011                     MOV             HRAM_0X11,      A
:0X7a  e681                     MOVA            HRAM_0X81
:0X7b  5080                     MOV             HRAM_0X80,      A
:0X7c  2007                     MOVAR           ?_TMP                                ;?_TMP: Bank 0    Addr: 7     
:0X7d  7807                     MOVRA           ?_TMP                                ;?_TMP: Bank 0    Addr: 7     
:0X7e  e6d6                     MOVA            HRAM_0XD6
:0X7f  550f                     INC             HRAM_0XF,       R
:0X80  9284                     JBS             HRAM_0X84,      2
:0X81  6883                     GOTO            HADR_0X83
:0X82  5510                     INC             HRAM_0X10,      R
HADR_0X83:
;        CLRWDT();
:0X83  c18b                     CWDT
;    }
:0X84  6865                     GOTO            HADR_0X65
HADR_0X85:
;    {
;#ifndef IT_SR           //查询方式发送接收
;
;        if (RX1IF == 1)
;        {
;            rxbuf = RX1B;
;
;            while (!TRMT1);
;
;            TX1B = rxbuf;
;        }
;
;#endif
;        CLRWDT();
:0X85  c18b                     CWDT
;    }
:0X86  6885                     GOTO            HADR_0X85
HADR_0X87:
:0X87  5f86                     ADD             HRAM_0X86,      R
:0X88  e401                     RETIA           0X1
:0X89  e480                     RETIA           0X80
:0X8a  e40f                     RETIA           0XF
:0X8b  e477                     RETIA           0X77
:0X8c  e477                     RETIA           0X77
:0X8d  e477                     RETIA           0X77
:0X8e  e42e                     RETIA           0X2E
:0X8f  e465                     RETIA           0X65
:0X90  e473                     RETIA           0X73
:0X91  e473                     RETIA           0X73
:0X92  e465                     RETIA           0X65
:0X93  e46d                     RETIA           0X6D
:0X94  e469                     RETIA           0X69
:0X95  e42e                     RETIA           0X2E
:0X96  e463                     RETIA           0X63
:0X97  e46f                     RETIA           0X6F
:0X98  e46d                     RETIA           0X6D
:0X99  e400                     RETIA           0X0
:0X9a  e400                     RETIA           0X0
HADR_0X9B:
:0X9b  e783                     CLR             HRAM_0X83
:0X9c  e500                     MOVI            (#_CINIT)>>8
:0X9d  e687                     MOVA            HRAM_0X87
:0X9e  e500                     MOVI            0X0
:0X9f  e607                     MOVA            ?_TMP                                ;?_TMP: Bank 0    Addr: 7     
:0Xa0  5007                     MOV             ?_TMP,          A                    ;?_TMP: Bank 0    Addr: 7     
:0Xa1  ec00                     PAGE            (#_CINIT)>>11
:0Xa2  6087                     CALL            HADR_0X87
:0Xa3  e608                     MOVA            ?_TMP+1                              ;?_TMP+1: Bank 0    Addr: 8     
:0Xa4  5108                     MOV             ?_TMP+1,        R                    ;?_TMP+1: Bank 0    Addr: 8     
:0Xa5  9a84                     JBC             HRAM_0X84,      2
:0Xa6  c183                     RET
HADR_0XA7:
:0Xa7  5507                     INC             ?_TMP,          R                    ;?_TMP: Bank 0    Addr: 7     
:0Xa8  5007                     MOV             ?_TMP,          A                    ;?_TMP: Bank 0    Addr: 7     
:0Xa9  ec00                     PAGE            (#_CINIT)>>11
:0Xaa  6087                     CALL            HADR_0X87
:0Xab  e609                     MOVA            ?_TMP+2                              ;?_TMP+2: Bank 0    Addr: 9     
:0Xac  5507                     INC             ?_TMP,          R                    ;?_TMP: Bank 0    Addr: 7     
:0Xad  5007                     MOV             ?_TMP,          A                    ;?_TMP: Bank 0    Addr: 7     
:0Xae  ec00                     PAGE            (#_CINIT)>>11
:0Xaf  6087                     CALL            HADR_0X87
:0Xb0  e60a                     MOVA            ?_TMP+3                              ;?_TMP+3: Bank 0    Addr: 10     
:0Xb1  60b5                     CALL            HADR_0XB5
:0Xb2  5708                     JDEC            HRAM_0X8,       R
:0Xb3  68a7                     GOTO            HADR_0XA7
:0Xb4  c183                     RET
HADR_0XB5:
:0Xb5  5009                     MOV             ?_TMP+2,        A                    ;?_TMP+2: Bank 0    Addr: 9     
:0Xb6  e681                     MOVA            HRAM_0X81
:0Xb7  e500                     MOVI            0X0
:0Xb8  e682                     MOVA            HRAM_0X82
:0Xb9  5507                     INC             ?_TMP,          R                    ;?_TMP: Bank 0    Addr: 7     
:0Xba  5007                     MOV             ?_TMP,          A                    ;?_TMP: Bank 0    Addr: 7     
:0Xbb  ec00                     PAGE            (#_CINIT)>>11
:0Xbc  6087                     CALL            HADR_0X87
:0Xbd  e680                     MOVA            HRAM_0X80
:0Xbe  5509                     INC             ?_TMP+2,        R                    ;?_TMP+2: Bank 0    Addr: 9     
:0Xbf  570a                     JDEC            HRAM_0XA,       R
:0Xc0  68b5                     GOTO            HADR_0XB5
:0Xc1  c183                     RET
HADR_0XC2:
;/*********************************************************
;*Copyright (C), 2020, Shanghai Eastsoft Microelectronics Co., Ltd
;*文件名:  uart.c
;*作  者:  AE Team
;*版  本:  v1.0，编译于iDesigner(v4.2.3.166) + 工具链HRCC(v1.2.0.106)
;*日  期:  2020/07/07
;*描  述:  UART通信演示
;          PB5：TX
;          PB6：RX
;          与上位机通信，波特率9600，复位发送一次"www.essemi.com"，然后循环将接收的数据原样返回。
;          可通过宏定义的方式选择采用查询法发送接收或选择中断方式发送接收。
;*备  注:  本软件仅供学习和演示使用，对用户直接引用代码所带来的风险或后果不承担任何法律责任。
;**********************************************************/
;#include <hic.h>
;
;#define IT_SR       //中断发送接收，注释此宏定义则使用查询方式发送接收
;#define CLRWDT()   {__Asm CWDT;}        //宏定义清狗指令
;
;unsigned char rxbuf;
;unsigned char str[] = "www.essemi.com\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功能
:0Xc2  e783                     CLR             HRAM_0X83
:0Xc3  e5ff                     MOVI            0XFF
:0Xc4  e6bc                     MOVA            _ANSL_0                              ;_ANSL_0: Bank 511    Addr: 65468    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
;    ANSH = 0xFF;        //选择对应端口为数字IO功能
:0Xc5  e5ff                     MOVI            0XFF
:0Xc6  e68d                     MOVA            _ANSH_0                              ;_ANSH_0: Bank 511    Addr: 65421    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
;    PAT = 0x00;         //所有IO设为输出低电平
:0Xc7  e7ad                     CLR             _PAT_0                               ;_PAT_0: Bank 511    Addr: 65453    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
;    PBT = 0x00;
:0Xc8  e7ae                     CLR             _PBT_0                               ;_PBT_0: Bank 511    Addr: 65454    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
;    PCT = 0x00;
:0Xc9  e7af                     CLR             _PCT_0                               ;_PCT_0: Bank 511    Addr: 65455    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
;    PA = 0x00;
:0Xca  e7a8                     CLR             _PA_0                                ;_PA_0: Bank 511    Addr: 65448    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
;    PB = 0x00;
:0Xcb  e7a9                     CLR             _PB_0                                ;_PB_0: Bank 511    Addr: 65449    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
;    PC = 0x00;
:0Xcc  e7aa                     CLR             _PC_0                                ;_PC_0: Bank 511    Addr: 65450    C:\Lisq\Project\Git\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\UART\uart\debug\uart.obj 
;}
:0Xcd  c183                     RET

                                END
