We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
How come there is obviously space (gap) in the memory, but when I declare the Test[10] between the 0x34 and 0x62 the program kept saying overlap and address overflow.
IDATA 0029H 000BH UNIT ?ID?XXACT_H 0034H 002FH *** GAP *** IDATA 0063H 0001H ABSOLUTE 0064H 0004H *** GAP *** IDATA 0068H 000AH ABSOLUTE 0072H 0001H *** GAP *** IDATA 0073H 0002H ABSOLUTE
unsigned char idata Test[10] _at_ 0x34; //new declare unsigned char idata Name[10] _at_ 0x68; unsigned int idata TestCH _at_ 0x73;
help~!
unsigned char data Namse[10];
the program shows
*** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: ?DT?XXACT_H2 LENGTH: 0049H
unsigned char idata Namse[10];
NO ERROR(S)
Errik
Why you want to put in idata?
You know data access is more faster
AND idata like this no good on 8051!
When one memory area is full, it doesn't matter if it is faster or not. Something must be moved.
That is why it is important to look at variables and make as small arrays as possible, and to use byte instead of short/int and to use bit variables where applicable.
Per
Yes you are right.
But have I seen memory size of chip in thred messages? no.
So if 8051 then idata is waste of time (8051 has no separate idata space).
refar,
The 8051 doesn't have a separate idata space, but the 8052 does. I'm also willing to bet that we're not really talking about an original 8051, so using idata is a pretty safe bet. Still, perhaps not the best idea given than each byte of idata you use takes away from stack space, but such is life.
-Jay Daniel
Why you want to put in idata? You know data access is more faster AND idata like this no good on 8051!
it makes no difference! when it is x[y]
try to compile both and look at the generated assembler
Erik
Correct
But when it is (example) x[1] it does
try to compile both and look at the generated assembler.
Ok might not be all the time.
But when you use only 8051 compatible core (as I often have to) every little bit helps - I know!
But when it is (example) x[1] it does the construction in question is x[y]
try to compile both and look at the generated assembler. I do not need to see what I know
I do not need to see what I know
Oh lordy.
I will not get dragged into an Erik verus Jack style discussion.
But it is tempting!
Goodbye.
No such intention :)
Just informing you that I have actually learned a little bit from working with Keil for more than a decade
So if 8051 then idata is waste of time (8051 has no separate idata space). Once more the OP does not tell it all. It is rather frustrating when some threads go on forever and then at the 47th entry the OP reveals the detail that is the clue to the problem
Welcome to the wonderful world of Erik, that strange place where questions and answers mutate, fact and fantasy merge, quotations reinvent themselves, black is white, evidence is irrelevant, reading is unnecessary, learning breeds idiocy.
Be grateful, for he has generously bestowed upon you a magnificent question to accompany his magnificent answer.
Yes, that seems accurate.
refar jalke, 27-Jun-2007 09:40 CST: "So if 8051 then idata is waste of time (8051 has no separate idata space)."
Jojo Kid, 29-Jun-2007 00:23 CST: "oh and I am using 8052 by the way"
So he does have extra IDATA!
erik malund, 27-Jun-2007 15:53 CST: "It is rather frustrating when some threads go on forever and then at the 47th entry the OP reveals the detail that is the clue to the problem"
Quite so!