Home

Assembler

An assembler is a software tool that translates assembly language, a human-readable low-level representation of a computer's instruction set, into machine code or object code that a processor can execute. Assembly language uses mnemonics for opcodes, symbolic names for registers and memory addresses, and a variety of directives to control assembly and data layout. The output is typically object code or an executable, which may require a linker to resolve symbols and produce a final binary.

Assemblers perform symbol resolution, address arithmetic, and relocation. They often support macros and conditional assembly. Most

Syntax: assembly languages vary by architecture and by assembler. Two common syntaxes are Intel syntax and

Workflow: source file(s) -> assembler -> object file(s) -> linker -> executable or library.

Usage and history: assemblers emerged in the 1950s to simplify programming on early computers. They are still

Limitations: portability is limited by architecture; readability is lower than high-level languages; debugging can be challenging;

assemblers
operate
in
one
or
more
passes.
In
a
two-pass
assembler,
forward
references
(labels
defined
later)
are
resolved
in
a
second
pass.
They
also
maintain
a
symbol
table
mapping
labels
to
addresses.
AT&T
syntax;
different
assemblers
implement
different
directives
and
pseudo-ops
for
sections,
data,
and
constants.
used
for
performance-critical
code,
embedded
systems,
OS
kernels,
bootloaders,
and
for
reverse
engineering.
Popular
assemblers
include
NASM,
MASM,
GAS
(GNU
Assembler),
with
architecture-specific
variants.
optimization
is
manual.