Debug: c (compare)

Compares two portions of memory.

Syntax

c range address

Parameters

range : Required. Specifies the starting and ending addresses, or the starting address and length, of the first area of memory you want to compare.

address : Required. Specifies the starting address of the second area of memory you want to compare.

?: Displays a list of debug subcommands.

Remarks

Windows XP does not use this command. It is accepted only for compatibility with MS-DOS files. 

Specifying valid range entries

Use range with a debug subcommand to specify a range of memory. You can choose one of the following formats for range: a starting address and an ending address, or a starting address and the length (denoted by l) of the range. For example, both of the following syntaxes specify a 16-byte range beginning at CS:100:

cs:100 10f

cs:100 l 10

Specifying valid address entries

Address is a two-part designation, containing either an alphabetic segment register or a four-digit segment address with an offset value. You can omit the segment register or segment address. CS is the default segment for the following debug subcommands: a, g, l, t, u, and w. DS is the default segment for all other subcommands. All numeric values are in hexadecimal format. You must include a colon between the segment name and the offset value. The following are valid addresses:

CS:0100

04BA:0100

If the range and address memory areas are identical, the c subcommand displays nothing and returns to the debug prompt. If there are differences, c displays them in the following format:

address1 byte1 byte2 address2

Examples

To compare the block of memory from 100h through 10Fh with the block of memory from 300h through 30Fh, type:

c100,10f 300

or

c100l10 300

Both of these commands produce the following output (assuming DS = 197F):

197F:0100 4D E4 197F:0300 
197F:0101 67 99 197F:0301 
197F:0102 A3 27 197F:0302 
197F:0103 35 F3 197F:0303 
197F:0104 97 BD 197F:0304 
197F:0105 04 35 197F:0305 
197F:0107 76 71 197F:0307 
197F:0108 E6 11 197F:0308 
197F:0109 19 2C 197F:0309 
197F:010A 80 0A 197F:030A 
197F:010B 36 7F 197F:030B 
197F:010C BE 22 197F:030C 
197F:010D 83 93 197F:030D 
197F:010E 49 77 197F:030E 
197F:010F 4F 8A 197F:030F 

The addresses 197F:0106 and 197F:0306 are missing from the list. This means that the values in those addresses are identical.

Formatting legend

FormatMeaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

Debug

Debug subcommands

Command-line reference A-Z



© 2016 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies