Your SlideShare is downloading. ×
Assembler
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Assembler

4,295
views

Published on

Published in: Education, Technology

2 Comments
1 Like
Statistics
Notes
No Downloads
Views
Total Views
4,295
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
176
Comments
2
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. ASSEMBLER
  • 2. WHAT IS ASSEMBLER?
    • An assembler is a program that converts an assembly level language code (also called as mnemonic code) into machine language code and provides necessary information for the loader to load the programme.
  • 3. Assembler languages-structure
    • Label
      • symbolic labeling of an assembler address (command address at Machine level)
    • Mnemomic
      • Symbolic description of an operation
    • Operands
      • Contains of variables or addresse if necessary
    • Comments
      • ignored by assembler
      • used by humans to document/understand programs
      • tips for useful comments:
        • avoid restating the obvious, as “decrement R1”
        • provide additional insight, as in “accumulate product in R6”
    <Mnemomic> <Operand> Comments <Label>
  • 4. TYPES OF STATEMENT OF ASSEMBLER STATEMENTS IMPERATIVE STATEMENTS DECLARATIVE STATEMENT ASSEMBLER DIRECTIVE STATEMENTS
  • 5. ASSEMBLER PROCESS ASSEMBLY LANGUAGE PROGRAM PASS1 PASS2 EXECUTABLE IMAGE SYMBOL TABLE
    • First Pass:
      • scan program file
      • find all labels and calculate the corresponding addresses; this is called the symbol table
    • Second Pass:
      • convert instructions to machine language, using information from symbol table
  • 6. OVERVIEW PASS1
  • 7. PASS 2 Overview: Evaluate Fields and Generate Code.
  • 8. Assembler’s functions
    • Convert mnemonic operation codes to their machine language equivalents
    • Convert symbolic operands to their equivalent machine addresses .
    • Build the machine instructions in the proper format
    • Convert the data constants to internal machine representations
    • Write the object program and the assembly listing
  • 9. Linking and Loading
    • Loading is the process of copying an executable image into memory.
      • more sophisticated loaders are able to relocate images to fit into available memory
      • must readjust branch targets, load/store addresses
    • Linking is the process of resolving symbols between independent object files.
      • suppose we define a symbol in one module, and want to use it in another
      • some notation, such as . EXTERNAL , is used to tell assembler that a symbol is defined in another module
      • linker will search symbol tables of other modules to resolve symbols and complete code generation before loading
  • 10. DATABASES USED BY PASS1 AND PASS2
  • 11. ADVANTAGES
    • It used mnemonics instead used bits.
    • Address are symbolic not absolute.
    • Reading / understand program easily.
    • Introduction to data is easier.
  • 12. DISADVANTAGES
    • Working with assembler takes a little more time, through not as much as people are wont to think.
    • Assembler offers more facilities for structuring, even though lacking craftsmanship will bring on maintenance problems more easily.
    • In assembler one has more possibilities for solving or preventing performance problems.
    • It takes some extra effort to find or train professionals.
  • 13.  

×