<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2008 (1.71) 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>Contents</TITLE> <META NAME="description" CONTENT="Contents"> <META NAME="keywords" CONTENT="sdccman"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2008"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="sdccman.css"> <LINK REL="next" HREF="node2.html"> <LINK REL="previous" HREF="sdccman.html"> <LINK REL="up" HREF="sdccman.html"> <LINK REL="next" HREF="node2.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html399" HREF="node2.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html395" HREF="sdccman.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html389" HREF="sdccman.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html397" HREF="node191.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html400" HREF="node2.html">1. Introduction</A> <B> Up:</B> <A NAME="tex2html396" HREF="sdccman.html">SDCC Compiler User Guide</A> <B> Previous:</B> <A NAME="tex2html390" HREF="sdccman.html">SDCC Compiler User Guide</A> <B> <A NAME="tex2html398" HREF="node191.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <BR> <H2><A NAME="SECTION00100000000000000000"> Contents</A> </H2> <!--Table of Contents--> <UL> <LI><A NAME="tex2html401" HREF="node2.html">1. Introduction</A> <UL> <LI><A NAME="tex2html402" HREF="node3.html">1.1 About SDCC</A> <LI><A NAME="tex2html403" HREF="node4.html">1.2 Open Source</A> <LI><A NAME="tex2html404" HREF="node5.html">1.3 Typographic conventions</A> <LI><A NAME="tex2html405" HREF="node6.html">1.4 Compatibility with previous versions</A> <LI><A NAME="tex2html406" HREF="node7.html">1.5 System Requirements</A> <LI><A NAME="tex2html407" HREF="node8.html">1.6 Other Resources</A> <LI><A NAME="tex2html408" HREF="node9.html">1.7 Wishes for the future</A> </UL> <BR> <LI><A NAME="tex2html409" HREF="node10.html">2. Installing SDCC</A> <UL> <LI><A NAME="tex2html410" HREF="node11.html">2.1 Configure Options</A> <LI><A NAME="tex2html411" HREF="node12.html">2.2 Install paths</A> <LI><A NAME="tex2html412" HREF="node13.html">2.3 Search Paths</A> <LI><A NAME="tex2html413" HREF="node14.html">2.4 Building SDCC</A> <UL> <LI><A NAME="tex2html414" HREF="node15.html">2.4.1 Building SDCC on Linux</A> <LI><A NAME="tex2html415" HREF="node16.html">2.4.2 Building SDCC on Mac OS X</A> <LI><A NAME="tex2html416" HREF="node17.html">2.4.3 Cross compiling SDCC on Linux for Windows</A> <LI><A NAME="tex2html417" HREF="node18.html">2.4.4 Building SDCC using Cygwin and Mingw32</A> <LI><A NAME="tex2html418" HREF="node19.html">2.4.5 Building SDCC Using Microsoft Visual C++ 6.0/NET (MSVC)</A> <LI><A NAME="tex2html419" HREF="node20.html">2.4.6 Windows Install Using a ZIP Package</A> <LI><A NAME="tex2html420" HREF="node21.html">2.4.7 Windows Install Using the Setup Program</A> <LI><A NAME="tex2html421" HREF="node22.html">2.4.8 VPATH feature</A> </UL> <LI><A NAME="tex2html422" HREF="node23.html">2.5 Building the Documentation</A> <LI><A NAME="tex2html423" HREF="node24.html">2.6 Reading the Documentation</A> <LI><A NAME="tex2html424" HREF="node25.html">2.7 Testing the SDCC Compiler</A> <LI><A NAME="tex2html425" HREF="node26.html">2.8 Install Trouble-shooting</A> <UL> <LI><A NAME="tex2html426" HREF="node27.html">2.8.1 If SDCC does not build correctly</A> <LI><A NAME="tex2html427" HREF="node28.html">2.8.2 What the ''./configure'' does</A> <LI><A NAME="tex2html428" HREF="node29.html">2.8.3 What the ''make'' does</A> <LI><A NAME="tex2html429" HREF="node30.html">2.8.4 What the ''make install'' command does.</A> </UL> <LI><A NAME="tex2html430" HREF="node31.html">2.9 Components of SDCC</A> <UL> <LI><A NAME="tex2html431" HREF="node32.html">2.9.1 sdcc - The Compiler</A> <LI><A NAME="tex2html432" HREF="node33.html">2.9.2 sdcpp - The C-Preprocessor</A> <LI><A NAME="tex2html433" HREF="node34.html">2.9.3 sdas, sdld - The Assemblers and Linkage Editors</A> <LI><A NAME="tex2html434" HREF="node35.html">2.9.4 s51, sz80, shc08 - The Simulators</A> <LI><A NAME="tex2html435" HREF="node36.html">2.9.5 sdcdb - Source Level Debugger</A> </UL> </UL> <BR> <LI><A NAME="tex2html436" HREF="node37.html">3. Using SDCC</A> <UL> <LI><A NAME="tex2html437" HREF="node38.html">3.1 Compiling</A> <UL> <LI><A NAME="tex2html438" HREF="node39.html">3.1.1 Single Source File Projects</A> <LI><A NAME="tex2html439" HREF="node40.html">3.1.2 Postprocessing the Intel Hex file</A> <LI><A NAME="tex2html440" HREF="node41.html">3.1.3 Projects with Multiple Source Files</A> <LI><A NAME="tex2html441" HREF="node42.html">3.1.4 Projects with Additional Libraries</A> <LI><A NAME="tex2html442" HREF="node43.html">3.1.5 Using sdcclib to Create and Manage Libraries</A> <LI><A NAME="tex2html443" HREF="node44.html">3.1.6 Using ar to Create and Manage Libraries</A> </UL> <LI><A NAME="tex2html444" HREF="node45.html">3.2 Command Line Options</A> <UL> <LI><A NAME="tex2html445" HREF="node46.html">3.2.1 Processor Selection Options</A> <LI><A NAME="tex2html446" HREF="node47.html">3.2.2 Preprocessor Options</A> <LI><A NAME="tex2html447" HREF="node48.html">3.2.3 Linker Options</A> <LI><A NAME="tex2html448" HREF="node49.html">3.2.4 MCS51 Options</A> <LI><A NAME="tex2html449" HREF="node50.html">3.2.5 DS390 / DS400 Options</A> <LI><A NAME="tex2html450" HREF="node51.html">3.2.6 Z80 Options</A> <LI><A NAME="tex2html451" HREF="node52.html">3.2.7 GBZ80 Options</A> <LI><A NAME="tex2html452" HREF="node53.html">3.2.8 Optimization Options</A> <LI><A NAME="tex2html453" HREF="node54.html">3.2.9 Other Options</A> <LI><A NAME="tex2html454" HREF="node55.html">3.2.10 Intermediate Dump Options</A> <LI><A NAME="tex2html455" HREF="node56.html">3.2.11 Redirecting output on Windows Shells</A> </UL> <LI><A NAME="tex2html456" HREF="node57.html">3.3 Environment variables</A> <LI><A NAME="tex2html457" HREF="node58.html">3.4 Storage Class Language Extensions</A> <UL> <LI><A NAME="tex2html458" HREF="node59.html">3.4.1 MCS51/DS390 Storage Class Language Extensions</A> <LI><A NAME="tex2html459" HREF="node60.html">3.4.2 Z80/Z180 Storage Class Language Extensions</A> <LI><A NAME="tex2html460" HREF="node61.html">3.4.3 HC08 Storage Class Language Extensions</A> </UL> <LI><A NAME="tex2html461" HREF="node62.html">3.5 Other SDCC language extensions</A> <UL> <LI><A NAME="tex2html462" HREF="node63.html">3.5.1 Binary constants</A> </UL> <LI><A NAME="tex2html463" HREF="node64.html">3.6 Absolute Addressing</A> <LI><A NAME="tex2html464" HREF="node65.html">3.7 Parameters & Local Variables</A> <LI><A NAME="tex2html465" HREF="node66.html">3.8 Overlaying</A> <LI><A NAME="tex2html466" HREF="node67.html">3.9 Interrupt Service Routines</A> <UL> <LI><A NAME="tex2html467" HREF="node68.html">3.9.1 General Information</A> <LI><A NAME="tex2html468" HREF="node69.html">3.9.2 MCS51/DS390 Interrupt Service Routines</A> <LI><A NAME="tex2html469" HREF="node70.html">3.9.3 HC08 Interrupt Service Routines</A> <LI><A NAME="tex2html470" HREF="node71.html">3.9.4 Z80 Interrupt Service Routines</A> </UL> <LI><A NAME="tex2html471" HREF="node72.html">3.10 Enabling and Disabling Interrupts</A> <UL> <LI><A NAME="tex2html472" HREF="node73.html">3.10.1 Critical Functions and Critical Statements</A> <LI><A NAME="tex2html473" HREF="node74.html">3.10.2 Enabling and Disabling Interrupts directly</A> <LI><A NAME="tex2html474" HREF="node75.html">3.10.3 Semaphore locking (mcs51/ds390)</A> </UL> <LI><A NAME="tex2html475" HREF="node76.html">3.11 Functions using private register banks(mcs51/ds390)</A> <LI><A NAME="tex2html476" HREF="node77.html">3.12 Startup Code</A> <UL> <LI><A NAME="tex2html477" HREF="node78.html">3.12.1 MCS51/DS390 Startup Code</A> <LI><A NAME="tex2html478" HREF="node79.html">3.12.2 HC08 Startup Code</A> <LI><A NAME="tex2html479" HREF="node80.html">3.12.3 Z80 Startup Code</A> </UL> <LI><A NAME="tex2html480" HREF="node81.html">3.13 Inline Assembler Code</A> <UL> <LI><A NAME="tex2html481" HREF="node82.html">3.13.1 A Step by Step Introduction</A> <LI><A NAME="tex2html482" HREF="node83.html">3.13.2 Naked Functions</A> <LI><A NAME="tex2html483" HREF="node84.html">3.13.3 Use of Labels within Inline Assembler</A> </UL> <LI><A NAME="tex2html484" HREF="node85.html">3.14 Interfacing with Assembler Code</A> <UL> <LI><A NAME="tex2html485" HREF="node86.html">3.14.1 Global Registers used for Parameter Passing</A> <LI><A NAME="tex2html486" HREF="node87.html">3.14.2 Registers usage</A> <LI><A NAME="tex2html487" HREF="node88.html">3.14.3 Assembler Routine (non-reentrant)</A> <LI><A NAME="tex2html488" HREF="node89.html">3.14.4 Assembler Routine (reentrant)</A> </UL> <LI><A NAME="tex2html489" HREF="node90.html">3.15 int (16 bit) and long (32 bit) Support</A> <LI><A NAME="tex2html490" HREF="node91.html">3.16 Floating Point Support</A> <LI><A NAME="tex2html491" HREF="node92.html">3.17 Library Routines</A> <UL> <LI><A NAME="tex2html492" HREF="node93.html">3.17.1 Compiler support routines (_gptrget, _mulint etc.)</A> <LI><A NAME="tex2html493" HREF="node94.html">3.17.2 Stdclib functions (puts, printf, strcat etc.)</A> <LI><A NAME="tex2html494" HREF="node95.html">3.17.3 Math functions (sinf, powf, sqrtf etc.)</A> <LI><A NAME="tex2html495" HREF="node96.html">3.17.4 Other libraries</A> </UL> <LI><A NAME="tex2html496" HREF="node97.html">3.18 Memory Models</A> <UL> <LI><A NAME="tex2html497" HREF="node98.html">3.18.1 MCS51 Memory Models</A> <LI><A NAME="tex2html498" HREF="node99.html">3.18.2 DS390 Memory Model</A> </UL> <LI><A NAME="tex2html499" HREF="node100.html">3.19 Pragmas</A> <LI><A NAME="tex2html500" HREF="node101.html">3.20 Defines Created by the Compiler</A> </UL> <BR> <LI><A NAME="tex2html501" HREF="node102.html">4. Notes on supported Processors</A> <UL> <LI><A NAME="tex2html502" HREF="node103.html">4.1 MCS51 variants</A> <UL> <LI><A NAME="tex2html503" HREF="node104.html">4.1.1 pdata access by SFR</A> <LI><A NAME="tex2html504" HREF="node105.html">4.1.2 Other Features available by SFR</A> <LI><A NAME="tex2html505" HREF="node106.html">4.1.3 Bankswitching</A> </UL> <LI><A NAME="tex2html506" HREF="node107.html">4.2 DS400 port</A> <LI><A NAME="tex2html507" HREF="node108.html">4.3 The Z80 and gbz80 port</A> <LI><A NAME="tex2html508" HREF="node109.html">4.4 The HC08 port</A> <LI><A NAME="tex2html509" HREF="node110.html">4.5 The PIC14 port</A> <UL> <LI><A NAME="tex2html510" HREF="node111.html">4.5.1 PIC Code Pages and Memory Banks</A> <LI><A NAME="tex2html511" HREF="node112.html">4.5.2 Adding New Devices to the Port </A> <LI><A NAME="tex2html512" HREF="node113.html">4.5.3 Interrupt Code</A> <LI><A NAME="tex2html513" HREF="node114.html">4.5.4 Linking and Assembling</A> <LI><A NAME="tex2html514" HREF="node115.html">4.5.5 Command-Line Options</A> <LI><A NAME="tex2html515" HREF="node116.html">4.5.6 Environment Variables</A> <LI><A NAME="tex2html516" HREF="node117.html">4.5.7 The Library</A> <LI><A NAME="tex2html517" HREF="node118.html">4.5.8 Known Bugs</A> </UL> <LI><A NAME="tex2html518" HREF="node119.html">4.6 The PIC16 port</A> <UL> <LI><A NAME="tex2html519" HREF="node120.html">4.6.1 Global Options</A> <LI><A NAME="tex2html520" HREF="node121.html">4.6.2 Port Specific Options</A> <LI><A NAME="tex2html521" HREF="node122.html">4.6.3 Environment Variables</A> <LI><A NAME="tex2html522" HREF="node123.html">4.6.4 Preprocessor Macros</A> <LI><A NAME="tex2html523" HREF="node124.html">4.6.5 Directories</A> <LI><A NAME="tex2html524" HREF="node125.html">4.6.6 Pragmas</A> <LI><A NAME="tex2html525" HREF="node126.html">4.6.7 Header Files and Libraries</A> <LI><A NAME="tex2html526" HREF="node127.html">4.6.8 Header Files</A> <LI><A NAME="tex2html527" HREF="node128.html">4.6.9 Libraries</A> <LI><A NAME="tex2html528" HREF="node129.html">4.6.10 Adding New Devices to the Port</A> <LI><A NAME="tex2html529" HREF="node130.html">4.6.11 Memory Models</A> <LI><A NAME="tex2html530" HREF="node131.html">4.6.12 Stack</A> <LI><A NAME="tex2html531" HREF="node132.html">4.6.13 Functions</A> <LI><A NAME="tex2html532" HREF="node133.html">4.6.14 Function return values</A> <LI><A NAME="tex2html533" HREF="node134.html">4.6.15 Interrupts</A> <LI><A NAME="tex2html534" HREF="node135.html">4.6.16 Generic Pointers</A> <LI><A NAME="tex2html535" HREF="node136.html">4.6.17 PIC16 C Libraries</A> <LI><A NAME="tex2html536" HREF="node137.html">4.6.18 PIC16 Port - Tips</A> <LI><A NAME="tex2html537" HREF="node138.html">4.6.19 Known Bugs</A> </UL> </UL> <BR> <LI><A NAME="tex2html538" HREF="node139.html">5. Debugging</A> <UL> <LI><A NAME="tex2html539" HREF="node140.html">5.1 Debugging with SDCDB </A> <UL> <LI><A NAME="tex2html540" HREF="node141.html">5.1.1 Compiling for Debugging</A> <LI><A NAME="tex2html541" HREF="node142.html">5.1.2 How the Debugger Works</A> <LI><A NAME="tex2html542" HREF="node143.html">5.1.3 Starting the Debugger SDCDB</A> <LI><A NAME="tex2html543" HREF="node144.html">5.1.4 SDCDB Command Line Options</A> <LI><A NAME="tex2html544" HREF="node145.html">5.1.5 SDCDB Debugger Commands</A> <LI><A NAME="tex2html545" HREF="node146.html">5.1.6 Interfacing SDCDB with DDD</A> <LI><A NAME="tex2html546" HREF="node147.html">5.1.7 Interfacing SDCDB with XEmacs</A> </UL> </UL> <BR> <LI><A NAME="tex2html547" HREF="node148.html">6. TIPS</A> <UL> <LI><A NAME="tex2html548" HREF="node149.html">6.1 Porting code from or to other compilers</A> <LI><A NAME="tex2html549" HREF="node150.html">6.2 Tools included in the distribution</A> <LI><A NAME="tex2html550" HREF="node151.html">6.3 Documentation included in the distribution</A> <LI><A NAME="tex2html551" HREF="node152.html">6.4 Communication online at SourceForge</A> <LI><A NAME="tex2html552" HREF="node153.html">6.5 Related open source tools</A> <LI><A NAME="tex2html553" HREF="node154.html">6.6 Related documentation / recommended reading</A> <LI><A NAME="tex2html554" HREF="node155.html">6.7 Application notes specifically for SDCC</A> <LI><A NAME="tex2html555" HREF="node156.html">6.8 Some Questions</A> </UL> <BR> <LI><A NAME="tex2html556" HREF="node157.html">7. Support</A> <UL> <LI><A NAME="tex2html557" HREF="node158.html">7.1 Reporting Bugs</A> <LI><A NAME="tex2html558" HREF="node159.html">7.2 Requesting Features</A> <LI><A NAME="tex2html559" HREF="node160.html">7.3 Submitting patches</A> <LI><A NAME="tex2html560" HREF="node161.html">7.4 Getting Help</A> <LI><A NAME="tex2html561" HREF="node162.html">7.5 ChangeLog</A> <LI><A NAME="tex2html562" HREF="node163.html">7.6 Subversion Source Code Repository</A> <LI><A NAME="tex2html563" HREF="node164.html">7.7 Release policy</A> <LI><A NAME="tex2html564" HREF="node165.html">7.8 Quality control</A> <LI><A NAME="tex2html565" HREF="node166.html">7.9 Examples</A> <LI><A NAME="tex2html566" HREF="node167.html">7.10 Use of SDCC in Education</A> </UL> <BR> <LI><A NAME="tex2html567" HREF="node168.html">8. SDCC Technical Data</A> <UL> <LI><A NAME="tex2html568" HREF="node169.html">8.1 Optimizations</A> <UL> <LI><A NAME="tex2html569" HREF="node170.html">8.1.1 Sub-expression Elimination</A> <LI><A NAME="tex2html570" HREF="node171.html">8.1.2 Dead-Code Elimination</A> <LI><A NAME="tex2html571" HREF="node172.html">8.1.3 Copy-Propagation</A> <LI><A NAME="tex2html572" HREF="node173.html">8.1.4 Loop Optimizations</A> <LI><A NAME="tex2html573" HREF="node174.html">8.1.5 Loop Reversing</A> <LI><A NAME="tex2html574" HREF="node175.html">8.1.6 Algebraic Simplifications</A> <LI><A NAME="tex2html575" HREF="node176.html">8.1.7 'switch' Statements</A> <LI><A NAME="tex2html576" HREF="node177.html">8.1.8 Bit-shifting Operations.</A> <LI><A NAME="tex2html577" HREF="node178.html">8.1.9 Bit-rotation</A> <LI><A NAME="tex2html578" HREF="node179.html">8.1.10 Nibble and Byte Swapping</A> <LI><A NAME="tex2html579" HREF="node180.html">8.1.11 Highest Order Bit / Any Order Bit</A> <LI><A NAME="tex2html580" HREF="node181.html">8.1.12 Higher Order Byte / Higher Order Word</A> <LI><A NAME="tex2html581" HREF="node182.html">8.1.13 Peephole Optimizer</A> </UL> <LI><A NAME="tex2html582" HREF="node183.html">8.2 ANSI-Compliance</A> <LI><A NAME="tex2html583" HREF="node184.html">8.3 Cyclomatic Complexity</A> <LI><A NAME="tex2html584" HREF="node185.html">8.4 Retargetting for other Processors</A> </UL> <BR> <LI><A NAME="tex2html585" HREF="node186.html">9. Compiler internals</A> <UL> <LI><A NAME="tex2html586" HREF="node187.html">9.1 The anatomy of the compiler</A> <LI><A NAME="tex2html587" HREF="node188.html">9.2 A few words about basic block successors, predecessors and dominators</A> </UL> <BR> <LI><A NAME="tex2html588" HREF="node189.html">10. Acknowledgments</A> <LI><A NAME="tex2html589" HREF="node191.html">Index</A> </UL> <!--End of Table of Contents--> <P> <BR><HR> <ADDRESS> 2011-03-20 </ADDRESS> </BODY> </HTML>