Professional Documents
Culture Documents
: - 01
Aim: - Design and implementation of pass1 of two-pass assembler for general machine.
2. Synthesis phase
These phases performs following tasks :
1. Analysis phase :
1.a.a) Isolate label, mnemonic opcode, operands and comment of statement.
1.a.b) Check validity of mnemonic opcode by consulting MOT.
1.a.c) Check the no. of operands required for an instruction by consulting MOT.
1.a.d) Process the labels or symbols appropriately and fill ST(Symbol Table).
1.a.e) Update LC appropriately by consulting MOT for the length of instruction.
1.a.f) Ignore comments.
1.a.g) Take proper actions for pseudo opcodes by consulting POT.
2. Synthesis phase :
1.a) Obtain machine opcode consulting to MOT corresponding to mnemonic.
1.b) Filll in address of symbols or labels by consulting ST.
1.c) Write the above information in output object file.
// Draw flowchart for PASS1
Program:
Output:
Conclusion: - Successfully designed pass 1 in Two pass assembler.