Array: Difference between revisions
m
→Assembly
Puppydrum64 (talk | contribs) m (→Assembly) |
Puppydrum64 (talk | contribs) m (→Assembly) |
||
Line 43:
An array is simply a sequence of values stored in memory. Its beginning is typically defined with some sort of label that points to the address where that array is stored. Arrays are mutable unless they are stored in ROM, such as on a video game cartridge.
<lang 6502asm>;6502 Assembly example
ArrayROM: db 0,5,10,15,20,25,30,35,40,45,50 ;an array stored in ROM</lang>
Line 49 ⟶ 50:
<lang 68000devpac>
LEA myArray,A0
MOVE.W #4*5*1,D1 ;five elements per row, so to get the 4th row we multiply the row number by the elements per row,
;times the number of bytes per element
|