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

scanf error when code is > 64K

Hallo,

I face another problem:
I am using Cx51 Ver 7.06
I am using Philips/89C669
I am using ROM(HUGE) (code size maybe > 64K)
I use number of sscanf functions and
until now everything was fine.
Now my code size actually grew more than
64K and then I get this error:

*** ERROR L121: IMPROPER FIXUP
    MODULE:  C:\KEIL\C51\LIB\CS51FPS.LIB (SCANF)
    SEGMENT: ?PR?SCANF?SCANF
    OFFSET:  000043H
If I take out some lines in the program
(not sscanf, but any other lines),
such that code is again < 64K, then I get
no error. Which means the error is not
due to sscanf function but due to code
size (It is my guess :)
What should I do now? I am not possible
to reduce any code. I am still not completely
written the prgram, which means the code
size will increase even more.
mk

Parents
  • Yes, I have Cx51, Lx51 and so on (actually
    PK51)
    Besides, the problem seems to be only with
    scanf function. I can call many other
    library functions and the code size may
    increase > 64K and still I get no error;
    and the code also works well on my hardware.
    Only if I call scanf, then I get error
    if code is > 64K. (Actually the linker
    complains about scanf, but really I directly
    never call scanf, I only call sscanf.
    Maybe sscanf calls scanf?)

    If sscanf used and code size > 64K, then only
    I see the linker error. If either sscanf
    is removed or if code size is < 64K, then
    everything is ok.

    Yes, I have set the necessary bits for
    using > 64K code. Since my code works even
    if it is > 64K (but without sscanf), it
    means my bit settings are correct (I hope!)

    mk

Reply
  • Yes, I have Cx51, Lx51 and so on (actually
    PK51)
    Besides, the problem seems to be only with
    scanf function. I can call many other
    library functions and the code size may
    increase > 64K and still I get no error;
    and the code also works well on my hardware.
    Only if I call scanf, then I get error
    if code is > 64K. (Actually the linker
    complains about scanf, but really I directly
    never call scanf, I only call sscanf.
    Maybe sscanf calls scanf?)

    If sscanf used and code size > 64K, then only
    I see the linker error. If either sscanf
    is removed or if code size is < 64K, then
    everything is ok.

    Yes, I have set the necessary bits for
    using > 64K code. Since my code works even
    if it is > 64K (but without sscanf), it
    means my bit settings are correct (I hope!)

    mk

Children
No data