Assembly language

From Free Pascal wiki

Deutsch (de) English (en) español (es) suomi (fi)

Assembly language is the source code which is written to be translated by an assembler into the binary executable program which is then run to produce the desired results.

Programs written in assembly are of three types:

  • Directly written assembly language files created by someone.
  • Inline assembly language which is included as part of a Pascal source code file which was created by someone.
  • Assembly language output of a compiler, e.g. the FPC Pascal Compiler which was automatically generated from the Pascal source code supplied to the compiler.

Note that directly written/inline assembly code often only works on one specific processor type/family (e.g. Intel i386) or even processor/OS combination (amd64/Windows x64 and amd64/Linux x64) and is therefore not as portable as Pascal code.

However, hand written optimized assembler code may often be faster than machine/compiler-generated assembler code and therefore it is used in tight performance-critical program code at the expense of portability and maintainability.