2004-07-09 01:01 AM
2004-06-23 07:40 PM
How do I set up lookup table in ST72264 and access it?
Any tips is appreciated! Cheers!2004-06-24 03:27 AM
You can use direct Indexed addressing mode to access the lookup table.
2004-07-09 01:01 AM
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 }