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.

DS instructionthat corresponds to the first nominal value of the first operand. The lengthattribute value is equal to the length explicitly specified or implicit in the firstoperand.Bytes skipped for alignmentUnlike the DC instruction, bytes skipped for alignment are not set to zero. Also,nothing is assembled into the storage area reserved by a DS instruction. Noassumption should be made as to the contents of the skipped bytes or the reservedarea.The size of a storage area that can be reserved by a DS instruction is limited onlyby the size of virtual storage or by the maximum value of the location counter,whichever is smaller.How to use the DS instructionUse the DS instruction to:v Reserve storagev Force alignment of the location counter so that the data that follows is on aparticular storage boundaryv Name fields in a storage area.To reserve storageIf you want to take advantage of automatic boundary alignment (if the ALIGNoption is specified) and implicit length calculation, you should not supply a lengthmodifier in your operand specifications. Instead, specify a type subfield thatcorresponds to the type of area you need for your instructions.Using a length modifier can give you the advantage of explicitly specifying thelength attribute value assigned to the label naming the area reserved. However,your areas are not aligned automatically according to their type. If you omit thenominal value in the operand, you should use a length modifier for the binary (B),character (C), graphic (G), hexadecimal (X), and decimal (P and Z) type areas;otherwise, their labels are given a length attribute value of 1 (2 for G and CUtype).When you need to reserve large areas, you can use a duplication factor. However,in this case, you can only refer to the first area by its label. You can also use thecharacter (C) and hexadecimal (X) field types to specify large areas using thelength modifier. Duplication has no effect on implicit length.Although the nominal value is optional for a DS instruction, you can put it to gooduse by letting the assembler compute the length for areas of the B, C, G, X, anddecimal (P or Z) type areas. You achieve this by specifying the general format ofthe nominal value that is placed in the area at execution time.If a nominal value and no length modifier are specified for a Unicode characterstring, the length of the storage reserved is derived by multiplying by two thenumber of characters specified in the nominal value (after pairing).To force alignmentUse the DS instruction to align the instruction or data that follows, on a specificboundary. You can align the location counter to a doubleword, a fullword, or ahalfword boundary by using the correct constant type (for example, D, F, or H)and a duplication factor of zero. No space is reserved for such an instruction, yetChapter 5. Assembler instruction statements 175

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

Saved successfully!

Ooh no, something went wrong!