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.

Mnemonic tags|||||||||For example, say there is a machine code entry named AR. Then AR will find thatentry (no change). AR:ASM will be the same; the assembler looks for a machine orassembler instruction. With AR:MAC, the assembler looks for a macro named AR. Ifit is not found in the internal table then the assembler searches on SYSLIB.Assuming AR is found, the assembler adds a macro entry for AR to the table, andthis entry is used for this instruction.Note: Library macros are added after any existing entry of the same name, whilean inline macro is added before any existing entry. This is done to preservethe current behaviour when mnemonic tags are not used.Terms, literals, and expressionsTermsThe most basic element of the assembler language is the term. Terms may be usedalone, or in combination with other terms in expressions. This section describes thedifferent types of terms used in the assembler language, and how they can beused.A term is the smallest element of the assembler language that represents a distinctand separate value. It can, therefore, be used alone or in combination with otherterms to form expressions. Terms are classified as absolute or relocatable,depending on the effect of program relocation upon them. Program relocation is theloading of the object program into storage locations other than those originallyassigned by the assembler. Terms have absolute or relocatable values that areassigned by the assembler or that are inherent in the terms themselves.A term is absolute if its value does not change upon program relocation. A term isrelocatable if its value changes by n if the origin of the control section in which itappears is relocated by n bytes.Terms in parenthesesTerms in parentheses are reduced to a single value; thus the terms in parentheses,in effect, become a single term.You can use arithmetically combined terms, enclosed in parentheses, incombination with terms outside the parentheses, as follows:14+BETA-(GAMMA-LAMBDA)When the assembler encounters terms in parentheses in combination with otherterms, it first reduces the combination of terms inside the parentheses to a singlevalue which may be absolute or relocatable, depending on the combination ofterms. This value is then used in reducing the rest of the combination to anothersingle value.You can include terms in parentheses within a set of terms in parentheses:A+B-(C+D-(E+F)+10)The innermost set of terms in parentheses is evaluated first. Any number of levelsof parentheses are allowed. A level of parentheses is a left parenthesis and itscorresponding right parenthesis. An arithmetic combination of terms is evaluatedas described in “Expressions” on page 43. Table 5 summarizes the various types ofterms, and gives a reference to the page number that discusses the term and therules for using it.Chapter 2. Coding and structure 27

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

Saved successfully!

Ooh no, something went wrong!