Maybe people never stops discussing about Assembly (low level language) or C (high level), which is better?
I myself never hate or complain about any language, or praise for the rest. Each language has its own pros and cons, and depending the specific project, specific programmer, using this or that language is better solution.
I just list out here the pros and cons of these 2 languages, based on my experiences, for your ease of "judging":
Assembly:
Pros:
- First, most of assembler are freely provided and well supported from chip manufacturers. And you must not be worried about these sources. Every new chip will be updated instantly in these softwares.
- Assembly is simple so easy to learn.
- Assembly helps (I write "help", not "always make" because it is still up to the programmer's ability) write better, shorter, more compact (more efficient), faster machine codes. You can experience trimming the code to fit the chips, and you can get funs at that jobs, that you cannot get in C programming. The smaller in memory chips usually mean that cheaper chips.
- Easy to revise, maintain (repeat: based on my experiences).
- You will understand very well the chip hardware. So, you will use the chip in excellent ways, especially when you also are the electronic engineer, not a programmer only.
- For the time being, I have seen only the dissassembler programs, this kind of program helps you convert the hex file (machine code) back into asm file (source code). That in many cases is very useful, for example, in case you have lost the source codes, but still keep the machine codes, or sometimes you can get the hex codes elsewhere but there is no source code provided.
Cons:
- Source codes often very long (in comparison with code written in C).
- Each chip manufacturer provides a different assembler for its chips. Even a slight difference from chip to chip of one manufacturer.
- It is really the tough mission (or even impossible with a individual) if dealing with the big projects/or bigger chips (for example, 16-bit or 32-bit chips) (due to the very long source codes).
C languge:
Pros:
- Programmer needs not to understand well the chip hardware.
- Applying the code for various chips is easier.
- Writing source codes is easier task, and it is shorter in general.
Cons:
- C compilers is usually not free, and expensive. Sometimes maybe cannot affordable for the individual programmer or beginner.
- Cannot use the chip at high efficiency. There is a statistics that a good written machine code written by C maybe upto 150% longer than a good written machine code written by Assembly.
- Some projects where Assembly can solve the problems but C cannot.
- For the time being, I have seen no program that helps convert the hex file back into the C source code.
- Once only using C, you become lazy and do not want to come back to assembly. And it is bad, as in some projects, you may be impossible to get the project done.
Just some of my thoughts.
nguyennam