2009-03-06 3 views
6

Ich habe folgende asm-Code:

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 

Die Tabelle richtig eingestellt ist, aber die staa schreibt nichts bei 1020 auf. Warum?

+0

Upvote für den Gang über den Kopf abzuschalten. :-) –

+0

vielleicht, wenn ich sie kommentiere? – kthakore

+0

konnte es nicht schaden .... –

Antwort

6

Ich glaube, es ROM gibt es

10,3 ROM Array

Das ROM einen 28K-Byte-Array von $ 1000 bis $ 7FFF gemacht wird und einen 32 K-Byte-Array von $ 8000 abgebildet $ FFFF beim Zurücksetzen. Das MAPROM-Bit im MISC-Register ermöglicht das Tauschen der beiden Arrays. ROMON28 und ROMON32 aktivieren oder das ROM-Modul

Vom M68HC12 datasheet

+0

Sie haben Recht !!! Außer der ROM-Bereich ist von $ 1000 bis $ 2000. Vielen Dank – kthakore

Verwandte Themen