📄 c_m.htm
字号:
<title>The m Command</title><h1>m</h1><!--INDEX "m command" "modify memory" -->The m command displays and modifies memory. <p></dl><h2>Format</h2><dl><dd>The format for the m command is:<p><pre>m [-bhw] [adr [hexval|-s str]..]</pre>where:<p><table><tr><td>-b </td><td>is a flag signifying that byte accesses are to be used.</td></tr><tr><td>-h </td><td>is a flag signifying that halfword accesses are to be used.</td></tr><tr><td>-w </td><td>is a flag signifying that word accesses are to be used.</td></tr><tr><td>adr </td><td>is the memory address to display or modify without entering interactive mode.</td></tr><tr><td>hexval </td><td>is the value to insert at the specified address.</td></tr><tr><td>-s </td><td>is a flag signifying that the following parameter is a string value.</td></tr><tr><td>str </td><td>is a string value to copy to the specified address.</td></tr><tr><td><CR> </td><td>enters interactive mode.</td></tr><tr><td>= </td><td>in interactive mode, reads current address again.</td></tr><tr><td>^|- </td><td>in interactive mode, moves back one word.</td></tr><tr><td>. </td><td>exits interactive mode.</td></tr></table><p>Entering no values with this command causes the command to operate in interactive mode.<p></dl><h2>Functional Description</h2><dl><dd>This command can display and then modify memory locationsinteractively. This command can also set memory to a specified valuedirectly.<p>If invoked with one or more values following the address, the command is executed immediately, without entering the interactive mode.<p>If the command is invoked without a value, the command enters theinteractive memory mode. In interactive memory mode, the user enters acommand at the cursor. The interactive memory mode first displays theaddress and its current value. Interactive memory mode then lets theuser select one of the commands listed in the following table.<p>If the -s option is specified, the <a href="mondef.htm">Monitor</a>displays the memory contents as an ASCII string. A multiple-word stringmay be specified by enclosing the multiple-word string in quotationmarks.<p>Examples illustrating the use of the m command follow.<p><pre>PMON> m a0020000 Display memory at address in interactive mode.a0020000 00 _ User can enter command at cursor (_).PMON> m a0020000 1 2 3 4 Set address 0xa0020000 to 1, address 0xa0020001 to 2, etc., in noninteractive mode.PMON> m a0020000 Display memory at 0xa0020000.a0020000 01 CR a0020001 02 CR a0020002 03 CR a0020003 04 .PMON> m a0020000 22 Set address 0xa0020000 to 0x22.PMON> m a0020000 Display memory at 0xa0020000.a0020000 22 44 a0020001 00 <CR> a0020002 00 55 a0020003 00 66a0020004 00 ^ a0020003 66 <CR>a0020004 00 .PMON> m 80020000 -s even Set memory starting at 0x80020000 to the string "even." PMON> m 80030100 -s "LSI Logic"Set memory starting at 0x80030100 to the multiple-word string "LSI Logic."</pre></dl><h2>Files</h2><dl><dd>The m command is located in <a href="../mon/modify.c">mon/modify.c</a>.</dl><h2>See Also</h2><dl><dd><a href="c_fill.htm">fill command</a>,<a href="c_l.htm">l command</a>,<a href="c_d.htm">d command</a>,and <a href="c_dump.htm">dump command</a>.</dl><p><hr><b>Navigation:</b> <a href="index.htm">Document Home</a> | <a href="doctoc.htm">Document Contents</a> | <a href="docindex.htm">Document Index</a> <p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -