22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

WXTRN Instruction<br />

ALBL1 USING DSECTA,14<br />

USING<br />

DSECTB,ALBL1.A<br />

.<br />

.<br />

ALBL2 USING DSECTA,ALBL1.A<br />

.<br />

BLBL1 USING DSECTA,ALBL2.A<br />

.<br />

DROP<br />

ALBL2<br />

.<br />

DSECTA DSECT<br />

A DS A<br />

DSECTB DSECT<br />

B DS A<br />

A dependent USING is not dependent on another dependent USING. It is<br />

dependent on the ordinary or labeled USING that is finally used to resolve the<br />

address. For example, the USING at BLBL1 is dependent on the ALBL1 USING.<br />

Remember that all dependent USINGs must eventually be based on an ordinary or<br />

labeled USING that provides the base register used for base-displacement<br />

resolutions.<br />

WXTRN Instruction<br />

The WXTRN statement identifies “weak external” symbols referred to in a source<br />

module but defined in another source module. The WXTRN instruction differs from<br />

the EXTRN instruction (see “EXTRN Instruction” on page 189) as follows:<br />

The EXTRN instruction causes the linker to automatically search libraries (if<br />

automatic library call is in effect) to find the module that contains the external<br />

symbols that you identify in its operand field. If the module is found, linkage<br />

addresses are resolved; the module is then linked to your module, which<br />

contains the EXTRN instruction.<br />

The WXTRN instruction suppresses automatic search of libraries. The linker<br />

only resolves the linkage addresses if the external symbols that you identify in<br />

the WXTRN operand field are defined:<br />

– In a module that is linked and loaded along with the object module<br />

assembled from your source module, or<br />

– In a module brought in from a library because of the presence of an<br />

EXTRN instruction in another module linked and loaded with yours.<br />

┌─,───────────────┐<br />

►►──┬─────────────────┬──WXTRN─── ▼ ─external_symbol─┴────────────────►◄<br />

└─sequence_symbol─┘<br />

sequence_symbol<br />

is a sequence symbol.<br />

Chapter 5. Assembler Instruction Statements 229

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!