Professional Documents
Culture Documents
Module 2 - Assemblers & Macro Processor
Module 2 - Assemblers & Macro Processor
Assembler : An assembler is a program that accepts as input an assembly language program &
produces its machine language equivalent along with information for the loader.
• Functions of Assembler:
1. Imperative statement:
Understood by m/c & executed by m/c.
e.g. All the instructions.
1. Declarative statements:
DC statement: Declare Constant
Label Opcode Operand
FOUR DC F ‘4’
1) Registers:-
2) Memory:-
Unit Of Memory Bytes Bits
Byte 1 8
-Basic unit Bytes.
Half Word 2 16
Full Word 4 32
Double Word 8 64
Instruction Formats:
a) RR Format:-
In this format the first & second operands present in the registers.
Format:
Opcode R1 (OP1) R2 (OP2)
0 7 8 11 12 15
e.g AR 3,4
3) RX format:
-In this format first operand is in the register & second operand is external (
present in the memory location).
-The address of second operand is given by-
C (B2) + C(X2) + D2
Contents of Base Reg. + Contents of Index Reg. + Displacement
Format:
Opcode R1 X1 B2 D2
0 7 8 11 12 15 16 19 20 31
e.g A 1, 90(2,15)
i.e. C(15) + C(2) +90
Thank You