100% found this document useful (2 votes)
3K views2 pages

Pass1 of Two-Pass Assembler: Experiment No. 2

The document describes experiment 2 which aims to apply the first pass of a two-pass assembler algorithm to generate a symbol table and literal table. It discusses that the first pass separates fields, builds the symbol table, performs label processing, and constructs an intermediate representation by analyzing the source program. The conclusion states that by analyzing the first pass flowchart and using programming skills, the experiment successfully simulated the first pass and generated the tables.

Uploaded by

Yashika Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
3K views2 pages

Pass1 of Two-Pass Assembler: Experiment No. 2

The document describes experiment 2 which aims to apply the first pass of a two-pass assembler algorithm to generate a symbol table and literal table. It discusses that the first pass separates fields, builds the symbol table, performs label processing, and constructs an intermediate representation by analyzing the source program. The conclusion states that by analyzing the first pass flowchart and using programming skills, the experiment successfully simulated the first pass and generated the tables.

Uploaded by

Yashika Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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