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.

Terms, literals, and expressions1. A literal with a relocatable address:L 3,=F’33’ Register 3 set to 33. See note 1L 3,F33 Register 3 set to 33. See note 2...F33 DC F’33’2. A literal with a self-defining term and a symbol with an absolute valueMVC FLAG,=X’00’ FLAG set to X’00’. See note 1MVI FLAG,X’00’ FLAG set to X’00’. See note 3MVI FLAG,ZERO FLAG set to X’00’. See note 4...FLAG DS XZERO EQU X’00’3. A symbol having an absolute address value specified by a self-defining termLA 4,LOCORE Register 4 set to 1000. See note 4LA 4,1000 Register 4 set to 1000. See note 3...LOCORE EQU 1000Notes:1. A literal both defines data and represents data. The address of the literal is assembled into the object code of theinstruction in which it is used. The constant specified by the literal is assembled into the object code, in the literalpool.2. A constant is represented by a symbol with a relocatable value. The address of a constant is assembled into theobject code.3. A self-defining term has an absolute value. In this example, the absolute value of the self-defining term isassembled into the object code.4. A symbol with an absolute value does not represent the address of a constant, but represents either immediatedata or an absolute address. When a symbol with an absolute value represents immediate data, it is the absolutevalue that is assembled into the object code.Figure 9. Differences between literals, constants, and self-defining termsGeneral rules for using literalsYou can specify a literal as either a complete operand in a machine instruction, oras part of an expression in the operand of a machine instruction. A literal can alsobe specified as the name field on a macro call instruction.Because literals define read-only data, they must not be used in operands thatrepresent the receiving field of an instruction that modifies storage.The assembler requires a description of the type of literal being specified as well asthe literal itself. This descriptive information assists the assembler in assemblingthe literal correctly. The descriptive portion of the literal must indicate the formatof the constant. It can also specify the length of the constant.The method of describing and specifying a constant as a literal is nearly identicalto the method of specifying it in a single operand of a DC assembler instruction.The only difference is that the literal must start with an equal sign (=), whichChapter 2. Coding and structure 41

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

Saved successfully!

Ooh no, something went wrong!