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 instructionv The first format specifies a base address, an optional range, and one or morebase registers. This format of the USING instruction is called an ordinary USINGinstruction, and is described under “Ordinary USING instruction” on page 218.v The second format specifies a base address, an optional range, one or more baseregisters, and a USING label which may be used as a symbol qualifier. Thisformat of the USING instruction is called a labeled USING instruction, and isdescribed under “Labeled USING instruction” on page 222.v The third format specifies a base address, an optional range, and a relocatableexpression instead of one or more base registers. This format of a USINGinstruction is called a dependent USING instruction, and is described under“Dependent USING instruction” on page 224. If a USING label is also specified,this format of the USING instruction is called a labeled dependent USINGinstruction.Note: The assembler identifies and warns about statements where the impliedalignment of an operand does not match the requirements of the instruction.However, if the base for a USING is not aligned on the required boundary,the assembler cannot diagnose a problem. For example:DS1 DSECTDS HREGPAIR DS 2ADL8 Halfword alignmentDS2 DSECTREGPAIR_ALIGN DS 2ADL8 Doubleword alignmentCSECT...USING DS1,R1 Ordinary USINGUSING DS2,REGPAIR Dependent USINGSTPQ R0,REGPAIR REGPAIR is not a quadwordSTPQ R0,REGPAIR_ALIGN But REGPAIR_ALIGN isThe first STPQ instruction is diagnosed as an alignment error. The second STPQinstruction is not, even though the same storage location is implied by the code.You must take care to ensure base addresses match the alignment requirements ofstorage mapped by a USING. For a description of the alignment requirements ofinstructions, see the relevant Principles of Operation.How to use the USING instructionSpecify the USING instruction so that:v All the required implicit addresses in each control section lie within a USINGrange.v All the references for these addresses lie within the corresponding USINGdomain.You could, therefore, place all ordinary USING instructions at the beginning of thecontrol section and specify a base address in each USING instruction that lies atthe beginning of each control section.For Executable Control Sections: To establish the addressability of an executablecontrol section defined by a START or CSECT instruction, specify a base addressand assign a base register in the USING instruction. At execution time, the baseregister must be loaded with the correct base address.If a control section requires addressability to more than 4096 bytes, you mustassign more than one base register, or make implicit references using onlyChapter 5. Assembler instruction statements 217

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

Saved successfully!

Ooh no, something went wrong!