Array: Difference between revisions

m
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
<lang 6502asm>ArrayRAM equ $00 ;the beginning of an array, stored in zero page RAM
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;68000 myArray,A0Assembly example
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
1,489

edits