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

                MCU  ES7P169C

A    equ    0
R    equ    1
HRAM_0X0  equ  0X0
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_0X81  equ  0X81
HRAM_0X82  equ  0X82
HRAM_0X83  equ  0X83
HRAM_0X84  equ  0X84
HRAM_0X87  equ  0X87
HRAM_0X88  equ  0X88
HRAM_0X89  equ  0X89
HRAM_0X9  equ  0X9
HRAM_0X9D  equ  0X9d
HRAM_0X9E  equ  0X9e
HRAM_0XA  equ  0Xa
HRAM_0XEC  equ  0Xec
HRAM_0XED  equ  0Xed
HRAM_0XF0  equ  0Xf0
HRAM_0XF1  equ  0Xf1
HRAM_0XF2  equ  0Xf2

                ORG             0X00
HADR_0X0:
:0X0  c74af000                  AJMP            HADR_0X4A
                                ORG             0X2
:0X2  6800                      GOTO            HADR_0X0
                                ORG             0X4
: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\T21\timer\debug\timer.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\T21\timer\debug\timer.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 (T21VIE==1 && T21VIF==1)        //定时器溢出中断
:0X1b  e500                     MOVI            0X0
:0X1c  9a9d                     JBC             HRAM_0X9D,      2
:0X1d  e501                     MOVI            0X1
:0X1e  ea01                     SECTION         0X1
:0X1f  e600                     MOVA            HRAM_0X0
:0X20  5000                     MOV             HRAM_0X0,       A
:0X21  e301                     XORI            0X1
:0X22  9284                     JBS             HRAM_0X84,      2
:0X23  682e                     GOTO            HADR_0X2E
:0X24  e500                     MOVI            0X0
:0X25  9a9e                     JBC             HRAM_0X9E,      2
:0X26  e501                     MOVI            0X1
:0X27  e600                     MOVA            HRAM_0X0
:0X28  5000                     MOV             HRAM_0X0,       A
:0X29  e301                     XORI            0X1
:0X2a  9284                     JBS             HRAM_0X84,      2
:0X2b  682e                     GOTO            HADR_0X2E
;    {
;        T21VIF = 0;        //清标志位
:0X2c  aa9e                     BCC             (_T21VIF_0)>>3, 2                    ;(_T21VIF_0)>>3: Bank 511    Addr: 65438    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;        PA1 = ~PA1;
:0X2d  29a8                     BTT             (_PA1_0)>>3,    1                    ;(_PA1_0)>>3: Bank 511    Addr: 65448    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
HADR_0X2E:
;    }
;}
:0X2e  ea00                     SECTION         0X0
:0X2f  6830                     GOTO            HADR_0X30
HADR_0X30:
:0X30  ffff                     NOP
:0X31  ffff                     NOP
:0X32  5003                     MOV             HRAM_0X3,       A
:0X33  e607                     MOVA            HRAM_0X7
:0X34  5004                     MOV             HRAM_0X4,       A
:0X35  e608                     MOVA            HRAM_0X8
:0X36  5005                     MOV             HRAM_0X5,       A
:0X37  e609                     MOVA            HRAM_0X9
:0X38  5006                     MOV             HRAM_0X6,       A
:0X39  e60a                     MOVA            HRAM_0XA
:0X3a  5012                     MOV             (CSEG_PTR+3)&7f,                A    ;(CSEG_PTR+3)&7f: Bank 0    Addr: 18     
:0X3b  e610                     MOVA            (CSEG_PTR+1)&7f                      ;(CSEG_PTR+1)&7f: Bank 0    Addr: 16     
:0X3c  5011                     MOV             (CSEG_PTR+2)&7f,                A    ;(CSEG_PTR+2)&7f: Bank 0    Addr: 17     
:0X3d  e60f                     MOVA            (CSEG_PTR)&7f                        ;(CSEG_PTR)&7f: Bank 0    Addr: 15     
:0X3e  500d                     MOV             (MUL_TEMP+2)&7f,                A    ;(MUL_TEMP+2)&7f: Bank 0    Addr: 13     
:0X3f  e60b                     MOVA            (MUL_TEMP)&7f                        ;(MUL_TEMP)&7f: Bank 0    Addr: 11     
:0X40  e688                     MOVA            HRAM_0X88
:0X41  500e                     MOV             (MUL_TEMP+3)&7f,                A    ;(MUL_TEMP+3)&7f: Bank 0    Addr: 14     
:0X42  e60c                     MOVA            (MUL_TEMP+1)&7f                      ;(MUL_TEMP+1)&7f: Bank 0    Addr: 12     
:0X43  e689                     MOVA            HRAM_0X89
:0X44  5001                     MOV             (SAVED_FSR+1)&7f,               A    ;(SAVED_FSR+1)&7f: Bank 0    Addr: 1    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
:0X45  e682                     MOVA            HRAM_0X82
:0X46  5000                     MOV             (SAVED_FSR)&7f, A                    ;(SAVED_FSR)&7f: Bank 0    Addr: 0    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
:0X47  e681                     MOVA            HRAM_0X81
:0X48  c181                     POP
:0X49  c189                     RETIE
HADR_0X4A:
;
;/*******************************************************
;函数名：void main(void)
;描  述：主函数
;输入值：无
;输出值：无
;返回值：无
;*******************************************************/
;void main(void)
;{
;    RAMclear();
:0X4a  e783                     CLR             HRAM_0X83
:0X4b  ec00                     PAGE            (_RAMclear)>>11
:0X4c  6060                     CALL            HADR_0X60
:0X4d  ec00                     PAGE            (_0)>>11
;    GPIOInit();
:0X4e  ec00                     PAGE            (_GPIOInit)>>11
:0X4f  6072                     CALL            HADR_0X72
:0X50  ec00                     PAGE            (_1)>>11
;    T21CL = 0x00;        //定时器模式
:0X51  e7f0                     CLR             HRAM_0XF0
;    T21CM = 0x0F;        //预分频1:16
:0X52  e50f                     MOVI            0XF
:0X53  e6f1                     MOVA            HRAM_0XF1
;    T21CH = 0x79;        //后分频次数121
:0X54  e579                     MOVI            0X79
:0X55  e6f2                     MOVA            HRAM_0XF2
;    T21PH = 0x0F;        //周期值高4位
:0X56  e50f                     MOVI            0XF
:0X57  e6ed                     MOVA            HRAM_0XED
;    T21PL = 0xFF;        //周期值低8位
:0X58  e5ff                     MOVI            0XFF
:0X59  e6ec                     MOVA            HRAM_0XEC
;    T21VIE = 1;          //打开T21溢出中断
:0X5a  a29d                     BSS             (_T21VIE_0)>>3, 2                    ;(_T21VIE_0)>>3: Bank 511    Addr: 65437    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;    T21VIF = 0;          //清标志位
:0X5b  aa9e                     BCC             (_T21VIF_0)>>3, 2                    ;(_T21VIF_0)>>3: Bank 511    Addr: 65438    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;    GIE = 1;             //开全局中断
:0X5c  a796                     BSS             (_GIE_0)>>3,    7                    ;(_GIE_0)>>3: Bank 511    Addr: 65430    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;    T21EN = 1;           //使能T21
:0X5d  a7f2                     BSS             HRAM_0XF2,      7
HADR_0X5E:
;    while (1)
:0X5e  c18b                     CWDT
;    }
:0X5f  685e                     GOTO            HADR_0X5E
HADR_0X60:
;/*******************************************************
;*Copyright(C),2020,Shanghai Eastsoft Microelectronics Co.,Ltd.
;*文件名：timer.c
;*作  者：AE Team
;*版  本：v1.0，编译于iDesigner(v4.2.3.166) + 工具链HRCC(v1.2.0.106)
;*日  期：2020/07/09
;*描  述：T21定时器定时模式，计数器溢出翻转PA1，溢出周期0.5s。预分频器决定计数器时钟频率，后分频器决定溢出总长度。
;        单纯的一次计数器溢出并不会置起溢出标志，只有当计数器溢出次数与后分频器+1相等时才置起溢出标志。
;*备  注：本软件仅供学习和演示使用，对用户直接引用代码所带来的风险或后果不承担任何法律责任。
;*******************************************************/
;#include <hic.h>
;
;#define CLRWDT()   {__Asm CWDT;}        //宏定义清狗指令
;
;/******************************************************
;函数名：void RAMclear(void)
;描  述：RAM区数据清零，RAM区地址0x0000~0x03FF
;输入值：无
;输出值：无
;返回值：无
;*******************************************************/
;void RAMclear(void)
;{
;    for (IAAH=0; IAAH<=0x03; IAAH++)
:0X60  e783                     CLR             HRAM_0X83
:0X61  e782                     CLR             _IAAH_0                              ;_IAAH_0: Bank 511    Addr: 65410    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
HADR_0X62:
:0X62  5082                     MOV             _IAAH_0,        A                    ;_IAAH_0: Bank 511    Addr: 65410    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
:0X63  ce03                     SUBI            0X3
:0X64  9084                     JBS             HRAM_0X84,      0
:0X65  6871                     GOTO            HADR_0X71
;    {
;        for (IAAL=0; IAAL<0xFF; IAAL++)
:0X66  e781                     CLR             _IAAL_0                              ;_IAAL_0: Bank 511    Addr: 65409    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
HADR_0X67:
:0X67  e5ff                     MOVI            0XFF
:0X68  ee81                     SUB             _IAAL_0,        A                    ;_IAAL_0: Bank 511    Addr: 65409    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
:0X69  9884                     JBC             HRAM_0X84,      0
:0X6a  686e                     GOTO            HADR_0X6E
;            IAD = 0x00;
:0X6b  e780                     CLR             _IAD_0                               ;_IAD_0: Bank 511    Addr: 65408    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
:0X6c  5581                     INC             _IAAL_0,        R                    ;_IAAL_0: Bank 511    Addr: 65409    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
:0X6d  6867                     GOTO            HADR_0X67
HADR_0X6E:
;        IAD = 0x00;
:0X6e  e780                     CLR             _IAD_0                               ;_IAD_0: Bank 511    Addr: 65408    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
:0X6f  5582                     INC             _IAAH_0,        R                    ;_IAAH_0: Bank 511    Addr: 65410    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;    }
:0X70  6862                     GOTO            HADR_0X62
HADR_0X71:
;}
:0X71  c183                     RET
HADR_0X72:
;
;/******************************************************
;函数名：void GPIOInit(void)
;描  述：首先初始化所有未用到的IO口为输出低电平
;输入值：无
;输出值：无
;返回值：无
;*******************************************************/
;void GPIOInit(void)
;{
;    ANSL = 0xFF;        //选择对应端口为数字IO功能
:0X72  e783                     CLR             HRAM_0X83
:0X73  e5ff                     MOVI            0XFF
:0X74  e6bc                     MOVA            _ANSL_0                              ;_ANSL_0: Bank 511    Addr: 65468    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;    ANSH = 0xFF;        
:0X75  e5ff                     MOVI            0XFF
:0X76  e68d                     MOVA            _ANSH_0                              ;_ANSH_0: Bank 511    Addr: 65421    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;    PAT = 0x00;         //所有IO设为输出低电平
:0X77  e7ad                     CLR             _PAT_0                               ;_PAT_0: Bank 511    Addr: 65453    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;    PBT = 0x00;
:0X78  e7ae                     CLR             _PBT_0                               ;_PBT_0: Bank 511    Addr: 65454    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;    PCT = 0x00;
:0X79  e7af                     CLR             _PCT_0                               ;_PCT_0: Bank 511    Addr: 65455    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;    PA = 0x00;
:0X7a  e7a8                     CLR             _PA_0                                ;_PA_0: Bank 511    Addr: 65448    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;    PB = 0x00;
:0X7b  e7a9                     CLR             _PB_0                                ;_PB_0: Bank 511    Addr: 65449    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;    PC = 0x00;
:0X7c  e7aa                     CLR             _PC_0                                ;_PC_0: Bank 511    Addr: 65450    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T21\timer\debug\timer.obj 
;}
:0X7d  c183                     RET

                                END
