Page 116 - DCAP507_SYSTEM_SOFTWARE
P. 116
System Software
Notes 3. There are some address reliant positions in the program, such address constants must be
accustomed as per to allocated space, such activity performed by loader is known as
relocation.
4. Lastly it positions all the machine instructions and data of analogous programs and
subroutines into the memory. Thus, program now turns out to be prepared for execution;
this activity is known as loading.
8.1 Loader Schemes
Depending on the different functionalities of loader, there are different types of loaders:
8.1.1 “Compile and Go” Loader
In "Compile and go" loader , the instruction is read line by line, its machine code is attained and
it is directly placed in the major memory at some recognized address. That means the assembler
executes in one part of memory and the assembled machine instructions and data is directly
placed into their allocated memory locations. After finishing of assembly process, allocate
starting address of the program to the location counter.
Example: The usual example is WATFOR-77, it's a FORTRAN compiler which utilizes
such "load and go" scheme.
Did u know? This loading scheme is also known as "assemble and go".
Advantage
This scheme is easy to execute. Since assembler is positioned at one part of the memory
and loader just loads assembled machine instructions into the memory.
Disadvantages
In this scheme some part of memory is engaged by assembler which is just a wastage of
memory. As this scheme is mixture of assembler and loader activities, this combination
program contains huge block of memory.
There is no production of .obj file, the source code is directly transformed to implementable
form. Thus although there is no modification in the source program it requires to be
assembled and executed every time, which then turns out to be a time consuming activity.
It cannot manage multiple source programs or multiple programs written in dissimilar
languages. This is because assembler can transform one source language to other goal
language.
For a programmer it is very hard to make an arranged modulator program and also it
turns out to be difficult to preserve such program, and the "compile and go" loader cannot
manage such programs.
The implementation time will be more in this scheme as each time program is assembled
and then implemented.
110 LOVELY PROFESSIONAL UNIVERSITY