REFADR ROUTINE (DMSLDRB)
Function computes the storage address of a given entry in the reference table. This routine has one entry point, location REFADR. The routine is
entered for several of the routines within the loader. QEerg!!QB 1. Checks to see if requested ESDID is zero. If so, uses LOCCNT as
requested location; branches to the return location + 44; otherwise continues this routine.
2. The routine first obtains, from the indicated ESID table entry,
the position (n) of the given entry within the reference table the nth HEFTEr . 3. The routine then multiplies n by 16 (the number of bytes in each
REFTBL entry) and subtracts this result from the starting
address of the reference table. The starting address of the
reference table is held in area TBLREF; this address is the
highest address in storage, and the reference table is always built downward from that address.
4. The result of the subtraction in operation 2, above, is the
storage address of the given reference table entry. If there is
no ESD for the entry, goes to operation 5; otherwise, this
routine returns to the location specified by the calling
routine.
5. Adds an element to the chain of waiting elements. The element
contains the ESD data item information to be resolved when the
requested ESDID is encountered. PRSERCH ROUTINE (DMSLDRD) Function compares each reference table entry name with the given
name determining (1) whether there is an entry for that name and (2)
what the storage address of that entry is. This routine is initially entered at PRSERCH, and subsequently at
location SEReH. The routine is entered from several routines within
the loader. 1. This routine begins its operation by obtaining the number of
entries currently in the reference table (this number is
contained in area TBLCT), the size of a reference table entry
(16 bytes), and the starting address of the reference table
(always the highest address in storage, contained in area
TBLREF) .• 2-82 IBM VM/370 System Logic and Program Determination--Voluae 2
2. The routine then checks the number of entries in the reference
table. If the number is zero, the routine performs operation 5; otherwise, the routine performs operation 3.
3. The routine next determines the address of the first (or next)
reference table entry to have its name checked, increments by one the count it is keeping of name COMparisons, and cOmpares the given name with the name contained in that entry. If the
names are identical, PRSERCH branches to the location specified
in the routine that linked to it. PRSERCH then returns the
address of the REFTBL entry; else PRSERCB performs operation 4. 4. The routine then determines whether there is another reference
table entry to be checked. If there is none, the routine
performs operation 5; if there is another, the routine
decrements by one the number of entries remaining and repeats
its operation starting with operation 3.
5. If all the entries have been checked, and none contains the
given name for which this routine is searching, the routine
increments by one the count it is keeping of name comparisons, places that new value in area TBLCT, moves the given name to form a new reference table entry, and returns to the calling
program.
Exits routine exits to either of two locations, both of which are
specified by the routine that linked to this routine. The first
location is that specified in the event that an entry for the given name is found; the second location is that specified in the event
that such as entry is not found. LOADER DATA BASES ESD Card Codes (col. 25 ••• ) £Qde 00 SD (CSECT or START) Oi LD (ENTRY) 02 ER (EXTRN) 04 PC (Private code) 05 CM (COMMON) 06 ID (Pseudo-register) OA WI (WEAK EXTERN) ESIDTB ENTRY The ESD ID table (ESIDTB) is constructed separately for each text deck
processed by the loader. The ESIDTB produces a correspondence between
ESD ID numbers (used on RLD cards) and entries in the loader reference
table (R!FTBL) as specified by the ESD cards. Thus, the ESIDTB is
constructed while processing the ESD cards. It is then used to process
the TXT and RLD cards in the text deck.
The ESIDTB is treated as an array and is accessed by using the ID number as an index. Each ESIDTB entry is 16 bits long. CMS Method of Operation and Program Organization 2-83
Previous Page Next Page