11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Terms, literals, and expressions1. A literal which contains a location counter reference is not identical to anyother literal.2. Otherwise, two literals are identical (and will be generated only once), if theirsource forms are identical.|||||||||||||||||||||||Summary of literal rules:1. S-type address constants may be used in literals.2. Location counter references (*) may be used in address constants.3. When not in a literal, * in an address constant refers to the first byte of theconstant.4. When not in a literal, if an address constant containing * is duplicated, thevalue of * is updated for each duplication to refer to the address of thatduplication.5. When a literal address constant contains *, each use of that literal is assigned aseparate location in the literal pool.6. When a literal address constant contains *, the value used for * is the address ofthe (single) instruction in which the literal is used.7. When a literal address constant containing * also has a duplication factor, thevalue of * does not change for each duplication, but remains equal to theaddress if the first byte of the instruction in which the literal was used.8. When an S-type address constant is used in a literal, regardless of whether ornot it contains *, the base register that is used to compute the base anddisplacement that are parts of the S-type address constant is determined by theUSING statements that are in effect at the place that the literal is assembled,not the USING statements in effect at the place where the literal is referenced inan instruction. Note that there are two different base-displacement calculations:one in the instruction referring to the S-type address constant, and one in theS-type address constant to determine how to address the object of the constant.Contrast with immediate data: You should not confuse a literal with theimmediate data in an SI instruction. Immediate data is assembled into theinstruction.Literal poolThe literals processed by the assembler are collected and placed in a special areacalled the literal pool. You can control the positioning of the literal pool. Unlessotherwise specified, the literal pool is placed at the end of the first control section.You can also specify that multiple literal pools be created. However, the assemblercontrols the sequence in which literals are ordered within the pool. Furtherinformation on positioning literal pools is in “LTORG instruction” on page 192.ExpressionsThis section discusses the expressions used in coding operand entries for sourcestatements. You can use an expression to specify:v An addressv An explicit lengthv A modifierv A duplication factorv A complete operandExpressions have absolute and relocatable values. Whether an expression isabsolute or relocatable depends on the value of the terms it contains. TheChapter 2. Coding and structure 43

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

Saved successfully!

Ooh no, something went wrong!