Definition of assembly language:
A low-level programming language which uses symbols and lack variables and functions and which work directly with CPU. Assembly language is coded differently for every type of processor. X86 and x64 processors have a different code of assembly language for performing the same tasks. Assembly language has the same commands as machine language but instead of 0 and 1, it uses names.
Definition of high-level language:
A high-level language is a human-friendly language which uses variables and functions and it is independent of computer architecture. The programmer writes code with general purpose without worrying about hardware integration part. A program written in high-level language needs to be first interpreted into machine code and then processed by a computer.
Assembly language vs high-level language
- In assembly language programs written for one processor will not run on another type of processor. In high-level language programs run independently of processor type.
- Performance and accuracy of assembly language code are better than a high-level.
- High-level languages have to give extra instructions to run code on the computer.
- Code of assembly language is difficult to understand and debug than a high-level.
- One or two statements of high-level language expand into many assembly language codes.
- Assembly language can communicate better than a high-level Some type of hardware actions can only be performed by assembly language.
- In assembly language, we can directly read pointers at a physical address which is not possible in high-level
- Working with bits is easier in assembly language.
- Assembler is used to translate code in assembly language while the compiler is used to compile code in the high-level.
- The executable code of high-level language is larger than assembly language code so it takes a longer time to execute.
- Due to long executable code, high-level programs are less efficient than assembly language programs.
- High-level language programmer does not need to know details about hardware like registers in the processor as compared to assembly programmers.
- The most high-level language code is first automatically converted into assembly code.
Examples of assembly language:
Assembly languages are different for every processor. Some of assembly languages examples are below.
Examples of high-level language:
- Common Lisp