gbdk-releases/sdcc/doc/sdccman.html/node35.html
2015-01-10 16:25:09 +01:00

122 lines
4.4 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.16 MCS51 Memory Models</TITLE>
<META NAME="description" CONTENT="3.16 MCS51 Memory Models">
<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="node36.html">
<LINK REL="previous" HREF="node34.html">
<LINK REL="up" HREF="node19.html">
<LINK REL="next" HREF="node36.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html766"
HREF="node36.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
<A NAME="tex2html760"
HREF="node19.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
<A NAME="tex2html754"
HREF="node34.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A>
<A NAME="tex2html762"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A>
<A NAME="tex2html764"
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="tex2html767"
HREF="node36.html">3.17 DS390 Memory Models</A>
<B> Up:</B> <A NAME="tex2html761"
HREF="node19.html">3. Using SDCC</A>
<B> Previous:</B> <A NAME="tex2html755"
HREF="node34.html">3.15 Floating Point Support</A>
&nbsp <B> <A NAME="tex2html763"
HREF="node1.html">Contents</A></B>
&nbsp <B> <A NAME="tex2html765"
HREF="node61.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION000416000000000000000">
3.16 MCS51 Memory Models</A>
</H2>
<P>
SDCC allows two memory models for MCS51 code, small and large. Modules
compiled with different memory models should <I>never</I> be combined
together or the results would be unpredictable. The library routines
supplied with the compiler are compiled as both small and large. The
compiled library modules are contained in seperate directories as
small and large so that you can link to either set.
<P>
When the large model is used all variables declared without a storage
class will be allocated into the external ram, this includes all parameters
and local variables (for non-reentrant functions). When the small
model is used variables without storage class are allocated in the
internal ram.
<P>
Judicious usage of the processor specific storage classes and the
'reentrant' function type will yield much more efficient code, than
using the large model. Several optimizations are disabled when the
program is compiled using the large model, it is therefore strongly
recommdended that the small model be used unless absolutely required.
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html766"
HREF="node36.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
<A NAME="tex2html760"
HREF="node19.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
<A NAME="tex2html754"
HREF="node34.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A>
<A NAME="tex2html762"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A>
<A NAME="tex2html764"
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="tex2html767"
HREF="node36.html">3.17 DS390 Memory Models</A>
<B> Up:</B> <A NAME="tex2html761"
HREF="node19.html">3. Using SDCC</A>
<B> Previous:</B> <A NAME="tex2html755"
HREF="node34.html">3.15 Floating Point Support</A>
&nbsp <B> <A NAME="tex2html763"
HREF="node1.html">Contents</A></B>
&nbsp <B> <A NAME="tex2html765"
HREF="node61.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
<I>Johan Knol</I>
<BR><I>2001-07-13</I>
</ADDRESS>
</BODY>
</HTML>