Google Search

Sunday, June 5, 2011

IMPLEMENTATION OF PASS - 1 OF A DIRECT LINKING LOADER:implement pass - 1 of a direct-linking loader


IMPLEMENTATION OF PASS - 1 OF A DIRECT LINKING LOADER

Aim:  To implement pass - 1 of a direct-linking loader
                                                         
Algorithm:
1.      Get the PROGADDR from the user
2.      Initiate CSADDR  with value of PROGADDR
3.      Read header record from object program
4.      Store the length of the control section in CSLTH
5.      Search the ESTAB for control section name
(i)                 If found display an error message
(ii)               Otherwise, insert the control section name with CSADDR into ESTAB

6.      Read the next input record
7.      If  the record type is END goto step 10
8.      If  the record type is not D goto step 6
9.      Search the ESTAB for symbol names given in D record.
(i)                 If found display an error message
(ii)               Otherwise, insert  the symbol into ESTAB with the sum of CSADDR and indicated address and goto step 6.
10.   Add CSLTH to CSADDR.
11.  If end of file is reached, Exit. Otherwise goto step 3.


0 comments:

Post a Comment