INtime SDK Help
s (SDM)

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]

Parameters

count
The number of times in decimal you want SDM to repeat the command.
data-type
The format in which you want SDM to display the memory locations you specify. The data types and the display formats they specify are:
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
The address of the memory location you want to display. If you omit this parameter, SDM displays the memory locations beginning at the value corresponding to the segment selector value in the DS register, with an offset of 0.

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
The value with which you want to replace the value referenced by the address parameter. The equal sign (=) preceding the expression parameter instructs SDM to place the value indicated by the expression in memory.
/expression
The slash (/) preceding the second 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
The descriptor table you want SDM to display. The table types and the descriptor tables they reference are:
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)
References the descriptor table entry you want to display.

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
The abbreviation for the type of descriptor you want to use in place of the entry in the descriptor table referenced by the (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
The name of the of the descriptor table entry component you want to display. Include a period (.) before the component name so SDM can recognize the name.

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
An expression that corresponds to a value to use in place of the value referenced by the .component parameter. The equal sign (=) preceding the expression parameter instructs SDM to place in memory the value indicated by the expression.

Remarks

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>.

Examples

  1. This example illustrates how to use the s command to display and then modify contents of a memory location. Suppose you enter the s command by itself:
    ..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
    
  2. This example shows how to display and modify the conforming bit component of a descriptor table entry. The CS register indicates where the descriptor table is located.
    ..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 -
    
  3. This example sets the 45th global descriptor table entry to a data segment descriptor with all fields set to 0:
    ..sgdt(45t)=dseg32
    
  4. You can use register names to specify address selectors and offsets. For example, to examine the word at an address with a selector value contained in the AX register, enter:
    ..swax:0
    

See Also

Debugging tools, System Debug Monitor (SDM)