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

                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_0XA  equ  0Xa
HRAM_0XC1  equ  0Xc1
HRAM_0XC5  equ  0Xc5
HRAM_0XC7  equ  0Xc7
HRAM_0XCB  equ  0Xcb
HRAM_0XCD  equ  0Xcd
HRAM_0XD1  equ  0Xd1
HRAM_0XDC  equ  0Xdc
HRAM_0XDD  equ  0Xdd
HRAM_0XDE  equ  0Xde
HRAM_0XDF  equ  0Xdf
HRAM_0XE0  equ  0Xe0

                ORG             0X00
HADR_0X0:
:0X0  c74bf000                  AJMP            HADR_0X4B
                                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\T31\timer_internal_clock\debug\timer_internal_clock.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\T31\timer_internal_clock\debug\timer_internal_clock.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 (UPIS==1 && UPIF==1)        //定时器溢出中断
:0X1b  e500                     MOVI            0X0
:0X1c  98cb                     JBC             HRAM_0XCB,      0
: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  682f                     GOTO            HADR_0X2F
:0X24  e500                     MOVI            0X0
:0X25  98cd                     JBC             HRAM_0XCD,      0
: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  682f                     GOTO            HADR_0X2F
;    {
;        UPIC = 1;       //清溢出标志位，UPIF必须要在T31IF之前清除
:0X2c  a0d1                     BSS             HRAM_0XD1,      0
;        T31IF = 0;      //清定时器总标志位，UPIF必须要在T31IF之前清除
:0X2d  aa9a                     BCC             (_T31IF_0)>>3,  2                    ;(_T31IF_0)>>3: Bank 511    Addr: 65434    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;
;        PA1 = ~PA1;
:0X2e  29a8                     BTT             (_PA1_0)>>3,    1                    ;(_PA1_0)>>3: Bank 511    Addr: 65448    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
HADR_0X2F:
;    }
;}
:0X2f  ea00                     SECTION         0X0
:0X30  6831                     GOTO            HADR_0X31
HADR_0X31:
:0X31  ffff                     NOP
:0X32  ffff                     NOP
:0X33  5003                     MOV             HRAM_0X3,       A
:0X34  e607                     MOVA            HRAM_0X7
:0X35  5004                     MOV             HRAM_0X4,       A
:0X36  e608                     MOVA            HRAM_0X8
:0X37  5005                     MOV             HRAM_0X5,       A
:0X38  e609                     MOVA            HRAM_0X9
:0X39  5006                     MOV             HRAM_0X6,       A
:0X3a  e60a                     MOVA            HRAM_0XA
:0X3b  5012                     MOV             (CSEG_PTR+3)&7f,                A    ;(CSEG_PTR+3)&7f: Bank 0    Addr: 18     
:0X3c  e610                     MOVA            (CSEG_PTR+1)&7f                      ;(CSEG_PTR+1)&7f: Bank 0    Addr: 16     
:0X3d  5011                     MOV             (CSEG_PTR+2)&7f,                A    ;(CSEG_PTR+2)&7f: Bank 0    Addr: 17     
:0X3e  e60f                     MOVA            (CSEG_PTR)&7f                        ;(CSEG_PTR)&7f: Bank 0    Addr: 15     
:0X3f  500d                     MOV             (MUL_TEMP+2)&7f,                A    ;(MUL_TEMP+2)&7f: Bank 0    Addr: 13     
:0X40  e60b                     MOVA            (MUL_TEMP)&7f                        ;(MUL_TEMP)&7f: Bank 0    Addr: 11     
:0X41  e688                     MOVA            HRAM_0X88
:0X42  500e                     MOV             (MUL_TEMP+3)&7f,                A    ;(MUL_TEMP+3)&7f: Bank 0    Addr: 14     
:0X43  e60c                     MOVA            (MUL_TEMP+1)&7f                      ;(MUL_TEMP+1)&7f: Bank 0    Addr: 12     
:0X44  e689                     MOVA            HRAM_0X89
:0X45  5001                     MOV             (SAVED_FSR+1)&7f,               A    ;(SAVED_FSR+1)&7f: Bank 0    Addr: 1    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
:0X46  e682                     MOVA            HRAM_0X82
:0X47  5000                     MOV             (SAVED_FSR)&7f, A                    ;(SAVED_FSR)&7f: Bank 0    Addr: 0    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
:0X48  e681                     MOVA            HRAM_0X81
:0X49  c181                     POP
:0X4a  c189                     RETIE
HADR_0X4B:
;
;/*******************************************************
;函数名：void main(void)
;描  述：主函数，定时器1s溢出翻转PA1
;输入值：无
;输出值：无
;返回值：无
;*******************************************************/
;void main(void)
;{
;    RAMclear();
:0X4b  e783                     CLR             HRAM_0X83
:0X4c  ec00                     PAGE            (_RAMclear)>>11
:0X4d  6065                     CALL            HADR_0X65
:0X4e  ec00                     PAGE            (_0)>>11
;    GPIOInit();
:0X4f  ec00                     PAGE            (_GPIOInit)>>11
:0X50  6077                     CALL            HADR_0X77
:0X51  ec00                     PAGE            (_1)>>11
;    T31C2L = 0x00;      //禁止从模式，使用内部HRC(16mHz)作为计数器时钟源
:0X52  e7c5                     CLR             HRAM_0XC5
;    T31C0L = 0x00;      //T31CNTLD寄存器无缓冲，写入值立即生效。计数器边沿计数模式，向上计数
:0X53  e7c1                     CLR             HRAM_0XC1
;    T31CNTLDH = 0xF4;     //重装载值，计数器与其匹配时产生事件
:0X54  e5f4                     MOVI            0XF4
:0X55  e6df                     MOVA            HRAM_0XDF
;    T31CNTLDL = 0x24;
:0X56  e524                     MOVI            0X24
:0X57  e6de                     MOVA            HRAM_0XDE
;    T31PRSH = 0x00;       //预分频系数1:16
:0X58  e7dd                     CLR             HRAM_0XDD
;    T31PRSL = 0x0F;
:0X59  e50f                     MOVI            0XF
:0X5a  e6dc                     MOVA            HRAM_0XDC
;    T31POS = 0x0F;        //计数器与T31CNTLD第16次匹配事件时产生溢出中断  
:0X5b  e50f                     MOVI            0XF
:0X5c  e6e0                     MOVA            HRAM_0XE0
;    UPIE = 1;       //打开计数溢出中断
:0X5d  a0c7                     BSS             HRAM_0XC7,      0
;    T31IE = 1;      //开启多功能定时器中断
:0X5e  a299                     BSS             (_T31IE_0)>>3,  2                    ;(_T31IE_0)>>3: Bank 511    Addr: 65433    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;    UPIC = 1;       //清溢出标志位
:0X5f  a0d1                     BSS             HRAM_0XD1,      0
;    T31IF = 0;      //清定时器总标志位
:0X60  aa9a                     BCC             (_T31IF_0)>>3,  2                    ;(_T31IF_0)>>3: Bank 511    Addr: 65434    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;    GIE = 1;        //开启全局中断
:0X61  a796                     BSS             (_GIE_0)>>3,    7                    ;(_GIE_0)>>3: Bank 511    Addr: 65430    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;    T31EN = 1;      //使能计数器
:0X62  a0c1                     BSS             HRAM_0XC1,      0
HADR_0X63:
;    while (1)
:0X63  c18b                     CWDT
;    }
:0X64  6863                     GOTO            HADR_0X63
HADR_0X65:
;/*******************************************************
;*Copyright(C),2020,Shanghai Eastsoft Microelectronics Co.,Ltd.
;*文件名：timer_internal_clock.c
;*作  者：AE Team
;*版  本：v1.0，编译于iDesigner(v4.2.3.166) + 工具链HRCC(v1.2.0.106)
;*日  期：2020/07/09
;*描  述：多功能定时器内部时钟源定时模式，定时器1s溢出翻转PA1
;*备  注：本软件仅供学习和演示使用，对用户直接引用代码所带来的风险或后果不承担任何法律责任。
;*******************************************************/
;#include <hic.h>
;
;#define CLRWDT()   {__Asm CWDT;}        //宏定义清狗指令
;
;/******************************************************
;函数名：void RAMclear(void)
;描  述：RAM区数据清零，RAM区地址0x0000~0x03FF
;输入值：无
;输出值：无
;返回值：无
;*******************************************************/
;void RAMclear(void)
;{
;    for (IAAH=0; IAAH<=0x03; IAAH++)
:0X65  e783                     CLR             HRAM_0X83
:0X66  e782                     CLR             _IAAH_0                              ;_IAAH_0: Bank 511    Addr: 65410    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
HADR_0X67:
:0X67  5082                     MOV             _IAAH_0,        A                    ;_IAAH_0: Bank 511    Addr: 65410    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
:0X68  ce03                     SUBI            0X3
:0X69  9084                     JBS             HRAM_0X84,      0
:0X6a  6876                     GOTO            HADR_0X76
;    {
;        for (IAAL=0; IAAL<0xFF; IAAL++)
:0X6b  e781                     CLR             _IAAL_0                              ;_IAAL_0: Bank 511    Addr: 65409    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
HADR_0X6C:
:0X6c  e5ff                     MOVI            0XFF
:0X6d  ee81                     SUB             _IAAL_0,        A                    ;_IAAL_0: Bank 511    Addr: 65409    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
:0X6e  9884                     JBC             HRAM_0X84,      0
:0X6f  6873                     GOTO            HADR_0X73
;            IAD = 0x00;
:0X70  e780                     CLR             _IAD_0                               ;_IAD_0: Bank 511    Addr: 65408    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
:0X71  5581                     INC             _IAAL_0,        R                    ;_IAAL_0: Bank 511    Addr: 65409    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
:0X72  686c                     GOTO            HADR_0X6C
HADR_0X73:
;        IAD = 0x00;
:0X73  e780                     CLR             _IAD_0                               ;_IAD_0: Bank 511    Addr: 65408    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
:0X74  5582                     INC             _IAAH_0,        R                    ;_IAAH_0: Bank 511    Addr: 65410    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;    }
:0X75  6867                     GOTO            HADR_0X67
HADR_0X76:
;}
:0X76  c183                     RET
HADR_0X77:
;
;/******************************************************
;函数名：void GPIOInit(void)
;描  述：首先初始化所有未用到的IO口为输出低电平
;输入值：无
;输出值：无
;返回值：无
;*******************************************************/
;void GPIOInit(void)
;{
;    ANSL = 0xFF;        //选择对应端口为数字IO功能
:0X77  e783                     CLR             HRAM_0X83
:0X78  e5ff                     MOVI            0XFF
:0X79  e6bc                     MOVA            _ANSL_0                              ;_ANSL_0: Bank 511    Addr: 65468    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;	ANSH = 0xFF;
:0X7a  e5ff                     MOVI            0XFF
:0X7b  e68d                     MOVA            _ANSH_0                              ;_ANSH_0: Bank 511    Addr: 65421    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;    PAT = 0x00;         //所有IO设为输出低电平
:0X7c  e7ad                     CLR             _PAT_0                               ;_PAT_0: Bank 511    Addr: 65453    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;    PBT = 0x00;
:0X7d  e7ae                     CLR             _PBT_0                               ;_PBT_0: Bank 511    Addr: 65454    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;    PCT = 0x00;
:0X7e  e7af                     CLR             _PCT_0                               ;_PCT_0: Bank 511    Addr: 65455    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;    PA = 0x00;
:0X7f  e7a8                     CLR             _PA_0                                ;_PA_0: Bank 511    Addr: 65448    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;    PB = 0x00;
:0X80  e7a9                     CLR             _PB_0                                ;_PB_0: Bank 511    Addr: 65449    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;    PC = 0x00;
:0X81  e7aa                     CLR             _PC_0                                ;_PC_0: Bank 511    Addr: 65450    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\T31\timer_internal_clock\debug\timer_internal_clock.obj 
;}
:0X82  c183                     RET

                                END
