but please check where the compiler puts the const data (it can be in rom or in ram). Also check the size of an int for your compiler (most uC have a 16 bit integer but it can also be 32 bit like most PC's)
lookup table can be easily built using array declaration.
you may need to consider a few more things such as: in ROM or RAM (i.e. is it updateable?), at which address (the address in some cases can help you access the table conveniently.)? ...
If you want to make a LUT you can use Assembly language like the following :
assume you want to do LUT for sine wave generation , then you will call a subroutine that takes the required value of sine and moves it to the program counter register PCL then it will jump to certain address that corresponds to the called value then returns with literal value stored in the Working register ...
like that :
label :
..... ; here you will transfer the input value that you need to get its sin
movfw input
call sin
....
sin :
movwf PCL
retlw .1 ; scaled value of the sin output ...
retlw .2
retlw .3
retlw .4
.....
I hope that Helped you ...
If you needed anything else or didn't understand what i said .. please PM me ..