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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/27/06 13:42
Read: times


 
#121160 - bringing 2 togethert
Responding to: ???'s previous message
1) This is where the fallacy of "Assembler gives tighter code" lies; I've said it many times before - it's not Assembler itself that gives tighter tighter, it requires a skilled & experienced assemlber programmer to do it.

2) The same applies to writing "portable" code in 'C' - as Erik so often says, if you just assume that your code must be inherently portable simple by virtue of writing it in 'C' ("C is C"), then you are seriously mistaken!


1) This is where the fallacy of "C is C" lies; it requires a skilled & experienced assemlber programmer to write "compiler code friendly to the processor" that makes C "tighter and faster". As an example, the "switch" statement is a real 'killer' in '51 C, whereas if (bit) is much more powerful in '51 C than most other environments.

2) since 1) is correct procedure for embedded microcontrollers 2) is automatically void.

re 2) In an environment, such as the PC, where (virtually) no I/O is involved C is, indeed, quite portable. However in a microcontroller environment where, even a thing like finding a cosine, is I/O related (must be done before next input) that does not hold.

Erik

so, it all comes back to my favourite phrase " the '51 ain't no PC"

List of 26 messages in thread
TopicAuthorDate
How long we see 8051            01/01/70 00:00      
   unofficial history of 8051            01/01/70 00:00      
      History, or prediction?            01/01/70 00:00      
         It seems to gain, not lose            01/01/70 00:00      
   Does it matter?            01/01/70 00:00      
      Double negative?            01/01/70 00:00      
      to C or not to C            01/01/70 00:00      
         Defintely 'C'!            01/01/70 00:00      
            yeah, let's flame!            01/01/70 00:00      
          Defintely 'C'!            01/01/70 00:00      
            arguments            01/01/70 00:00      
               An example for 8051/AVR            01/01/70 00:00      
                  contra-example for 8051/AVR            01/01/70 00:00      
                  A slight mistake            01/01/70 00:00      
                     stdint.h            01/01/70 00:00      
               That's your trouble, then!            01/01/70 00:00      
                  Compiler independant            01/01/70 00:00      
                  C is not better            01/01/70 00:00      
                  bringing 2 togethert            01/01/70 00:00      
                  Opening pandora's box            01/01/70 00:00      
               Learning C            01/01/70 00:00      
                  for a beginner ...            01/01/70 00:00      
            are You sure?            01/01/70 00:00      
            Portability and scars            01/01/70 00:00      
   I'm an ASM Guru but            01/01/70 00:00      
      why discuss the rare exception tha same apply            01/01/70 00:00      

Back to Subject List