11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

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

Create successful ePaper yourself

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

USING instructioninstructions supporting 20-bit displacements (“long displacements”). Thisestablishes the addressability of the entire control section with one USINGinstruction.For <strong>Ref</strong>erence Control Sections: A dummy section is a reference control sectiondefined by the DSECT instructions. To establish the addressability of a dummysection, specify the address of the first byte of the dummy section as the baseaddress, so that all its addresses lie within the pertinent USING range. The addressyou load into the base register must be the address of the storage area beingdescribed by the dummy section. However, if all references to fields withing theDSECT are made with instructions supporting long displacements, the baseaddress need not be the first byte of the dummy section.When you refer to symbolic addresses in the dummy section, the assemblercomputes displacements accordingly. However, at execution time, the assembledaddresses refer to the location of real data in the storage area.Base registers for absolute addressesAbsolute addresses used in a source module must also be made addressable.Absolute addresses require a base register other than the base register assigned torelocatable addresses (as described above).However, the assembler does not need a USING instruction to convert absoluteimplicit addresses in the range 0 through 4095 to their explicit form. The assembleruses register 0 as a base register. Displacements are computed from the baseaddress 0, because the assembler assumes that a base or index of 0 implies that azero quantity is to be used in forming the address, regardless of the contents ofregister 0. The USING domain for this automatic base register assignment is theentire source module.If a register is specified with base address zero, the assembler will use it inpreference to the default use of register zero. For example:USING 3,0LA 7,5generates the instruction X’41703005’; in the absence of the USING statement, thegenerated instruction would be X’41700005’.For absolute implicit addresses greater than 4095 and in the absence oflong-displacement instructions, a USING instruction must be specified according tothe following:v With a base address representing an absolute expressionv With a base register that has not been assigned by a USING instruction in whicha relocatable base address is specifiedThis base register must be loaded with the base address specified.Ordinary USING instructionThe ordinary USING instruction format specifies a base address and one or morebase registers.218 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>

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

Saved successfully!

Ooh no, something went wrong!