Google Search

Sunday, June 5, 2011

IMPLEMENTATION OF PASS - 2 OF A DIRECT LINKING LOADER : implement pass2 of direct linking loader using C program.


IMPLEMENTATION OF PASS - 2 OF A DIRECT LINKING LOADER

Aim:  To implement pass2 of direct linking loader using C program.

Algorithm:
  1. Read the header record from object program.
  2. Get the CSADDR for the correct control section from ESTAB.
  3. Read next input record.
  4. If the record type is END, go to  step 8.
  5. If the record type is ‘T’, place the object code in location which is sum of CSADDR and specified address.
  6. If the record type is ‘M’ search the ESTAB for symbol table.
(i)                 If found add or subtract symbol value at location CSADDR + specified  
Address.
(ii)               Otherwise display error message.

  1. Read  next input record and go to step 4.
  2. If end of file is reached,Exit.Otherwise go to step1.

0 comments:

Post a Comment