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

                MCU  ES7P169C

A    equ    0
R    equ    1
HRAM_0X1  equ  0X1
HRAM_0X10  equ  0X10
HRAM_0X11  equ  0X11
HRAM_0X12  equ  0X12
HRAM_0X13  equ  0X13
HRAM_0X14  equ  0X14
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_0X80  equ  0X80
HRAM_0X81  equ  0X81
HRAM_0X82  equ  0X82
HRAM_0X83  equ  0X83
HRAM_0X84  equ  0X84
HRAM_0X85  equ  0X85
HRAM_0X86  equ  0X86
HRAM_0X87  equ  0X87
HRAM_0X88  equ  0X88
HRAM_0X89  equ  0X89
HRAM_0X8A  equ  0X8a
HRAM_0X8B  equ  0X8b
HRAM_0X8C  equ  0X8c
HRAM_0X8D  equ  0X8d
HRAM_0X8E  equ  0X8e
HRAM_0X8F  equ  0X8f
HRAM_0X9  equ  0X9
HRAM_0X90  equ  0X90
HRAM_0X91  equ  0X91
HRAM_0X92  equ  0X92
HRAM_0X93  equ  0X93
HRAM_0X94  equ  0X94
HRAM_0X95  equ  0X95
HRAM_0X96  equ  0X96
HRAM_0XA  equ  0Xa
HRAM_0XB  equ  0Xb
HRAM_0XC  equ  0Xc
HRAM_0XD  equ  0Xd
HRAM_0XE  equ  0Xe
HRAM_0XF  equ  0Xf

                ORG             0X00
HADR_0X0:
:0X0  60a8                      CALL            HADR_0XA8
:0X1  c704f000                  AJMP            HADR_0X4
                                ORG             0X3
