Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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


List of 32 messages in thread
TopicAuthorDate
loading the SBUF shortcut?            01/01/70 00:00      
   Printing a string            01/01/70 00:00      
   Shortcut...NOT            01/01/70 00:00      
   You have to enrich your library of Assembly Code            01/01/70 00:00      
      that is not a shortcut            01/01/70 00:00      
         Library of Assembly Code            01/01/70 00:00      
            the key word            01/01/70 00:00      
               polled serial            01/01/70 00:00      
                  "living with interrupts "            01/01/70 00:00      
                     what I got out of all of this            01/01/70 00:00      
                        DPTR .... Yes!!            01/01/70 00:00      
                        Check out DPTR            01/01/70 00:00      
                     I AGREE            01/01/70 00:00      
                        agree with WHAT?            01/01/70 00:00      
                            I AGREE with ...            01/01/70 00:00      
   C shortcut            01/01/70 00:00      
      'C' confusion            01/01/70 00:00      
         Confused            01/01/70 00:00      
            Maybe, maybe not            01/01/70 00:00      
               printf baggage            01/01/70 00:00      
                  This should come as no surprise            01/01/70 00:00      
               27K lots of memory            01/01/70 00:00      
                  "C baggage"            01/01/70 00:00      
                     Getting off-topic            01/01/70 00:00      
                        I wholehardely agree            01/01/70 00:00      
         Shortcuts are for wimps!            01/01/70 00:00      
            Disagree            01/01/70 00:00      
            Half a million Lines?            01/01/70 00:00      
               I didn't use 'C' or other HLL's on the old PC            01/01/70 00:00      
   Poor choice of terms!            01/01/70 00:00      
      A subroutine?            01/01/70 00:00      
         more code-efficient that macros            01/01/70 00:00      

Back to Subject List