I have a table in program memory and want to store a byte at a given location into register R16.
(This is just example data for testing)
MyTable: ; 256 bytes .db $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$0B,$0C,$0D,$0E,$0F .db $10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$1A,$1B,$1C,$1D,$1E,$1F .db $F0,$F1,$F2,$F3,$F4,$F5,$F6,$F7,$F8,$F9,$FA,$FB,$FC,$FD,$FE,$FF R17 contains a number between $00 and $FF which represents the offset from MyTable.
Can someone please show me a nice way of doing this?