With the BIND macro, DBL determines the load address and the addressing mode from the operands PROGMOD=ANY|24 and BRANCH=NO|YES.
PROGMOD=ANY (default)
Each module of the load unit can be loaded above or below 16 Mb. The load address is dependent on the RMODE attributes of the CSECTs contained in the module and on the program addressing mode at the time of the BIND call.
If AMODE-CHECK=*ADVANCED is specified, the AMODE attribute of the load unit is also used to determine the load address of the load unit’s modules.
If the module contains a number of CSECTs, DBL defines a (pseudo-)RMODE based on the RMODE attributes of the individual CSECTs, as follows:
The object module is given the attribute pseudo-RMODE ANY only if all the CSECTs contained in it have the RMODE ANY attribute.
If at least one CSECT has the RMODE 24 attribute, the module also is assigned the attribute pseudo-RMODE 24.
When AMODE-CHECK=*STD the load address is determined as follows:
If the program addressing mode on the BIND call is not 31 then all the load unit modules are loaded below the 16 MB boundary.
Otherwise the modules are loaded above or below the 16 MB boundary depending on their (pseudo) RMODE.
The DBL thus only loads any module above the 16 MB boundary if the module possesses the attribute RMODE ANY and the 31-bit addressing mode was set in the BIND call.
In all other cases the module is loaded below 16 Mb.
With AMODE-CHECK=*ADVANCED, the following applies:
If after the first module of the load unit has been loaded 24 was determined as AMODE attribute, all other modules of the load unit are loaded below 16 Mb.
PROGMOD=24
DBL evaluates the operand PROGMOD=24 as follows:
All modules of the load unit will be loaded below 16 Mb.
External references will be resolved only if they designate an address below 16 Mb.
If the operand BRANCH=YES is also specified, 24-bit addressing mode will be set.
Loading of the load unit will be aborted with an error message if the load unit contains a module with the AMODE 31 attribute.
BRANCH=NO (default)
Once the module has been loaded control is returned to the calling program. The current addressing mode is not changed. Following the BIND macro, the high-order bit of the field that was defined with the SYMBLAD operand indicates which addressing mode has to be set when the module is executed.
This information is determined using the following criteria:
Location | AMODE (CSECT) | ||
24 | 31 | ANY | |
| 24-bit mode | 31-bit mode | dependent on AMODE set in BIND macro |
> 16 Mb | 31-bit mode | 31-bit mode | 31-bit mode |
BRANCH=YES
The loaded module is processed first (starting at its entry point). The addressing mode is determined by the value specified for the PROGMOD operand in conjunction with the AMODE attribute of the first control section (CSECT) in the module and taking into account the entry point and the addressing mode set at the time of issuing the BIND macro. The addressing mode is set internally according to the following criteria:
PROGMOD | AMODE (CSECT) | ||
24 | 31 | ANY | |
24 | 24-bit mode | illegal | 24-bit mode |
ANY | 24-bit mode | 31-bit mode | 31-bit mode if |
As in BIND macro if |