This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Memory declaration problem

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~!

Parents
  • Addresses 00..7FH are also the "data" space. This space is used by the overlay analysis in the small memory model. It's also used for any "data" variables you might have declared.

    Are you displacing other information when you add the declaration for Test? I don't know off the top of my head if the linker is smart enough to show you data usage in the idata map where they overlap, or whether is just says "nope, no declarations in just idata there".

    As long as you're forcing the locations of these variables to the lower part of the internal RAM, why not declare them "data"? Access will be a little more efficient than "idata", which is indirect (hence the 'i') via a register used as an 8-bit pointer.

Reply
  • Addresses 00..7FH are also the "data" space. This space is used by the overlay analysis in the small memory model. It's also used for any "data" variables you might have declared.

    Are you displacing other information when you add the declaration for Test? I don't know off the top of my head if the linker is smart enough to show you data usage in the idata map where they overlap, or whether is just says "nope, no declarations in just idata there".

    As long as you're forcing the locations of these variables to the lower part of the internal RAM, why not declare them "data"? Access will be a little more efficient than "idata", which is indirect (hence the 'i') via a register used as an 8-bit pointer.

Children