84 lines
2.9 KiB
HTML
84 lines
2.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
|
|
<!--Converted with LaTeX2HTML 99.1 release (March 30, 1999)
|
|
original version by: Nikos Drakos, CBLU, University of Leeds
|
|
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
|
|
* with significant contributions from:
|
|
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>3.12 Startup Code</TITLE>
|
|
<META NAME="description" CONTENT="3.12 Startup Code">
|
|
<META NAME="keywords" CONTENT="sdccman">
|
|
<META NAME="resource-type" CONTENT="document">
|
|
<META NAME="distribution" CONTENT="global">
|
|
|
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
|
<META NAME="Generator" CONTENT="LaTeX2HTML v99.1 release">
|
|
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
|
|
|
<LINK REL="STYLESHEET" HREF="sdccman.css">
|
|
|
|
<LINK REL="next" HREF="node32.html">
|
|
<LINK REL="previous" HREF="node30.html">
|
|
<LINK REL="up" HREF="node19.html">
|
|
<LINK REL="next" HREF="node32.html">
|
|
</HEAD>
|
|
|
|
<BODY >
|
|
<!--Navigation Panel-->
|
|
<A NAME="tex2html710"
|
|
HREF="node32.html">
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
|
|
<A NAME="tex2html704"
|
|
HREF="node19.html">
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
|
|
<A NAME="tex2html698"
|
|
HREF="node30.html">
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A>
|
|
<A NAME="tex2html706"
|
|
HREF="node1.html">
|
|
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A>
|
|
<A NAME="tex2html708"
|
|
HREF="node61.html">
|
|
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index_motif.gif"></A>
|
|
<BR>
|
|
<B> Next:</B> <A NAME="tex2html711"
|
|
HREF="node32.html">3.13 Inline Assembler Code</A>
|
|
<B> Up:</B> <A NAME="tex2html705"
|
|
HREF="node19.html">3. Using SDCC</A>
|
|
<B> Previous:</B> <A NAME="tex2html699"
|
|
HREF="node30.html">3.11 Absolute Addressing</A>
|
|
  <B> <A NAME="tex2html707"
|
|
HREF="node1.html">Contents</A></B>
|
|
  <B> <A NAME="tex2html709"
|
|
HREF="node61.html">Index</A></B>
|
|
<BR>
|
|
<BR>
|
|
<!--End of Navigation Panel-->
|
|
|
|
<H2><A NAME="SECTION000412000000000000000">
|
|
3.12 Startup Code</A>
|
|
</H2>
|
|
|
|
<P>
|
|
The compiler inserts a call to the C routine <I>_sdcc__external__startup()</I>
|
|
at the start of the CODE area. This routine is in the runtime library.
|
|
By default this routine returns 0, if this routine returns a non-zero
|
|
value, the static & global variable initialization will be skipped
|
|
and the function main will be invoked Other wise static & global
|
|
variables will be initialized before the function main is invoked.
|
|
You could add a <I>_sdcc__external__startup()</I> routine to
|
|
your program to override the default if you need to setup hardware
|
|
or perform some other critical operation prior to static & global
|
|
variable initialization.
|
|
|
|
<P>
|
|
<BR><HR>
|
|
<ADDRESS>
|
|
<I>Johan Knol</I>
|
|
<BR><I>2001-07-13</I>
|
|
</ADDRESS>
|
|
</BODY>
|
|
</HTML>
|