??? 07/12/08 04:56 Read: times |
#156635 - Maybe, maybe not Responding to: ???'s previous message |
Oliver Sedlacek said:
In C it's printf("hello");
You can learn quite a lot of C in the time it takes to write string handling functions in assembler. Perhaps, but that doesn't mean it's necessarily the better solution. I actually have an app that I originally wrote in SDCC 'C'. I migrated it to Keil 'C' last year but the application still included some custom string-output routines that were themselves written in 'C' (I seem to recall at the time I had some trouble modifying the SDCC putchar routine, so I just didn't use printfs at all and rolled my own routines). As I said, I migrated it to Keil 'C' last year. A few weeks ago I decided I'd try replacing all my routines and calls with printfs; if it was about the same size then I'd prefer to use printf to keep it clean. My 23k program became 27k. Needless to say I threw out that exercise and just went back to my original rudimentary string output routines. Obviously printf includes a lot of baggage that you may not need. Regards, Craig Steiner |