Module 2
Module 2
- NEHA SURTI
Assembler: Definition
5
Elements of the Assembly Language
Programming
An Assembly language is a
◦ machine dependent,
◦ low level Programming language specific to a certain computer system.
Label
◦ symbolic labeling of an assembler address (command
address at Machine level)
Mnemomic
◦ Symbolic description of an operation
Operands
◦ Contains of variables or addresse if necessary
Comments
8
Mnemonic Operation Codes
Each statement has two operands, first operand is always a register, and
second operand refers to a memory word using a symbolic name and
optional displacement.
Assembly Language Statements
An assembly program contains three kinds of statements:
Imperative Statements
Declaration Statements
Assembler Directives
To update the contents of the LC, analysis phase needs to know lengths of the
different instructions
◦ This information is available in the Mnemonics table and is extended with a field called
length
Symbol Address
N 103
Since there the instructions take different amount of memory, it is also stored
in the mnemonic table in the “length” field