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

How printf()s work under C51?

Can any body tell me how printf() and the likes work under C51? If I don't have a display device, where does the output go? If I don't have a kernel and still want to use the functions and redirect the output to the serial port what should I implement first? I have already implemented a putch() function. Can I use it?

I'm a rookie here in C51. Would you help me on that? Thanks very much.

Parents
  • <I>"It's a pity the fact that Keil doesn't have routines source code, just to glance, ( prinft.c, strcopy.c,... )</I>

    The standard library implementations for printf, etc, are available from many places.
    We don't really need to know how printf does its magic, just how to send the characters it generates to whatever our embedded platform supports.
    That's where putchar (and getkey) come in!

Reply
  • <I>"It's a pity the fact that Keil doesn't have routines source code, just to glance, ( prinft.c, strcopy.c,... )</I>

    The standard library implementations for printf, etc, are available from many places.
    We don't really need to know how printf does its magic, just how to send the characters it generates to whatever our embedded platform supports.
    That's where putchar (and getkey) come in!

Children