Professional Documents
Culture Documents
Introduction
To execute an object program, we need
memory location and brings the object program into memory for execution.
Source Program
Assembler
Object Code
Linker
Executable Code Loader
Type of loaders
Assemble-and-go loader Absolute loader (bootstrap loader) Relocating loader (relative loader) Direct linking loader
Design options
Absolute Loader
There are two types of loaders, relocating and absolute. The absolute loader is the simplest and quickest of the two. The loader loads the object file into memory at the location specified by the beginning portion (header) of the file, then passes control to the program. If the memory space specified by the header is currently in use, execution cannot proceed, and the user must wait until the requested memory becomes free.
Advantage
Simple
and efficient. It can load object code generated by any translator into memory.
Disadvantage
They
need programmer to specify the actual load address. Difficult to use subroutine libraries because programmer must do the linking.
When a computer is first turned on or restarted, a special type of absolute loader, called bootstrap loader is executed. This bootstrap loads the first program to be run by the computer -- usually an operating system. The bootstrap itself begins at address 0. It loads the OS starting address 0x80. No header record or control information is required , the object code is consecutive bytes of memory.