📄 nflashset.asm
字号:
;******************************************************************************
;
;Copyright (c) 2004 GoldInfo Technology Co., Ltd.
;
;Module Name:
;
; NFlash.ASM
;
;Abstract:
;
; Module related to The NandFlash write and read
;
;Environment:
;
; ccs2.0 IDE
;
;Revision History:
;
; 02/03/2004 Mikal created
;
;
;;*****************************************************************************
.mmregs
.sect "code"
;********************************************************************
;global function
.global _G_NFlashData
.bss _G_NFlashData ,1
NAND_DATA .set 05ffch
NAND_SET_ALE .set 05ffdh
NAND_SET_CLE .set 05ffeh
.def _Nand_Write_Data
_Nand_Write_Data:
nop
nop
nop
pshm AL ; save the data to write
nop
nop
nop
portw *SP(0), NAND_DATA
frame 1
ret
.def _NandWrite_SET_CLE
_NandWrite_SET_CLE
nop
nop
nop
pshm AL ; save the data to write
nop
nop
nop
; write data
portw *SP(0), NAND_SET_CLE
frame 1
ret
.def _NandWrite_SET_ALE
_NandWrite_SET_ALE
nop
nop
nop
pshm AL ; save the data to write
nop
nop
nop
; write data
portw *SP(0), NAND_SET_ALE
frame 1
ret
.def _AtaBusyStatusCheck
_AtaBusyStatusCheck:
BusyStatusCheck
nop
nop
nop
bc BusyStatusCheck, BIO
nop
nop
ret
.def _NFlashReadData
_NFlashReadData:
nop
nop
nop
stm #(_G_NFlashData) , AR7
nop
portr NAND_DATA , *AR7
nop
nop
nop
ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -