flasherased.asm

来自「ADI 公司的DSP ADSP21369 EZ-KIT LITE开发板的全部源代」· 汇编 代码 · 共 33 行

ASM
33
字号
/* This program checks whether the flash is erased. If the flash is not erased right it gets
stuck here.
Input - Word_To_Write
Output - None */

#include <def21369.h>
.global FLASH_ERASED;
.extern Word_Read_In, External_Sector_Address,External_Byte_Address;
.extern READ_FLASH_WORD;

.section/pm seg_pmco;

FLASH_ERASED:


    r2 = 0;
    r0 = dm(External_Sector_Address);
    dm(External_Byte_Address)=r0;

    call READ_FLASH_WORD;           //Read the data in the flash
    r11 = dm(Word_Read_In); nop;
    call READ_FLASH_WORD;           //Read the data again
    r10 = dm(Word_Read_In); nop;
    r11 = r11-r10;                    //compares whether both the datas read are identical
    if ne jump FLASH_ERASED;
    r12 = 0x000000ff;
    r11 = r12 - r10;                  //compares the last data byte read with FF
    if ne jump FLASH_ERASED;

    nop;
    rts;
FLASH_ERASED.END:

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?