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

📄 c_call

📁 MIPS处理器的bootloader,龙芯就是用的修改过的PMON2
💻
字号:
The call CommandcallThe call command executes a subroutine.FormatThe format for the call command is:call adr [-s str|val]..where:adr	is the address of the subroutine to be executed.-s str	is a string argument.val	is a value to be passed.The call command calls a function using the standard C callingconvention. The "-s str" and val options permit arguments to be passed to the subroutine.Functional DescriptionThe call command executes a downloaded subroutine, using a jalr instructionto pass control to the specified address.This does not affect the existing value of the savedregisters. Instead the subroutine is called directly from C codewithout restoring the saved registers. Control returns to PMONvia the usual subroutine return mechanism. If the user specifies arguments,these are passed using the standard C calling convention. If the"-s" option is specified, the following argument is assumed to bea string. In this case the address of the string is passed to thesubroutine. If a numerical value is specified in place of the "-s",it will be evaluated according to the existing rules and passedto the function. Up to five arguments may be passed.This command is usually used to provide a method of displayingapplication-specific data structures. For example, if your applicationhas a complex, linked-list data structure, you might find it helpfulto add a function to your program that can display the structure. Thecall command can then be used to invoke this function from thePMON prompt at any time in the execution, even between two single-stepoperations.Examples illustrating the use of the call command follow.PMON call prstat		Call the function whos name is 'prstat'.PMON call prrec a0020000+8	Call the function 'prrec' and pass it				the value 0xa0020008 as the first argument.PMON call printf -s "hello world"				Call the function printf and pass it the				address of the string "hello world".FilesThe call command is located in mon/call.c.See Alsog command

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -