Raj Kumar
Computer Science And Engineering

Explain the absolute loader and Write its algorithm.

System Software and Compiler Design

Explanation

974    0

The operation of absolute loader is very simple. The object code is loaded to specified locations in the memory. At the end the loader jumps to the specified address to begin execution of the loaded program. The role of absolute loader is as shown in the figure 4.4.

The advantage of absolute loader is simple and efficient. But the disadvantages are, the need for programmer to specify the actual address, and, difficult to use subroutine libraries.

The algorithm for this type of loader is given here. The object program and, the object program loaded into memory by the absolute loader are also shown. Each byte of assembled code is given using its hexadecimal representation in character form. Easy to read by human beings. Each byte of object code is stored as a single byte. Most machine store object programs in a binary form, and we must be sure that our file and device conventions do not cause some of the program bytes to be interpreted as control characters.


Begin

read Header record

verify program name and length

read first Text record

while record type is <> ‘E’ do

begin

{if object code is in character form, convert into internal representation} move object code to specified location in memory read next object program record

end

jump to address specified in End record

end




Share:   
   Raj Kumar
Computer Science And Engineering

More Questions from System Software and Compiler Design Module 2