1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>OSFatal</title>
10</head>
11
12<body>
13
14<h1>OSFatal</h1>
15
16
17<h2>C Specification</h2>
18
19<dl>
20<dd><pre><code>#include &lt;revolution/os.h&gt;</code></pre>
21  </dd>
22<dd><pre>void OSFatal ( <a href="../../gx/Structures/GXColor.html">GXColor</a> fg, <a href="../../gx/Structures/GXColor.html">GXColor</a> bg, const char* msg );</pre>
23  </dd>
24</dl>
25<h2>Arguments</h2>
26<TABLE border="1" cellpadding="3" cellspacing="0.1">
27  <tr>
28<TD width="120" bgcolor="#ffffe8"><code><em><strong><STRONG><EM><CODE>fg</CODE></EM></STRONG></strong></em></code></TD>
29<TD width="520">Foreground (text) color. The value of <code><em><strong>fg</strong></em></code> member <code><em><strong>a</strong></em></code> (the alpha value) is not used.</TD>
30    </tr>
31  <tr>
32<TD width="120" bgcolor="#ffffe8"><code><em><strong><STRONG><EM><CODE>bg</CODE></EM></STRONG></strong></em></code></TD>
33<TD width="520">Background (text) color. The value of <code><em><strong>bg</strong></em></code> member <code><em><strong>a</strong></em></code> (the alpha value) is not used.</TD>
34    </tr>
35  <tr>
36<TD width="120" bgcolor="#ffffe8"><em><strong><code><CODE><EM><CODE>msg</CODE></EM></CODE></code></strong></em></TD>
37<TD width="520">Pointer to the null-terminated string.</TD>
38    </tr>
39</TABLE>
40<h2>Return Values</h2>
41<P>None.</P>
42<h2>Description</h2>
43<P>The <code>OSFatal</code> function immediately stops the running program and displays the specified text message on the TV screen. This function can even be called inside a callback function.</P>
44<P>The following example demo shows how to hook the SDK assertion message for displaying the assertion failure message on a TV screen using the <code>OSFatal</code> function.</P>
45<p><code>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;$REVOLUTION_SDK_ROOT/build/demos/osdemo/src/panic.c</code></p>
46<P><B><STRONG>Note:</STRONG></B> The <code>OSFatal</code> function uses the memory space above 18 MB for its work buffer.</P>
47
48<h2>See Also</h2>
49
50<p><a href="../list.html#Error" target="contents">Error Functions</a>, <code><a href="ASSERT.html">ASSERT</a></code>, <code><a href="ASSERTMSG.html">ASSERTMSG</a></code>,<code><a href="OSReport.html">OSReport</a></code></p>
51<H2>Revision History</H2>
52<P>03/01/2006 Initial version.</P>
53</body>
54</html>