11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Addressingz/VM and z/OSWhen you specify the GOFF option, the RMODE value specified for a section is bydefault assigned to the B_TEXT class, and the AMODE specified for the section isassigned to an entry point having the section name and the location of the firstbyte of class B_TEXT. If the source program defines additional classes, each classmay be assigned its own RMODE, and an entry point in any class may be assignedits own AMODE.End of z/VM and z/OSSymbolicFor more information about the AMODE and RMODE instructions, see “AMODEinstruction” on page 109 and “RMODE instruction” on page 210.linkagesSymbols can be defined in one module and referred to in another, which results insymbolic linkages between independently assembled program sections. Theselinkages can be made only if the assembler can provide information about thelinkage symbols to the linker, which resolves the linkage references at link-edittime.Establishing symbolic linkageYou must establish symbolic linkage between source modules so that you can referto or branch to symbolic locations defined in the control sections of external sourcemodules. You do this by using external symbol definitions, and external symbolreferences. To establish symbolic linkage with an external source module, you mustdo the following:v In the current source module, you must identify the symbols that are notdefined in that source module, if you want to use them in instruction operands.These symbols are called external symbols, because they are defined in another(external) source module. You identify external symbols in the EXTRN orWXTRN instruction, or the V-type address constant. For more information aboutthe EXTRN and WXTRN instructions, see “EXTRN instruction” on page 188 and“WXTRN instruction” on page 227.v In the external source modules, you must identify the symbols that are definedin those source modules, and that you refer to from the current source module.The two types of definitions that you can use are control section names (definedby the CSECT, RSECT, and START instructions), and entry symbols. Entrysymbols are so called because they provide points of entry to a control section ina source module. You identify entry symbols with the ENTRY instruction. Formore information about the ENTRY instruction, see “ENTRY instruction” onpage 182.v To reference the external symbols, you must either– provide the A-type or V-type address constants needed by the assembler toreserve storage for the addresses represented by the external symbols, or– reference an external symbol in the same class in a relative branch instruction.The assembler places information about entry and external symbols in the externalsymbol dictionary. The linker uses this information to resolve the linkage addressesidentified by the entry and external symbols.<strong>Ref</strong>erring to external dataUse the EXTRN instruction to identify the external symbol that represents data inan external source module, if you want to refer to this data symbolically.Chapter 3. Program structures and addressing 67

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

Saved successfully!

Ooh no, something went wrong!