Array: Difference between revisions

Content added Content deleted
Line 76: Line 76:
loop:
loop:
MOVE.B (A0)+,D0
MOVE.B (A0)+,D0
; As is, this example code will inevitably index out of bounds.
; In practice there will be some way to end the loop, typically a byte count or a null terminator.
JMP loop</lang>
JMP loop</lang>


Line 83: Line 85:
ld bc,myArrayEnd-myArray ;assembler directive that auto-calculates the array size using labels placed at the beginning and end.
ld bc,myArrayEnd-myArray ;assembler directive that auto-calculates the array size using labels placed at the beginning and end.
ldir ;copy the entire contents of the array to work RAM</lang>
ldir ;copy the entire contents of the array to work RAM</lang>



====Skip-Counting====
====Skip-Counting====