RosettaCodeData/Task/Arrays/6502-Assembly/arrays-3.6502
2023-07-01 13:44:08 -04:00

7 lines
237 B
Text

foo:
LDX #2 ;load the desired index
LDA array,x ;load the second (zero-indexed) entry in array, i.e. 9
RTS ;return. The return value is stored in A.
array: ;this is the array we're reading from.
db 3,6,9,12,15