STAA와 함께 M68HC12에서 메모리 영역 $ 1020이없는 이유는 무엇입니까?

StackOverflow https://stackoverflow.com/questions/620206

문제

다음 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은 $ 1000 ~ $ 7fff로 매핑 된 28K 바이트 어레이와 재설정시 $ 8000에서 $ FFFF로 매핑 된 32K 바이트 어레이로 만들어졌습니다. 기타 레지스터의 MAPROM 비트를 사용하면 두 배열을 스와핑 할 수 있습니다. ROMON28 및 ROMON32 ROM 모듈을 활성화 또는 비활성화합니다

M68HC12에서 데이터 시트

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top