? (Evaluate Expression)

? [option.]expr
? "string", expr, ...

The ? command evaluates an expression and displays the result.

expr
Expression to evaluate. Can be a combination of numbers, addresses, and operators. Numbers are assumed to be hexadecimal. Addresses can be 32-bit physical addresses or protected-mode addresses (selector:offset). The number sign (#) operator overrides the current address type. Operators can be any listed in Binary and Unary Operators.
option
Format in which to display the expression. Can be one of these:
Option Format
h Hexadecimal
d Decimal
t Decimal
o Octal
q Octal
y Binary

By default, the command displays all formats: decimal, hexadecimal, octal, binary, ASCII, and Boolean.

string
Formatting string. Can be a combination of text and zero or more of the following formatting descriptors and escape sequences:
String Description
%% Displays a percent sign (%).
%A Displays matching expr as an address.
%b Displays matching expr in binary format.
%c Displays matching expr as a character.
%d Displays matching expr in decimal format.
%G Evaluates matching expr as an address and displays the group and symbol associated with the address in group:symbol format.
%M Evaluates matching expr as an address and displays the map file, group and symbol associated with the address in map:group:symbol format.
%o Displays matching expr in octal format.
%S Evaluates matching expr as an address and displays the map file, group and symbol associated with the address.
%s Evaluates matching expr as an address and displays the string at that address.
%u Displays matching expr in unsigned decimal format.
%X Displays matching expr in hexadecimal format.
%x Displays matching expr in hexadecimal format
\a Inserts a bell (alert) character.
\b Inserts a backspace character.
\n Inserts a new line character.
\r Inserts a carriage return character.
\t Inserts a horizontal tab character.

One expression must be given for each formatting descriptor in the string. Multiple expressions can be separated with commas (,) or spaces.

Formatting descriptors can have these optional prefixes:
Prefix Description
A [-][width][.precision][a][p][n][L][H][N]
b [-][0][width][.precision][p][n]
d [-][+][ ][0][width][.precision][p][n]
G [-][width][.precision][a][p][n][L][H][N]
M [-][width][.precision][a][p][n][L][H][N]
o [-][0][width][.precision][p][n]
s [-][width][.precision][a]
S [-][width][.precision][a][p][n][L][H][N]
u [-][0][width][.precision][p][n]
X [-][#][0][width][.precision][p][n]
x [-][#][0][width][.precision][p][n]

Specifying an asterisk (*) for the width or precision parameter causes the field width or precision, respectively, to be picked up from the next parameter. Decimal values can also be specified for the width and precision parameters. The prefix letters have these meanings:
Prefix Description
a Address argument size
H Display 16-bit offset
L Display 32-bit offset
N Display offset only
p Get the previous symbol, symbol address, or offset
n Get the next symbol, symbol address, or offset