Enumerations: Difference between revisions

m
→‎Without Explicit Values: minor formatting edit
m (→‎Without Explicit Values: minor formatting edit)
Line 34:
A lookup table is the most common method of enumeration of actual data in assembly. Each element of the table can be accessed by an index, and the starting index is zero. (The index may need to be adjusted for data sizes larger than 1 byte, i.e. doubled for 16-bit data and quadrupled for 32-bit data.) Unlike the above example, these values do indeed take up memory. Using this method when the above enumeration would suffice is incredibly wasteful.
 
<lang 6502asm>Days_Of_The_Week:
Days_Of_The_Week:
word Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
 
1,489

edits