IMPLEMENTATION OF
RELOCATION LOADER
AIM
To implement relocation loader using C.
ALGORITHM
1.Enter new starting location to which object has ti be
relocated.
2.Read the content of the input file as strings one at a
time in an array input.
3.Transfer the string read in array input into another array
output until it is incremented.
4.Move consecutive next 3 strings into array “output”.
5.Cover current location bit associated with each text
record to binary form.
6.Make necessary changes in corresponding words of object
code and store the updated object code into array “output”.
7.Move object code for which corresponding relocation bit is not set directly to the
array “output” from array “input” without any change.
8.Repeat step 2 to 8 until end record is encountered.
9.If the object code is in character form ,convert into
internal hexadecimal representation.
10.Move object code to specified location in memory
11.Write starting LOCCTR value of block of object code and
the corresponding internal hexadecimal representative to the output files.