PRELIMINARY
Assembly Source for Algorithms
* The erase pulse duration is 7ms, and a maximum of | ** | |
* | 1000 pulses is applied to the array. | ** |
* |
| ** |
*The following resources are used for temporary storage: **
* | AR0 | Used for comparisons | ** |
* | AR1 | Used for erase pulse count | ** |
* | AR2 | Used for main banz loop | ** |
* | AR6 | Parameter passed to DELAY | ** |
* | BASE_0 | Parameter passed to Set_mode | ** |
* | BASE_1 | Used for flash address. | ** |
* | BASE_2 | Used for flash data | ** |
* | BASE_3 | Used for flash checksum | ** |
* | BASE_4 | Used for segment size | ** |
* | BASE_5 | Flash Erase command | ** |
* | BASE_6 | Flash Erase+EXE command | ** |
*************************************************************
| .include ºsvar20.hº ;defines variables for flash0 | ||
|
|
| ;or for flash1 array |
* |
|
|
|
MAX_ER | .set | 1000 | ;Allow only 1000 erase pulses. |
VER1 | .set | 8 | ;VER1 command. |
ER_CMND | .set | 2 | ;ERASE COMMAND WORD |
ER_EXE | .set | 043h | ;ERASE EXEBIN COMMAND WORD |
INV_ER | .set | 018h | ;INVERSE ERASE COMMAND WORD |
FL_WR | .set | 6 | ;FLASH WRITE COMMAND WORD |
FLWR_EX | .set | 047h | ;FLASH WRITE EXEBIN COMMAND WORD |
STOP | .set | 0 | ;RESET REGISTER COMMAND WORD |
| .def | GERS |
|
| .ref | PROTECT,SEG_ST,SEG_END | |
| .ref | DELAY,REGS,ARRAY | |
| .sect | ºfl_ersº |
|
*************************************************************
* GERS: This routine performs an erase to | * | ||
* xorver1 level. The Seg to erase is defined by | * | ||
* the vars SEG_ST and SEG_END. The following | * | ||
* resources are used for temporary storage: | * | ||
* | AR0 | Used for comparisons | * |
* | AR1 | Used for erase pulse count | * |
* | AR2 | Used for main banz loop | * |
* | BASE_0 | Parameter passed to Set_mode | * |
* | BASE_1 | Used for flash address. | * |
* | BASE_2 | Used for flash data | * |
* | BASE_3 | Used for flash checksum | * |
* | BASE_4 | Used for segment size | * |
*************************************************************
GERS:
*************************************************************
* | Code initialization section | * |
* Initialize test loop counters: | * | |
* | AR1 is the number of ERASE pulses. | * |
*************************************************************
SETC | INTM | ;Disable all | maskable ints. |
SETC | SXM | ;Enable sign | extension. |
PRELIMINARY | Assembly Source Listings and Program Examples |