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

                MCU  ES7P169C

A    equ    0
R    equ    1
HRAM_0X0  equ  0X0
HRAM_0X1  equ  0X1
HRAM_0X2  equ  0X2
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_0X9B  equ  0X9b
HRAM_0X9C  equ  0X9c
HRAM_0XA  equ  0Xa
HRAM_0XA8  equ  0Xa8

                ORG             0X00
HADR_0X0:
:0X0  c74ef000                  AJMP            HADR_0X4E
                                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\EXIT\exit\debug\exit.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\EXIT\exit\debug\exit.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
;
;/**********************************************
;函数名：isr(void) interrupt
;描  述：中断服务程序
;输入值：无
;输出值：无
;返回值：无
;**********************************************/
;void isr(void) interrupt
;{
;    if(PIE1==1 && PIF1==1)
:0X1b  e500                     MOVI            0X0
:0X1c  999b                     JBC             HRAM_0X9B,      1
:0X1d  e501                     MOVI            0X1
:0X1e  ea01                     SECTION         0X1
:0X1f  e603                     MOVA            HRAM_0X3
:0X20  5003                     MOV             HRAM_0X3,       A
:0X21  e301                     XORI            0X1
:0X22  9284                     JBS             HRAM_0X84,      2
:0X23  6832                     GOTO            HADR_0X32
:0X24  e500                     MOVI            0X0
:0X25  999c                     JBC             HRAM_0X9C,      1
:0X26  e501                     MOVI            0X1
:0X27  e603                     MOVA            HRAM_0X3
:0X28  5003                     MOV             HRAM_0X3,       A
:0X29  e301                     XORI            0X1
:0X2a  9284                     JBS             HRAM_0X84,      2
:0X2b  6832                     GOTO            HADR_0X32
;    {
;        PA3_volt = PA3;     //读取当前按键状态
:0X2c  a804                     BCC             ((_PA3_volt)>>3)&7f,            0    ;((_PA3_volt)>>3)&7f: Bank 0    Addr: 4     
:0X2d  93a8                     JBS             HRAM_0XA8,      3
:0X2e  6830                     GOTO            HADR_0X30
:0X2f  a004                     BSS             ((_PA3_volt)>>3)&7f,            0    ;((_PA3_volt)>>3)&7f: Bank 0    Addr: 4     
HADR_0X30:
;        key_change_flag = 1;
:0X30  a104                     BSS             ((_key_change_flag)>>3)&7f,     1    ;((_key_change_flag)>>3)&7f: Bank 0    Addr: 4     
;        PIF1 = 0;       //清除外部中断
:0X31  a99c                     BCC             (_PIF1_0)>>3,   1                    ;(_PIF1_0)>>3: Bank 511    Addr: 65436    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
HADR_0X32:
;    }
;}
:0X32  ea00                     SECTION         0X0
:0X33  6834                     GOTO            HADR_0X34
HADR_0X34:
:0X34  ffff                     NOP
:0X35  ffff                     NOP
:0X36  5003                     MOV             HRAM_0X3,       A
:0X37  e607                     MOVA            HRAM_0X7
:0X38  5004                     MOV             HRAM_0X4,       A
:0X39  e608                     MOVA            HRAM_0X8
:0X3a  5005                     MOV             HRAM_0X5,       A
:0X3b  e609                     MOVA            HRAM_0X9
:0X3c  5006                     MOV             HRAM_0X6,       A
:0X3d  e60a                     MOVA            HRAM_0XA
:0X3e  5012                     MOV             (CSEG_PTR+3)&7f,                A    ;(CSEG_PTR+3)&7f: Bank 0    Addr: 18     
:0X3f  e610                     MOVA            (CSEG_PTR+1)&7f                      ;(CSEG_PTR+1)&7f: Bank 0    Addr: 16     
:0X40  5011                     MOV             (CSEG_PTR+2)&7f,                A    ;(CSEG_PTR+2)&7f: Bank 0    Addr: 17     
:0X41  e60f                     MOVA            (CSEG_PTR)&7f                        ;(CSEG_PTR)&7f: Bank 0    Addr: 15     
:0X42  500d                     MOV             (MUL_TEMP+2)&7f,                A    ;(MUL_TEMP+2)&7f: Bank 0    Addr: 13     
:0X43  e60b                     MOVA            (MUL_TEMP)&7f                        ;(MUL_TEMP)&7f: Bank 0    Addr: 11     
:0X44  e688                     MOVA            HRAM_0X88
:0X45  500e                     MOV             (MUL_TEMP+3)&7f,                A    ;(MUL_TEMP+3)&7f: Bank 0    Addr: 14     
:0X46  e60c                     MOVA            (MUL_TEMP+1)&7f                      ;(MUL_TEMP+1)&7f: Bank 0    Addr: 12     
:0X47  e689                     MOVA            HRAM_0X89
:0X48  5001                     MOV             (SAVED_FSR+1)&7f,               A    ;(SAVED_FSR+1)&7f: Bank 0    Addr: 1    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
:0X49  e682                     MOVA            HRAM_0X82
:0X4a  5000                     MOV             (SAVED_FSR)&7f, A                    ;(SAVED_FSR)&7f: Bank 0    Addr: 0    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
:0X4b  e681                     MOVA            HRAM_0X81
:0X4c  c181                     POP
:0X4d  c189                     RETIE
HADR_0X4E:
;
;/**********************************************
;函数名：void main(void)
;描  述：主函数，PA3与外部复位(MRETN)复用，需要在配置字界面选择MRSTEN为数字IO功能。
;输入值：无
;输出值：无
;返回值：无
;**********************************************/
;void main(void) 
;{
;    unsigned int i;     //延时变量
;    RAMclear();
:0X4e  e783                     CLR             HRAM_0X83
:0X4f  ec00                     PAGE            (_RAMclear)>>11
:0X50  6085                     CALL            HADR_0X85
:0X51  ec00                     PAGE            (_0)>>11
;    GPIOInit();
:0X52  ec00                     PAGE            (_GPIOInit)>>11
:0X53  6097                     CALL            HADR_0X97
:0X54  ec00                     PAGE            (_1)>>11
;    INTC0 &= 0xFC;      //PINT1下降沿中断
:0X55  5098                     MOV             _INTC0_0,       A                    ;_INTC0_0: Bank 511    Addr: 65432    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
:0X56  e2fc                     ANDI            0XFC
:0X57  e698                     MOVA            _INTC0_0                             ;_INTC0_0: Bank 511    Addr: 65432    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;    PIE1 = 1;           //打开管脚中断
:0X58  a19b                     BSS             (_PIE1_0)>>3,   1                    ;(_PIE1_0)>>3: Bank 511    Addr: 65435    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;    PIF1 = 0;           //清除外部中断标志
:0X59  a99c                     BCC             (_PIF1_0)>>3,   1                    ;(_PIF1_0)>>3: Bank 511    Addr: 65436    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;    GIE = 1;            //打开总中断     
:0X5a  a796                     BSS             (_GIE_0)>>3,    7                    ;(_GIE_0)>>3: Bank 511    Addr: 65430    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
HADR_0X5B:
;    while(1)
:0X5b  e500                     MOVI            0X0
:0X5c  ea01                     SECTION         0X1
:0X5d  9904                     JBC             HRAM_0X4,       1
:0X5e  e501                     MOVI            0X1
:0X5f  e602                     MOVA            HRAM_0X2
:0X60  5002                     MOV             HRAM_0X2,       A
:0X61  e301                     XORI            0X1
:0X62  9284                     JBS             HRAM_0X84,      2
:0X63  6883                     GOTO            HADR_0X83
;        {
;            for(i = 0;i<10000;i++);     //延时消抖
:0X64  e700                     CLR             HRAM_0X0
:0X65  e701                     CLR             HRAM_0X1
HADR_0X66:
:0X66  e527                     MOVI            0X27
:0X67  ee01                     SUB             HRAM_0X1,       A
:0X68  9284                     JBS             HRAM_0X84,      2
:0X69  686c                     GOTO            HADR_0X6C
:0X6a  e510                     MOVI            0X10
:0X6b  ee00                     SUB             HRAM_0X0,       A
HADR_0X6C:
:0X6c  9884                     JBC             HRAM_0X84,      0
:0X6d  6873                     GOTO            HADR_0X73
:0X6e  5500                     INC             HRAM_0X0,       R
:0X6f  9284                     JBS             HRAM_0X84,      2
:0X70  6872                     GOTO            HADR_0X72
:0X71  5501                     INC             HRAM_0X1,       R
HADR_0X72:
:0X72  6866                     GOTO            HADR_0X66
HADR_0X73:
;            if(PA3_volt == PA3)         //判断按键是否抬起
:0X73  e500                     MOVI            0X0
:0X74  9ba8                     JBC             HRAM_0XA8,      3
:0X75  e501                     MOVI            0X1
:0X76  ea00                     SECTION         0X0
:0X77  e607                     MOVA            (?_TMP)&7f                           ;(?_TMP)&7f: Bank 0    Addr: 7     
:0X78  e500                     MOVI            0X0
:0X79  ea01                     SECTION         0X1
:0X7a  9804                     JBC             HRAM_0X4,       0
:0X7b  e501                     MOVI            0X1
:0X7c  ea00                     SECTION         0X0
:0X7d  5d07                     XOR             (?_TMP)&7f,     R                    ;(?_TMP)&7f: Bank 0    Addr: 7     
:0X7e  9284                     JBS             HRAM_0X84,      2
:0X7f  6881                     GOTO            HADR_0X81
;                PA1 = ~PA1;             //管脚取反
:0X80  29a8                     BTT             (_PA1_0)>>3,    1                    ;(_PA1_0)>>3: Bank 511    Addr: 65448    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
HADR_0X81:
;            key_change_flag = 0;
:0X81  ea01                     SECTION         0X1
:0X82  a904                     BCC             ((_key_change_flag)>>3)&7f,     1    ;((_key_change_flag)>>3)&7f: Bank 0    Addr: 4     
HADR_0X83:
;        CLRWDT();
:0X83  c18b                     CWDT
;    }
:0X84  685b                     GOTO            HADR_0X5B
HADR_0X85:
;/*********************************************************
;*Copyright (C), 2020, Shanghai Eastsoft Microelectronics Co., Ltd
;*文件名:  exit.c
;*作  者:  AE Team
;*版  本:  v1.0，编译于iDesigner(v4.2.3.166) + 工具链HRCC(v1.2.0.106)
;*日  期:  2020/07/07
;*描  述:  按键中断演示
;          PA1：管脚翻转输出
;          PA3：外部中断管脚
;          注意：PA3与外部复位(MRSETN)复用，需要在配置字界面选择MRSTEN为数字IO功能。
;*备  注:  本软件仅供学习和演示使用，对用户直接引用代码所带来的风险或后果不承担任何法律责任。
;**********************************************************/
;#include <hic.h>
;
;#define CLRWDT()   {__Asm CWDT;}        //宏定义清狗指令
;
;sbit key_change_flag;
;sbit PA3_volt;
;
;/******************************************************
;函数名：void RAMclear(void)
;描  述：RAM区数据清零，RAM区地址0x0000~0x03FF
;输入值：无
;输出值：无
;返回值：无
;*******************************************************/
;void RAMclear(void)
;{
;    for (IAAH=0; IAAH<=0x03; IAAH++)
:0X85  e783                     CLR             HRAM_0X83
:0X86  e782                     CLR             _IAAH_0                              ;_IAAH_0: Bank 511    Addr: 65410    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
HADR_0X87:
:0X87  5082                     MOV             _IAAH_0,        A                    ;_IAAH_0: Bank 511    Addr: 65410    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
:0X88  ce03                     SUBI            0X3
:0X89  9084                     JBS             HRAM_0X84,      0
:0X8a  6896                     GOTO            HADR_0X96
;    {
;        for (IAAL=0; IAAL<0xFF; IAAL++)
:0X8b  e781                     CLR             _IAAL_0                              ;_IAAL_0: Bank 511    Addr: 65409    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
HADR_0X8C:
:0X8c  e5ff                     MOVI            0XFF
:0X8d  ee81                     SUB             _IAAL_0,        A                    ;_IAAL_0: Bank 511    Addr: 65409    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
:0X8e  9884                     JBC             HRAM_0X84,      0
:0X8f  6893                     GOTO            HADR_0X93
;            IAD = 0x00;
:0X90  e780                     CLR             _IAD_0                               ;_IAD_0: Bank 511    Addr: 65408    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
:0X91  5581                     INC             _IAAL_0,        R                    ;_IAAL_0: Bank 511    Addr: 65409    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
:0X92  688c                     GOTO            HADR_0X8C
HADR_0X93:
;        IAD = 0x00;
:0X93  e780                     CLR             _IAD_0                               ;_IAD_0: Bank 511    Addr: 65408    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
:0X94  5582                     INC             _IAAH_0,        R                    ;_IAAH_0: Bank 511    Addr: 65410    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;    }
:0X95  6887                     GOTO            HADR_0X87
HADR_0X96:
;}
:0X96  c183                     RET
HADR_0X97:
;
;/******************************************************
;函数名：void GPIOInit(void)
;描  述：首先初始化所有未用到的IO口为输出低电平
;输入值：无
;输出值：无
;返回值：无
;*******************************************************/
;void GPIOInit(void)
;{
;    ANSL = 0xFF;        //选择对应端口为数字IO功能
:0X97  e783                     CLR             HRAM_0X83
:0X98  e5ff                     MOVI            0XFF
:0X99  e6bc                     MOVA            _ANSL_0                              ;_ANSL_0: Bank 511    Addr: 65468    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;	ANSH = 0xFF;
:0X9a  e5ff                     MOVI            0XFF
:0X9b  e68d                     MOVA            _ANSH_0                              ;_ANSH_0: Bank 511    Addr: 65421    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;    PAT = 0x00;         //所有IO设为输出低电平
:0X9c  e7ad                     CLR             _PAT_0                               ;_PAT_0: Bank 511    Addr: 65453    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;    PBT = 0x00;
:0X9d  e7ae                     CLR             _PBT_0                               ;_PBT_0: Bank 511    Addr: 65454    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;    PCT = 0x00;
:0X9e  e7af                     CLR             _PCT_0                               ;_PCT_0: Bank 511    Addr: 65455    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;    PA = 0x00;
:0X9f  e7a8                     CLR             _PA_0                                ;_PA_0: Bank 511    Addr: 65448    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;    PB = 0x00;
:0Xa0  e7a9                     CLR             _PB_0                                ;_PB_0: Bank 511    Addr: 65449    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;    PC = 0x00;
:0Xa1  e7aa                     CLR             _PC_0                                ;_PC_0: Bank 511    Addr: 65450    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;    PAT3 = 1;           //PINT1设为输入
:0Xa2  a3ad                     BSS             (_PAT3_0)>>3,   3                    ;(_PAT3_0)>>3: Bank 511    Addr: 65453    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;    PAPU3 = 1;          //打开上拉
:0Xa3  a3b2                     BSS             (_PAPU3_0)>>3,  3                    ;(_PAPU3_0)>>3: Bank 511    Addr: 65458    C:\Users\lisq\Desktop\AN135_Examples_ES7P169C\EXIT\exit\debug\exit.obj 
;}
:0Xa4  c183                     RET

                                END
