Changes the contents of register, memory location, block of registers, or memory locations.
change <addr-spec> [<range>] [-s|-ns] [%<conv>] <value>
change <addr-spec>{..<addr>|#<n>} [<range>] [-s|-ns] [%<conv>] <value>
change <reg-spec> [<n>] [-s|-ns] [%<conv>] <value>
change <reg-spec>{..<reg>|#<n>} [-s|-ns] [%<conv>] <value>
change <var-spec> [-s|-ns] [%<conv>] <value>
change v <var> [-s|-ns] [%<conv>] <value>
The following table lists and defines parameters of the change command.
| Command | Description |
|---|---|
| <ms> | On architectures supporting multiple memory spaces, specifies the memory space in which <addr> is to be found. See help for the option -ms of display or mem for more information on memory spaces. If unspecified, the setting "config MemIdentifier" is used. |
| <addr> | Target address in hex format. |
| <count> | Number of memory cells. |
| x<cell-size> | Memory is displayed in units called cells, where each cell consists of <cell-size> bytes. If unspecified, the setting "config MemWidth" is used. |
| h<access-size> | Memory is accessed with a hardware access size of <access-size> bytes. If unspecified, the setting "config MemAccess" is used. |
| {8,16,32,64}bit | Sets both <cell-size> and <access-size>. |
| <a1>{..<a2>|#<n>} | Specifies a range of memory either by two endpoints, <a1> and <a2>, or by a startpoint and a byte count, <a1> and <n>. This alternate syntax is provided mainly for backwards compatibility. The new form of <addr> and <count> should be easier to use and thus preferred. |
| {r|nr} | If multiple registers are specified, then the prefix r: causes a recursive, depth-first traversal of the register hierarchy. The prefix nr: prevents recursion. If unspecified, recursion is the default. Note that different levels of the register hierarchy are represented in the manner of a path with forward-slashes '/' used to delimit the register groups. A name that contains a slash itself can be represented with an escape backward-slash '\' followed by the forward-slash. Further note that a backslash in a doubly-quoted Tcl string is itself an escape character -- in this case two backslashes are required. Alternatively, you may use curly braces '{' and '}' to denote your string in which case just one backslash is necessary. |
| <reg> | A register name or a register group name. |
| ..<reg> | The end point for a range of registers to access. |
| <n> | Number of registers. |
| all | Specifies all registers. |
| v: | If this option appears with no <var> following it, then all variables pertinent to the current scope are printed. |
| <var> | Symbolic name of the variable to print. Can be a C expression as well. |
| v | This alternate syntax is provided mainly for backward compatibility. |
| -s|-ns | Specifies whether each value is to be swapped. For memory, specifies whether each cell is to be swapped. With a setting of -ns, target memory is written in order from lowest to highest byte address. Otherwise, each cell is endian swapped. If unspecified, the setting "config MemSwap" is used. |
| %<conv> | Specifies the type of the data. Possible values for <conv> are given below. The default conversion is set by the radix command for memory and registers and by the config var command for variables. |
| %x | Hexadecimal. |
| %d | Signed decimal. |
| %u | Unsigned decimal. |
| %f | Floating point. |
| %[Q<n>]F | Fixed or Fractional. The range of a fixed point value depends on the (fixed) location of the decimal point. The default location is set by the config command option "MemFixedIntBits". |
| %s | ASCII. |
The examples assume the following settings:
The following table lists and defines Memory examples of the change command.
| Command | Description |
|---|---|
| change 10000 10 | Change memory range 0x10000-3 to 0x10 (because radix is hex). |
| change 1:10000 20 | Change memory range 0x10000-3, memory space 1, to 0x20. |
| change 10000 16 20 | Change each of 16 cells in the memory range 0x10000-3f to 0x20. |
| change 10000 16x1h8 31 | Change each of 16, 1-byte cells to 0x31, using a hardware access size of 8-bytes per write. |
| change 10000 -s %d 200 | Change memory range 0x10000-3 to c8000000. |
The following table lists and defines Register examples of the change command.
The following table lists and defines Variable examples of the change command.