⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c_sh.htm

📁 mips架构的bootloader,99左右的版本 但源代码现在没人更新了
💻 HTM
字号:
<title>The sh Command</title><h1>sh</h1><!--INDEX "sh command" "command editing" -->The sh command is an embedded command that executes the <ahref="mondef.htm">Monitor</a> command typed following the prompt. <p></dl><h2>Functional Description</h2><dl><dd>The following syntactic rules apply to all command lines entered at the <a href="mondef.htm">Monitor</a> prompt.<p><ul><li>	Multiple commands can appear on one line if each command is 	separated by a semicolon (;). <li>	Register names are replaced by their contents if the register name is 	prefixed with an "at" symbol (@). <li>	Symbol names are replaced by their value if the symbol name is 	pre fixed with an ampersand symbol (&).<li>	Control-S pauses the output stream. <li>	Control-Q restarts the output stream. <li>	Control-C aborts the current command.</ul>The shell also maintains a command history. Previous command lines arerecalled either with Emacs-like commands or with C Shell "!" notation.the following table lists the commands that are supported by the <ahref="mondef.htm">Monitor</a>.<p><center><table border cellpadding=5><tr><th> Command </th><th> Action </th></tr><tr><td>^P</td><td>Recall previous command</td></tr><tr><td>^N</td><td>Recall next command</td></tr><tr><td>^F</td><td>Move cursor once character to the right (forward)</td></tr><tr><td>^B</td><td>Move the cursor one character to the left (back)</td></tr><tr><td>^A</td><td>Move the cursor to the beginning of the line</td></tr><tr><td>^E</td><td>Move the cursor to the end of the line</td></tr><tr><td>^D</td><td>Delete character at cursor position</td></tr><tr><td>^H</td><td>Delete character to the left of the cursor</td></tr><tr><td>!<var>str</var></td><td>Recall and execute the last command that started with the string <var>str</var></td></tr><tr><td>!<var>num</var></td><td>Recall and execute command number <var>num</var></td></tr><tr><td>!!</td><td>Recall and execute last command</td></tr><tr><td>+-/()</td><td>Algebraic operators</td></tr><tr><td>^<var>addr</var></td><td>Substitute with contents of address <var>addr</var></td></tr><tr><td>@<var>name</var></td><td>Substitute with contents of named register</td></tr><tr><td>&<var>name</var></td><td>Substitute with value of symbol <var>name</var></td></tr><tr><td>0x<var>num</var></td><td>Treat <var>num</var> as a hexadecimal number</td></tr><tr><td>0o<var>num</var></td><td>Treat <var>num</var> as an octal number</td></tr><tr><td>0t<var>num</var></td><td>Treat <var>num</var> as an decimal number</td></tr></table></center><p><h2>The inbase, <br>inalpha, prompt, <br>and rptcmd <br>Variables<br></h2>The following paragraphs describe the inbase, inalpha, prompt, and rptcmd environment variables:<p><b>inbase -</b> This variable selects the default input base for numeric values. A value of 8, 10, or 16 selects that base as the assumed default. If "auto" is specified, the base is determined according to the usual C language rules (0x = hex, leading 0 = octal, otherwise decimal).<p>If inbase is set to 8, 10, or 16, then values starting with zero through nine are assumed to be values in the specified base. If inbase is set to "auto", then values starting with zero are assumed to be octal, and numbers starting with one through nine are assumed to be decimal.<p>The following lists the rules that hold in setting the default numeric base.<p><center><table border cellpadding=5><tr><th>Inbase</th><th>Base</th></tr><tr><td> 0x </td><td> Hexadecimal </td></tr><tr><td> 0t </td><td> Decimal </td></tr><tr><td> 0o </td><td> Octal </td></tr><tr><td> [g-zG-Z@_.] </td><td> Symbol </td></tr><tr><td> & </td><td> Symbol </td></tr><tr><td> @ </td><td> Register </td></tr></table></center><p><b>inalpha -</b> This variable selects whether arguments starting with a, b, c, d, e, or f are interpreted as symbols or as hexadecimal numbers.<p>Setting inalpha to "hex" causes the <a href="mondef.htm">Monitor</a> interpret the argument as a hexadecimal value, if possible. If the argument cannot be interpreted as a hexadecimal value, then the <a href="mondef.htm">Monitor</a> checks the symbol table to see if the argument is a known symbol. <p>Setting inalpha to "symbol" causes the <a href="mondef.htm">Monitor</a> to check the symbol table first.<p>It is also possible to specify values using simple expressions using the arithmetic operators +, -, *, and /. Expressions do not take spaces between the numerals and operators. For example, <p><dl><dd><pre>PMON> b printf+4</pre> </dl><p>sets a breakpoint at (printf+4). Any combination of register names, symbols, and values may be used. The precedence order of operators is the same as that defined by the C language. Two examples showing the use of simple arithmetic operators follow:<p><dl><dd><table><tr><td width=300><samp>PMON> ls -v start+0x240		</samp></td><td>Show the actual address.</td></tr><tr><td><samp>PMON> d map+0t10*4		</samp></td><td>Dump memory at (map+(10*4)).</td></tr><tr><td><samp>PMON> d @a0+0t56		</samp></td><td>Dump memory at 56(a0)</td></tr><tr><td><samp>PMON> d ^tcbchn			</samp></td><td>Dump memory at contents of tcbchn</td></tr></table></dl> <p><b>prompt -</b> This variable specifies the command prompt string. The metacharacter "!" is replaced by the current history number. For example, <p><dl><dd> <pre>PMON> set prompt "!> " 23> _</pre></dl><p>It is not possible to display system variables in the prompt.<p><p><b>rptcmd -</b> When this environment variable is set to "on", the previous command is repeated when the user enters a blank line. When set to "trace", only trace commands (t or to) are repeated.<p></dl><h2>See Also</h2><dl><dd><a href="c_hi.htm">hi</a> (command history) and <a href="c_set.htm">set</a> (setup and display environment variables) commands.</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 + -