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<H2>C Specification</H2> 13<DL> 14 <DD> 15<PRE><CODE>#include <revolution/os.h></CODE></PRE> 16 <DD> 17<PRE><CODE>u32 OSGetResetCode (void);</CODE></PRE> 18</DL> 19<H2>Arguments</H2> 20<P>None.</P> 21<H2>Return Values</H2> 22<P>Returns the reset code.</P> 23<DIV align=left> 24<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> 25<TBODY> 26<TR> 27<TD align=middle width=123 bgColor=#000000 height=24><FONT color=#ffffff>Type</FONT></TD> 28<TD align=middle width=662 bgColor=#000000 height=24><FONT color=#ffffff>Reset Code</FONT></TD> 29 </TR> 30<TR> 31<TD width=123 height=24>when launched from the system menu</TD> 32<TD width=662 height=24>0</TD> 33</TR> 34<TR> 35<TD width=123 height=24>the <CODE><A href="OSRestart.html">OSRestart</A></CODE> function</TD> 36<TD width=662 37height=24><CODE>OS_RESETCODE_RESTART</CODE>(0x8000_0000) | the 29 bits of reset code specified by <CODE><A href="OSRestart.html">OSRestart</A></CODE></TD> 38</TR> 39<TR> 40<TD width=123 height=24><code><a href="OSExec.html">OSExecl</a></code>/<code><a href="OSExec.html">OSExecv</a></code></TD> 41<TD width=662 42height=24><CODE>OS_RESETCODE_EXEC</CODE>(0xC000_0000).</TD> 43</TR> 44 </TBODY> 45</TABLE> 46</DIV> 47<H2>Description</H2> 48<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> 49<UL> 50<LI>The code used for system power on is 0. 51<LI>For the <CODE><A href="OSRestart.html">OSRestart</A></CODE> 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> 52<LI>The code used if the system was booted by <CODE><A href="OSExec.html">OSExecl</A></CODE> or <CODE><A href="OSExec.html">OSExecv</A></CODE> is <CODE>OS_RESETCODE_EXEC</CODE>(0xC000_0000).</LI> 53</UL> 54 55<H2>See Also</H2> 56<P><CODE><A href="OSRestart.html">OSRestart</A><BR> <A href="OSIsRestart.html">OSIsRestart</A><BR> <A href="OSExec.html">OSExecl</A>/<A href="OSExec.html">OSExecv</A><BR></CODE></P> 57<H2>Revision History</H2> 58<P> 592006/08/14 Added text specific to <CODE>OSRestart</CODE>.<BR>2006/03/01 Initial version. 60</P> 61 62<hr> 63<P>CONFIDENTIAL</p> 64</BODY> 65</HTML>