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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/15/08 14:56
Read: times


 
Msg Score: +2
 +2 Good Answer/Helpful
#156723 - Getting off-topic
Responding to: ???'s previous message
Erik Malund said:
if the C code is 27k and you need to cut it to 4k there are two possibilities:


Somehow this got deviated from the original scenario. I was saying that my 23k program became 27k when I experimented with dropping my custom I/O routines in favor of printf. Then Alan mentioned he was working with a 4k code size limit. There was never any intent to make a 27k program fit in 4k.

Personally, I'm now of the opinion that except for sections of code where you must know exactly how long they'll take, 'C' is usually a reasonable alternative for assembly language. Even a 4k code size limit can be written in 'C' if you write the routines yourself rather than using the 'C' libraries. Most 'C' compilers generate decent code and don't generate much extra bulk if you forgo their full-featured libraries.

There are exceptions, of course. But if you know assembly language so you know what the 'C' compiler will try to generate, you can write 'C' code that has the readability of 'C' and the efficiency of assembly language. That allows you to code faster with fewer housekeeping errors, and more readability for the person that has to take over the project after you.

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