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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/10/02 22:09
Read: times


 
#28970 - Assembler or Compiler?
"as the 8051 cannot work directly with a 24 bit value, you must break it into 8 bit Most, Mid, Least significant bytes."

This is a good example of why you need to take care to distinguish between a Compiler and an Assembler - the 2 terms are not interchangeable!

An Assembler takes low-level Assembly source code as input; there is a 1:1 correspondence between Assembly instructions and machine instructions in the generated object. Therefore, Assembler is directly constrained by the processor architecture & instruction set.

A Compiler takes source code in a High-Level Language (HLL; eg, 'C') as input: there is no direct correspondence between source lines and machine instructions in the generated object (generally, it will be 1:many). Therefore, a HLL is not constrained by the processor architecture nor instruction set; eg, even on an 8-bit processor (such as the 8051) 'C' can easily give you 8-, 16- and 32-bit variables.
Of course, there's no such thing as a free lunch: if you ignore the underlying processor architecture & instruction set in your 'C' programming, you will almost certainly end up with inefficient & bulky code.



List of 7 messages in thread
TopicAuthorDate
About Assembler/Compiler...Metalink            01/01/70 00:00      
RE: About Assembler/Compiler...Metalink            01/01/70 00:00      
RE: About Assembler/Compiler...Metalink            01/01/70 00:00      
Assembler or Compiler?            01/01/70 00:00      
RE: Assembler or Compiler?            01/01/70 00:00      
RE: Assembler or Compiler?            01/01/70 00:00      
RE: Assembler or Compiler?            01/01/70 00:00      

Back to Subject List