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 instructionby means of another USING statement. In the following sequence, the assemblerfirst assumes that the value of ALPHA is in register 9. The second statement thencauses the assembler to assume that ALPHA+1000 is the value in register 9.USING..USINGALPHA,9ALPHA+1000,9Using General Register ZeroYou can refer to the first 4096 bytes of storage using general register 0, subject tothe following conditions:v The value of operand base must be either absolute or relocatable zero.v Register 0 must be specified as the first base_register operand.The assembler assumes that register 0 contains zero. Therefore, regardless of thevalue of operand base, it calculates displacements as if operand base were absoluteor relocatable zero. The assembler also assumes that subsequent registers specifiedin the same USING statement contain 4096, 8192, etc.If register 0 is used as a base register, the referenced control section (or dummysection) is not relocatable, despite the fact that operand base may be relocatable.The control section can be made relocatable by:v Replacing register 0 in the USING statementv Loading the new register with a relocatable valuev Reassembling the programRange of an ordinary USING instructionThe range of an ordinary USING instruction (called the ordinary USING range, orsimply the USING range) is the 4096 bytes beginning at the base address specifiedin the USING instruction, or the range as specified by the range end, whichever isthe lesser. For long-displacement instructions, the range is the addresses between(base_address-524288) and (base_address+524287). Addresses that lie within theUSING range can be converted from their implicit to their explicitbase-displacement form using the designated base registers; those outside theUSING range cannot be converted.The USING range does not depend upon the position of the USING instruction inthe source module; rather, it depends upon the location of the base addressspecified in the USING instruction.The USING range is the range of addresses in a control section that is associatedwith the base register specified in the USING instruction. If the USING instructionassigns more than one base register, the composite USING range is the union ofthe USING ranges that would apply if the base registers were specified in separateUSING instructions.Note that USING ranges need not be contiguous. For example, you could specifyUSING X,4USING X+6000,5and implicit addresses with values between X+4096 and X+5999 would not beaddressable by instructions with unsigned 12-bit displacements.Two USING ranges coincide when the same base address is specified in twodifferent USING instructions, even though the base registers used are different.When two USING ranges coincide, the assembler uses the higher-numbered220 <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!