Why to move from ASM to C

ASM language is a low-level programming language. It takes tons of time to develop embedded programs. Now even 8-bit microcontrollers aren’t as small as they were earlier. The program memories are climbing to a megabyte(s). Program structure becoming more complicated because of the bigger functionality demand. This is why it is better to use higher-level programming languages like C.

code

By using C language, you are not overwhelmed by details. You don’t always have to think about hardware logic to be able to program its restricted tasks. It is better to give this work to the C compiler, which helps you avoid bugs at the silicon level.

Another C language benefit against ASM language is portability. Let’s say you work on one embedded system architecture and decide to move to another, maybe more advanced. If your previous program was written in ASM language, you will need to rewrite (modify) this code from scratch. Using C language, you can run the program on a different microcontroller without significant modifications. This also reduces the costs of your project upgrade.

Continuing the thought, it is good to mention that using C makes it easy to save specific hardware routines to libraries that are convenient to use in other projects. Using C library functions and headers ensure that the application source can be recompiled for different MCU targets.

And the most important thing in using a higher-level programming language is that you can focus on algorithm design and spend less time implementing. C is a high-level language. It enables us to write embedded programs more quickly and easily. One C code line can stand for several ASM lines.

ASM language is used in critical parts of programs, but C compilers are improving, and sometimes programs written in C may be more efficient than written in ASM. It depends more on the programmer than a programming language.

Search engine compilers are so intelligent to incorporate a unique set of languages into one. Nowadays, in reverse engineering in data with Big-query is extended to another level. A French-based website Portices, is discussing new technologies in programming languages.

One Comment:

  1. I am in process of researching around assemblers about to start designing a new language.
    In my opinion, major disadvantage of high-level languages (HLL) is obscure code generation.
    Since HLL are not targeted for (not constrained with) any particular platform, code generation is left up to compiler vendor (developer). It is OK in case when hardware constraints on the target platform are pretty much loose and system (product) built with it does not violate the requirements. However, when tough hardware constraints come across tight system requirements, engineers need more control on the produced code.
    Assemblers vs HLL

Leave a Reply