Spos As1 305a027 Gadewar Parth 01
Spos As1 305a027 Gadewar Parth 01
Spos As1 305a027 Gadewar Parth 01
: 01
Problem Statement: Design suitable data structures and implement pass-I of a two-pass
assembler for pseudo machine in Java/C++ using object oriented feature. Implementation should
consist of a few instructions from each category and few assembler directives.
Objectives:
1. To study the design and implementation of 1st pass of two pass assembler.
2. To study the categorized instruction set of assembler.
3. To study the data structure used in assembler implementation.
Theory:
Instruction Formats:
IBM 360 has logical, control and special purpose instructions. Instructions are of two types:
register operands and storage operands.
RR – Register to register
Algorithm/Flowchart:
Input:
Source code of Assembly Language
SAMPLE START 100
USING *, 15
L 1, FOUR
A 1, =F’3’
ST 1, RESULT
SR 1, 2
LTORG
L 2, FIVE
A 2, =F’5’
A 2, =F’7’
FIVE DC F’5’
FOUR DC F’4’
RESULT DS 1F
END
Output:
100 SAMPLE START 100
100 USING *, 15
100 L 1, FOUR
104 A 1, =F’3’
108 ST 1, RESULT
112 SR 1, 2
114 LTORG
124 L 2, FIVE
128 A 2, =F’5’
132 A 2, =F’7’
136 FIVE DC F’5’
140 FOUR DC F’4’
144 RESULT DS 1F
152 5
156 7
160 END
Test Cases:
1. Check syntax of instruction (Correct and wrong)
2. Symbol not found
3. Wrong instruction
4. Duplicate symbol declaration
5. Test the output of program by changing value of START pseudo opcode.
6. Test the output of program by changing position of LTORG pseudo-op.
Software Requirement:
1. Fedora
2. Eclipse
3. JDK
Hardware Requirement:
Not specific
Frequently Asked Questions:
Conclusion:
Input assembly language program is processed by applying Pass-I algorithm of assembler and
intermediate data structures, Symbol Table, Literal Table, MOT, POT, BT, etc. are generated.