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

📄 c_g.htm

📁 mips架构的bootloader,99左右的版本 但源代码现在没人更新了
💻 HTM
字号:
<title>The g Command</title><h1>g</h1><!--INDEX "g command" go "start execution" -->The g command starts program execution.<p></dl><h2>Format</h2><dl><dd>The format for the g command is:<p><pre>g [-st] [adr [bptadr]] [-c args-]</pre>where:<p><dl compact><dt>-s	<dd>is a flag indicating that the stack pointer, sp, should not be set.<dt>-t	<dd>is a flag that causes the execution time of the client program 	to be displayed in seconds.<dt>adr	<dd>is the address of the first instruction to be executed.<dt>bptadr	<dd>is a breakpoint address where program execution is to be 	stopped. This breakpoint is removed the next time that 	execution halts.<dt>-c args	<dd>indicates that the argument or arguments args are to be 	passed to the client program.</dl><p>By default, the g command starts program execution at the address in the EPC register, and sets the stack pointer, sp, to the beginning of the stack area.<p></dl><h2>Functional Description</h2><dl><dd>The g command starts program execution. If the user does not specify the starting address adr, execution starts at the current value of the EPC register. This command must only be used once after downloadinga new program. Use the <a href="c_c.htm">c</a> command to continue execution after a breakpoint.<p>If the user specifies the -c option, the <ahref="mondef.htm">Monitor</a> passes all arguments after -c to theclient program by the following method. If -c is specified, the <ahref="mondef.htm">Monitor</a> places the number of arguments (argc) inRegister a0. The <a href="mondef.htm">Monitor</a> also places theaddress of an array of pointers to the command argument-strings inRegister a1. The first element in the array pointed to by a1 contains apointer to the string -c (the option on the command line).  Note thatif the -c is not specified, register a0 will be set to zero.<p>If adr is specified, a temporary <a href="brkpts.htm">breakpoint</a>(bptadr) may also be specified.  The temporary breakpoint remains ineffect only until the next time that program execution is halted. Thecharacter '.' may be used as a placeholder for the adr if you wish tospecifiy a temporary breakpoint without specifying a start address.<p>If you use the standard start-up file for executing programs under thecontrol of the PROM <a href="mondef.htm">Monitor</a>, the functionmain will receive two incoming arguments, argc and argv, having thecorrect values to permit a program to read options from the commandline, where argv[0] is a pointer to the string -c. <p>Note that a program built using version 4.0 of pmcc will not execute under pre-3.0 versions of  the PROM Monitor unless the -c option is specified in the g command.<p>Examples illustrating the use of the g command follow.<p><pre>PMON> g				Start executing at the current value of 				the EPC register.PMON> g a0020000		Start executing at 0xa0020000.PMON> g a0020000 a0020008	Start executing at 0xa0020000 and 				break at 0xa0020008.</pre></dl><h2>Files</h2><dl><dd>The g command is located in <a href="../mon/go.c">mon/go.c</a>.</dl><h2>See Also</h2><dl><dd><a href="c_c.htm">c 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 + -