The first command form displays or modifies memory locations. The second and third command forms display or modify the components of descriptor table entries.
[count] s [data-type][address][=expression][/expression] ... s table-type (expression)=descriptor-type s table-type (expression).component[=expression]
count
data-type
Enter this data type... | To display this format... |
---|---|
H |
Halfword |
I |
Word integer |
L |
Long integer |
LR |
Long real |
S |
Short integer |
SR |
Short real |
T |
Binary coded decimal |
TR |
Temporary real |
W |
Word |
If you omit the data-type
parameter, SDM displays the memory locations in both byte and ASCII characters.
See also: NPX data types.
address
If you do not include any further parameters, SDM displays the contents of the address followed by a dash (-). At this point, if you wish to change the contents of the memory location, enter the new value followed by a <CR>. If you do not want to change the contents, enter a <CR> or a continuation comma. If you enter a comma, SDM displays the contents of the next location and prompts for more input.
=expression
address
parameter. The equal sign (=) preceding the expression
parameter instructs SDM to place the value indicated by the expression in memory.
/expression
expression
parameter separates any subsequent expressions and indicates the values you want to substitute in memory. SDM places these values in the locations immediately following the one you specified in the address
parameter.
You can use the s command to display and optionally modify descriptor table entries. If you want to display descriptor table entries, use the second or third command form with the parameters described in this section.
table-type
Enter this table type... | To display this descriptor table... |
---|---|
DT |
Generic descriptor table. |
GDT |
Global descriptor table. |
IDT |
Interrupt descriptor table. |
LDT |
Local descriptor table. |
See also: Descriptor tables, the Programmer's Reference Manual for your microprocessor.
(expression)
If you chose DT, use a segment register mnemonic or a selector enclosed in parentheses to designate the entry in the local or global descriptor table you wish to display. SDM uses the selector to decide which descriptor table you are referencing. Therefore, when you are debugging an application and you know the selector, you can examine and modify the entry in the corresponding descriptor table without knowing whether it is a local or global table.
If GDT, LDT, or IDT is your table type, use sequential entry numbers with a T suffix to specify the table entry desired.
=descriptor-type
expression
) parameter. Place an equal sign (=) before the descriptor-type
parameter. This causes SDM to initialize the entry you specified as the descriptor type. SDM then initializes all other fields of the descriptor as 0.
.component
If you do not include any further parameters, SDM displays the contents of the descriptor table entry indicated by the expression followed by a dash (-). At this point, if you wish to change the contents of the descriptor table entry, enter the new value followed by a <CR>. If you do not want to change the descriptor table entry value, enter a <CR>.
See also: Descriptor tables, the Programmer's Reference Manual for your microprocessor.
=expression
.component
parameter. The equal sign (=) preceding the expression
parameter instructs SDM to place in memory the value indicated by the expression. The s command is actually two commands in one. You can use it to display and (optionally) modify either the contents of memory or the contents of descriptor table entries.
If you enter the s command without an equal sign (=), SDM displays a dash (-) prompt. Then, it waits for you to enter either:
SDM continues to issue dash prompts until you enter a <CR>.
..s
SDM responds with the contents of the byte at DS:0:
0170:00000000 40 -
At this point, SDM issues a dash prompt and waits for you to enter an expression or a comma. Suppose you enter:
0170:00000000 40 - 1/2/3, Five bytes are modified in this example. 0170:00000003 20 - 4/15
SDM replaces the existing data in the memory locations with the expressions you entered. It then displays the next memory location because you entered a continuation comma. If you enter a <CR> after this substitution, you return to the prompt and can enter any SDM command.
If you want to replace the data in a given memory location without checking to see what it contains, you can enter:
..100sw ds:ax=ffff
..sdt(cs).c
SDM responds with this line and waits for you to substitute an expression:
0 -
This line illustrates a similar example:
..sgdt(4t).base
SDM responds with the contents of the base component of the fourth global descriptor table entry and waits for you to enter an expression:
123456 -
..sgdt(45t)=dseg32
..swax:0