19-06-2013, 12:45 PM
ASSEMBLERS
ASSEMBLERS.doc (Size: 103 KB / Downloads: 26)
Introduction
There are two main classes of programming languages: high level (e.g., C, Pascal) and low level. Assembly Language is a low level programming language. Programmers code symbolic instructions, each of which generates machine instructions.
An assembler is a program that accepts as input an assembly language program (source) and produces its machine language equivalent (object code) along with the information for the loader.
Advantages of coding in assembly language are:
• Provides more control over handling particular hardware components
• May generate smaller, more compact executable modules
• Often results in faster execution
Disadvantages:
• Not portable
• More complex
• Requires understanding of hardware details (interfaces)
One-Pass Assemblers
Two methods can be used:
- Eliminating forward references
Either all labels used in forward references are defined in the source program before they are referenced, or forward references to data items are prohibited.
- Generating the object code in memory
No object program is written out and no loader is needed. The program needs to be re-assembled every time.