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

Association and classes betwnn student and university, Association and clas...

Association and classes betwnn student and university Association and classes are alike in the sense that classes describe objects, and association describe links. Figure shows

Compare pre-emptive and non-preemptive scheduling policies, Compare pre-emp...

Compare pre-emptive and non-preemptive scheduling policies. We preempt the currently executing process in preemptive scheduling. In non-preemptive we permit the current process

What is mqseries cluster, Cluster is said to be collection of queue manager...

Cluster is said to be collection of queue manager's logically linked together to balance the load on the remote machine (i.e if it is remote queue managers which processes your mes

Variable ordering - forward checking, Variable ordering - Forward checking:...

Variable ordering - Forward checking: Hence this is different from variable ordering in two important ways as:  Whether this is a dead end when we will end up visiting a

Define pvm library functions, Q. Define pvm library functions? int...

Q. Define pvm library functions? int info = pvm_freebuf( int bufid ) organizes of a message buffer. bufid message buffer identifier.  int pvm_getsbuf( void

What is encapsulation technique, Hiding data within the class and making it...

Hiding data within the class and making it available only by the methods. This method is used to protect your class against accidental changes to fields, which might leave the clas

What is thread, What is Thread? A thread, sometimes termed a lightweigh...

What is Thread? A thread, sometimes termed a lightweight process (LWP), is a fundamental unit of CPU utilization; this comprises a thread ID, a register set, a program counter

Explain about the term business-to-customer, Explain about the term busines...

Explain about the term business-to-customer. B2C (business-to-customer): "Electronic commerce" is usually understood mostly as selling goods or services to people ("last

Explain the categories of design patterns, Question: (a) Explain the th...

Question: (a) Explain the three categories of design patterns. Give two examples from each category. (b) When describing a pattern what is the purpose of "The Intent", an

Explain data rates in public switched telephone network, Explain data rates...

Explain data rates in public switched telephone network. Data rates in PSTNs : A voice channel in a public switched telephone network is band restricted with a nominal bandwid

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