Pass1 of Two-Pass Assembler: Experiment No. 2

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Experiment No.

2
Pass1 of Two-pass Assembler
Aim: Apply PASS-1 algorithm of two-pass Assembler and simulate it to generate Symbol Table &
Literal Table.

Software Requirement: Turbo C++ / Python /Java


Theory:
An assembler is a program that accepts as input an assembly language program (source) and
produces its machine language equivalent (object code) along with the information for the
loader.
It generates instructions by evaluating the mnemonics (symbols) in operation field and find
the value of symbol and literals to produce machine code. To perform assembly process,
assembler scans the source program twice, each scan is called a Pass.
Tasks performed by the Pass-I are:
1. Separate the symbol table, mnemonic table, and operand fields.
2. Build the symbol table.
3. Perform LC Processing.
4. Construct Intermediate Representation (IR).
Pass-I performs the analysis of the Source Program and synthesize the IR.
Flowchart for Pass1:
Conclusion:
By analyzing the Pass1 flowchart of two-pass assembler, and applying basic high-level
programming knowledge, we successfully simulated Pass1 of assembler and generated
symbol table and literal table.
LOs achieved: LO1
POs achieved: PO1, PO2, PO3, PO4, PO8,PO10
PSOs achieved: PSO1

You might also like