What is assembler, Computer Engineering

Assignment Help:

Q. What is Assembler?

An assembly program is used to transfer assembly language mnemonics to binary code for every instruction after the complete program has been written with support of an editor it's then assembled with help of an assembler. 

An assembler works in 2 stageswhich are: it reads your source code 2 times.  In first pass the assembler gathers all the symbols defined in the program accompanied by their offsets in symbol table.  On the 2ndpass through the source program it generates binary code for every instruction of the program and give all symbols an offset with respect to segment from symbol table.

The assembler produces three files. Object file, list file and cross reference file. The object file comprises the binary code for every instruction in program. It is created only when your program has been successfully assembled without errors.  Errors which are detected by assembler are known as the symbol errors.  For illustrationMOVE AX1, ZX1.

In the statement it reads the word MOVE and it attempts to match with mnemonic sets as there is no mnemonic with this spelling then it presumes it to be an identifier and searches for its entry in symbol table.  It doesn't even find it there hence gives an error as undeclared identifier.

List file is optional and comprises the source code, binary equivalent of every instruction and offsets of symbols in the program.  This file is for purelydocumentation purposes. A number of the assemblers available on PC are TURBO,MASM etc.


Related Discussions:- What is assembler

Give solution for readers-writers problem, Give a solution for readers-writ...

Give a solution for readers-writers problem using conditional critical regions. Solution for readers-writers problem using conditional critical regions: Conditional critical

What is computer virus, What is computer virus?  A  computer  virus  is...

What is computer virus?  A  computer  virus  is  a  computer  program  that  is  designed  to  spread  itself between   computers.   Computer virus are inactive when standing a

Instruction set, Instruction set: The architecture gives instructions for m...

Instruction set: The architecture gives instructions for multimedia operations and floating point operations. The Itanium supports various bundle mappings to allow for more inst

Explain instruction level of parallel processing, Instruction Level It ...

Instruction Level It refers to condition where different instructions of a program are implemented by different processing elements. Most processors have various execution unit

Implemented in a program developed for sorting , A student counted up the n...

A student counted up the number of statements implemented in a program developed for sorting n integers and came up with a recurrence of the form: T(n) = a * n + b + 2T(n/2), an

What is partition, What is partition? Partitions divide a system into s...

What is partition? Partitions divide a system into several independent or weakly coupled subsystems, each giving one kind of service. Partitions use peer-peer subsystems.

Why is the data bus in most microprocessors bidirectional, Why is the data ...

Why is the data bus in most microprocessors bidirectional while the address bus is unidirectional?  Data Bus:  These lines are used to send data to memory by output ports and

What is over-clocking, Overclocking is the process of making a computer or ...

Overclocking is the process of making a computer or component operate faster than the clock frequency particular by the manufacturer by modifying system parameters. One of the most

Evaluate physical address of top of stack, Q. Evaluate Physical address of ...

Q. Evaluate Physical address of top of stack? Value of stack segment register (SS) = 6000h Value of stack pointer (SP) which is Offset = 0010h  So Physical address of top

Temporary location, Compare zero-, one, two-, and three- address machines b...

Compare zero-, one, two-, and three- address machines by writing programs to compute                         X = (A + B x C)/(D - E x F) for every of the four machines.  Do n

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