Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

LPOV - Load segment

&pagelevel(3)&pagelevel

General

Application area:

Linking and loading; see "Linking and loading"

Macro type:

Type O; see "O-type macros"

Macro description

The LPOV macro (Load Program OVerlay) allows only the (one) specified segment to be loaded into memory, even if it is already in memory.
The LPOV macro is used if nonautomatic segment loading is required. Automatic segment loading permits more than one segment to be loaded with one macro (see the “Utility Routines” manual [27 (Related publications)]).

Macro format and description of operands

LPOV

,modulename [,address]

modulename
Specifies the symbolic name of the segment to be loaded. This name can be up to 6 alphanumeric characters long.

address
Specifies the symbolic address in the calling or another module, to which control is returned after the module has been loaded. If this operand is omitted, control is returned to the instruction following the LPOV macro. The calling program waits until the module is loaded.

Functional description

Execution of the LPOV macro causes the static loader to be invoked; this loads the segment specified by “modulename” into memory. After the loading process, control is passed to the instruction specified by “address”. This address may be contained in the calling module or be an external reference in another module. If the “address” operand is omitted, control is passed to the instruction following the LPOV macro.
If an external reference is used for control transfer, it is the user's responsibility to ensure that the module with the relevant entry address is in memory after the loading process. Since execution of the LPOV macro causes only one segment to be loaded, each segment must be loaded explicitly. When the LPOV macro is executed, the segment specified is loaded irrespective of whether it is in memory or not. The LPOV macro is not linked to the overlay control module, and no list of overlay segments currently in memory is maintained.

Notes on the macro call

  • After a segment has been loaded by the LPOV macro, corrections may be made using AID with %ON %LPOV (see the “AID” manual [3 (Related publications)]).

  • The LPOV macro, which permits the nonautomatic loading of segments, communicates directly with the operating system. If LPOV is used concurrently with the CALL or SEGLD macro (automatic segment loading), the status list of the program overlay structure may be corrupted (see the “Utility Routines” manual [27 (Related publications)]). Such a condition may lead to errors during program execution.

Return information and error flags

If errors occur during loading of an overlay segment, the Executive returns control to the program at the instruction following the LPOV macro expansion. If no errors occur, the continuation address specified in the macro call is valid.

R15:

+---------------+
|   |   |   |   |
| | | | | | |a|a|
+---------------+

A return code relating to the execution of the LPOV macro is transferred in the rightmost byte of register R15.

X'aa'

Meaning

X'00'

The load operation was successful.

X'04'

Invalid read-only modification record.

X'08'

Illegal record code in text/modification block or a modification record precedes the first text
record.

X'0C'

There are too many read-only modification records or the segemt name cannot be found in
any of the index records for load modules (=segments).

X'10'

There is no index record for load modules having the segment name %ROOT.

X'14'

There is not sufficient memory to load the segment.

X'18'

Illegal key information, error during reading of PAM load module file or error in the output of
messages.

X'1C'

Invalid segment name.

X'20'

AID load error.

X'24'

Error in reading C element from PLAM library.