Explain about two-pass assembler, Computer Engineering

Assignment Help:

Q. Explain about Two-pass assembler?

Assemblers usually make two or more passes through a source program in order to resolve forward references in a program. A forward reference is expressed as a type of instruction in code segment which is referencing the label of an instruction though the assembler hasn't yet encountered the definition of that instruction.

Pass 1:  Assembler reads the whole source program and creates a symbol table of labels and names used in the program that is name of data fields and programs labels and their relative location (offset) within the segment.

Pass 1 concludes the amount of code to be produced for every instruction. 

Pass 2:Assembler uses the symbol table which it constructed in Pass 1. Now it knows the relative position and length of every data field and instruction and it can complete object code for every instruction.  It generates .OBJ (Object file), .LST (list file) and cross reference (.CRF) files.


Related Discussions:- Explain about two-pass assembler

Explain what is the difference among isr & function call, In ISR there is n...

In ISR there is no return value but in function call there is return value

Describe menu in dreamweaver, File Menu: Under it there are New, Save, Sav...

File Menu: Under it there are New, Save, Save as, Save as template, Import, Export, Preview in browser etc. options. Edit Menu: In this menu there are Cut, Copy, Paste, Undo,

Differentiate between string constants & character constants, Computer Conc...

Computer Concepts & C Programming 1. Write a program to read four floating point numbers and find their sum and average. 2. What is the difference between string constants a

What is boot manager, An EFI boot manager is also used to select and load t...

An EFI boot manager is also used to select and load the operating system, removing the require for a dedicated boot loader mechanism

State in brief about virtual memory, What is Virtual memory The term v...

What is Virtual memory The term virtual memory signifies something that appears to be present though actually it is not. Virtual memory technique enables users to use more mem

What are the advantages of batch processing, What are the advantages of bat...

What are the advantages of batch processing This has the advantage which jobs can be processed when computer resources are less busy (for example during the evening or at night

Define relocation bits utilized by relocating loader, Relocation bits used ...

Relocation bits used by relocating loader are specified by? Ans. Relocation bits utilized by relocating loader are identified by Assembler or Translator.

Limitations of experts system, 1. It is hard even for a highly skilled ex...

1. It is hard even for a highly skilled experts to abstract good situational assessment when he is under time pressure. 2. Expert systems perform well with specific t

Explain optimization process of pipelining, Q. Explain Optimization process...

Q. Explain Optimization process of Pipelining ? RISC machines can use a very efficient pipeline scheme due to the regular and simple instructions. Similarly all other instructi

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd