Jump to content

Array: Difference between revisions

No change in size ,  2 years ago
m
→‎Assembly: formatting
m (→‎Assembly: accidentally deleted lang closer)
m (→‎Assembly: formatting)
Line 47:
ArrayROM: db 0,5,10,15,20,25,30,35,40,45,50
;on Commodore 64 (for example) this can be RAM but on the NES or something similar it would be read-only</lang>
 
 
====Indexing====
Almost all assembly languages have a method of loading from a memory address offset by some sort of variable amount. That offset is the index into the array. Depending on the size of each element that index is multiplied by the number of bytes each element takes up. What constitutes an "element," "row," or "column" of the array is entirely decided by the programmer. Arrays in assembly are always zero-indexed.
 
 
<lang 68000devpac>;68000 Assembly example
1,489

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.