cancel
Showing results for 
Search instead for 
Did you mean: 

ST72264 lookup table

feedback
Associate
Posted on July 09, 2004 at 10:01

ST72264 lookup table

3 REPLIES 3
feedback
Associate
Posted on June 24, 2004 at 04:40

How do I set up lookup table in ST72264 and access it?

Any tips is appreciated!

Cheers!
anshul
Associate II
Posted on June 24, 2004 at 12:27

You can use direct Indexed addressing mode to access the lookup table.

md1
Associate II
Posted on July 09, 2004 at 10:01

In assembly...

segment 'rom'

.table DC.B $10, $20, $40, $80

.reset

ld X, #0

ld A, (table,X) ; A now contains $10

inc X

ld A, (table,X) ; A now contains $20

In C (Cosmic):

const unsigned char table[] = {

1,2,3,4,5,6,7,8,9

};

void main()

{

unsigned char a;

a = table[0]; // a contains 1

}