8 lines
477 B
Text
8 lines
477 B
Text
LDA #3 ;desired row
|
|
ASL A ;Times 2 bytes per row (if the array's row size wasn't a multiple of 2 we'd need to actually do multiplication)
|
|
;which the 6502 doesn't have in hardware but can be simulated by repeated adding.
|
|
CLC
|
|
ADC #1 ;desired column (since it's 1 byte per column, we can skip the part where we multiply desired column by bytes per column)
|
|
TAX ;move A to X so we can use it as the index
|
|
|
|
LDA Array,x ;evaluates to LDA #40
|