HLASM Toolkit Feature Interactive Debug Facility User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Address expressions

HLASM Toolkit Feature Interactive Debug Facility User's Guide
GC26-8709-07

You can specify the addresses you provide to IDF either by the cursor placement (for information about this see Arguments and cursor positioning) or by typing an expression on the command line before pressing a PF key.

An IDF expression is made up of terms. If an expression consists of two or more terms, a plus (+) or minus (-) sign (operator) indicates that the fully resolved values of the terms should be added or subtracted.

A term can consist of a program symbol, a statement number, a hex constant, a decimal constant, or a character constant that is one character in length. Program symbols are of the form "(module.csect) symbol". If supported by the LSM, they may also be of the form "(module.csect) STMT#nnnnn". The following are examples of basic terms:
     LOOP
     STMT#5
     X'2005E'
     C'b'
     247
     F'235'

Source statement numbers can be used as symbolic names. They are specified in the form "STMT#nnnnn", where nnnnn is the statement number involved.

Numeric values that are input without an explicit hexadecimal (X'999') or decimal (F'999') indication, for example "246", are interpreted by IDF as determined by the current base setting. The default base is decimal. It can be redefined to hexadecimal with HEXINPUT ON or SET OPTION ON HEXINPUT. (The arrow beside the command line indicates the default base; an arrow of the form "-->" is used if the default base is decimal, and of the form "==>" is used if the default base is hex.)

Implicitly specified hexadecimal numbers must begin with a numeric digit from 0 to 9. If you attempt to input a hexadecimal number such as A34 implicitly, IDF interprets it as the name of a symbol, not a number. Thus, 0A34 is recognized (assuming the default base is hexadecimal) but A34 is taken as a symbol name.

In some cases you may wish to specify a CSECT name or a module name. For example, if symbol LOOP occurs in two assemblies, you have to specify the CSECT name of the symbol you are referring to. If the symbol is not in the currently QUALIFIED module, you have to specify the module of the symbol you are referring to. Specify the module name and the CSECT name by prefixing the term with them, and enclosing them in parentheses. The module name, when present, precedes the CSECT name and is followed by a period. When a module name is specified, a CSECT name need not be specified. Here are some examples:
     (TEST)LOOP
     (VARMVSXA.VARASM) BTHING
     (TCAT.) LOCRET
Intersperse blanks as you like, provided they do not interrupt items such as a symbol or hex constant. For example, the following expressions are equivalent to the previous ones:
     ( TEST   )      LOOP
     ( VARMVSXA  . VARASM   ) BTHING
     ( TCAT .  ) LOCRET

The SET QUALIFY command tells IDF which module's symbols should be searched when a module name is not specified in a symbolic name.

In some cases you may wish to follow a term with a register designator. A register designator consists of the strings 'PSW', 'R0' through 'R15', or 'AR0' through 'AR15', enclosed in parentheses. If 'AR0' through 'AR15' are specified then those commands that can use an ALET use the ALET contained in that access register in addition to the contents of the associated general purpose register. For example, location LOOP in CSECT TEST indexed by the current contents of R4 is specified:
     (TEST)LOOP(R4)
The byte at the location addressed by R4 in the dataspace identified by the ALET in AR4 is specified:
     0(AR4)
You can combine terms, for example:
     (TEST) LOOP+20 (R2)

     24(R2)+0(R3)
As another example, to find the difference between two labels in the same CSECT, LOOP, and LOOPEND, you could use:
     (TEST)LOOPEND-(TEST)LOOP
If you have a translate table, you might want to use an expression with a character term:
     TRTABLE+C't'
Character terms in addressing expressions are restricted to a single character. If you need to specify an apostrophe, place two apostrophes within the enclosing apostrophes: for example C''''.
Terms and register designators can be followed by indirection operators (%, :>, &, +>, ?, =>, ->). If an indirection operator follows a term, IDF uses the contents of the word pointed to by the expression evaluated thus far. Similarly, if an indirection operator follows a register designator, IDF is being told how to interpret the contents of the register. The word or register is treated as:
  • A 24-bit address if the % or :> operators are used.
  • A 31-bit address if the ? or => operators are used.
  • A 64-bit address if the & or +> operators are used.
  • The appropriate size (31-bit or 24-bit or 64-bit) depending on the AMODE of the PSW if the -> operator was used.
Note: If a register designator is not followed by an indirection operator it is interpreted as a 24-bit, 31-bit or 64-bit value depending on the AMODE of the PSW.
You can refer to the current offset value (set with the OFFSET command) by starting an expression with a unary plus or minus. If the expression begins with a unary plus, it is interpreted as the current OFFSET value plus the remainder of the expression. If the expression begins with a unary minus, it is interpreted as the current OFFSET value minus the remainder of the expression. Examples of an expression of this type are:
+X'40'
-23
If the current offset value is X'20000', the expression +X'40' gives the value X'20040'.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014