Megawin MM36SB010, Read EFlash main storage





1
Date Submitted Tue. Sep. 1st, 2009 12:23 AM
Revision 1 of 1
Scripter Cloudgen
Tags EFlash | main-storage | Megawin | MM36SB010 | Read | SPI
Comments 0 comments
This assembly code is used to Read the Megawin MM36SB010, Read EFlash main storage, by issuing RME command using SPI, see source from "Programming 6502 assembly language"

;---------------------------------------------
;EFLASH_RME
; Purposes:
;       1. Read EFlash main storage
; Input:
;       1. tmpdata : buffer address
;       2. tmpdata+1 : page address (low byte)
;       3. tmpdata+2 : page address (high byte) (<=2)
; Output:
; Required Variables:
; Required Functions:
; Required Table:
; Labels used:
;       1. EFLASH_RME:
; Variables used:
; Constant used:
; Function used:
; Used by:
; Version: 1.0
; Revision Date: 28/8/2006
;---------------------------------------------
EFLASH_RME:
        LDA #$9C
        STA E_BUFFER
        LDA #%00000011
        STA E_RW
        NOP
        NOP
        LDA tmpdata
        STA E_BUFFER
        LDA #%00000011
        STA E_RW
        NOP
        NOP
        LDA tmpdata+1
        STA E_BUFFER
        LDA #%00000011
        STA E_RW
        NOP
        NOP
        LDA tmpdata+2
        STA E_BUFFER
        LDA #%00000011
        STA E_RW
        NOP
        NOP
        LDA #%00000010
        STA E_RW
        NOP
        NOP
        RTS

;End of EFLASH_RME
;---------------------------------------------
 

Comments

There are currently no comments for this snippet.

Voting

Votes Up


Scripter Cloudgen

Votes Down