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~!
WHY? HOW!
Because instead of using them, you're trying to fight the tools for no apparent reason. And so far it looks like the tools are winning by a comfortable margin.
What makes you think you have to make your own decisions about memory allocations for individual variables? The linker/locator and the compiler are quite good at that job as it is. Why interfere with their work?
For the record: if you're going to have that variable in _idata_, the 0x6* range is hardly the best place to put it. The linker would have known that. But you told it you know better.
ohhh.... i see... so i shouldn't have use _at_ thanks hans....
and erik you are right.. but how come??? thx~
"ohhh.... i see... so i shouldn't have use _at_ thanks hans...."
Ah yes, two days later made it ripe and fit for consumption.
and erik you are right.. but how come???
I know you will hate me for this, but
this question is so basic thet there is no point in answering it. You need to get your basic understanding of the '51 brought to an, at least, rudimentary level.
so STUDY, STUDY, STUDY first read "the bible" then work through the getting started guide.
Erik
here are the links to "the bible" Chapter 1 - 80C51 Family Architecture: www.nxp.com/.../80C51_FAM_ARCH_1.pdf
Chapter 2 - 80C51 Family Programmer's Guide and Instruction Set: www.nxp.com/.../80C51_FAM_PROG_GUIDE_1.pdf
Chapter 3 - 80C51 Family Hardware Description: www.nxp.com/.../80C51_FAM_HARDWARE_1.pdf
the getting started guide is on the Keil CD
alright erik... thanks for the advice and no i don't hate you... i do need the basics thanks a lot man~ :)
oh and I am using 8052 by the way... so ya...