Assembly Language – Computer Science


title: Assembly Language

Assembly Language

Assembly Language is the interface between higher level languages (C++, Java, etc) and machine code (binary). For a compiled language, the compiler transforms higher level code into assembly language code.

Every family of CPUs define their own Instruction Set Architeture (ISA), a set of basic instructions that the CPU can execute without needing further translation or transformation.
The compiler decomposes composite higher level composite instructions into operations available in the ISA.
Some of the more common ISAS in use today include MIPS, ARM, Intel x86, RISC-V.

Assemblers decompose Assembly instructions into their respective binary representations and replace the generic addresses of assembly code with explicit register and memory addresses of your computer.

Where execution time and control is crucial, code can be written directly in assembler. However, this comes at the cost of prolonging development time, making development harder. It should also be noted that there has been a large amount of research going into making compilers optimize the code that is generated automatically.

Assembly language is primarily used in the following situations:

  • There is a need to use CPU instructions not available in higher-level languages.
  • There is no high-level language to program a certain types of processors.
  • Implementing a compiler for a higher level language on a new ISA.

More Information:

This article needs improvement. You can help improve this article. You can also write similar articles and help the community.