我有以下asm代码:
org $1000 ;Table Origin is at $1000 fcb $02,$04,$06,$08 ; values of table from $1001 - $1004 fcb $0a,$0c,$0e,$10 ; values of table from $1005 - $1009 org $400 ; Program Start lds #$4000 ; Set Stack Pointer at value (#) $4000 ldy #$1000 ; Set Index Y at $1000 ldaa #$04 ; Load Accumulator a with value $04 loop staa $20,y ; Store value of Accumulator a at y = $1000 {DOESNT WORK} staa $21,y ; Store value of Accumulator a at y = $1021 {DOESNT WORK} iny ; increment y (at this point $1020 and $1021 are still ff) iny ; increment y (at this point $1020 and $1021 are still ff) deca ; decrement a bne loop ; loop until a = 0 hold bra hold ; end of program end
表格设置正确但是staa在1020处没有写入任何内容.为什么?
我相信那里有ROM
10.3 ROM阵列
ROM由一个28K字节的数组映射,从$ 1000到$ 7FFF映射,32K字节数组从$ 8000映射到$ FFFF复位.MISC寄存器中的MAPROM位允许交换两个阵列.ROMON28和ROMON32启用或禁用ROM模块
来自M68HC12 数据表