However, there at least three reasons to use assembler language:
- If you switch to a family of microprocessors or microcontrollers still unknown to you, and you have enough time and ambition to learn all one can know about the features, assembler is the right choice. It's like traveling to a country still unknown to you: You can rely on interpreters, but if you prefer to directly learn how people live and think you have to speak the language that the inhabitants understand.
- High-level compilers are capable of some optimization but in rare cases your requirements are not met. For example, if you need to calculate and store numbers with a certain precision (e. g. 80 bit floating point) your choice is between languages which support these (but in many cases the precision is not preserved ("optimized" away) during storing), languages which support 128-bit-numbers (kind of overkill, mostly not supported by hardware), languages providing arbitrarily selectable precision (the slowest option), or self-written assembler routines (most effort if you need a lot of math functions).
- With compilers, the details (e. g. registers) of the CPU are hidden ("transparent", computer scientists call it but "opaque" would be more appropriate). In some cases, you need to modify the content of a register. This is only possible by inline assembler or similar mechanisms.
With compaler the execution time would increased considerably, compared to assembly language programs, and the operation would not be more cleared and hence the needed modifications could not be done easily hence assembly programs in opcodes storing in RAM are more useful in, on-line application for controller development for exact time execution , using of respective processors kits. Once program is finalized could be burned in controller modules EPROMs. For understanding refer my papers...