O'Reilly logo

Compilers: Principles and Practice by Himanshu B. Dave, Parag H. Dave

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

B.2 Assemblers

Jobs to be done by an assembler: An assembler has to do the following at the minimum:

  1. Scan the input assembly language code, check that only valid characterset is used and statement constructs are valid.
  2. Replace all mnemonic op-codes by correct machine op-codes.
  3. Replace all symbolic addresses, address constants, etc. by proper numeric values.
  4. Assign data areas and provide for loading-defined data wherever specified.
  5. Execute all the other pseudo-operations.

We shall now consider various types of assemblers and their major characteristics. We then discuss working of a two-pass assembler for the example assembly language.

Types of Assemblers

  • Line-by-line assembler: This type of assembler is usually used in debuggers, where the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required