D!SITS uses the system save area (DSECT SSAVE) to save the value of
the SVC old PSi at the time of the SVC call# the caller's registers at
the time of the call, and any other necessary control information. Since SVC calls can be nested, there can be several of these save areas
at one time. The system save area is allocated in protected free
storage.
The user save area contains (DSECT EXTUAREA) fullwords), allocated in unprotected free storage.
this area at all, but simply passes to the called
this area in register 13. Thus, the called routine
a temporary work area, or as a register save area.
save area for each system save area, and the latter
to the former in the USAVEPTR field.
Load and Execute Text Files 12 doublewords (24 D!SITS does not use
routine a pointer to
can use this area as
There is one user
contains a pointer
The CMS loader consists of a nucleus resident loader (DMSLDR), a file
and message handler program (DMSLIO), a library search program (DMSLIB), and other subroutine programs. DMSLDR starts loading at the user first
location (AUSRAREA) specified in NUCON or at a user specified location. When performing an INCLUDE function, loading resumes at the next
available location after the previous LOAD, INCLUDE, or LOADMOD. The loader reads in the entire user's program, which consists of one
or more control sections, each defined by a type 0 ESD record ("card"). Each control section a type 1 ESD card for each entry point and
may contain other control cards. Once the user's program is in storage, the loader begins to search
his files for library subprograms called by the program. The loader
reads the library subprograms into storage, re1ecating and linking them
as required. To relocate programs, the loader analyzes information on
the SLC, ICS, ESD, TXT, and REP cards. To establish linkages, it
operates on ESD, and RLD cards. Information for end-of-load transfer of
control is provided by the END and LDT cards, the ENTRY control card, START command, or RESET option.
The loader also INCLUDE commands.
analyzes the options specified on the LOAD In response to specified optiens, the loader can: Set the load area to zeros before loading (CLEAR option). Load the program at a specified location (ORIGIN option) Suppress creation of the load-map file on disk (NOMAP option).
and Suppress the printing of invalid card images in the load map (NOINV option). Suppress the printing of REP card i.ages in the load map (NOREP option). Load program into "transient area" (ORIGIN TRANS option) Suppress TXTLIB search (NOLIBE option). Suppress text file search (NO AUTO option) Execute the loaded program (START option) eMS Method of operation and program Organization 2-71
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
Previous Page Next Page