Megawin MM36SB010,Read Main Storage to Buffer





1
Date Submitted Tue. Sep. 1st, 2009 12:30 AM
Revision 1 of 1
Scripter Cloudgen
Tags 6502 | Assembly | EFlash | Megawin | MM36SB010 | RMB | SPI
Comments 0 comments
This assembly code is responsible for reading EFlash Main Storage to EFlash buffer, see source from Programming 6502 assembly language

;---------------------------------------------
;EFLASH_RMB
; Purposes:
;       1. Read EFlash Main Storage to EFlash buffer
; Input:
;       1. X: Low byte
;       2. Y: High byte (less than or equal to 2)
; Output:
; Required Variables:
; Required Functions:
; Required Table:
; Labels used:
;       1. EFLASH_RMB:
;       2. EFLASH_RMB_LOOP:
; Variables used:
; Constant used:
; Function used:
; Used by:
; Version: 1.0
; Revision Date: 28/8/2006
;---------------------------------------------
EFLASH_RMB:
        LDA #$A4
        STA E_BUFFER
        LDA #%00000011
        STA E_RW
        NOP
        NOP
        STX E_BUFFER
        LDA #%00000011
        STA E_RW
        NOP
        NOP
        STY E_BUFFER
        LDA #%00000011
        STA E_RW
        NOP
        NOP
EFLASH_RMB_LOOP:
        LDA #$94
        STA E_BUFFER
        LDA #%00000011
        STA E_RW
        NOP
        NOP
        LDA #%00000010
        STA E_RW
        NOP
        NOP
        NOP
        LDA E_BUFFER
        CMP #%10100100
        BNE EFLASH_RMB_LOOP
        RTS
;End of EFLASH_RMB
;---------------------------------------------
 

Comments

There are currently no comments for this snippet.

Voting

Votes Up


Scripter Cloudgen

Votes Down