1 Expressions You can use expressions as parameters for some SDA commands, such as SEARCH and EXAMINE. To create expressions, use any of the following elements: o Numerals o Radix operators o Arithmetic and logical operators o Precedence operators o Symbols Numerals are one possible component of an expression. The following paragraphs describe the use of the other components. Radix operators determine which numeric base SDA uses to evaluate expressions. You can use one of the three radix operators to specify the radix of the numeric expression that follows the operator: o ^X (hexadecimal) o ^O (octal) o ^D (decimal) The default radix is hexadecimal. SDA displays hexadecimal numbers with leading zeros and decimal numbers with leading spaces. There are two types of arithmetic and logical operators: o Unary operators affect the value of the expression that follows them. o Binary operators combine the operands that precede and follow them. In evaluating expressions containing binary operators, SDA performs logical AND, OR, and XOR operations, and multiplication, division, and arithmetic shifting before addition and subtraction. Note that the SDA arithmetic operators perform integer arithmetic on 64-bit operands. 2 Unary_Operators The following table describes the unary operators. Operator Action # Performs a logical NOT of the expression. + Makes the value of the expression positive. - Makes the value of the expression negative. @ Evaluates the following expression as an address, then uses the contents of that address as its value. ^Q Specifies that the size of the field to be used as an address is a quadword when used with the unary operator @. ^L Specifies that the size of the field to be used as an address is a longword when used with the unary operator @. ^W Specifies that the size of the field to be used as an address is a word when used with the unary operator @. ^B Specifies that the size of the field to be used as an address is a byte when used with the unary operator @. ^P Specifies a physical address when used with the unary operator @. ^V Specifies a virtual address when used with the unary operator @. G Adds FFFFFFFF 80000000(16) to the value of the expression. The unary operator G corresponds to the first virtual address in S0 system space. For example, the expression GD40 can be used to represent the address FFFFFFFF 80000D40(16). H Adds 7FFE0000(16) to the value of the expression. The unary operator H corresponds to a convenient base address in P1 space (7FFE0000(16)). You can therefore refer to an address such as 7FFE2A64(16) as H2A64. I Fills the leading digits of the following hexadecimal number with hex value of F. For example: SDA> eval i80000000 Hex = FFFFFFFF.80000000 Decimal = -2147483648 G SYS$PUBLIC_VECTORS_NPRO 2 Binary_Operators The following table describes the binary operators. Operator Action + Addition - Subtraction * Multiplication & Logical AND | Logical OR \ Logical XOR / Division - In division, SDA truncates the quotient to an integer, if necessary, and does not retain a remainder. @ Arithmetic shifting "." Catenates two 32-bit values into a 64-bit value. For example: SDA> eval fe.50000 Hex = 000000FE00050000 Decimal = 1090922020864 2 Precedence_Operators SDA uses parentheses as precedence operators. Expressions enclosed in parentheses are evaluated first. SDA evaluates nested parenthetical expressions from the innermost to the outermost pairs of parentheses.