08448380779 Call Girls In Civil Lines Women Seeking Men
Workshop Assembler
1. Lokmanya Tilak Jan Kalyan Shikshan Sanshtha’sWorkshop on“Improving Teaching Competencies” Lecture on the Topic: System Programming:Assembler Presented BY : Manoj S. Chaudhari Smt. Bhagwati Charturvedi College of Engg.
2. Aim of the Lecture: To Study Assembler Structure of Assembly Language Program(ALP) Steps to Translate ALP to Machine Language Program Data Structure/Tables used by the assembler Two pass assembler Pass 1 Assembler Pass 2 Assembler
3.
4. Structure of Assembly Language Program: ALP is a sequence of Assembly language statement. Each Assembly language statement consist of 4 fields: Label Opcode Operand Comment Consider the Assembly Language Statement: Loop MVI B, 05H ; move data 05H to register B Label Opcode Operand Comment
5.
6. Steps for Translating an ALP to Machine Language Code Translation is statement by statement basis . Read the assembly language statement and separate all the fields. Verify whether opcode is Machine opcode or Pseudo opcode. If Pseudo opcode , check the type of Pseudo opcode. If Machine opcode , obtain information about binary code , format and length of instruction. Process the operands. Increment the value of counter by length of the instruction.
7. Data Structure/Tables used by Assembler: Following are the tables used by the assembler. 1) Machine Opcode Table (MOT) 2)Pseudo Opcode Table (POT) 3)Symbol Table (ST) 4)Base Register Table (BRT) 5)Literal Table (LT)
8. 1)Machine Opcode Table The table consist of the fields: Name of mnemonic i.e. machine opcode, equiv. byte opcode, format of instruction and length of instruction.
9. 2)Pseudo Opcode Table(POT) This table consist of the fields : Name of Pseudo opcode Routine associated with the Pseudo Opcode
10. 3)Symbol Table(ST) The symbol table keeps track of the symbols used in the ALP . It has the following fields . Name of symbol Value of symbol Type of symbol
11. 4)Base Register Table This table keeps the track of registers which are used as base register. The table has the following format.
12. 5)Literal Table The literal table keep list of all the literals used in the program. The table has the following format.
13. Two Pass Assembler The entire process of translating an ALP to its equivalent machine language code is divided into two passes. 1) Pass 1 Assembler. 2)Pass 2 Assembler.
14.
15.
16.
17. Pass 1 Data Bases: 1)Input Source Program 2) LC : Used to keep track of each instruction. 3) MOT :Indicates Symbolic mnemonic for each instruction and its length. 4)POT: Indicates Symbolic mnemonic and action to be taken for each Pseudo Opcode. 5)ST: Store each label and its value. 6)LT: Store each literal and its corresponding location. 7)A Copy of input later used by pass2
18. Pass 1 Assembler Flow Chart: USING DROP Found DC/DS not found EQU END Pass 1 LC0 A Read ALS X SearchPOT? Type of Pseudo Opcode Adjust LC to Proper Alignment E Search MOT Eval Operand field B C D
19. yes no B C D E Llength LLength of data field Assign value to symbol in Label field Assign Storage Location to Literals Process Literals ,Enter in LT Onto Pass 2 Any Symbol? Assign Current value of LC to Symbol LC=LC+L A Write ALS on file for Use by Pass 2 X
20. References: Textbook : 1)“System Programming”, By J.J. Donovan. 2)”System programming and Operating system”, By D. M. Dhadhere. 3)”Concepts of Compiler design “,By Adesh K Pandey.