1<html>
2
3<head>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="Microsoft FrontPage 5.0">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<title>OSExec</title>
9</head>
10
11<body>
12
13<h1>OSExecl / OSExecv</h1>
14
15<h2>C Specification</h2>
16
17<dl>
18<dd><pre><code>#include &lt;revolution/os.h&gt;</code></pre>
19  </dd>
20<dd><pre><code>void OSExecl(const char* <i>dolfile</i>, const char* <i>arg0</i>, .../*, (char*)NULL */);
21void OSExecv(const char* <i>dolfile</i>, char* const <i>argv[]</i>);</code></pre>
22  </dd>
23</dl>
24<h2>Arguments</h2>
25
26<table border="1" cellpadding="3" cellspacing="0">
27  <tr>
28<td width="120" bgcolor="#ffffe8"><code><b><i>dolfile</i></b></code></td>
29<td width="520">Path name for the file to be executed. If a null string is specified, the default <CODE>dol</CODE> file (the file booted by IPL) will be executed.</td>
30  </tr>
31  <tr>
32<td width="120" bgcolor="#ffffe8"><code><b><i>arg0,...</i></b></code></td>
33<td width="520">This is a list of pointers to zero or more null-terminated strings that make up an argument list that can be used by the <CODE>dol</CODE> file to be executed (<code>OSExecl()</code> function only). The list of arguments must be terminated by a NULL pointer.</td>
34  </tr>
35  <tr>
36<td width="120" bgcolor="#ffffe8"><code><b><i>argv</i></b></code></td>
37<td width="520">This is an array of pointers to zero or more null-terminated strings that make up an argument list that can be used by new programs (<code>OSExecv()</code> function only). The array of pointers must be terminated by a NULL pointer.</td>
38  </tr>
39
40</table>
41
42<h2>Return Values</h2>
43<p>None.</p>
44
45<h2>Description</h2>
46<P>A problem was found with OSExec; it has temporarily been removed from this release. It should be supported in the next patch or release. </P>
47<P><code>OSExecl</code>/<code>OSExecv</code> execute a new <CODE>dol</CODE> file. If successful, control is not returned to this function.</P>
48<P>The initial argument for these functions is the full pathname of the <CODE>dol</CODE> file to execute. If a null string is specified, the default <CODE>dol</CODE> file that the IPL boots is executed.</P>
49<P>If the specified <CODE>dol</CODE> file doesn't exist, an assert will fire in the debug library. In this case, control returns to this function immediately.</P>
50<P>Arguments for <CODE>OSExecl()</CODE> are in the order of <i><code>arg0, arg1, ..., argn</code></i>. Together they describe a list of zero or more pointers to null-terminated strings that represent the argument list available to the new <CODE>dol</CODE> file. The list of arguments must be terminated by a NULL pointer.</P>
51<P><code>OSExecv()</code> provides an array of pointers to null-terminated strings that represent the argument list available to the new <CODE>dol</CODE> file. The array of pointers must be terminated by a NULL pointer.</P>
52<P><code><a href="OSSetSaveRegion.html">OSSetSaveRegion</a></code> also functions with <code>OSExecl</code>/<code>OSExecv</code>.</P>
53<P>The Revolution Controllers will not be recalibrated during an execution sequence.</P>
54<P>If the Game Disc cannot be read for any reason (including cover open, no disc, retry error, fatal error, wrong disk) during an execution sequence, <code>OSExecl</code>/<code>OSExecv</code> issue a hot reset. So if there is data not saved to the Memory Card, please make sure to save it before calling <code>OSExecl</code>/<code>OSExecv</code> (rather than passing the data using the save region feature).</P>
55<P>An <CODE>elf</CODE> file can be converted to a <CODE>dol</CODE> file using <code><a href="../../tools/makedol.html">makedol</a></code>.</P>
56
57<h2>See Also</h2>
58<p><code><a href="OSSetSaveRegion.html">OSSetSaveRegion</a><BR> <a href="OSIsRestart.html">OSIsRestart</a><BR> <a href="../../tools/makedol.html">makedol</a></code></p>
59<H2>Revision History</H2>
60<P>03/01/2006 Initial version. <BR>06/19/2006 Temporarily deleted OSExec from this release. </P>
61</body>
62</html>