RosettaCodeData/Task/Arrays/6502-Assembly/arrays-3.6502

8 lines
237 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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