Type the load map (TYPE option). set the program entry point (RESET option) During its operation, the loader uses a loader table (REFTBL), and
external symbol identification table (ESIDTB), and a location counter (LOCCNT). The loader table contains the names of control sections and
entry points, their current location, and the relocation factor. (The
relocation factor is the difference between the compiler-assigned
address of a control section and the address of the storage location
where it is actually loaded.) The ESIDTB contains pointers to the
entries in REFTBL for the control section currently being processed by the loader. The loader uses the location counter to determine where the
control section is to be loaded. Initially, the loader obtains from the
nucleus constant area the address (LOCCNT) of the next location at
which to start loading. This value is subsequently incremented by the
length indicated on an ESD (typeO), END, or ICS card, or it may be reset
by an SLC card.
The loader contains a distinct routine for each type of input card. calculations using information contained in the
nucleus constant area, the location counter, the ESIDTB, the loader
table, and the input cards. Other loader routines perform
initialization, read cards into storage, handle error conditions,
provide disk and typewritten output, search libraries, convert
hexadecimal characters to binary, process end-of-file conditions, and
begin execution of programs in core.
Following are descriptions of the individual subprocessors with LDR. SLC CARD ROUTINE Function ---rhis- routine sets the location counter (LOCCT) to the address
specified on an SLC card, or to the address assigned (in the REFTBL)
to a specified symbolic name. The routine is entered at the first instruction when it receives
control from the initial and resume loading routine. It is entered
at ORG2 whenever a loader routine requires the current address of a
symbolic location specified on an SLC card. This routine determines which of the following situations exists, and
takes the indicated action: The SLC card does not contain an address or a symbolic name.
The SLC card routine branches, via BADCRD in the reference table
search routine, to the disk and type output routine which generates an error message.
2. The SLC card contains an address only. The SLC card routine
sets the location counter (LOCCT) to that address and returns to
RD, in the initial and resume loading routine, to read another
card.
3. The SLC card contains a name only, and there is a reference
table entry for that name. The SLC card routine sets LOCCT to
the current address of that name (at ORG2) and returns to the
initial and resume loading routine to get another card.
2-72 IBM VM/370 System Logic and Program Determination--Voluae 2
4. The SLC card contains a name only, and there is no reference
table entry for that name. The SLC card routine branches via ERRSLC to the Disk and Type output routine (DMSLIO), which
generates an error message for that name.
5. The SLC card contains both an address and a name. If there is a
REFTBL entry for the name, the sum of the current address of the
name and the address specified on the SLC card 1S placed 1n LOCCT; control returns to the initial and resume loading routine
to get another card. If there is no REFTBL entry for the name,
the SLC card routine branches via ERRSLC to the Disk and Type Output routine, which generates an error message for the name. ICS CARD ROUTINE - C2AE1
Function ---rbIs- routine establishes a reference table entry for "the control-seg_ent name on the ICS card if no entry for that name exists, adjusts the location counter to a fullword boundary, if
necessary, and adds the card-specified control-segment length to the
location counter if This routine has one entry point,
entered from the initial and resume ICS card.
named C2AE1. The routine is
loading routine when it finds an 1. The routine begins its operation with a test of card type. If
the card being processed is not an ICS card, the routine
branches to the ESD card analysis routine; otherwise, processing
continues in this routine.
2. The routine tests for a hexadecimal address on the ICS card. If
an address is present, the routine links to the DMSLSEA subroutine to convert the address to binary, otherwise the
routine branches via BADCRD to the disk and type output routine (DMSLIO). 3. The routine next links to the REFTBL search routine, which
determines whether there is a reference table entry for the
card-specified control-segment name. If such an entry is found,
the REFTBL search routine branches to the initial and resume loading routine; otherwise, the REFTBL search routine places the
control-segment name in the reference table, and processing
continues.
4. The routine determines whether the card-specified
control-segment length is zero or greater than zero. If the
length is zero, the routine places the current location counter
value in the reference table entry as the control segment's
starting address (ORG2), and branches to the initial and resume loading routine. If the length is greater than zero, the
routine sets the current location counter value at a fullword
boundary address. The routine then Flaces this adjusted current
location counter value in the reference table entry, adjusts the
location counter by adding the specified control-segment length
to it, and branches to RD in the initial and resume loading
routine to get another card. CMS Method of Operation and Program Organization 2-73
Previous Page Next Page