? [[option.]expr]
? ["string", expr, expr, [ . . . ]]
The ? command evaluates an expression and displays the result.
The ? command with no arguments displays a list of commands and syntax recognized by the debugger.
option
Specifies the format in which to display the expression specified by expr. The option parameter can be one of the following characters:
Character | Format |
h | Hexadecimal |
d | Decimal |
t | Decimal |
o | Octal |
q | Octal |
y | Binary |
If option is given, a period (.) must be used to separate option and expr. If option is not given, the command displays all formats, an ASCII character representation, and whether the expression is TRUE or FALSE.
expr
Specifies an expression consisting of one or more addresses, numbers, and operators. The operators in the expression can be any of the 80386 Debugger operators listed in Section 5.4.3, “Binary and Unary Operators.” The addresses in the expression can be 32-bit physical addresses or protected-mode addresses (selector:offset). The number sign (#) operator overrides the current address type.
string
Specifies a printf formatting string. Supported printf format characters are as follows:
Format character | Meaning |
%% | % |
%c | Character |
%[-][+][ ][0][width][.precision][p][n]d | Decimal |
%[-][0][width][.precision][p][n]u | Unsigned decimal |
%[-][#][0][width][.precision][p][n]x | Hexadecimal |
%[-][#][0][width][.precision][p][n]X | Hexadecimal |
%[-][0][width][.precision][p][n]o | Octal |
%[-][0][width][.precision][p][n]b | Binary |
%[-][width][.precision][a]s | String |
%[-][width][.precision][a][p][n][L][H][N]S | Symbol |
%[-][width][.precision][a][p][n][L][H][N]G | Group:symbol |
%[-][width][.precision][a][p][n][L][H][N]M | Map:group:symbol |
%[-][width][.precision][a][p][n][L][H][N]A | Address |
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 following escape sequences are supported:
Escape sequence | Description |
\a | Alert (bell) character |
\b | Backspace |
\n | New line |
\r | Carriage return |
\t | Horizontal tab |
The following table describes the optional prefixes:
Prefix | Format character(s) | Meaning |
a | s,S,G,M,A | Address argument size |
H | S,G,M,A | 16-bit offset |
L | S,G,M,A | 32-bit offset |
N | S,G,M,A | Offset only |
p | S,G,M | Get the previous symbol |
n | S,G,M | Get the next symbol |
p | A | Get the previous symbol address |
n | A | Get the next symbol address |
p | d,u,x,X,o,b | Get the previous symbol offset |
n | d,u,x,X,o,b | Get the next symbol offset |
The following example looks up the physical address of selector 1Fh in the current local descriptor table (LDT) and adds 220h to it:
?%(#001F:0220)
The following example displays the value of the expression DS:SI + BX:
? ds:si+bx
The debugger returns a display similar to the following:
987A:000001B3 %00098953 %%00098953
The following example displays the value of the arithmetic expression 3*4:
? 3*4
The debugger returns the following display:
0Ch 12T 14Q 00001100Y '.' TRUE