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.

CXD instructionZETA: the resulting allocation will be 22 bytes on a fullword boundary. Whenprogram linking is complete, the sum of these individual dummy external sectionlengths is placed in the location of the CXD instruction labeled OMEGA. Routine Acan then allocate the amount of storage that is specified in the CXD location, andeach dummy external section’s offset within the allocated storage is found in theQ-type offset constant referencing its name. Q-type offset constants are described at“Offset constant—Q” on page 157.DCinstructionYou specify the DC instruction to define the data constants you need for programexecution. The DC instruction causes the assembler to generate the binaryrepresentation of the data constant you specify into a particular location in theassembled source module; this is done at assembly time.Note that the DC instruction’s name — Define Constant — is somewhatmisleading: DC simply creates initial data in an area of the program. The contentsof that area may be modified during program execution, so the original data isn’ttruly “constant”. If you want to declare values that are more likely to behave likeconstants, use literals (“Literals” on page 40); the assembler attempts to detect anddiagnose instructions that might change the contents of a field defined by a literal.If a control section has not been established previously, DC will initiate anunnamed (private) control section.The DC instruction can generate the following types of constants:||Table 16. Types of data constantsType ofConstant Function ExampleAddress Defines address mainlyfor the use offixed-point and otherinstructionsL 5,ADCONADCON DC A(SOMWHERE)Binary Defines bit patterns FLAG DC B’00010000’Character Defines character stringsor messagesDecimal Used by decimalinstructionsFixed-point Used by the fixed-pointand other instructionsFloating-point Used by floating-pointinstructionsGraphic Defines character stringsor messages that containpure double-byte dataHexadecimal Defines large bitpatternsZoned Defines numericcharactersCHAR DC C’string of characters’ZAP AREA,PCONPCON DC P’100’AREA DS PL3L 3,FCONFCON DC F’100’LE 2,ECONECON DC E’100.50’DBCS DC G’’PATTERN DC X’FF00FF00’ZONEVVAL DC Z’-123’Chapter 5. Assembler instruction statements 125

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

Saved successfully!

Ooh no, something went wrong!