Rectangle 27 0

q Assembly Language Usage?

Reasons you might write a program in assembly language

  • You don't trust a compiler to generate optimized or working machine code

Assembly language is used for transforming higher-level programming languages like C into machine code. Processors can only run machine code -- a sequence of short, discrete, instructions encoded in binary format. Every time any program runs, machine code is being executed by a processor. Assembly language is simply a human-readable form of machine code.

The job of transforming high-level code into machine code is performed by a compiler, and assembly is typically created along the way as an intermediate representation before being translated into machine code. In this light, assembly is written at least as often popular high-level programming languages -- its just written by another program.