1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 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>OSGetResetCode</TITLE> 9</HEAD> 10<BODY> 11<H1>OSGetResetCode</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/os.h> 16 17u32 OSGetResetCode(void); 18</pre></dd></dl> 19 20<H2>Arguments</H2> 21<P>None.</P> 22 23<H2>Return Values</H2> 24<P>Returns the reset code.</P> 25 26<DIV align=left> 27<TABLE class="arguments" border="1" > 28 <TBODY> 29 <TR> 30<TD align="middle" bgColor="#C0C0C0">Type</TD> 31<TD align="middle" bgColor="#C0C0C0">Reset Code</TD> 32 </TR> 33 <TR> 34<TD>when launched from the system menu</TD> 35<TD>0</TD> 36 </TR> 37 <TR> 38<TD>The <A href="OSRestart.html"><CODE>OSRestart</CODE></A> function</TD> 39<TD><CODE>OS_RESETCODE_RESTART</CODE>(0x8000_0000) | the 29 bits of reset code specified by <A href="OSRestart.html"><CODE>OSRestart</CODE></A></TD> 40 </TR> 41 <TR> 42<TD>The <A href="OSExec.html"><CODE>OSExecl</CODE></A> and <A href="OSExec.html"><CODE>OSExecv</CODE></A> functions</TD> 43<TD><CODE>OS_RESETCODE_EXEC</CODE>(0xC000_0000).</TD> 44 </TR> 45 </TBODY> 46</TABLE> 47</DIV> 48 49<H2>Description</H2> 50<P>Returns the reset code. The application uses this code to identify whether the system was booted by either the system menu, <CODE>OSRestart</CODE>, <CODE>OSExecl</CODE> or <CODE>OSExecv</CODE>. </P> 51<UL> 52<LI>The code used for system power on is 0. 53<LI>For the <A href="OSRestart.html"><CODE>OSRestart</CODE></A> function the code is a logical sum of <CODE>OS_RESETCODE_RESTART</CODE>(0x8000_0000) and the 29 bit value specified by the <CODE>OSRestart</CODE> function.</LI> 54<LI>The code used if the system was booted by <A href="OSExec.html"><CODE>OSExecl</CODE></A> or <A href="OSExec.html"><CODE>OSExecv</CODE></A> is <CODE>OS_RESETCODE_EXEC</CODE>(0xC000_0000).</LI> 55</UL> 56 57<H2>See Also</H2> 58<P class="reference"> 59<A href="OSRestart.html">OSRestart</A>, 60<A href="OSIsRestart.html">OSIsRestart</A>, 61<A href="OSExec.html">OSExecl</A>/<A href="OSExec.html">OSExecv</A> 62</P> 63 64<H2>Revision History</H2> 65<P> 662006/08/14 Added text specific to <CODE>OSRestart</CODE>.<BR>2006/03/01 Initial version.<br> 67</P> 68 69<hr><p>CONFIDENTIAL</p></body> 70</HTML>