Jobs to be done by an assembler: An assembler has to do the following at the minimum:
- Scan the input assembly language code, check that only valid characterset is used and statement constructs are valid.
- Replace all mnemonic op-codes by correct machine op-codes.
- Replace all symbolic addresses, address constants, etc. by proper numeric values.
- Assign data areas and provide for loading-defined data wherever specified.
- 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 ...