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

Can't compile...

I written this code and it compiles just fine. However, when I tried to include <stdio.h> library to use with my hyperterminal, it says that it compiled, but can not link. Here is the message that it gave me...

ERROR L107: ADDRESS SPACE OVERFLOW
SPACE: DATA
SEGMENT: _DATA_GROUP_
LENGTH: 0070H

My memory model is "Small: variables in DATA". When I changed it to compact or large, my program will compile and link, but it behaves differently when I put program it to the Philips 89C664..

thanks
Tommy

Parents
  • I written this code and it compiles just fine.

    So why is your title "Can't Compile?!" ;-)

    See the recent Thread, Differences between compiler versions

    When you include the extra functions, they require some space for parameters & their own internal variables as well as just code space - which is why you got the DATA space overflow in Small model.

    When you switch to COmpact or Large, your code starts using "External" [1] memory, MOVX instructions, and the DPTR.

    There could be a hardware fault with your XRAM, or a timing difference which causes your code to fail, something might be corrupting your DPTR(s), your Startup code might not be properly initialising your XRAM & revealing flaws like uninitialised variables in your code, you may have mis-used memory-specific pointers, etc, etc

    [1] "External" here means "outside the CPU core" - although it may be packaged within the IC, it is still outside the core & has to be addessed with MOVX.

Reply
  • I written this code and it compiles just fine.

    So why is your title "Can't Compile?!" ;-)

    See the recent Thread, Differences between compiler versions

    When you include the extra functions, they require some space for parameters & their own internal variables as well as just code space - which is why you got the DATA space overflow in Small model.

    When you switch to COmpact or Large, your code starts using "External" [1] memory, MOVX instructions, and the DPTR.

    There could be a hardware fault with your XRAM, or a timing difference which causes your code to fail, something might be corrupting your DPTR(s), your Startup code might not be properly initialising your XRAM & revealing flaws like uninitialised variables in your code, you may have mis-used memory-specific pointers, etc, etc

    [1] "External" here means "outside the CPU core" - although it may be packaged within the IC, it is still outside the core & has to be addessed with MOVX.

Children
No data