Array: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) m (→Assembly) |
Puppydrum64 (talk | contribs) m (→Assembly) |
||
Line 70:
Iteration over the elements of an array is fairly straightforward.
<lang 68000devpac>
LEA myArray,A0
loop:
MOVE.B (A0)+,D0
JMP loop</lang>
<lang z80>;z80 Assembly example
ld de,userRam ;load the address of work RAM into de
ld bc,myArrayEnd-myArray ;assembler directive that auto-calculates the array size using labels placed at the beginning and end.
|