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

printf problem

putchar works but printf does not ... my putchar is used by printf
so the problem must be in my code somewhere??

I started deleting sections of code until my printf
started to work ... then I narrowed it down to
a single statement ... statement in - it worked,
statement out - printf didn't work ... the
statement was in a routine that did not get
executed .. deleting other statements made
printf work ... the program was only 5161
bytes when I reached to go/no go condition

Have you ever heard of anything like this???

Any ideas on how to find out what is going on??

Parents
  • How would the string constant being stored in code space
    be a problem? The printf routine gets passed the starting
    address of the string and something that tells it the address
    is code space.


    In theory this is true, but from experience I've seen incorrectly written/compiled code that will try to use a MOVX to fetch from code space... what you get is obviously garbage.

    It was just a shot in the dark

Reply
  • How would the string constant being stored in code space
    be a problem? The printf routine gets passed the starting
    address of the string and something that tells it the address
    is code space.


    In theory this is true, but from experience I've seen incorrectly written/compiled code that will try to use a MOVX to fetch from code space... what you get is obviously garbage.

    It was just a shot in the dark

Children
No data