compare

Format: compare [operation] src1 src2 length [size]

Compares two blocks of memory beginning at src1 and src2 and continuing for length bytes. The compare operation is specified by operation and the size of the value to compare is specified by size. size is the number of bytes and is either 1, 2, or 4. The default is 4 if size is not specified. operation may be:
operation Meaning
<=
Less than or equal to
<
Less than
>=
Greater than or equal to
>
Greater than
==
Equal to
!=
Not equal to

If operation is not specified, then == (equality) is used.

If the comparison succeeds, the addresses are printed and the values are compared.

The following example compares two overlapping arrays of six 4-byte integers. The first array starts at 0x1000 and the second at 0x1008. The compare command displays only the results of comparisons that succeed:

compare >= 0x10000 0x10008 6 4

0x10000, 0x10008 : 2091264888, 2086935416

0x10004, 0x1000c : 2089100152, 945815572

0x10008, 0x10010 : 2086935416, 1279398274

0x10014, 0x1001c : 1207968893, 1099038740


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.