MikroC demo not satisfy me

Thread Starter

embedtechnology

Joined Dec 25, 2015
42
I am using mikroc for 8051 (compiler) version 3.6.0 demo . I wrote some codes for experiment.
There is a line in my code which contained with codes mentioned below :
unsigned short const lookup[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} absolute 0x0500; code;
The code is repeatedly compiled with no error massage but when I noticed hex file in out put folder, I saw that no data
has been written at the location mentioned (0x0500). Even when I deleted absolute 0x0500 from my code and compiled
again , it didn't write lookup data any where in hex file.Although hex file is much lower than 2K bytes.(only 356 bytes) .
I am satisfied with all other lines of my code. What might be the cause? please help.
 
Last edited:

JohnInTX

Joined Jun 26, 2012
4,787
Have you done anything with the data in the array? If you haven't used it, the compiler will optimize out and not assign any space for it.
I tried it on MicroC for PIC and that's what it did.
Look in the .lst file to see how it all works.
 

Thread Starter

embedtechnology

Joined Dec 25, 2015
42
Have you done anything with the data in the array? If you haven't used it, the compiler will optimize out and not assign any space for it.
I tried it on MicroC for PIC and that's what it did.
Look in the .lst file to see how it all works.
ok it's really helpful. I didn't do anything with the arry. Now I did something with it and its ok. many thanks to you for your kind help. good luck.
.
 
Last edited:
Top