Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

CALL - Load segments

&pagelevel(3)&pagelevel

General

Application area:

Linking and loading; see "Linking and loading"

Macro type:

O-Type O; see "O-type macros"

Macro description

The CALL macro enables the user to load a segment that is not yet in memory by specifying a symbol. Subsequent segments within the same path of the overlay structure are loaded automatically.

After loading is completed program execution continues at the specified symbol in the segment just loaded.

Macro format and description of operands

CALL

symbol

symbol
Symbolic address (entry point) within the segment to be loaded.
A 4-byte V-type constant is generated for this symbol. This operand allows the user to implicitly specify the segment to be loaded and, simultaneously, to specify the address at which program execution continues after macro execution.

Functional description

The CALL macro (and also the SEGLD macro) implements the automatic loading of segments (nonautomatic loading is performed by the LPOV macro).

An instruction in the CALL macro causes the Assembler to generate a V-type constant from the specified symbolic address. This constant identifies both the segment to be loaded and the address at which program execution continues after loading is completed. Based on this V-type constant in the CALL macro and on the CONTROL=YES operand in the PROGRAM control statement (see the “Utility Routines” manual [27 (Related publications)]), the linkage editor generates an overlay control module, required for automatic loading, which satisfies the V-type constant with an address. The CALL macro includes a branch to the V-type constant. When CALL is to be executed, control is passed to the overlay control module, which performs a check to establish whether the required segment is already in memory. If the segment has already been loaded, program execution will continue at the instruction identified by the operand “symbol”. If the segment specified has not yet been loaded, it will be brought into memory together with all segments that are in the same path. After the loading operation the program will continue - in the same way as if no loading had occurred - at the specified address in the segment to be loaded.

Notes

  • The overlay structure of a program in which automatic loading of segments is performed should be designed in such a way as to allow for additional memory as required for the overlay control module, for ENTAB and for SEGTAB (see the “Utility Routines” manual [27 (Related publications)]).

  • The CALL macro must be contained in a program area covered by a USING statement. As register 15 is used by the CALL macro for segment loading (it contains the entry address), it must not be used as the base register for the program section that contains the CALL macro.