:0X3  6800                      GOTO            HADR_0X0
HADR_0X4:
;}
;
;/*******************************************************
;函数名：void main(void)
;描  述：主函数，程序区IAP操作，程序区地址：0000~1FFF
;输入值：无
;输出值：无
;返回值：无
;*******************************************************/
;void main(void)
;{
;    unsigned char i;
;    unsigned int j;
;    unsigned long codeflash;
;    unsigned int flashaddr;     //地址变量，用于flash擦除、读写操作
;
;    RAMclear();
:0X4  e783                      CLR             HRAM_0X83
:0X5  ec00                      PAGE            (_RAMclear)>>11
:0X6  60cf                      CALL            HADR_0XCF
:0X7  ec00                      PAGE            (_5)>>11
;    GPIOInit();
:0X8  ec00                      PAGE            (_GPIOInit)>>11
:0X9  60e1                      CALL            HADR_0XE1
:0Xa  ec00                      PAGE            (_6)>>11
;    CLRWDT();
:0Xb  c18b                      CWDT
;
;    /************IAP擦除操作，以页为单位，每页256Word*******/
;    flashaddr = STARTADDR;      //擦除包含flashaddr地址的整页
:0Xc  e51f                      MOVI            0X1F
:0Xd  2083                      MOVAR           HRAM_0X83
:0Xe  e500                      MOVI            0X0
:0Xf  2082                      MOVAR           HRAM_0X82
;    j = (ENDADDR >> 8) - (STARTADDR >> 8) + 1; //计算在起始地址和结束地址之间需要擦除的页数量
;
;    for (i = 0; i < j; i++)
:0X10  ea01                     SECTION         0X1
:0X11  e701                     CLR             HRAM_0X1
HADR_0X12:
:0X12  e501                     MOVI            0X1
:0X13  ee01                     SUB             HRAM_0X1,       A
:0X14  9884                     JBC             HRAM_0X84,      0
:0X15  6830                     GOTO            HADR_0X30
;    {
;        CallFlashEn = 0x55;     //CallFlashEn赋值0x55才能正常执行擦除编程操作
:0X16  e555                     MOVI            0X55
:0X17  e615                     MOVA            (_CallFlashEn)&7f                    ;(_CallFlashEn)&7f: Bank 0    Addr: 21     
;        FlashErsPage(flashaddr, ~flashaddr);
:0X18  5002                     MOV             HRAM_0X2,       A
:0X19  e608                     MOVA            HRAM_0X8
:0X1a  5003                     MOV             HRAM_0X3,       A
:0X1b  e609                     MOVA            HRAM_0X9
:0X1c  5202                     COM             HRAM_0X2,       A
:0X1d  e604                     MOVA            HRAM_0X4
:0X1e  5203                     COM             HRAM_0X3,       A
:0X1f  e605                     MOVA            HRAM_0X5
:0X20  5004                     MOV             HRAM_0X4,       A
:0X21  e60a                     MOVA            HRAM_0XA
:0X22  5005                     MOV             HRAM_0X5,       A
:0X23  e60b                     MOVA            HRAM_0XB
:0X24  ec00                     PAGE            (_FlashErsPage)>>11
:0X25  6106                     CALL            HADR_0X106
:0X26  ec00                     PAGE            (_7)>>11
;        flashaddr += 0x80;     //擦除下一页
:0X27  7882                     MOVRA           HRAM_0X82
:0X28  e080                     ADDI            0X80
:0X29  2082                     MOVAR           HRAM_0X82
:0X2a  7883                     MOVRA           HRAM_0X83
:0X2b  c300                     ADDCI           0X0
:0X2c  2083                     MOVAR           HRAM_0X83
:0X2d  ea01                     SECTION         0X1
:0X2e  5501                     INC             HRAM_0X1,       R
;    }
:0X2f  6812                     GOTO            HADR_0X12
HADR_0X30:
;
;    ROMCL = 0x00;       //退出IAP
:0X30  e794                     CLR             _ROMCL_0                             ;_ROMCL_0: Bank 511    Addr: 65428    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    CLRWDT();
:0X31  c18b                     CWDT
;
;    /******************IAP写入并读出校验********************/
;    for (flashaddr = STARTADDR; flashaddr <= ENDADDR; flashaddr += 2)
:0X32  e51f                     MOVI            0X1F
:0X33  e603                     MOVA            HRAM_0X3
:0X34  e500                     MOVI            0X0
:0X35  e602                     MOVA            HRAM_0X2
HADR_0X36:
:0X36  5003                     MOV             HRAM_0X3,       A
:0X37  ce1f                     SUBI            0X1F
:0X38  9284                     JBS             HRAM_0X84,      2
:0X39  683c                     GOTO            HADR_0X3C
:0X3a  5002                     MOV             HRAM_0X2,       A
:0X3b  ce7f                     SUBI            0X7F
HADR_0X3C:
:0X3c  9084                     JBS             HRAM_0X84,      0
:0X3d  6867                     GOTO            HADR_0X67
;    {
;        CallFlashEn = 0x55;     //CallFlashEn赋值0x55才能正常执行擦除编程操作
:0X3e  e555                     MOVI            0X55
:0X3f  e615                     MOVA            (_CallFlashEn)&7f                    ;(_CallFlashEn)&7f: Bank 0    Addr: 21     
;        i = FlashWrData(flashaddr, ~flashaddr, WRDATA);
:0X40  5002                     MOV             HRAM_0X2,       A
:0X41  e608                     MOVA            HRAM_0X8
:0X42  5003                     MOV             HRAM_0X3,       A
:0X43  e609                     MOVA            HRAM_0X9
:0X44  5202                     COM             HRAM_0X2,       A
:0X45  e604                     MOVA            HRAM_0X4
:0X46  5203                     COM             HRAM_0X3,       A
:0X47  e605                     MOVA            HRAM_0X5
:0X48  5004                     MOV             HRAM_0X4,       A
:0X49  e60a                     MOVA            HRAM_0XA
:0X4a  5005                     MOV             HRAM_0X5,       A
:0X4b  e60b                     MOVA            HRAM_0XB
:0X4c  e578                     MOVI            0X78
:0X4d  e60c                     MOVA            HRAM_0XC
:0X4e  e556                     MOVI            0X56
:0X4f  e60d                     MOVA            HRAM_0XD
:0X50  e534                     MOVI            0X34
:0X51  e60e                     MOVA            HRAM_0XE
:0X52  e512                     MOVI            0X12
:0X53  e60f                     MOVA            HRAM_0XF
:0X54  ec00                     PAGE            (_FlashWrData)>>11
:0X55  6223                     CALL            HADR_0X223
:0X56  ec00                     PAGE            (_8)>>11
:0X57  2081                     MOVAR           HRAM_0X81
;
;        if (i != 1)
:0X58  7881                     MOVRA           HRAM_0X81
:0X59  e301                     XORI            0X1
:0X5a  9a84                     JBC             HRAM_0X84,      2
:0X5b  685f                     GOTO            HADR_0X5F
;            dataerr = 1;        //数据校验出错
:0X5c  e501                     MOVI            0X1
:0X5d  ea01                     SECTION         0X1
:0X5e  e600                     MOVA            (_dataerr)&7f                        ;(_dataerr)&7f: Bank 0    Addr: 0     
HADR_0X5F:
;    }
:0X5f  ea01                     SECTION         0X1
:0X60  5002                     MOV             HRAM_0X2,       A
:0X61  e002                     ADDI            0X2
:0X62  e602                     MOVA            HRAM_0X2
:0X63  5003                     MOV             HRAM_0X3,       A
:0X64  c300                     ADDCI           0X0
:0X65  e603                     MOVA            HRAM_0X3
:0X66  6836                     GOTO            HADR_0X36
HADR_0X67:
;
;    ROMCL = 0x00;       //退出IAP
:0X67  e794                     CLR             _ROMCL_0                             ;_ROMCL_0: Bank 511    Addr: 65428    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    CLRWDT();
:0X68  c18b                     CWDT
;
;    /******************IAP读出校验(示例)********************/
;    for (flashaddr = STARTADDR; flashaddr <= ENDADDR; flashaddr += 2)
:0X69  e51f                     MOVI            0X1F
:0X6a  e603                     MOVA            HRAM_0X3
:0X6b  e500                     MOVI            0X0
:0X6c  e602                     MOVA            HRAM_0X2
HADR_0X6D:
:0X6d  5003                     MOV             HRAM_0X3,       A
:0X6e  ce1f                     SUBI            0X1F
:0X6f  9284                     JBS             HRAM_0X84,      2
:0X70  6873                     GOTO            HADR_0X73
:0X71  5002                     MOV             HRAM_0X2,       A
:0X72  ce7f                     SUBI            0X7F
HADR_0X73:
:0X73  9084                     JBS             HRAM_0X84,      0
:0X74  689e                     GOTO            HADR_0X9E
;    {
;        codeflash = FlashRdData(flashaddr);
:0X75  5002                     MOV             HRAM_0X2,       A
:0X76  e608                     MOVA            HRAM_0X8
:0X77  5003                     MOV             HRAM_0X3,       A
:0X78  e609                     MOVA            HRAM_0X9
:0X79  ec00                     PAGE            (_FlashRdData)>>11
:0X7a  6162                     CALL            HADR_0X162
:0X7b  ec00                     PAGE            (_9)>>11
:0X7c  2084                     MOVAR           HRAM_0X84
:0X7d  5001                     MOV             (?_TMP+1)&7f,   A                    ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X7e  2085                     MOVAR           HRAM_0X85
:0X7f  5002                     MOV             (?_TMP+2)&7f,   A                    ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X80  2086                     MOVAR           HRAM_0X86
:0X81  5003                     MOV             (?_TMP+3)&7f,   A                    ;(?_TMP+3)&7f: Bank 0    Addr: 3     
:0X82  2087                     MOVAR           HRAM_0X87
;
;        if (codeflash != WRDATA)
:0X83  7884                     MOVRA           HRAM_0X84
:0X84  e378                     XORI            0X78
:0X85  9284                     JBS             HRAM_0X84,      2
:0X86  6894                     GOTO            HADR_0X94
:0X87  ea01                     SECTION         0X1
:0X88  5005                     MOV             HRAM_0X5,       A
:0X89  e356                     XORI            0X56
:0X8a  9284                     JBS             HRAM_0X84,      2
:0X8b  6894                     GOTO            HADR_0X94
:0X8c  5006                     MOV             HRAM_0X6,       A
:0X8d  e334                     XORI            0X34
:0X8e  9284                     JBS             HRAM_0X84,      2
:0X8f  6894                     GOTO            HADR_0X94
:0X90  5007                     MOV             HRAM_0X7,       A
:0X91  e312                     XORI            0X12
:0X92  9a84                     JBC             HRAM_0X84,      2
:0X93  6897                     GOTO            HADR_0X97
HADR_0X94:
;            dataerr = 1;        //数据校验出错
:0X94  e501                     MOVI            0X1
:0X95  ea01                     SECTION         0X1
:0X96  e600                     MOVA            (_dataerr)&7f                        ;(_dataerr)&7f: Bank 0    Addr: 0     
HADR_0X97:
;    }
:0X97  5002                     MOV             HRAM_0X2,       A
:0X98  e002                     ADDI            0X2
:0X99  e602                     MOVA            HRAM_0X2
:0X9a  5003                     MOV             HRAM_0X3,       A
:0X9b  c300                     ADDCI           0X0
:0X9c  e603                     MOVA            HRAM_0X3
:0X9d  686d                     GOTO            HADR_0X6D
HADR_0X9E:
;
;    ROMCL = 0x00;       //退出IAP
:0X9e  e794                     CLR             _ROMCL_0                             ;_ROMCL_0: Bank 511    Addr: 65428    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    CLRWDT();
:0X9f  c18b                     CWDT
HADR_0XA0:
;
;    while (1)
:0Xa0  c18b                     CWDT
;    }
:0Xa1  68a0                     GOTO            HADR_0XA0
HADR_0XA2:
:0Xa2  5f86                     ADD             HRAM_0X86,      R
:0Xa3  e401                     RETIA           0X1
:0Xa4  e480                     RETIA           0X80
:0Xa5  e401                     RETIA           0X1
:0Xa6  e400                     RETIA           0X0
:0Xa7  e400                     RETIA           0X0
HADR_0XA8:
:0Xa8  e783                     CLR             HRAM_0X83
:0Xa9  e500                     MOVI            (#_CINIT)>>8
:0Xaa  e687                     MOVA            HRAM_0X87
:0Xab  e500                     MOVI            0X0
:0Xac  e600                     MOVA            ?_TMP                                ;?_TMP: Bank 0    Addr: 0     
:0Xad  5000                     MOV             ?_TMP,          A                    ;?_TMP: Bank 0    Addr: 0     
:0Xae  ec00                     PAGE            (#_CINIT)>>11
:0Xaf  60a2                     CALL            HADR_0XA2
:0Xb0  e601                     MOVA            ?_TMP+1                              ;?_TMP+1: Bank 0    Addr: 1     
:0Xb1  5101                     MOV             ?_TMP+1,        R                    ;?_TMP+1: Bank 0    Addr: 1     
:0Xb2  9a84                     JBC             HRAM_0X84,      2
:0Xb3  c183                     RET
HADR_0XB4:
:0Xb4  5500                     INC             ?_TMP,          R                    ;?_TMP: Bank 0    Addr: 0     
:0Xb5  5000                     MOV             ?_TMP,          A                    ;?_TMP: Bank 0    Addr: 0     
:0Xb6  ec00                     PAGE            (#_CINIT)>>11
:0Xb7  60a2                     CALL            HADR_0XA2
:0Xb8  e602                     MOVA            ?_TMP+2                              ;?_TMP+2: Bank 0    Addr: 2     
:0Xb9  5500                     INC             ?_TMP,          R                    ;?_TMP: Bank 0    Addr: 0     
:0Xba  5000                     MOV             ?_TMP,          A                    ;?_TMP: Bank 0    Addr: 0     
:0Xbb  ec00                     PAGE            (#_CINIT)>>11
:0Xbc  60a2                     CALL            HADR_0XA2
:0Xbd  e603                     MOVA            ?_TMP+3                              ;?_TMP+3: Bank 0    Addr: 3     
:0Xbe  60c2                     CALL            HADR_0XC2
:0Xbf  5701                     JDEC            HRAM_0X1,       R
:0Xc0  68b4                     GOTO            HADR_0XB4
:0Xc1  c183                     RET
HADR_0XC2:
:0Xc2  5002                     MOV             ?_TMP+2,        A                    ;?_TMP+2: Bank 0    Addr: 2     
:0Xc3  e681                     MOVA            HRAM_0X81
:0Xc4  e500                     MOVI            0X0
:0Xc5  e682                     MOVA            HRAM_0X82
:0Xc6  5500                     INC             ?_TMP,          R                    ;?_TMP: Bank 0    Addr: 0     
:0Xc7  5000                     MOV             ?_TMP,          A                    ;?_TMP: Bank 0    Addr: 0     
:0Xc8  ec00                     PAGE            (#_CINIT)>>11
:0Xc9  60a2                     CALL            HADR_0XA2
:0Xca  e680                     MOVA            HRAM_0X80
:0Xcb  5502                     INC             ?_TMP+2,        R                    ;?_TMP+2: Bank 0    Addr: 2     
:0Xcc  5703                     JDEC            HRAM_0X3,       R
:0Xcd  68c2                     GOTO            HADR_0XC2
:0Xce  c183                     RET
HADR_0XCF:
;/*******************************************************
;*Copyright(C),2020,Shanghai Eastsoft Microelectronics Co.,Ltd.
;*文件名：iap_flash.c
;*作  者：AE Team
;*版  本：v1.1，编译于iDesigner(v4.2.3.166) + 工具链HRCC(v1.2.0.106)
;*日  期：2020/12/18
;*描  述：程序区IAP操作，需在配置字使能FREN。程序区地址：0x0000~0x1FFF，0x0000~0x007F为第1页，
;         0x0080~0x00FF为第2页，0x0100~0x017F为第3页，以此类推。。。
;         IAP擦除以页(256个地址单元)为单位，对一个地址执行擦除动作即是擦除这个地址所在的一整页。
;         IAP写入以一个地址单元为单位(一个地址单元对应一个Word)。每页擦除时间至少2ms，单个地址编程时间至少25us。
;         增加IAP擦除编程软件锁，防止程序跑飞误擦程序。
;        注意：建议IAP操作前关闭WDT(配置字选择WDTEN为Disable)，若使能WDT，请设置合理的WDT溢出时间，并合理清狗。
;*备  注：本软件仅供学习和演示使用，对用户直接引用代码所带来的风险或后果不承担任何法律责任。
;*******************************************************/
;#include <hic.h>
;
;#define CLRWDT()   {__Asm CWDT;}    //宏定义清狗指令
;
;#define STARTADDR    0x1F00         //宏定义程序区IAP操作起始地址
;#define ENDADDR      0x1F7F         //宏定义程序区IAP操作结束地址
;#define WRDATA       0x12345678     //宏定义待写入的数据
;
;unsigned char dataerr = 0;      //0：写入与读出相等，1：写入与读出不等
;
;unsigned char CallFlashEn, FlashEwEn; //软件锁变量
;
;/******************************************************
;函数名：void RAMclear(void)
;描  述：RAM区数据清零，RAM区地址0x0000~0x03FF
;输入值：无
;输出值：无
;返回值：无
;*******************************************************/
;void RAMclear(void)
;{
;    for (IAAH = 0; IAAH <= 0x03; IAAH++)
:0Xcf  e783                     CLR             HRAM_0X83
:0Xd0  e782                     CLR             _IAAH_0                              ;_IAAH_0: Bank 511    Addr: 65410    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
HADR_0XD1:
:0Xd1  5082                     MOV             _IAAH_0,        A                    ;_IAAH_0: Bank 511    Addr: 65410    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0Xd2  ce03                     SUBI            0X3
:0Xd3  9084                     JBS             HRAM_0X84,      0
:0Xd4  68e0                     GOTO            HADR_0XE0
;    {
;        for (IAAL = 0; IAAL < 0xFF; IAAL++)
:0Xd5  e781                     CLR             _IAAL_0                              ;_IAAL_0: Bank 511    Addr: 65409    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
HADR_0XD6:
:0Xd6  e5ff                     MOVI            0XFF
:0Xd7  ee81                     SUB             _IAAL_0,        A                    ;_IAAL_0: Bank 511    Addr: 65409    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0Xd8  9884                     JBC             HRAM_0X84,      0
:0Xd9  68dd                     GOTO            HADR_0XDD
;            IAD = 0x00;
:0Xda  e780                     CLR             _IAD_0                               ;_IAD_0: Bank 511    Addr: 65408    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0Xdb  5581                     INC             _IAAL_0,        R                    ;_IAAL_0: Bank 511    Addr: 65409    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0Xdc  68d6                     GOTO            HADR_0XD6
HADR_0XDD:
;
;        IAD = 0x00;
:0Xdd  e780                     CLR             _IAD_0                               ;_IAD_0: Bank 511    Addr: 65408    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0Xde  5582                     INC             _IAAH_0,        R                    ;_IAAH_0: Bank 511    Addr: 65410    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    }
:0Xdf  68d1                     GOTO            HADR_0XD1
HADR_0XE0:
;}
:0Xe0  c183                     RET
HADR_0XE1:
;
;/******************************************************
;函数名：void GPIOInit(void)
;描  述：首先初始化所有未用到的IO口为输出低电平
;输入值：无
;输出值：无
;返回值：无
;*******************************************************/
;void GPIOInit(void)
;{
;    ANSH = 0xFF;        //选择对应端口为数字IO功能
:0Xe1  e783                     CLR             HRAM_0X83
:0Xe2  e5ff                     MOVI            0XFF
:0Xe3  e68d                     MOVA            _ANSH_0                              ;_ANSH_0: Bank 511    Addr: 65421    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    ANSL = 0xFF;        //选择对应端口为数字IO功能
:0Xe4  e5ff                     MOVI            0XFF
:0Xe5  e6bc                     MOVA            _ANSL_0                              ;_ANSL_0: Bank 511    Addr: 65468    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    PAT = 0x00;         //所有IO设为输出低电平
:0Xe6  e7ad                     CLR             _PAT_0                               ;_PAT_0: Bank 511    Addr: 65453    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    PBT = 0x00;
:0Xe7  e7ae                     CLR             _PBT_0                               ;_PBT_0: Bank 511    Addr: 65454    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    PCT = 0x00;
:0Xe8  e7af                     CLR             _PCT_0                               ;_PCT_0: Bank 511    Addr: 65455    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    PA = 0x00;
:0Xe9  e7a8                     CLR             _PA_0                                ;_PA_0: Bank 511    Addr: 65448    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    PB = 0x00;
:0Xea  e7a9                     CLR             _PB_0                                ;_PB_0: Bank 511    Addr: 65449    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    PC = 0x00;
:0Xeb  e7aa                     CLR             _PC_0                                ;_PC_0: Bank 511    Addr: 65450    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;}
:0Xec  c183                     RET
HADR_0XED:
;
;static volatile unsigned int section8 FRAN @ 0xFF8E;
;static volatile unsigned int section8 FRA  @ 0xFF90;
;
;/******************************************************
;函数名：void StartIAP(void)
;描  述：开始IAP操作。注意：IAP固定操作格式，使用时不可改变
;输入值：无
;输出值：无
;返回值：无
;*******************************************************/
;void StartIAP(void)
;{
;    __asm
:0Xed  e783                     CLR             HRAM_0X83
;    {
;        MOVI 0x55
:0Xee  e555                     MOVI            0X55
;        MOVA ROMCH
:0Xef  e695                     MOVA            HRAM_0X95
;        MOVI 0xFF     //8个NOP代替语句开始
:0Xf0  e5ff                     MOVI            0XFF
;        SECSEL &FlashEwEn &% 0x80//选择变量所在的section
:0Xf1  ea01                     SECTION         (_FlashEwEn)>>7
;        XOR &FlashEwEn &% 0x80, 0 //0xFF xor 0xAA = 0x55
:0Xf2  5c16                     XOR             (_FlashEwEn)&7f,                A    ;(_FlashEwEn)&7f: Bank 0    Addr: 22     
;        SECSEL &CallFlashEn &% 0x80//选择变量所在的section
:0Xf3  ea01                     SECTION         (_CallFlashEn)>>7
;        XOR &CallFlashEn &% 0x80, 0 //若CallFlashEn在调用函数前为0x55，0x55 xor 0x55 = 0x00
:0Xf4  5c15                     XOR             (_CallFlashEn)&7f,              A    ;(_CallFlashEn)&7f: Bank 0    Addr: 21     
;        JBS PSW, Z //如果运算结果为0x00，则执行正确，跳至下一个NOP
:0Xf5  9284                     JBS             HRAM_0X84,      2
;        GOTO $+3
:0Xf6  68f9                     GOTO            HADR_0XF9
;        NOP//8个NOP代替语句结束
:0Xf7  ffff                     NOP
;        MOVI 0xAA
:0Xf8  e5aa                     MOVI            0XAA
HADR_0XF9:
;        MOVA ROMCH
:0Xf9  e695                     MOVA            HRAM_0X95
;        MOVI 0xFF     //8个NOP代替语句开始
:0Xfa  e5ff                     MOVI            0XFF
;        SECSEL &FlashEwEn &% 0x80//选择变量所在的section
:0Xfb  ea01                     SECTION         (_FlashEwEn)>>7
;        XOR &FlashEwEn &% 0x80, 0 //0xFF xor 0xAA = 0x55
:0Xfc  5c16                     XOR             (_FlashEwEn)&7f,                A    ;(_FlashEwEn)&7f: Bank 0    Addr: 22     
;        SECSEL &CallFlashEn &% 0x80//选择变量所在的section
:0Xfd  ea01                     SECTION         (_CallFlashEn)>>7
;        XOR &CallFlashEn &% 0x80, 0 //若CallFlashEn在调用函数前为0x55，0x55 xor 0x55 = 0x00
:0Xfe  5c15                     XOR             (_CallFlashEn)&7f,              A    ;(_CallFlashEn)&7f: Bank 0    Addr: 21     
;        JBS PSW, Z //如果运算结果为0x00，则执行正确，跳至下一个NOP
:0Xff  9284                     JBS             HRAM_0X84,      2
;        GOTO $+3
:0X100  6903                    GOTO            HADR_0X103
;        NOP//8个NOP代替语句结束
:0X101  ffff                    NOP
;        BSS ROMCL, WR    //触发编程操作
:0X102  a194                    BSS             HRAM_0X94,      1
HADR_0X103:
;        JBC ROMCL, WR
:0X103  9994                    JBC             HRAM_0X94,      1
;        goto $-1         //等待操作结束
:0X104  6903                    GOTO            HADR_0X103
;    }
:0X105  c183                    RET
HADR_0X106:
;
;/*******************************************************
;函数名：void FlashErsPage(unsigned int addr)
;描  述：擦除地址所在的整页(256 word)，地址范围：0x0000~0x1FFF
;输入值：Flash地址addr，Flash取反地址addri
;输出值：无
;返回值：无
;*******************************************************/
;void FlashErsPage(unsigned int addr, unsigned int addri)
;{
;    unsigned char gie_bk = GIE;     //备份GIE
:0X106  e783                    CLR             HRAM_0X83
:0X107  e500                    MOVI            0X0
:0X108  9f96                    JBC             HRAM_0X96,      7
:0X109  e501                    MOVI            0X1
:0X10a  ea01                    SECTION         0X1
:0X10b  e60d                    MOVA            HRAM_0XD
:0X10c  500d                    MOV             HRAM_0XD,       A
:0X10d  e60c                    MOVA            HRAM_0XC
;    CLRWDT();
:0X10e  c18b                    CWDT
HADR_0X10F:
;
;    while (GIE == 1)GIE = 0;           //启动IAP前关闭全局中断
:0X10f  e500                    MOVI            0X0
:0X110  9f96                    JBC             HRAM_0X96,      7
:0X111  e501                    MOVI            0X1
:0X112  e60d                    MOVA            HRAM_0XD
:0X113  500d                    MOV             HRAM_0XD,       A
:0X114  e301                    XORI            0X1
:0X115  9284                    JBS             HRAM_0X84,      2
:0X116  6919                    GOTO            HADR_0X119
:0X117  af96                    BCC             (_GIE_0)>>3,    7                   ;(_GIE_0)>>3: Bank 511    Addr: 65430    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X118  690f                    GOTO            HADR_0X10F
HADR_0X119:
;
;    FlashEwEn = 0xAA;//设置软件锁变量
:0X119  e5aa                    MOVI            0XAA
:0X11a  e616                    MOVA            (_FlashEwEn)&7f                     ;(_FlashEwEn)&7f: Bank 0    Addr: 22     
;
;    FPEE = 1;           //存储器擦除模式
:0X11b  a394                    BSS             (_FPEE_0)>>3,   3                   ;(_FPEE_0)>>3: Bank 511    Addr: 65428    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    FRAH = addr >> 8;
:0X11c  e508                    MOVI            0X8
:0X11d  e001                    ADDI            0X1
:0X11e  2000                    MOVAR           ?_TMP                               ;?_TMP: Bank 0    Addr: 0     
:0X11f  5008                    MOV             HRAM_0X8,       A
:0X120  2001                    MOVAR           ?_TMP+1                             ;?_TMP+1: Bank 0    Addr: 1     
:0X121  5009                    MOV             HRAM_0X9,       A
:0X122  2002                    MOVAR           ?_TMP+2                             ;?_TMP+2: Bank 0    Addr: 2     
:0X123  7800                    MOVRA           ?_TMP                               ;?_TMP: Bank 0    Addr: 0     
:0X124  6929                    GOTO            HADR_0X129
HADR_0X125:
:0X125  a884                    BCC             HRAM_0X84,      0
:0X126  ea00                    SECTION         0X0
:0X127  d102                    RRB             (?_TMP+2)&7f,   R,              0X1 ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X128  d101                    RRB             (?_TMP+1)&7f,   R,              0X1 ;(?_TMP+1)&7f: Bank 0    Addr: 1     
HADR_0X129:
:0X129  e0ff                    ADDI            0XFF
:0X12a  9284                    JBS             HRAM_0X84,      2
:0X12b  6925                    GOTO            HADR_0X125
:0X12c  ea00                    SECTION         0X0
:0X12d  5001                    MOV             (?_TMP+1)&7f,   A                   ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X12e  e691                    MOVA            _FRAH_0                             ;_FRAH_0: Bank 511    Addr: 65425    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    FRAL = addr;
:0X12f  7888                    MOVRA           HRAM_0X88
:0X130  e690                    MOVA            _FRAL_0                             ;_FRAL_0: Bank 511    Addr: 65424    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    FRAHN = addri >> 8;    //IAP擦除/编程必须满足地址取反逻辑
:0X131  e508                    MOVI            0X8
:0X132  e001                    ADDI            0X1
:0X133  e600                    MOVA            (?_TMP)&7f                          ;(?_TMP)&7f: Bank 0    Addr: 0     
:0X134  788a                    MOVRA           HRAM_0X8A
:0X135  e601                    MOVA            (?_TMP+1)&7f                        ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X136  788b                    MOVRA           HRAM_0X8B
:0X137  e602                    MOVA            (?_TMP+2)&7f                        ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X138  5000                    MOV             (?_TMP)&7f,     A                   ;(?_TMP)&7f: Bank 0    Addr: 0     
:0X139  693d                    GOTO            HADR_0X13D
HADR_0X13A:
:0X13a  a884                    BCC             HRAM_0X84,      0
:0X13b  d102                    RRB             (?_TMP+2)&7f,   R,              0X1 ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X13c  d101                    RRB             (?_TMP+1)&7f,   R,              0X1 ;(?_TMP+1)&7f: Bank 0    Addr: 1     
HADR_0X13D:
:0X13d  e0ff                    ADDI            0XFF
:0X13e  9284                    JBS             HRAM_0X84,      2
:0X13f  693a                    GOTO            HADR_0X13A
:0X140  5001                    MOV             (?_TMP+1)&7f,   A                   ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X141  e68f                    MOVA            _FRAHN_0                            ;_FRAHN_0: Bank 511    Addr: 65423    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    FRALN = addri;
:0X142  788a                    MOVRA           HRAM_0X8A
:0X143  e68e                    MOVA            _FRALN_0                            ;_FRALN_0: Bank 511    Addr: 65422    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;
;    WREN = 1;           //使能擦除/编程功能
:0X144  a294                    BSS             (_WREN_0)>>3,   2                   ;(_WREN_0)>>3: Bank 511    Addr: 65428    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    StartIAP();         //开始IAP操作
:0X145  ec00                    PAGE            (_StartIAP)>>11
:0X146  60ed                    CALL            HADR_0XED
:0X147  ec00                    PAGE            (_3)>>11
;    ROMCL = 0x00;       //退出IAP
:0X148  e794                    CLR             _ROMCL_0                            ;_ROMCL_0: Bank 511    Addr: 65428    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    FRA = 0xFF12;   //指到不用的地址空间
:0X149  e5ff                    MOVI            0XFF
:0X14a  e691                    MOVA            _FRA_0+1                            ;_FRA_0+1: Bank 511    Addr: 65425    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X14b  e512                    MOVI            0X12
:0X14c  e690                    MOVA            _FRA_0                              ;_FRA_0: Bank 511    Addr: 65424    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    FRAN = 0x3456;  //此处把地址反码赋成与0xFFFF和FRA无取反关系的值
:0X14d  e534                    MOVI            0X34
:0X14e  e68f                    MOVA            _FRAN_0+1                           ;_FRAN_0+1: Bank 511    Addr: 65423    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X14f  e556                    MOVI            0X56
:0X150  e68e                    MOVA            _FRAN_0                             ;_FRAN_0: Bank 511    Addr: 65422    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    CallFlashEn = 0;//清零软件锁变量
:0X151  ea01                    SECTION         0X1
:0X152  e715                    CLR             (_CallFlashEn)&7f                   ;(_CallFlashEn)&7f: Bank 0    Addr: 21     
;    FlashEwEn = 0;
:0X153  e716                    CLR             (_FlashEwEn)&7f                     ;(_FlashEwEn)&7f: Bank 0    Addr: 22     
;    GIE = gie_bk;            //恢复全局中断
:0X154  ea00                    SECTION         0X0
:0X155  a80a                    BCC             ((_FlashErsPage_#T20520_9)>>3)&7f,              0   ;((_FlashErsPage_#T20520_9)>>3)&7f: Bank 0    Addr: 10    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X156  ea01                    SECTION         0X1
:0X157  900c                    JBS             HRAM_0XC,       0
:0X158  695b                    GOTO            HADR_0X15B
:0X159  ea00                    SECTION         0X0
:0X15a  a00a                    BSS             ((_FlashErsPage_#T20520_9)>>3)&7f,              0   ;((_FlashErsPage_#T20520_9)>>3)&7f: Bank 0    Addr: 10    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
HADR_0X15B:
:0X15b  ea00                    SECTION         0X0
:0X15c  980a                    JBC             HRAM_0XA,       0
:0X15d  6960                    GOTO            HADR_0X160
:0X15e  af96                    BCC             (_GIE_0)>>3,    7                   ;(_GIE_0)>>3: Bank 511    Addr: 65430    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X15f  6961                    GOTO            HADR_0X161
HADR_0X160:
:0X160  a796                    BSS             (_GIE_0)>>3,    7                   ;(_GIE_0)>>3: Bank 511    Addr: 65430    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
HADR_0X161:
;}
:0X161  c183                    RET
HADR_0X162:
;
;/*******************************************************
;函数名：unsigned long FlashRdData(unsigned int addr)
;描  述：读Flash指定地址的数据，地址范围：0x0000~0x1FFF
;输入值：Flash地址addr
;输出值：无
;返回值：Flash指定地址的数据
;*******************************************************/
;unsigned long FlashRdData(unsigned int addr)
;{
;    unsigned long data;
;    unsigned char gie_bk = GIE;     //备份GIE
:0X162  e783                    CLR             HRAM_0X83
:0X163  e500                    MOVI            0X0
:0X164  9f96                    JBC             HRAM_0X96,      7
:0X165  e501                    MOVI            0X1
:0X166  ea01                    SECTION         0X1
:0X167  e60a                    MOVA            HRAM_0XA
:0X168  500a                    MOV             HRAM_0XA,       A
:0X169  e60c                    MOVA            HRAM_0XC
;    CLRWDT();
:0X16a  c18b                    CWDT
HADR_0X16B:
;
;    while (GIE == 1)GIE = 0;           //启动IAP前关闭全局中断
:0X16b  e500                    MOVI            0X0
:0X16c  9f96                    JBC             HRAM_0X96,      7
:0X16d  e501                    MOVI            0X1
:0X16e  e60a                    MOVA            HRAM_0XA
:0X16f  500a                    MOV             HRAM_0XA,       A
:0X170  e301                    XORI            0X1
:0X171  9284                    JBS             HRAM_0X84,      2
:0X172  6975                    GOTO            HADR_0X175
:0X173  af96                    BCC             (_GIE_0)>>3,    7                   ;(_GIE_0)>>3: Bank 511    Addr: 65430    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X174  696b                    GOTO            HADR_0X16B
HADR_0X175:
;
;    FRAH = addr >> 8;
:0X175  e508                    MOVI            0X8
:0X176  e001                    ADDI            0X1
:0X177  ea00                    SECTION         0X0
:0X178  e600                    MOVA            (?_TMP)&7f                          ;(?_TMP)&7f: Bank 0    Addr: 0     
:0X179  7888                    MOVRA           HRAM_0X88
:0X17a  e601                    MOVA            (?_TMP+1)&7f                        ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X17b  7889                    MOVRA           HRAM_0X89
:0X17c  e602                    MOVA            (?_TMP+2)&7f                        ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X17d  5000                    MOV             (?_TMP)&7f,     A                   ;(?_TMP)&7f: Bank 0    Addr: 0     
:0X17e  6982                    GOTO            HADR_0X182
HADR_0X17F:
:0X17f  a884                    BCC             HRAM_0X84,      0
:0X180  d102                    RRB             (?_TMP+2)&7f,   R,              0X1 ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X181  d101                    RRB             (?_TMP+1)&7f,   R,              0X1 ;(?_TMP+1)&7f: Bank 0    Addr: 1     
HADR_0X182:
:0X182  e0ff                    ADDI            0XFF
:0X183  9284                    JBS             HRAM_0X84,      2
:0X184  697f                    GOTO            HADR_0X17F
:0X185  5001                    MOV             (?_TMP+1)&7f,   A                   ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X186  e691                    MOVA            _FRAH_0                             ;_FRAH_0: Bank 511    Addr: 65425    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    FRAL = addr;
:0X187  7888                    MOVRA           HRAM_0X88
:0X188  e690                    MOVA            _FRAL_0                             ;_FRAL_0: Bank 511    Addr: 65424    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    __Asm TBR;          //查表读指令
:0X189  c184                    TBR
;    data = ((unsigned long)ROMD1H << 24) | ((unsigned long)ROMD1L << 16) | ((unsigned long)ROMDH << 8) | ROMDL;
:0X18a  ea01                    SECTION         0X1
:0X18b  e709                    CLR             HRAM_0X9
:0X18c  e70a                    CLR             HRAM_0XA
:0X18d  e70b                    CLR             HRAM_0XB
:0X18e  50a2                    MOV             _ROMD1H_0,      A                   ;_ROMD1H_0: Bank 511    Addr: 65442    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X18f  e608                    MOVA            HRAM_0X8
:0X190  e518                    MOVI            0X18
:0X191  e001                    ADDI            0X1
:0X192  2000                    MOVAR           ?_TMP                               ;?_TMP: Bank 0    Addr: 0     
:0X193  5008                    MOV             HRAM_0X8,       A
:0X194  2001                    MOVAR           ?_TMP+1                             ;?_TMP+1: Bank 0    Addr: 1     
:0X195  5009                    MOV             HRAM_0X9,       A
:0X196  2002                    MOVAR           ?_TMP+2                             ;?_TMP+2: Bank 0    Addr: 2     
:0X197  500a                    MOV             HRAM_0XA,       A
:0X198  2003                    MOVAR           ?_TMP+3                             ;?_TMP+3: Bank 0    Addr: 3     
:0X199  500b                    MOV             HRAM_0XB,       A
:0X19a  2004                    MOVAR           ?_TMP+4                             ;?_TMP+4: Bank 0    Addr: 4     
:0X19b  7800                    MOVRA           ?_TMP                               ;?_TMP: Bank 0    Addr: 0     
:0X19c  69a3                    GOTO            HADR_0X1A3
HADR_0X19D:
:0X19d  a884                    BCC             HRAM_0X84,      0
:0X19e  ea00                    SECTION         0X0
:0X19f  b101                    RLB             (?_TMP+1)&7f,   R,              0X1 ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X1a0  b102                    RLB             (?_TMP+2)&7f,   R,              0X1 ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X1a1  b103                    RLB             (?_TMP+3)&7f,   R,              0X1 ;(?_TMP+3)&7f: Bank 0    Addr: 3     
:0X1a2  b104                    RLB             (?_TMP+4)&7f,   R,              0X1 ;(?_TMP+4)&7f: Bank 0    Addr: 4     
HADR_0X1A3:
:0X1a3  e0ff                    ADDI            0XFF
:0X1a4  9284                    JBS             HRAM_0X84,      2
:0X1a5  699d                    GOTO            HADR_0X19D
:0X1a6  ea00                    SECTION         0X0
:0X1a7  5001                    MOV             (?_TMP+1)&7f,   A                   ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X1a8  208d                    MOVAR           HRAM_0X8D
:0X1a9  5002                    MOV             (?_TMP+2)&7f,   A                   ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X1aa  208e                    MOVAR           HRAM_0X8E
:0X1ab  5003                    MOV             (?_TMP+3)&7f,   A                   ;(?_TMP+3)&7f: Bank 0    Addr: 3     
:0X1ac  208f                    MOVAR           HRAM_0X8F
:0X1ad  5004                    MOV             (?_TMP+4)&7f,   A                   ;(?_TMP+4)&7f: Bank 0    Addr: 4     
:0X1ae  2090                    MOVAR           HRAM_0X90
:0X1af  ea01                    SECTION         0X1
:0X1b0  e709                    CLR             HRAM_0X9
:0X1b1  e70a                    CLR             HRAM_0XA
:0X1b2  e70b                    CLR             HRAM_0XB
:0X1b3  50a1                    MOV             _ROMD1L_0,      A                   ;_ROMD1L_0: Bank 511    Addr: 65441    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X1b4  e608                    MOVA            HRAM_0X8
:0X1b5  e510                    MOVI            0X10
:0X1b6  e001                    ADDI            0X1
:0X1b7  2000                    MOVAR           ?_TMP                               ;?_TMP: Bank 0    Addr: 0     
:0X1b8  5008                    MOV             HRAM_0X8,       A
:0X1b9  2001                    MOVAR           ?_TMP+1                             ;?_TMP+1: Bank 0    Addr: 1     
:0X1ba  5009                    MOV             HRAM_0X9,       A
:0X1bb  2002                    MOVAR           ?_TMP+2                             ;?_TMP+2: Bank 0    Addr: 2     
:0X1bc  500a                    MOV             HRAM_0XA,       A
:0X1bd  2003                    MOVAR           ?_TMP+3                             ;?_TMP+3: Bank 0    Addr: 3     
:0X1be  500b                    MOV             HRAM_0XB,       A
:0X1bf  2004                    MOVAR           ?_TMP+4                             ;?_TMP+4: Bank 0    Addr: 4     
:0X1c0  7800                    MOVRA           ?_TMP                               ;?_TMP: Bank 0    Addr: 0     
:0X1c1  69c8                    GOTO            HADR_0X1C8
HADR_0X1C2:
:0X1c2  a884                    BCC             HRAM_0X84,      0
:0X1c3  ea00                    SECTION         0X0
:0X1c4  b101                    RLB             (?_TMP+1)&7f,   R,              0X1 ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X1c5  b102                    RLB             (?_TMP+2)&7f,   R,              0X1 ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X1c6  b103                    RLB             (?_TMP+3)&7f,   R,              0X1 ;(?_TMP+3)&7f: Bank 0    Addr: 3     
:0X1c7  b104                    RLB             (?_TMP+4)&7f,   R,              0X1 ;(?_TMP+4)&7f: Bank 0    Addr: 4     
HADR_0X1C8:
:0X1c8  e0ff                    ADDI            0XFF
:0X1c9  9284                    JBS             HRAM_0X84,      2
:0X1ca  69c2                    GOTO            HADR_0X1C2
:0X1cb  ea00                    SECTION         0X0
:0X1cc  5001                    MOV             (?_TMP+1)&7f,   A                   ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X1cd  2091                    MOVAR           HRAM_0X91
:0X1ce  5002                    MOV             (?_TMP+2)&7f,   A                   ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X1cf  2092                    MOVAR           HRAM_0X92
:0X1d0  5003                    MOV             (?_TMP+3)&7f,   A                   ;(?_TMP+3)&7f: Bank 0    Addr: 3     
:0X1d1  2093                    MOVAR           HRAM_0X93
:0X1d2  5004                    MOV             (?_TMP+4)&7f,   A                   ;(?_TMP+4)&7f: Bank 0    Addr: 4     
:0X1d3  2094                    MOVAR           HRAM_0X94
:0X1d4  7891                    MOVRA           HRAM_0X91
:0X1d5  ea01                    SECTION         0X1
:0X1d6  580d                    IOR             HRAM_0XD,       A
:0X1d7  e608                    MOVA            HRAM_0X8
:0X1d8  5012                    MOV             HRAM_0X12,      A
:0X1d9  580e                    IOR             HRAM_0XE,       A
:0X1da  e609                    MOVA            HRAM_0X9
:0X1db  5013                    MOV             HRAM_0X13,      A
:0X1dc  580f                    IOR             HRAM_0XF,       A
:0X1dd  e60a                    MOVA            HRAM_0XA
:0X1de  5014                    MOV             HRAM_0X14,      A
:0X1df  5810                    IOR             HRAM_0X10,      A
:0X1e0  e60b                    MOVA            HRAM_0XB
:0X1e1  e70e                    CLR             HRAM_0XE
:0X1e2  e70f                    CLR             HRAM_0XF
:0X1e3  e710                    CLR             HRAM_0X10
:0X1e4  5093                    MOV             _ROMDH_0,       A                   ;_ROMDH_0: Bank 511    Addr: 65427    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X1e5  e60d                    MOVA            HRAM_0XD
:0X1e6  500d                    MOV             HRAM_0XD,       A
:0X1e7  e612                    MOVA            HRAM_0X12
:0X1e8  500e                    MOV             HRAM_0XE,       A
:0X1e9  e613                    MOVA            HRAM_0X13
:0X1ea  500f                    MOV             HRAM_0XF,       A
:0X1eb  e614                    MOVA            HRAM_0X14
:0X1ec  e711                    CLR             HRAM_0X11
:0X1ed  5011                    MOV             HRAM_0X11,      A
:0X1ee  5808                    IOR             HRAM_0X8,       A
:0X1ef  e60d                    MOVA            HRAM_0XD
:0X1f0  5012                    MOV             HRAM_0X12,      A
:0X1f1  5809                    IOR             HRAM_0X9,       A
:0X1f2  e60e                    MOVA            HRAM_0XE
:0X1f3  5013                    MOV             HRAM_0X13,      A
:0X1f4  580a                    IOR             HRAM_0XA,       A
:0X1f5  e60f                    MOVA            HRAM_0XF
:0X1f6  5014                    MOV             HRAM_0X14,      A
:0X1f7  580b                    IOR             HRAM_0XB,       A
:0X1f8  e610                    MOVA            HRAM_0X10
:0X1f9  e712                    CLR             HRAM_0X12
:0X1fa  e713                    CLR             HRAM_0X13
:0X1fb  e714                    CLR             HRAM_0X14
:0X1fc  5092                    MOV             _ROMDL_0,       A                   ;_ROMDL_0: Bank 511    Addr: 65426    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X1fd  e611                    MOVA            HRAM_0X11
:0X1fe  5011                    MOV             HRAM_0X11,      A
:0X1ff  580d                    IOR             HRAM_0XD,       A
:0X200  e608                    MOVA            HRAM_0X8
:0X201  5012                    MOV             HRAM_0X12,      A
:0X202  580e                    IOR             HRAM_0XE,       A
:0X203  e609                    MOVA            HRAM_0X9
:0X204  5013                    MOV             HRAM_0X13,      A
:0X205  580f                    IOR             HRAM_0XF,       A
:0X206  e60a                    MOVA            HRAM_0XA
:0X207  5014                    MOV             HRAM_0X14,      A
:0X208  5810                    IOR             HRAM_0X10,      A
:0X209  e60b                    MOVA            HRAM_0XB
;    GIE = gie_bk;            //恢复全局中断
:0X20a  ea00                    SECTION         0X0
:0X20b  a90a                    BCC             ((_FlashRdData_#T20611_12)>>3)&7f,              1   ;((_FlashRdData_#T20611_12)>>3)&7f: Bank 0    Addr: 10    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X20c  ea01                    SECTION         0X1
:0X20d  900c                    JBS             HRAM_0XC,       0
:0X20e  6a11                    GOTO            HADR_0X211
:0X20f  ea00                    SECTION         0X0
:0X210  a10a                    BSS             ((_FlashRdData_#T20611_12)>>3)&7f,              1   ;((_FlashRdData_#T20611_12)>>3)&7f: Bank 0    Addr: 10    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
HADR_0X211:
:0X211  ea00                    SECTION         0X0
:0X212  990a                    JBC             HRAM_0XA,       1
:0X213  6a16                    GOTO            HADR_0X216
:0X214  af96                    BCC             (_GIE_0)>>3,    7                   ;(_GIE_0)>>3: Bank 511    Addr: 65430    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X215  6a17                    GOTO            HADR_0X217
HADR_0X216:
:0X216  a796                    BSS             (_GIE_0)>>3,    7                   ;(_GIE_0)>>3: Bank 511    Addr: 65430    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
HADR_0X217:
;    return data;
:0X217  ea01                    SECTION         0X1
:0X218  5008                    MOV             HRAM_0X8,       A
:0X219  2000                    MOVAR           ?_TMP                               ;?_TMP: Bank 0    Addr: 0     
:0X21a  5009                    MOV             HRAM_0X9,       A
:0X21b  2001                    MOVAR           ?_TMP+1                             ;?_TMP+1: Bank 0    Addr: 1     
:0X21c  500a                    MOV             HRAM_0XA,       A
:0X21d  2002                    MOVAR           ?_TMP+2                             ;?_TMP+2: Bank 0    Addr: 2     
:0X21e  500b                    MOV             HRAM_0XB,       A
:0X21f  2003                    MOVAR           ?_TMP+3                             ;?_TMP+3: Bank 0    Addr: 3     
:0X220  7800                    MOVRA           ?_TMP                               ;?_TMP: Bank 0    Addr: 0     
:0X221  ea00                    SECTION         0X0
:0X222  c183                    RET
HADR_0X223:
;}
;
;/*******************************************************
;函数名：void FlashWrData(unsigned int addr, unsigned int word)
;描  述：写Flash指定地址的数据，地址范围：0x0000~0x1FFF
;输入值：Flash地址addr，Flash取反地址addri，待写的数据word
;输出值：无
;返回值：0:写入失败，1:写入成功
;*******************************************************/
;unsigned char FlashWrData(unsigned int addr, unsigned int addri, unsigned long word)
;{
;    unsigned char rmdh, rmdl, rmd1h, rmd1l;   //临时存放ROMDH、ROMDL值
;    unsigned char gie_bk = GIE;     //备份GIE
:0X223  e783                    CLR             HRAM_0X83
:0X224  e500                    MOVI            0X0
:0X225  9f96                    JBC             HRAM_0X96,      7
:0X226  e501                    MOVI            0X1
:0X227  ea01                    SECTION         0X1
:0X228  e611                    MOVA            HRAM_0X11
:0X229  5011                    MOV             HRAM_0X11,      A
:0X22a  e610                    MOVA            HRAM_0X10
;    unsigned int reault; 
;
;    CLRWDT();
:0X22b  c18b                    CWDT
HADR_0X22C:
;
;    while (GIE == 1)GIE = 0;           //启动IAP前关闭全局中断
:0X22c  e500                    MOVI            0X0
:0X22d  9f96                    JBC             HRAM_0X96,      7
:0X22e  e501                    MOVI            0X1
:0X22f  e611                    MOVA            HRAM_0X11
:0X230  5011                    MOV             HRAM_0X11,      A
:0X231  e301                    XORI            0X1
:0X232  9284                    JBS             HRAM_0X84,      2
:0X233  6a36                    GOTO            HADR_0X236
:0X234  af96                    BCC             (_GIE_0)>>3,    7                   ;(_GIE_0)>>3: Bank 511    Addr: 65430    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X235  6a2c                    GOTO            HADR_0X22C
HADR_0X236:
;
;    FlashEwEn = 0xAA;//设置软件锁变量
:0X236  e5aa                    MOVI            0XAA
:0X237  e616                    MOVA            (_FlashEwEn)&7f                     ;(_FlashEwEn)&7f: Bank 0    Addr: 22     
;
;    FPEE = 0;           //存储器编程模式
:0X238  ab94                    BCC             (_FPEE_0)>>3,   3                   ;(_FPEE_0)>>3: Bank 511    Addr: 65428    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    ROMD1H = word >> 24;  //写Word
:0X239  e518                    MOVI            0X18
:0X23a  e001                    ADDI            0X1
:0X23b  2000                    MOVAR           ?_TMP                               ;?_TMP: Bank 0    Addr: 0     
:0X23c  500c                    MOV             HRAM_0XC,       A
:0X23d  2001                    MOVAR           ?_TMP+1                             ;?_TMP+1: Bank 0    Addr: 1     
:0X23e  500d                    MOV             HRAM_0XD,       A
:0X23f  2002                    MOVAR           ?_TMP+2                             ;?_TMP+2: Bank 0    Addr: 2     
:0X240  500e                    MOV             HRAM_0XE,       A
:0X241  2003                    MOVAR           ?_TMP+3                             ;?_TMP+3: Bank 0    Addr: 3     
:0X242  500f                    MOV             HRAM_0XF,       A
:0X243  2004                    MOVAR           ?_TMP+4                             ;?_TMP+4: Bank 0    Addr: 4     
:0X244  7800                    MOVRA           ?_TMP                               ;?_TMP: Bank 0    Addr: 0     
:0X245  6a4c                    GOTO            HADR_0X24C
HADR_0X246:
:0X246  a884                    BCC             HRAM_0X84,      0
:0X247  ea00                    SECTION         0X0
:0X248  d104                    RRB             (?_TMP+4)&7f,   R,              0X1 ;(?_TMP+4)&7f: Bank 0    Addr: 4     
:0X249  d103                    RRB             (?_TMP+3)&7f,   R,              0X1 ;(?_TMP+3)&7f: Bank 0    Addr: 3     
:0X24a  d102                    RRB             (?_TMP+2)&7f,   R,              0X1 ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X24b  d101                    RRB             (?_TMP+1)&7f,   R,              0X1 ;(?_TMP+1)&7f: Bank 0    Addr: 1     
HADR_0X24C:
:0X24c  e0ff                    ADDI            0XFF
:0X24d  9284                    JBS             HRAM_0X84,      2
:0X24e  6a46                    GOTO            HADR_0X246
:0X24f  ea00                    SECTION         0X0
:0X250  5001                    MOV             (?_TMP+1)&7f,   A                   ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X251  e6a2                    MOVA            _ROMD1H_0                           ;_ROMD1H_0: Bank 511    Addr: 65442    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    ROMD1L = word >> 16;
:0X252  e510                    MOVI            0X10
:0X253  e001                    ADDI            0X1
:0X254  e600                    MOVA            (?_TMP)&7f                          ;(?_TMP)&7f: Bank 0    Addr: 0     
:0X255  788c                    MOVRA           HRAM_0X8C
:0X256  e601                    MOVA            (?_TMP+1)&7f                        ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X257  788d                    MOVRA           HRAM_0X8D
:0X258  e602                    MOVA            (?_TMP+2)&7f                        ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X259  788e                    MOVRA           HRAM_0X8E
:0X25a  e603                    MOVA            (?_TMP+3)&7f                        ;(?_TMP+3)&7f: Bank 0    Addr: 3     
:0X25b  788f                    MOVRA           HRAM_0X8F
:0X25c  e604                    MOVA            (?_TMP+4)&7f                        ;(?_TMP+4)&7f: Bank 0    Addr: 4     
:0X25d  5000                    MOV             (?_TMP)&7f,     A                   ;(?_TMP)&7f: Bank 0    Addr: 0     
:0X25e  6a64                    GOTO            HADR_0X264
HADR_0X25F:
:0X25f  a884                    BCC             HRAM_0X84,      0
:0X260  d104                    RRB             (?_TMP+4)&7f,   R,              0X1 ;(?_TMP+4)&7f: Bank 0    Addr: 4     
:0X261  d103                    RRB             (?_TMP+3)&7f,   R,              0X1 ;(?_TMP+3)&7f: Bank 0    Addr: 3     
:0X262  d102                    RRB             (?_TMP+2)&7f,   R,              0X1 ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X263  d101                    RRB             (?_TMP+1)&7f,   R,              0X1 ;(?_TMP+1)&7f: Bank 0    Addr: 1     
HADR_0X264:
:0X264  e0ff                    ADDI            0XFF
:0X265  9284                    JBS             HRAM_0X84,      2
:0X266  6a5f                    GOTO            HADR_0X25F
:0X267  5001                    MOV             (?_TMP+1)&7f,   A                   ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X268  e6a1                    MOVA            _ROMD1L_0                           ;_ROMD1L_0: Bank 511    Addr: 65441    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    ROMDH = word >> 8;
:0X269  e508                    MOVI            0X8
:0X26a  e001                    ADDI            0X1
:0X26b  e600                    MOVA            (?_TMP)&7f                          ;(?_TMP)&7f: Bank 0    Addr: 0     
:0X26c  788c                    MOVRA           HRAM_0X8C
:0X26d  e601                    MOVA            (?_TMP+1)&7f                        ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X26e  788d                    MOVRA           HRAM_0X8D
:0X26f  e602                    MOVA            (?_TMP+2)&7f                        ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X270  788e                    MOVRA           HRAM_0X8E
:0X271  e603                    MOVA            (?_TMP+3)&7f                        ;(?_TMP+3)&7f: Bank 0    Addr: 3     
:0X272  788f                    MOVRA           HRAM_0X8F
:0X273  e604                    MOVA            (?_TMP+4)&7f                        ;(?_TMP+4)&7f: Bank 0    Addr: 4     
:0X274  5000                    MOV             (?_TMP)&7f,     A                   ;(?_TMP)&7f: Bank 0    Addr: 0     
:0X275  6a7b                    GOTO            HADR_0X27B
HADR_0X276:
:0X276  a884                    BCC             HRAM_0X84,      0
:0X277  d104                    RRB             (?_TMP+4)&7f,   R,              0X1 ;(?_TMP+4)&7f: Bank 0    Addr: 4     
:0X278  d103                    RRB             (?_TMP+3)&7f,   R,              0X1 ;(?_TMP+3)&7f: Bank 0    Addr: 3     
:0X279  d102                    RRB             (?_TMP+2)&7f,   R,              0X1 ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X27a  d101                    RRB             (?_TMP+1)&7f,   R,              0X1 ;(?_TMP+1)&7f: Bank 0    Addr: 1     
HADR_0X27B:
:0X27b  e0ff                    ADDI            0XFF
:0X27c  9284                    JBS             HRAM_0X84,      2
:0X27d  6a76                    GOTO            HADR_0X276
:0X27e  5001                    MOV             (?_TMP+1)&7f,   A                   ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X27f  e693                    MOVA            _ROMDH_0                            ;_ROMDH_0: Bank 511    Addr: 65427    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    ROMDL = word;
:0X280  788c                    MOVRA           HRAM_0X8C
:0X281  e692                    MOVA            _ROMDL_0                            ;_ROMDL_0: Bank 511    Addr: 65426    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    FRAH = addr >> 8;   //IAP编程地址
:0X282  e508                    MOVI            0X8
:0X283  e001                    ADDI            0X1
:0X284  e600                    MOVA            (?_TMP)&7f                          ;(?_TMP)&7f: Bank 0    Addr: 0     
:0X285  7888                    MOVRA           HRAM_0X88
:0X286  e601                    MOVA            (?_TMP+1)&7f                        ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X287  7889                    MOVRA           HRAM_0X89
:0X288  e602                    MOVA            (?_TMP+2)&7f                        ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X289  5000                    MOV             (?_TMP)&7f,     A                   ;(?_TMP)&7f: Bank 0    Addr: 0     
:0X28a  6a8e                    GOTO            HADR_0X28E
HADR_0X28B:
:0X28b  a884                    BCC             HRAM_0X84,      0
:0X28c  d102                    RRB             (?_TMP+2)&7f,   R,              0X1 ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X28d  d101                    RRB             (?_TMP+1)&7f,   R,              0X1 ;(?_TMP+1)&7f: Bank 0    Addr: 1     
HADR_0X28E:
:0X28e  e0ff                    ADDI            0XFF
:0X28f  9284                    JBS             HRAM_0X84,      2
:0X290  6a8b                    GOTO            HADR_0X28B
:0X291  5001                    MOV             (?_TMP+1)&7f,   A                   ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X292  e691                    MOVA            _FRAH_0                             ;_FRAH_0: Bank 511    Addr: 65425    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    FRAL = addr;
:0X293  7888                    MOVRA           HRAM_0X88
:0X294  e690                    MOVA            _FRAL_0                             ;_FRAL_0: Bank 511    Addr: 65424    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    FRAHN = addri >> 8;    //IAP擦除/编程必须满足地址取反逻辑
:0X295  e508                    MOVI            0X8
:0X296  e001                    ADDI            0X1
:0X297  e600                    MOVA            (?_TMP)&7f                          ;(?_TMP)&7f: Bank 0    Addr: 0     
:0X298  788a                    MOVRA           HRAM_0X8A
:0X299  e601                    MOVA            (?_TMP+1)&7f                        ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X29a  788b                    MOVRA           HRAM_0X8B
:0X29b  e602                    MOVA            (?_TMP+2)&7f                        ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X29c  5000                    MOV             (?_TMP)&7f,     A                   ;(?_TMP)&7f: Bank 0    Addr: 0     
:0X29d  6aa1                    GOTO            HADR_0X2A1
HADR_0X29E:
:0X29e  a884                    BCC             HRAM_0X84,      0
:0X29f  d102                    RRB             (?_TMP+2)&7f,   R,              0X1 ;(?_TMP+2)&7f: Bank 0    Addr: 2     
:0X2a0  d101                    RRB             (?_TMP+1)&7f,   R,              0X1 ;(?_TMP+1)&7f: Bank 0    Addr: 1     
HADR_0X2A1:
:0X2a1  e0ff                    ADDI            0XFF
:0X2a2  9284                    JBS             HRAM_0X84,      2
:0X2a3  6a9e                    GOTO            HADR_0X29E
:0X2a4  5001                    MOV             (?_TMP+1)&7f,   A                   ;(?_TMP+1)&7f: Bank 0    Addr: 1     
:0X2a5  e68f                    MOVA            _FRAHN_0                            ;_FRAHN_0: Bank 511    Addr: 65423    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    FRALN = addri;
:0X2a6  788a                    MOVRA           HRAM_0X8A
:0X2a7  e68e                    MOVA            _FRALN_0                            ;_FRALN_0: Bank 511    Addr: 65422    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;
;    WREN = 1;           //使能编程
:0X2a8  a294                    BSS             (_WREN_0)>>3,   2                   ;(_WREN_0)>>3: Bank 511    Addr: 65428    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    StartIAP();         //开始IAP操作
:0X2a9  ec00                    PAGE            (_StartIAP)>>11
:0X2aa  60ed                    CALL            HADR_0XED
:0X2ab  ec00                    PAGE            (_4)>>11
;    CallFlashEn = 0;//清零软件锁变量
:0X2ac  ea01                    SECTION         0X1
:0X2ad  e715                    CLR             (_CallFlashEn)&7f                   ;(_CallFlashEn)&7f: Bank 0    Addr: 21     
;    FlashEwEn = 0;
:0X2ae  e716                    CLR             (_FlashEwEn)&7f                     ;(_FlashEwEn)&7f: Bank 0    Addr: 22     
;    rmdh = ROMDH++;
:0X2af  5093                    MOV             _ROMDH_0,       A                   ;_ROMDH_0: Bank 511    Addr: 65427    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X2b0  e608                    MOVA            HRAM_0X8
:0X2b1  5593                    INC             _ROMDH_0,       R                   ;_ROMDH_0: Bank 511    Addr: 65427    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    rmdl = ROMDL++;
:0X2b2  5092                    MOV             _ROMDL_0,       A                   ;_ROMDL_0: Bank 511    Addr: 65426    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X2b3  e609                    MOVA            HRAM_0X9
:0X2b4  5592                    INC             _ROMDL_0,       R                   ;_ROMDL_0: Bank 511    Addr: 65426    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    rmd1h = ROMD1H++;
:0X2b5  50a2                    MOV             _ROMD1H_0,      A                   ;_ROMD1H_0: Bank 511    Addr: 65442    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X2b6  e60a                    MOVA            HRAM_0XA
:0X2b7  55a2                    INC             _ROMD1H_0,      R                   ;_ROMD1H_0: Bank 511    Addr: 65442    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    rmd1l = ROMD1L++;
:0X2b8  50a1                    MOV             _ROMD1L_0,      A                   ;_ROMD1L_0: Bank 511    Addr: 65441    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X2b9  e60b                    MOVA            HRAM_0XB
:0X2ba  55a1                    INC             _ROMD1L_0,      R                   ;_ROMD1L_0: Bank 511    Addr: 65441    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;    __Asm TBR;          //查表读指令
:0X2bb  c184                    TBR
;
;    if (ROMDH == rmdh && ROMDL == rmdl && ROMD1H == rmd1h && ROMD1L == rmd1l)
:0X2bc  5008                    MOV             HRAM_0X8,       A
:0X2bd  5c93                    XOR             _ROMDH_0,       A                   ;_ROMDH_0: Bank 511    Addr: 65427    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X2be  9284                    JBS             HRAM_0X84,      2
:0X2bf  6ad1                    GOTO            HADR_0X2D1
:0X2c0  5009                    MOV             HRAM_0X9,       A
:0X2c1  5c92                    XOR             _ROMDL_0,       A                   ;_ROMDL_0: Bank 511    Addr: 65426    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X2c2  9284                    JBS             HRAM_0X84,      2
:0X2c3  6ad1                    GOTO            HADR_0X2D1
:0X2c4  500a                    MOV             HRAM_0XA,       A
:0X2c5  5ca2                    XOR             _ROMD1H_0,      A                   ;_ROMD1H_0: Bank 511    Addr: 65442    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X2c6  9284                    JBS             HRAM_0X84,      2
:0X2c7  6ad1                    GOTO            HADR_0X2D1
:0X2c8  500b                    MOV             HRAM_0XB,       A
:0X2c9  5ca1                    XOR             _ROMD1L_0,      A                   ;_ROMD1L_0: Bank 511    Addr: 65441    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X2ca  9284                    JBS             HRAM_0X84,      2
:0X2cb  6ad1                    GOTO            HADR_0X2D1
;    {
;		reault = 1;
:0X2cc  e500                    MOVI            0X0
:0X2cd  e609                    MOVA            HRAM_0X9
:0X2ce  e501                    MOVI            0X1
:0X2cf  e608                    MOVA            HRAM_0X8
;    }
:0X2d0  6ad3                    GOTO            HADR_0X2D3
HADR_0X2D1:
;	else
:0X2d1  e708                    CLR             HRAM_0X8
:0X2d2  e709                    CLR             HRAM_0X9
HADR_0X2D3:
;	}
:0X2d3  e794                    CLR             _ROMCL_0                            ;_ROMCL_0: Bank 511    Addr: 65428    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;	FRA = 0xFF12;//指到不用的地址空间
:0X2d4  e5ff                    MOVI            0XFF
:0X2d5  e691                    MOVA            _FRA_0+1                            ;_FRA_0+1: Bank 511    Addr: 65425    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X2d6  e512                    MOVI            0X12
:0X2d7  e690                    MOVA            _FRA_0                              ;_FRA_0: Bank 511    Addr: 65424    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;	FRAN = 0x3456;//此处把地址反码赋成与0xFFFF和FRA无取反关系的值
:0X2d8  e534                    MOVI            0X34
:0X2d9  e68f                    MOVA            _FRAN_0+1                           ;_FRAN_0+1: Bank 511    Addr: 65423    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X2da  e556                    MOVI            0X56
:0X2db  e68e                    MOVA            _FRAN_0                             ;_FRAN_0: Bank 511    Addr: 65422    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;	ROMDH = 0xFF;//数据初始化为0xFF
:0X2dc  e5ff                    MOVI            0XFF
:0X2dd  e693                    MOVA            _ROMDH_0                            ;_ROMDH_0: Bank 511    Addr: 65427    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;	ROMDL = 0xFF;//数据初始化为0xFF
:0X2de  e5ff                    MOVI            0XFF
:0X2df  e692                    MOVA            _ROMDL_0                            ;_ROMDL_0: Bank 511    Addr: 65426    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;	ROMD1H = 0xFF;//数据初始化为0xFF
:0X2e0  e5ff                    MOVI            0XFF
:0X2e1  e6a2                    MOVA            _ROMD1H_0                           ;_ROMD1H_0: Bank 511    Addr: 65442    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;	ROMD1L = 0xFF;//数据初始化为0xFF
:0X2e2  e5ff                    MOVI            0XFF
:0X2e3  e6a1                    MOVA            _ROMD1L_0                           ;_ROMD1L_0: Bank 511    Addr: 65441    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
;	CallFlashEn = 0;//清零软件锁变量
:0X2e4  e715                    CLR             (_CallFlashEn)&7f                   ;(_CallFlashEn)&7f: Bank 0    Addr: 21     
;	FlashEwEn = 0; 
:0X2e5  e716                    CLR             (_FlashEwEn)&7f                     ;(_FlashEwEn)&7f: Bank 0    Addr: 22     
;	GIE = gie_bk;            //恢复全局中断
:0X2e6  ea00                    SECTION         0X0
:0X2e7  aa0a                    BCC             ((_FlashWrData_#T20930_15)>>3)&7f,              2   ;((_FlashWrData_#T20930_15)>>3)&7f: Bank 0    Addr: 10    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X2e8  ea01                    SECTION         0X1
:0X2e9  9010                    JBS             HRAM_0X10,      0
:0X2ea  6aed                    GOTO            HADR_0X2ED
:0X2eb  ea00                    SECTION         0X0
:0X2ec  a20a                    BSS             ((_FlashWrData_#T20930_15)>>3)&7f,              2   ;((_FlashWrData_#T20930_15)>>3)&7f: Bank 0    Addr: 10    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
HADR_0X2ED:
:0X2ed  ea00                    SECTION         0X0
:0X2ee  9a0a                    JBC             HRAM_0XA,       2
:0X2ef  6af2                    GOTO            HADR_0X2F2
:0X2f0  af96                    BCC             (_GIE_0)>>3,    7                   ;(_GIE_0)>>3: Bank 511    Addr: 65430    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
:0X2f1  6af3                    GOTO            HADR_0X2F3
HADR_0X2F2:
:0X2f2  a796                    BSS             (_GIE_0)>>3,    7                   ;(_GIE_0)>>3: Bank 511    Addr: 65430    D:\WorkSpace\AN135_Examples_ES7P169C_ES7P0693_ES7P0031\IAP\iap_flash\debug\iap_flash.obj 
HADR_0X2F3:
;
;	return reault;
:0X2f3  ea01                    SECTION         0X1
:0X2f4  5008                    MOV             HRAM_0X8,       A
:0X2f5  e60a                    MOVA            HRAM_0XA
:0X2f6  500a                    MOV             HRAM_0XA,       A
:0X2f7  2000                    MOVAR           ?_TMP                               ;?_TMP: Bank 0    Addr: 0     
:0X2f8  ea00                    SECTION         0X0
:0X2f9  c183                    RET

                                END
