go to single .html
[fw/sdcc] / doc / SDCCUdoc-17.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4  <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.7">
5  <TITLE>SDCC Compiler User Guide: Flat 24 bit addressing model.</TITLE>
6  <LINK HREF="SDCCUdoc-18.html" REL=next>
7  <LINK HREF="SDCCUdoc-16.html" REL=previous>
8  <LINK HREF="SDCCUdoc.html#toc17" REL=contents>
9 </HEAD>
10 <BODY>
11 <A HREF="SDCCUdoc-18.html">Next</A>
12 <A HREF="SDCCUdoc-16.html">Previous</A>
13 <A HREF="SDCCUdoc.html#toc17">Contents</A>
14 <HR>
15 <H2><A NAME="--model-flat24"></A> <A NAME="s17">17. Flat 24 bit addressing model.</A> </H2>
16
17 <P>This option generates code for the 24 bit contiguous addressing mode of
18 the Dallas DS80C390 part. In this mode, up to four meg of external RAM or code
19 space can be directly addressed. See the data sheets at www.dalsemi.com for
20 further information on this part.
21 <P>Note that the compiler does not generate any code to place the processor
22 into this mode (it defaults to 8051 compatible mode). Boot loader or similar
23 code must ensure that the processor is in 24 bit contiguous addressing mode
24 before calling the SDCC startup code.
25 <P>Like the --model-large option, variables will by default be placed into
26 the XDATA segment. However, a current limitation is that the compiler will
27 spill variables into the DATA segment when it runs out of registers. This means
28 that compiling complex code can rapidly fill up the DATA segment. This limitation
29 is being worked on, and should be addressed in the next release of sdcc.
30 <P>Segments may be placed anywhere in the 4 meg address space using the usual
31 --*-loc options. Note that if any segments are located above 64K, the -r flag
32 must be passed to the linker to generate the proper segment relocations, and
33 the Intel HEX output format must be used. The -r flag can be passed to the
34 linker by using the option -Wl-r on the sdcc command line.
35 <P>--stack-10bit:
36 <P>This option generates code for the 10 bit stack mode of the Dallas DS80C390
37 part. In this mode, the stack is located in the lower 1K of the internal RAM,
38 which is mapped to 0x400000.
39 <P>With this option, sdcc will generate the proper addressing for stack variables.
40 <P>Note that the support is incomplete, since it still uses a single byte
41 as the stack pointer. This means that only the lower 256 bytes of the potential
42 1K stack space can actually be used. However, this does allow you to reclaim
43 the precious 256 bytes of low RAM for use for the DATA and IDATA segments.
44 <P>The compiler will not generate any code to put the processor into 10 bit
45 stack mode. It is important to ensure that the processor is in this mode before
46 calling any re-entrant functions compiled with this option.
47 <P>In principle, this should work with the --stack-auto option, but that has
48 not been tested. It is incompatible with the --xstack option. It also only
49 makes sense if the processor is in 24 bit contiguous addressing mode (see the
50 --model-flat24 option).
51 <HR>
52 <A HREF="SDCCUdoc-18.html">Next</A>
53 <A HREF="SDCCUdoc-16.html">Previous</A>
54 <A HREF="SDCCUdoc.html#toc17">Contents</A>
55 </BODY>
56 </HTML>