vinayby
Newbie level 4

.. 89c2051 has 2k code mem (onchip rom)
i want ,say a sin() lookuptable of 0xff height..
1)code unsigned char sintable[0x100]; //doesnt work says' u cant modify lvalue
2)tried xdata in place of it compiles fine.. but it is meaningless though..
(or leave aside sin() ,something arr=0xf1; in a loop shud show me something in the hex file.. nothing showsup)
3)why can't i write to code.... if i can do that in asm. with "db BYTE";
any #pragma directive can help?
even sdcc didnt help.. can some1 help me clear these things...
i used:
in Keil->targetOptions->use 0-0x07ff selected + small model, etc etc
sdcc -> default(small model)
i want ,say a sin() lookuptable of 0xff height..
1)code unsigned char sintable[0x100]; //doesnt work says' u cant modify lvalue
2)tried xdata in place of it compiles fine.. but it is meaningless though..
(or leave aside sin() ,something arr=0xf1; in a loop shud show me something in the hex file.. nothing showsup)
3)why can't i write to code.... if i can do that in asm. with "db BYTE";
any #pragma directive can help?
even sdcc didnt help.. can some1 help me clear these things...
i used:
in Keil->targetOptions->use 0-0x07ff selected + small model, etc etc
sdcc -> default(small model)