Segment load (SEGLD) macro instruction

The Segment Load macro instruction provides overlap between segment loading and processing within the requesting segment. As a result of using any of the examples in Table 1, the loading of the requested segment and any segments in its path is initiated when they are not part of the path already in virtual storage. Processing then resumes at the next sequential instruction in the requesting segment while the segment or segments are being loaded. Control can be passed to the requested segment with either a CALL or a branch, as shown in Examples 1 and 2, respectively. A SEGWT instruction can be used to ensure that the data in the control section specified by the external name is in virtual storage before processing resumes, as shown in Example 3.

Table 1. Use of the SEGLD macro instruction

Example

Name1

Operation

Operand2,3

1

SEGLD
CALL

external name
external name

2

SEGLD
branch

external name
external name

3
 
 

 
 
 

SEGLD
SEGWT
L

external name
external name
Rn,=V(name)

Notes:
  1. When the name field is blank, specification of a name is optional.
  2. External name is an entry name or a control section name in the requested segment.
  3. Rn is any other register and is used to hold the return address. This register is usually register 14.

The external name specified in the SEGLD macro instruction is defined with a 4-byte V-type address constant. The high-order bit is reserved for use by the control program and must not be altered during execution of the program.