* doc/sdccman.lyx: updated IRQ section
[fw/sdcc] / doc / sdccman.lyx
index 22df670dd1190325b5c300d7db82f1ac34e9d581..e99d50876547de62e249811d3d12d4856b98b709 100644 (file)
@@ -7,8 +7,8 @@
   pdftitle={SDCC Compiler User Guide},
   pdfauthor={SDCC development team},
   pdfsubject={installation, user manual},
-  pdfkeywords={8032 8051 ansi c compiler CPU DS390
-               embedded GPL HC08 manual mcs51 microcontroller PIC Z80},
+  pdfkeywords={68hc08 8032 8051 ansi c compiler assembler CPU DS390                 embedded development free Floating Point Arithmetic Freescale GPL HC08 inline Intel ISO/IEC 9899:1990 Linux MAC OS X manual Maxim mcs51 Microchip microcontroller open source PIC Unix Windows Z80 Zilog},
+  pdfpagemode=UseOutlines,
   colorlinks=true,
   linkcolor=blue] {hyperref}
 %
@@ -82,7 +82,7 @@ SDCC Compiler User Guide
 
 
 \size normal 
-SDCC 2.5.4
+SDCC 2.6.1
 \size footnotesize 
 
 \newline 
@@ -91,7 +91,7 @@ $Date$
 $Revision$
 \layout Comment
 
-The above strings enclosed in $ are automatically updated by cvs
+The above strings enclosed in $ are automatically updated by Subversion
 \layout Standard
 
 
@@ -142,8 +142,8 @@ Sandeep Dutta
 
 , etc.), Dallas DS80C390 variants, Freescale (formerly Motorola) HC08 and
  Zilog Z80 based MCUs.
- It can be retargetted for other microprocessors, support for Microchip
PIC, Atmel AVR is under development.
+ It can be retargeted for other microprocessors, support for Microchip PIC,
+ Atmel AVR is under development.
  The entire source code for the compiler is distributed under GPL.
  SDCC uses ASXXXX
 \begin_inset LatexCommand \index{asXXXX (as-gbz80, as-hc08, asx8051, as-z80)}
@@ -155,7 +155,7 @@ Sandeep Dutta
 
 \end_inset 
 
-, an open source retargettable assembler & linker.
+, an open source retargetable assembler & linker.
  SDCC has extensive language extensions suitable for utilizing various microcont
 rollers and underlying hardware effectively.
  
@@ -202,21 +202,365 @@ The peep hole optimizer uses a rule based substitution mechanism which is
 
 \newline 
 Supported data-types are:
-\layout Itemize
+\layout Standard
 
-char (8 bits, 1 byte), 
-\layout Itemize
 
-short and int (16 bits, 2 bytes), 
-\layout Itemize
+\begin_inset  Tabular
+<lyxtabular version="3" rows="8" columns="5">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="block" valignment="top" leftline="true" rightline="true" width="20text%">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
-long (32 bit, 4 bytes)
-\layout Itemize
+\layout Standard
+
+type
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+width
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+default
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+signed range
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+unsigned range
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+bool
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+1 bit
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+unsigned
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+-
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0, 1
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+char
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+8 bits, 1 byte
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
-float (4 byte IEEE).
 \layout Standard
 
+signed
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+-128, +127
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0, +255
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+short
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+16 bits, 2 bytes
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+signed
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+-32.768, +32.767
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0, +65.535
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+int
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+16 bits, 2 bytes
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+signed
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+-32.768, +32.767
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0, +65.535
+\end_inset 
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+long
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+32 bits, 4 bytes
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+signed
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+-2.147.483.648, +2.147.483.647
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0, +4.294.967.295
+\end_inset 
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+float
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+4 bytes IEEE 754
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+signed
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+1.175494351E-38, 
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+3.402823466E+38
+\end_inset 
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+pointer
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+1, 2, 3 or 4 bytes
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+generic
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+\end_inset 
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset 
+
+
+\newline 
 The compiler also allows 
 \emph on 
 inline assembler code
@@ -244,9 +588,7 @@ status Collapsed
 
 \newline 
 SDCC also comes with a companion source level debugger SDCDB, the debugger
- currently uses ucSim a freeware simulator for 8051 and other micro-controllers.
- SDCDB and ucSim are currently not available on Win32 platforms.
+ currently uses ucSim a freeware simulator for 8051 and other micro-controllers.<
 \newline 
 
 \newline 
@@ -349,7 +691,12 @@ typewriter font.
 italic.
 \layout Section
 
-Compatibility with previous versions
+Compatibility
+\begin_inset LatexCommand \label{sec:Compatibility-with-previous}
+
+\end_inset 
+
+ with previous versions
 \begin_inset LatexCommand \index{Compatibility with previous versions}
 
 \end_inset 
@@ -384,8 +731,24 @@ the default directory for gcc-builds where include, library and documentation
  files are stored is now in /usr/local/share.
 \layout Itemize
 
-char type parameters to vararg functions are casted to int unless explicitly
- casted, e.g.: 
+char type parameters to vararg
+\begin_inset LatexCommand \index{vararg, va\_arg}
+
+\end_inset 
+
+ functions are casted to int unless explicitly casted
+\begin_inset Marginal
+collapsed true
+
+\layout Standard
+
+
+\series bold 
+\SpecialChar ~
+!
+\end_inset 
+
+, e.g.: 
 \newline 
 
 \family typewriter 
@@ -486,7 +849,24 @@ bit b;
 \newline 
 \SpecialChar ~
 \SpecialChar ~
-b = ~b; /* equivalent to b=1 instead of toggling b */
+b = ~
+\begin_inset LatexCommand \index{\~\/ Operator}
+
+\end_inset 
+
+b; /* equivalent to b=1 instead of toggling b */
+\begin_inset Marginal
+collapsed true
+
+\layout Standard
+
+
+\series bold 
+\SpecialChar ~
+!
+\end_inset 
+
+
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -537,7 +917,8 @@ The SDCC home page at
  Some of the other tools (simulator and assembler) included with SDCC contain
  their own documentation and can be found in the source distribution.
  If you want the latest unreleased software, the complete source package
- is available directly by anonymous CVS on cvs.sdcc.sourceforge.net.
+ is available directly from Subversion on https://svn.sourceforge.net/svnroot/sdcc
+/trunk/sdcc.
 \layout Section
 
 Wishes for the future
@@ -602,13 +983,13 @@ For most users it is sufficient to skip to either section
 
 \end_inset 
 
- or section 
(Unix) or section 
 \begin_inset LatexCommand \ref{sub:Windows-Install}
 
 \end_inset 
 
-.
- More detailled instructions follow below.
+ (Windows).
+ More detailed instructions follow below.
 \layout Section
 
 Configure Options
@@ -839,7 +1220,7 @@ status Collapsed
 /
 \end_inset 
 
--disable-device-lib-build Disables automatically building device libraries
+-disable-device-lib Disables automatically building device libraries
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -867,6 +1248,20 @@ status Collapsed
 /
 \end_inset 
 
+-enable-doc Build pdf, html and txt files from the lyx sources
+\layout List
+\labelwidthstring 00.00.0000
+
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
 -enable-libgc Use the Bohem memory allocator.
  Lower runtime footprint.
 \layout Standard
@@ -1570,7 +1965,7 @@ status Collapsed
 /
 \end_inset 
 
--disable-device-lib-build
+-disable-device-lib
 \backslash 
 
 \newline 
@@ -1584,7 +1979,7 @@ status Collapsed
 /
 \end_inset 
 
--disable-ucsim
+-host=i586-mingw32msvc
 \backslash 
 
 \newline 
@@ -1598,16 +1993,6 @@ status Collapsed
 /
 \end_inset 
 
--host=i586-mingw32msvc -
-\begin_inset ERT
-status Collapsed
-
-\layout Standard
-
-\backslash 
-/
-\end_inset 
-
 -build=unknown-unknown-linux-gnu
 \layout Standard
 
@@ -1626,30 +2011,6 @@ compile on Cygwin for Mingw32 (see also sdcc/support/scripts/sdcc_cygwin_mingw32
 ./configure -C 
 \backslash 
 
-\newline 
-CFLAGS=
-\begin_inset Quotes srd
-\end_inset 
-
--mno-cygwin -O2
-\begin_inset Quotes srd
-\end_inset 
-
-\backslash 
-
-\newline 
-LDFLAGS=
-\begin_inset Quotes srd
-\end_inset 
-
--mno-cygwin
-\begin_inset Quotes srd
-\end_inset 
-
-\backslash 
-
 \newline 
 -
 \begin_inset ERT
@@ -1751,17 +2112,27 @@ sdccconf_h_dir_separator=
 \backslash 
 
 \newline 
--
-\begin_inset ERT
-status Collapsed
+CC=
+\begin_inset Quotes srd
+\end_inset 
 
-\layout Standard
+gcc -mno-cygwin
+\begin_inset Quotes srd
+\end_inset 
 
 \backslash 
-/
+
+\newline 
+CXX=
+\begin_inset Quotes srd
+\end_inset 
+
+g++ -mno-cygwin
+\begin_inset Quotes srd
 \end_inset 
 
--disable-ucsim
 \layout Standard
 
 'configure' is quite slow on Cygwin (at least on windows before Win2000/XP).
@@ -1797,10 +2168,10 @@ Install paths
 \begin_inset  Tabular
 <lyxtabular version="3" rows="5" columns="4">
 <features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<column alignment="left" valignment="top" leftline="true" width="0">
+<column alignment="left" valignment="top" leftline="true" width="0">
+<column alignment="left" valignment="top" leftline="true" width="0">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -2924,7 +3295,7 @@ Building SDCC on Linux
 \series medium 
 Download the source package
 \series default 
- either from the SDCC CVS repository or from the nightly snapshots
+ either from the SDCC Subversion repository or from the nightly snapshots
 \series medium 
 , it will be named something like sdcc
 \series default 
@@ -3044,14 +3415,6 @@ With the Mingw32 gcc cross compiler it's easy to compile SDCC for Win32.
  See section 'Configure Options'.
 \layout Subsection
 
-Building SDCC on Windows 
-\layout Standard
-
-With the exception of Cygwin the SDCC binaries uCsim and sdcdb can't be
- built on Windows.
- They use Unix-sockets, which are not available on Win32.
-\layout Subsection
-
 Building SDCC using Cygwin and Mingw32
 \layout Standard
 
@@ -3128,7 +3491,7 @@ less ; not really needed for building SDCC, but you'll miss it sooner or
  later
 \layout Itemize
 
-cvs ; only if you use CVS access
+svn ; only if you use Subversion access
 \layout Standard
 
 If you want to develop something you'll need:
@@ -3236,7 +3599,7 @@ Building SDCC Using Microsoft Visual C++ 6.0/NET (MSVC)
 \series medium 
 Download the source package
 \series default 
- either from the SDCC CVS repository or from the 
+ either from the SDCC Subversion repository or from the 
 \begin_inset LatexCommand \url[nightly snapshots]{http://sdcc.sourceforge.net/snap.php}
 
 \end_inset 
@@ -3251,8 +3614,7 @@ Download the source package
 
 \series default 
  SDCC is distributed with all the projects, workspaces, and files you need
- to build it using Visual C++ 6.0/NET (except for sdcdb.exe which currently
- doesn't build under MSVC).
+ to build it using Visual C++ 6.0/NET (except for SDCDB and ucSim).
  The workspace name is 'sdcc.dsw'.
  Please note that as it is now, all the executables are created in a folder
  called sdcc
@@ -3269,8 +3631,8 @@ bin before running SDCC.
 \newline 
 WARNING: Visual studio is very picky with line terminations; it expects
  the 0x0d, 0x0a DOS style line endings, not the 0x0a Unix style line endings.
- When using the CVS repository it's easiest to configure the cvs client
- to convert automatically for you.
+ When using the Subversion repository it's easiest to configure the svn
client to convert automatically for you.
  If however you are getting a message such as "This makefile was not generated
  by Developer Studio etc.
  etc.
@@ -3452,7 +3814,7 @@ Building SDCC Using Borland
 
 From the sdcc directory, run the command "make -f Makefile.bcc".
  This should regenerate all the .exe files in the bin directory except for
sdcdb.exe (which currently doesn't build under Borland C++).
SDCDB and ucSim.
 \layout Enumerate
 
 If you modify any source files and need to rebuild, be aware that the dependenci
@@ -3523,43 +3885,167 @@ Adjust your environment variable PATH to include the location of the bin
  directory or start sdcc using the full path.
 \layout Subsection
 
-Windows Install Using the Setup Program
-\begin_inset LatexCommand \label{sub:Windows-Install}
+Windows Install Using the Setup Program
+\begin_inset LatexCommand \label{sub:Windows-Install}
+
+\end_inset 
+
+
+\layout Standard
+
+Download the setup program 
+\emph on 
+sdcc-x.y.z-setup.exe
+\emph default 
+ for an official release from 
+\newline 
+
+\begin_inset LatexCommand \url{http://sf.net/project/showfiles.php?group_id=599}
+
+\end_inset 
+
+ or a setup program for one of the snapshots 
+\emph on 
+sdcc-yyyymmdd-xxxx-setup.exe
+\emph default 
+ from 
+\begin_inset LatexCommand \url{http://sdcc.sf.net/snap.php}
+
+\end_inset 
+
+ and execute it.
+ A windows typical installer will guide you through the installation process.
+\layout Subsection
+
+VPATH
+\begin_inset LatexCommand \index{VPATH}
+
+\end_inset 
+
+ feature
+\layout Standard
+
+SDCC supports the VPATH feature provided by configure and make.
+ It allows to separate the source and build trees.
+ Here's an example:
+\layout Standard
+
+
+\family typewriter 
+cd ~\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+# cd $HOME
+\layout Standard
+
 
-\end_inset 
+\family typewriter 
+tar -xzf sdcc.src.tar.gz\SpecialChar ~
+# extract source to directory sdcc
+\layout Standard
 
 
+\family typewriter 
+mkdir sdcc.build\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+# put output in sdcc.build
 \layout Standard
 
-Download the setup program 
-\emph on 
-sdcc-x.y.z-setup.exe
-\emph default 
- for an official release from 
-\newline 
 
-\begin_inset LatexCommand \url{http://sf.net/project/showfiles.php?group_id=599}
+\family typewriter 
+cd sdcc.build
+\layout Standard
 
-\end_inset 
 
- or a setup program for one of the snapshots 
-\emph on 
-sdcc_yyyymmdd_setup.exe
-\emph default 
- from 
-\begin_inset LatexCommand \url{http://sdcc.sf.net/snap.php}
+\family typewriter 
+../sdcc/configure\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+# configure is doing all the magic!
+\layout Standard
 
-\end_inset 
 
- and execute it.
- A windows typical installer will guide you through the installation process.
+\family typewriter 
+make
+\layout Standard
+\noindent 
+That's it! 
+\series bold 
+configure
+\series default 
+ will create the directory tree will all the necessary Makefiles in ~/sdcc.build.
+ It automagically computes the variables srcdir, top_srcdir and top_buildir
+ for each directory.
+ After running 
+\series bold 
+make
+\series default 
+ the generated files will be in ~/sdcc.build, while the source files stay
+ in ~/sdcc.
+\newline 
+This is not only usefull for building different binaries, e.g.
+ when cross compiling.
+ It also gives you a much better overview in the source tree when all the
+ generated files are not scattered between the source files.
+ And the best thing is: if you want to change a file you can leave the original
+ file untouched in the source directory.
+ Simply copy it to the build directory, edit it, enter `make clean`, `rm
+ Makefile.dep` and `make`.
+\series bold 
+make
+\series default 
+ will do the rest for you!
 \layout Section
 
 Building the Documentation
 \layout Standard
 
-If the necessary tools (LyX, LaTeX, LaTeX2HTML) are installed it is as easy
- as changing into the doc directory and typing 
+Add -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-enable-doc to the configure arguments to build the documentation together
+ with all the other stuff.
+ You will need several tools (LyX, LaTeX, LaTeX2HTML, pdflatex, dvipdf,
+ dvips and makeindex) to get the job done.
+ Another possibility is to change to the doc directory and to type 
 \family sans 
 \series bold 
 
@@ -3581,7 +4067,7 @@ x).
 
 \end_inset 
 
- as editor this is straightforward.
+ as editor is straightforward.
  Prebuilt documentation in html and pdf format is available from 
 \begin_inset LatexCommand \url{http://sdcc.sf.net/snap.php}
 
@@ -3591,6 +4077,11 @@ x).
 \layout Section
 
 Reading the Documentation
+\begin_inset LatexCommand \index{Documentation}
+
+\end_inset 
+
+
 \layout Standard
 
 Currently reading the document in pdf format is recommended, as for unknown
@@ -3677,11 +4168,30 @@ ate
 a
 \emph default 
 rray
-\begin_inset LatexCommand \index{fpga (field programmable gate array)}
+\begin_inset LatexCommand \index{FPGA (field programmable gate array)}
+
+\end_inset 
+
+
+\begin_inset Quotes srd
+\end_inset 
+
+ or 
+\begin_inset LatexCommand \url{http://sf.net/projects/fpgac}
+
+\end_inset 
+
+
+\begin_inset LatexCommand \index{FpgaC ((subset of) C to FPGA compiler)}
 
 \end_inset 
 
+\begin_inset Quotes sld
+\end_inset 
 
+have you ever heard of an open source compiler that compiles a subset of
+ C for an FPGA?
 \begin_inset Quotes srd
 \end_inset 
 
@@ -3731,8 +4241,16 @@ status Collapsed
 
 \family default 
 \series default 
- at the prompt, and the program should run and tell you the version.
- If it doesn't run, or gives a message about not finding sdcc program, then
+ at the prompt, and the program should run and output its version like:
+\newline 
+
+\family typewriter 
+SDCC : mcs51/z80/avr/ds390/pic16/pic14/ds400/hc08 2.5.6 #4169 (May 8 2006)
+ (UNIX)
+\layout Standard
+
+If it doesn't run, or gives a message about not finding sdcc program, then
  you need to check over your installation.
  Make sure that the sdcc bin directory is in your executable search path
  defined by the PATH environment setting (
@@ -4121,11 +4639,9 @@ link-gbz80 - The Z80 and GameBoy Z80 linkers.
 \layout Itemize
 
 s51 - The ucSim 8051 simulator.
- Not available on Win32 platforms.
 \layout Itemize
 
 sdcdb - The source debugger.
- Not available on Win32 platforms.
 \layout Itemize
 
 packihx - A tool to pack (compress) Intel hex files.
@@ -4209,19 +4725,18 @@ S51
 .
  It currently supports the core mcs51, the Dallas DS80C390 and the Phillips
  XA51 family.
- S51 is currently not available on Win32 platfors.
 \layout Subsection
 
 sdcdb - Source Level Debugger
 \layout Standard
 
-Sdcdb
-\begin_inset LatexCommand \index{sdcdb (debugger)}
+SDCDB
+\begin_inset LatexCommand \index{SDCDB (debugger)}
 
 \end_inset 
 
  is the companion source level debugger.
- More about sdcdb in section 
+ More about SDCDB in section 
 \begin_inset LatexCommand \ref{cha:Debugging-with-SDCDB}
 
 \end_inset 
@@ -4233,7 +4748,6 @@ Sdcdb
 \end_inset 
 
 , but can be easily changed to use other simulators.
- Sdcdb is currently not available on Win32 platfors.
 \layout Chapter
 
 Using SDCC
@@ -4418,7 +4932,7 @@ sourcefile.adb
  - An intermediate file containing debug information needed to create the
  .cdb file (with -
 \begin_inset ERT
-status Open
+status Collapsed
 
 \layout Standard
 
@@ -4464,7 +4978,12 @@ sourcefile.
 
 \end_inset 
 
- file containing debug information (generated with option -
+\begin_inset LatexCommand \label{OMF file}
+
+\end_inset 
+
+file containing debug information (generated with option -
 \begin_inset ERT
 status Collapsed
 
@@ -4537,6 +5056,87 @@ Anatomy of the compiler
 ).
 \layout Subsection
 
+Postprocessing the Intel Hex
+\begin_inset LatexCommand \index{Intel hex format}
+
+\end_inset 
+
+ file
+\layout Standard
+
+The Intel Hex file
+\begin_inset LatexCommand \index{<file>.ihx}
+
+\end_inset 
+
+ which is generated by SDCC might include lines of varying length and the
+ addresses within the file are not guaranteed to be strictly ascending.
+ If your toolchain or a bootloader does not like this you can use the tool
+\family typewriter 
+packihx
+\family default 
+
+\begin_inset LatexCommand \index{packihx (tool)}
+
+\end_inset 
+
+ which is part of the SDCC distribution: 
+\newline 
+
+\newline 
+
+\family sans 
+\series bold 
+ packihx sourcefile.ihx >sourcefile.hex
+\family default 
+\series default 
+
+\newline 
+
+\newline 
+The separately available
+\emph on 
+ srecord
+\emph default 
+
+\begin_inset LatexCommand \index{srecord (bin, hex, ... tool)}
+
+\end_inset 
+
+ package additionally allows to set undefined locations to a predefined
+ value, to insert checksums of various flavours (crc, add, xor) and to perform
+ other manipulations (convert, split, crop, offset, ...).
+\newline 
+
+\newline 
+
+\family sans 
+\series bold 
+srec_cat\SpecialChar ~
+\SpecialChar ~
+sourcefile.ihx -intel\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+-fill 0xff 0x0000 0x8000\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+-o sourcefile.hex -intel
+\newline 
+
+\newline 
+
+\family default 
+\series default 
+The srecord package is available at 
+\begin_inset LatexCommand \url{http://sf.net/projects/srecord}
+
+\end_inset 
+
+ .
+\layout Subsection
+
 Projects with Multiple Source Files
 \layout Standard
 
@@ -4985,10 +5585,10 @@ __mulint
 \newline 
 
 \layout Standard
-
+\added_space_bottom bigskip 
 If the source files are compiled using -
 \begin_inset ERT
-status Open
+status Collapsed
 
 \layout Standard
 
@@ -5232,7 +5832,7 @@ p16f627 p16f628 p16f84 p16f873 p16f877?
 
  processor (Not maintained, not complete).
 \layout List
-\labelwidthstring 00.00.0000
+\added_space_bottom bigskip \labelwidthstring 00.00.0000
 
 
 \series bold 
@@ -5448,7 +6048,7 @@ file"'.
 Like `-dD' except that the macro arguments and contents are omitted.
  Only `#define name' is included in the output.
 \layout List
-\labelwidthstring 00.00.0000
+\added_space_bottom bigskip \labelwidthstring 00.00.0000
 
 
 \series bold 
@@ -5741,6 +6341,66 @@ status Collapsed
 \labelwidthstring 00.00.0000
 
 
+\series bold 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-xstack-loc
+\series default 
+
+\begin_inset LatexCommand \index{-\/-xstack-loc <Value>}
+
+\end_inset 
+
+\SpecialChar ~
+<Value> By default the external stack
+\begin_inset LatexCommand \index{xstack}
+
+\end_inset 
+
+ is placed after the pdata
+\begin_inset LatexCommand \index{pdata (mcs51, ds390 storage class)}
+
+\end_inset 
+
+ segment.
+ Using this option the xstack can be placed anywhere in the external memory
+ space of the 8051.
+ The value entered can be in Hexadecimal or Decimal format, e.g.
+ -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-xstack-loc 0x8000 or -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-stack-loc 32768.
+ The provided value should not overlap any other memory areas such as the
+ pdata or xdata segment and with enough space for the current application.
+\layout List
+\labelwidthstring 00.00.0000
+
+
 \series bold 
 -
 \begin_inset ERT
@@ -5975,6 +6635,11 @@ status Collapsed
 \end_inset 
 
 
+\begin_inset LatexCommand \index{HC08!Options!-\/-out-fmt-elf}
+
+\end_inset 
+
+
 \bar under 
  
 \series default 
@@ -5985,9 +6650,14 @@ The linker output (final object code) is in ELF format
 \end_inset 
 
 .
- (Currently only supported for the HC08 processors)
+ (Currently only supported for the HC08
+\begin_inset LatexCommand \index{HC08}
+
+\end_inset 
+
+ processors)
 \layout List
-\labelwidthstring 00.00.0000
+\added_space_bottom bigskip \labelwidthstring 00.00.0000
 
 
 \series bold 
@@ -6001,7 +6671,23 @@ linkOption[,linkOption]
 
 ...
  Pass the linkOption to the linker.
- See file sdcc/as/doc/asxhtm.html for more on linker options.
+ If a bootloader is used an option like 
+\begin_inset Quotes sld
+\end_inset 
+
+-Wl\SpecialChar ~
+-bCSEG=0x1000
+\begin_inset Quotes srd
+\end_inset 
+
+ would be typical to set the start of the code segment.
+ See also #pragma constseg and #pragma codeseg in section 
+\begin_inset LatexCommand \ref{sec:Pragmas}
+
+\end_inset 
+
+ .
+ File sdcc/as/doc/asxhtm.html has more on linker options.
 \layout Subsection
 
 MCS51 Options
@@ -6121,8 +6807,13 @@ status Collapsed
 
 
 \series default 
- Uses a pseudo stack in the first 256 bytes in the external ram for allocating
- variables and passing parameters.
+ Uses a pseudo stack in the pdata
+\begin_inset LatexCommand \index{pdata (mcs51, ds390 storage class)}
+
+\end_inset 
+
+ area (usually the first 256 bytes in the external ram) for allocating variables
+ and passing parameters.
  See section 
 \begin_inset LatexCommand \ref{sub:External-Stack}
 
@@ -6256,7 +6947,7 @@ status Collapsed
  data, idata and stack together.
  This is the default now.
 \layout List
-\labelwidthstring 00.00.0000
+\added_space_bottom bigskip \labelwidthstring 00.00.0000
 
 
 \series bold 
@@ -6287,7 +6978,7 @@ DS390 / DS400 Options
 \end_inset 
 
 
-\begin_inset LatexCommand \index{DS390 options}
+\begin_inset LatexCommand \index{DS390}
 
 \end_inset 
 
@@ -6310,7 +7001,7 @@ status Collapsed
 -model-flat24
 \series default 
 
-\begin_inset LatexCommand \index{-\/-model-flat24}
+\begin_inset LatexCommand \index{DS390!Options!-\/-model-flat24}
 
 \end_inset 
 
@@ -6344,7 +7035,7 @@ status Collapsed
 \end_inset 
 
 -protect-sp-update
-\begin_inset LatexCommand \index{-\/-protect-sp-update}
+\begin_inset LatexCommand \index{DS390!Options!-\/-protect-sp-update}
 
 \end_inset 
 
@@ -6369,7 +7060,7 @@ status Collapsed
 -stack-10bit
 \series default 
 
-\begin_inset LatexCommand \index{-\/-stack-10bit}
+\begin_inset LatexCommand \index{DS390!Options!-\/-stack-10bit}
 
 \end_inset 
 
@@ -6464,7 +7155,7 @@ status Collapsed
 \end_inset 
 
 -stack-probe
-\begin_inset LatexCommand \index{-\/-stack-probe}
+\begin_inset LatexCommand \index{DS390!Options!-\/-stack-probe}
 
 \end_inset 
 
@@ -6487,7 +7178,7 @@ status Collapsed
 \end_inset 
 
 -tini-libid
-\begin_inset LatexCommand \index{-\/-tini-libid}
+\begin_inset LatexCommand \index{DS390!Options!-\/-tini-libid}
 
 \end_inset 
 
@@ -6496,7 +7187,7 @@ status Collapsed
  <nnnn> LibraryID used in -mTININative.
  
 \layout List
-\labelwidthstring 00.00.0000
+\added_space_bottom bigskip \labelwidthstring 00.00.0000
 
 
 \series bold 
@@ -6511,7 +7202,7 @@ status Collapsed
 \end_inset 
 
 -use-accelerator
-\begin_inset LatexCommand \index{-\/-use-accelerator}
+\begin_inset LatexCommand \index{DS390!Options!-\/-use-accelerator}
 
 \end_inset 
 
@@ -6527,7 +7218,7 @@ Z80 Options
 \end_inset 
 
 
-\begin_inset LatexCommand \index{Z80 options}
+\begin_inset LatexCommand \index{Z80}
 
 \end_inset 
 
@@ -6550,7 +7241,7 @@ status Collapsed
 -callee-saves-bc
 \series default 
 
-\begin_inset LatexCommand \index{-\/-callee-saves-bc}
+\begin_inset LatexCommand \index{Z80!Options!-\/-callee-saves-bc}
 
 \end_inset 
 
@@ -6562,7 +7253,7 @@ status Collapsed
 \emph default 
 Force a called function to always save BC.
 \layout List
-\labelwidthstring 00.00.0000
+\added_space_bottom bigskip \labelwidthstring 00.00.0000
 
 
 \series bold 
@@ -6579,7 +7270,7 @@ status Collapsed
 -no-std-crt0
 \series default 
 
-\begin_inset LatexCommand \index{-\/-no-std-crt0}
+\begin_inset LatexCommand \index{Z80!Options!-\/-no-std-crt0}
 
 \end_inset 
 
@@ -6897,7 +7588,7 @@ status Collapsed
 
 
 \series default 
- Disable peep-hole optimization.
+ Disable peep-hole optimization with built-in rules.
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -6986,7 +7677,7 @@ status Collapsed
  The compiler will optimize code generation towards fast code, possibly
  at the expense of code size.
 \layout List
-\labelwidthstring 00.00.0000
+\added_space_bottom bigskip \labelwidthstring 00.00.0000
 
 
 \series bold 
@@ -7409,8 +8100,8 @@ status Collapsed
 \series default 
  This option can be used if the code generated is called by a monitor program
  or if the main routine includes an endless loop.
- This option might result in slightly smaller code and save two bytes of
- stack space.
+ This option results in slightly smaller code and saves two bytes of stack
+ space.
  The return from the 'main'
 \begin_inset LatexCommand \index{main return}
 
@@ -7681,6 +8372,8 @@ status Collapsed
 \series default 
  Display errors and warnings using MSVC style, so you can use SDCC with
  visual studio.
+ With SDCC both offering a GCC-like (the default) and a MSVC-like output
+ style, integration into most programming editors should be straightforward.
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -7895,7 +8588,7 @@ status Collapsed
  Can be used for instance when using bank switching to put the const data
  in a bank.
 \layout List
-\labelwidthstring 00.00.0000
+\added_space_bottom bigskip \labelwidthstring 00.00.0000
 
 
 \series bold 
@@ -8281,7 +8974,7 @@ status Collapsed
 \series default 
  Will create a dump of the live ranges of iTemp's
 \layout List
-\labelwidthstring 00.00.0000
+\added_space_bottom bigskip \labelwidthstring 00.00.0000
 
 
 \series bold 
@@ -8312,7 +9005,7 @@ Will cause all the above mentioned dumps to be created.
 
 Redirecting output on Windows Shells
 \layout Standard
-
+\added_space_bottom bigskip 
 By default SDCC writes it's error messages to 
 \begin_inset Quotes sld
 \end_inset 
@@ -8555,7 +9248,7 @@ Search Paths
 
 ..
 \layout Standard
-
+\added_space_bottom bigskip 
 There are some more environment variables recognized by SDCC, but these
  are solely used for debugging purposes.
  They can change or disappear very quickly, and will never be documented.
@@ -8610,6 +9303,14 @@ data
  and 
 \emph on 
 near
+\emph default 
+ or the more ANSI-C compliant forms 
+\emph on 
+__data
+\emph default 
+ and 
+\emph on 
+__near
 \emph default 
  can be used synonymously).
  Variables declared with this storage class will be allocated in the directly
@@ -8618,7 +9319,7 @@ near
 
 
 \family typewriter 
-data unsigned char test_data;
+__data unsigned char test_data;
 \layout Standard
 
 Writing 0x01 to this variable generates the assembly code:
@@ -8631,7 +9332,7 @@ Writing 0x01 to this variable generates the assembly code:
 \SpecialChar ~
 mov\SpecialChar ~
 \SpecialChar ~
-_test_data,#0x01 
+_test_data,#0x01
 \layout Subsubsection
 
 xdata
@@ -8668,7 +9369,7 @@ default
 
 
 \family typewriter 
-xdata unsigned char test_xdata;
+__xdata unsigned char test_xdata;
 \layout Standard
 
 Writing 0x01 to this variable generates the assembly code:
@@ -8726,7 +9427,7 @@ Variables declared with this storage class will be allocated into the indirectly
 
 
 \family typewriter 
-idata unsigned char test_idata;
+__idata unsigned char test_idata;
 \layout Standard
 
 Writing 0x01 to this variable generates the assembly code:
@@ -8810,7 +9511,7 @@ default
 
 
 \family typewriter 
-pdata unsigned char test_pdata;
+__pdata unsigned char test_pdata;
 \layout Standard
 
 Writing 0x01 to this variable generates the assembly code:
@@ -8884,7 +9585,7 @@ code
 
 
 \family typewriter 
-code unsigned char test_code;
+__code unsigned char test_code;
 \layout Standard
 
 Read access to this variable generates the assembly code:
@@ -8929,7 +9630,7 @@ char
 
 
 \family typewriter 
-code char test_array[] = {'c','h','e','a','p'}; 
+__code char test_array[] = {'c','h','e','a','p'}; 
 \layout Standard
 
 Read access to this array using an 8-bit unsigned index generates the assembly
@@ -8989,7 +9690,7 @@ This is a data-type and a storage class specifier.
 
 
 \family typewriter 
-bit test_bit;
+__bit test_bit;
 \layout Standard
 
 Writing 1 to this variable generates the assembly code:
@@ -9069,6 +9770,11 @@ sfr
 \end_inset 
 
 
+\begin_inset LatexCommand \index{sbit}
+
+\end_inset 
+
+
 \layout Standard
 
 Like the bit keyword, 
@@ -9101,7 +9807,7 @@ bit
 
 
 \family typewriter 
-sfr at
+__sfr __at
 \begin_inset LatexCommand \index{at}
 
 \end_inset 
@@ -9111,7 +9817,7 @@ sfr at
 
 \end_inset 
 
0x80 P0;\SpecialChar ~
(0x80) P0;\SpecialChar ~
  /* special function register P0 at location 0x80 */
 \newline 
 /* 16 bit special function register combination for timer 0 */
@@ -9119,7 +9825,7 @@ sfr at
 /* with the high byte at location 0x8C and the low byte at location 0x8A
  */
 \newline 
-sfr16 at
+__sfr16 __at
 \begin_inset LatexCommand \index{at}
 
 \end_inset 
@@ -9129,9 +9835,9 @@ sfr16 at
 
 \end_inset 
 
0x8C8A TMR0;
(0x8C8A) TMR0;
 \newline 
-sbit at 0xd7 CY; /* CY (Carry Flag
+__sbit __at (0xd7) CY; /* CY (Carry Flag
 \begin_inset LatexCommand \index{Flags}
 
 \end_inset 
@@ -9163,6 +9869,61 @@ sfr32.
 \emph default 
  Allthough SDCC usually accesses them Least Significant Byte (LSB) first,
  this is not guaranteed.
+\newline 
+
+\layout Standard
+
+Please note, if you use a header file which was written for another compiler
+ then the sfr / sfr16 / sfr32 / sbit Storage Class extensions will most
+ likely be 
+\emph on 
+not 
+\emph default 
+compatible.
+ Specifically the syntax 
+\family typewriter 
+\SpecialChar ~
+sfr P0 = 0x80;\SpecialChar ~
+
+\family default 
+ is compiled 
+\emph on 
+without warning
+\emph default 
+ by SDCC to an assignment of 0x80 to a variable called P0 
+\family typewriter 
+
+\begin_inset Marginal
+collapsed true
+
+\layout Standard
+
+
+\series bold 
+\SpecialChar ~
+!
+\end_inset 
+
+.
+\family default 
+Nevertheless it is possible to write header files
+\begin_inset LatexCommand \index{Header files}
+
+\end_inset 
+
+
+\begin_inset LatexCommand \index{Include files}
+
+\end_inset 
+
+ which can be shared among different compilers (see section 
+\begin_inset LatexCommand \ref{sec:Porting-code-to-other-compilers}
+
+\end_inset 
+
+).
 \layout Subsubsection
 
 Pointers
@@ -9193,40 +9954,45 @@ Pointer declaration examples:
 /* pointer physically in internal ram pointing to object in external ram
  */ 
 \newline 
-xdata unsigned char * data p;
+__xdata unsigned char * __data p;
 \newline 
 
 \newline 
 /* pointer physically in external ram pointing to object in internal ram
  */ 
 \newline 
-data unsigned char * xdata p;
+__data unsigned char * __xdata p;
 \newline 
 
 \newline 
 /* pointer physically in code rom pointing to data in xdata space */ 
 \newline 
-xdata unsigned char * code p;
+__xdata unsigned char * __code p;
 \newline 
 
 \newline 
 /* pointer physically in code space pointing to data in code space */ 
 \newline 
-code unsigned char * code p;
+__code unsigned char * __code p;
 \newline 
 
 \newline 
-/* the following is a generic pointer physically located in xdata space
- */
+/* generic pointer physically located in xdata space */
+\newline 
+unsigned char * __xdata p;
+\newline 
+
 \newline 
-char * xdata p;
+/* generic pointer physically located in default memory space */
+\newline 
+unsigned char * p;
 \newline 
 
 \newline 
 /* the following is a function pointer physically located in data space
  */
 \newline 
-char (* data fp)(void);
+char (* __data fp)(void);
 \layout Standard
 
 Well you get the idea.
@@ -9461,6 +10227,8 @@ idata
 \emph default 
 ).
  
+\newline 
+
 \layout Standard
 
 By default the 8051 linker will place the stack after the last byte of (i)data
@@ -9557,7 +10325,7 @@ status Collapsed
  If in doubt, don't specify any options and see if the resulting memory
  layout is appropriate, then you can adjust it.
 \layout Standard
-
+\added_space_bottom bigskip 
 The linker generates two files with memory allocation information.
  The first, with extension .map
 \begin_inset LatexCommand \index{<file>.map}
@@ -9580,7 +10348,7 @@ The linker generates two files with memory allocation information.
 \layout Subsection
 
 Z80/Z180 Storage Class
-\begin_inset LatexCommand \index{Storage class}
+\begin_inset LatexCommand \index{Z80!Storage class}
 
 \end_inset 
 
@@ -9617,6 +10385,16 @@ utput memory.
  I/O memory
 \begin_inset LatexCommand \index{I/O memory (Z80, Z180)}
 
+\end_inset 
+
+
+\begin_inset LatexCommand \index{Z80!I/O memory}
+
+\end_inset 
+
+
+\begin_inset LatexCommand \index{Z180!I/O memory}
+
 \end_inset 
 
  is accessed with special instructions, e.g.:
@@ -9730,13 +10508,13 @@ sfr
 \end_inset 
 
 /HD64180
-\begin_inset LatexCommand \index{HD64180}
+\begin_inset LatexCommand \index{HD64180 (see Z180)}
 
 \end_inset 
 
 )
 \layout Standard
-
+\added_space_bottom bigskip 
 The compiler option -
 \begin_inset ERT
 status Collapsed
@@ -9747,9 +10525,14 @@ status Collapsed
 /
 \end_inset 
 
--portmode=180 (80) and a compiler #pragma\SpecialChar ~
+-portmode
+\begin_inset LatexCommand \index{Z180!Options!-\/-portmode}
+
+\end_inset 
+
+=180 (80) and a compiler #pragma\SpecialChar ~
 portmode
-\begin_inset LatexCommand \index{\#pragma portmode}
+\begin_inset LatexCommand \index{Z180!Pragmas!\#pragma portmode}
 
 \end_inset 
 
@@ -9767,7 +10550,7 @@ in/out
 \layout Subsection
 
 HC08 Storage Class
-\begin_inset LatexCommand \index{Storage class}
+\begin_inset LatexCommand \index{HC08!Storage class}
 
 \end_inset 
 
@@ -9789,8 +10572,12 @@ data
 
 The data storage class declares a variable that resides in the first 256
  bytes of memory (the direct page).
- The HC08 is most efficient at accessing variables (especially pointers)
- stored here.
+ The HC08
+\begin_inset LatexCommand \index{HC08}
+
+\end_inset 
+
+ is most efficient at accessing variables (especially pointers) stored here.
 \layout Subsubsection
 
 xdata
@@ -9805,7 +10592,7 @@ xdata
 
  
 \layout Standard
-
+\added_space_bottom bigskip 
 The xdata storage class declares a variable that can reside anywhere in
  memory.
  This is the default if no storage class is specified.
@@ -9862,14 +10649,33 @@ xdata
  0x7ffe unsigned int chksum;
 \layout Standard
 
+or, better conforming to ISO/IEC 9899 C:
+\layout Verse
+
+
+\family typewriter 
+__xdata __at (0x7ffe) unsigned int chksum;
+\layout Standard
+
 In the above example the variable chksum will be located at 0x7ffe and 0x7fff
  of the external ram.
  The compiler does 
 \emph on 
 not
 \emph default 
- reserve any space for variables declared in this way (they are implemented
- with an equate in the assembler).
+ reserve any space for variables declared in this way
+\begin_inset Marginal
+collapsed true
+
+\layout Standard
+
+
+\series bold 
+\SpecialChar ~
+!
+\end_inset 
+
+ (they are implemented with an equate in the assembler).
  Thus it is left to the programmer to make sure there are no overlaps with
  other variables that are declared without the absolute address.
  The assembler listing file (.lst
@@ -9891,6 +10697,18 @@ not
  Variables with an absolute address are 
 \emph on 
 not
+\begin_inset Marginal
+collapsed true
+
+\layout Standard
+
+
+\series bold 
+\SpecialChar ~
+!
+\end_inset 
+
+
 \emph default 
  initialized
 \begin_inset LatexCommand \index{Variable initialization}
@@ -9914,17 +10732,17 @@ volatile
 
 \end_inset 
 
- xdata
__xdata
 \begin_inset LatexCommand \index{xdata (mcs51, ds390 storage class)}
 
 \end_inset 
 
- at
__at
 \begin_inset LatexCommand \index{at}
 
 \end_inset 
 
0x8000 unsigned char PORTA_8255;
(0x8000) unsigned char PORTA_8255;
 \layout Standard
 
 For some architectures (mcs51) array accesses are more efficient if an (xdata/fa
@@ -9957,17 +10775,17 @@ Absolute addresses can be specified for variables in all storage classes,
 
 
 \family typewriter 
-bit
+__bit
 \begin_inset LatexCommand \index{bit}
 
 \end_inset 
 
- at
__at
 \begin_inset LatexCommand \index{at}
 
 \end_inset 
 
0x02 bvar;
(0x02) bvar;
 \layout Standard
 
 The above example will allocate the variable at offset 0x02 in the bit-addressab
@@ -9987,19 +10805,19 @@ extern volatile
 
 \end_inset 
 
- bit MOSI;\SpecialChar ~
__bit MOSI;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 /* master out, slave in */
 \newline 
-extern volatile bit MISO;\SpecialChar ~
+extern volatile __bit MISO;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 /* master in, slave out */
 \newline 
-extern volatile bit MCLK;\SpecialChar ~
+extern volatile __bit MCLK;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -10135,7 +10953,7 @@ Then, someplace in the code for the first hardware you would use
 
 
 \family typewriter 
-bit at
+__bit __at
 \begin_inset LatexCommand \index{at}
 
 \end_inset 
@@ -10145,19 +10963,19 @@ bit at
 
 \end_inset 
 
0x80 MOSI;\SpecialChar ~
(0x80) MOSI;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 /* I/O port 0, bit 0 */
 \newline 
-bit at 0x81 MISO;\SpecialChar ~
+__bit __at (0x81) MISO;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 /* I/O port 0, bit 1 */
 \newline 
-bit at 0x82 MCLK;\SpecialChar ~
+__bit __at (0x82) MCLK;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -10169,30 +10987,30 @@ Similarly, for the second hardware you would use
 
 
 \family typewriter 
-bit at 0x83 MOSI;\SpecialChar ~
+__bit __at (0x83) MOSI;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 /* I/O port 0, bit 3 */
 \newline 
-bit at 0x91 MISO;\SpecialChar ~
+__bit __at (0x91) MISO;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 /* I/O port 1, bit 1 */
 \newline 
-bit
+__bit
 \begin_inset LatexCommand \index{bit}
 
 \end_inset 
 
at 0x92 MCLK;\SpecialChar ~
__at (0x92) MCLK;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 /* I/O port 1, bit 2 */
 \layout Standard
-
+\added_space_bottom bigskip 
 and you can use the same hardware dependent routine without changes, as
  for example in a library.
  This is somehow similar to sbit, but only one absolute address has to be
@@ -10293,7 +11111,7 @@ reentrant
 
 
 \family typewriter 
-unsigned char foo(char i) reentrant 
+unsigned char foo(char i) __reentrant 
 \newline 
 { 
 \newline 
@@ -10363,24 +11181,24 @@ unsigned char foo()
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-xdata unsigned char i;
+__xdata unsigned char i;
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-bit bvar;
+__bit bvar;
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-data at
+__data __at
 \begin_inset LatexCommand \index{at}
 
 \end_inset 
 
0x31 unsigned char j;
(0x31) unsigned char j;
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -10443,8 +11261,12 @@ Parameters
 It is however allowed to use bit parameters in reentrant functions and also
  non-static local bit variables are supported.
  Efficient use is limited to 8 semi-bitregisters in bit space.
- They are pushed and popped to stack as a single byte just like the normal
- registers.
+ They are pushed and popped to stack
+\begin_inset LatexCommand \index{stack}
+
+\end_inset 
+
+ as a single byte just like the normal registers.
 \layout Section
 
 Overlaying
@@ -10494,8 +11316,18 @@ no other function calls and the function is non-reentrant and the memory
 
 Note that the compiler (not the linkage editor) makes the decision for overlayin
 g the data items.
- Functions that are called from an interrupt service routine should be preceded
- by a #pragma\SpecialChar ~
+ Functions that are called from an interrupt service routine
+\begin_inset Marginal
+collapsed true
+
+\layout Standard
+
+
+\series bold 
+!
+\end_inset 
+
+ should be preceded by a #pragma\SpecialChar ~
 nooverlay
 \begin_inset LatexCommand \index{\#pragma nooverlay}
 
@@ -10554,12 +11386,12 @@ P3 = errcd;
 \newline 
 
 \newline 
-void some_isr () interrupt
+void some_isr () __interrupt
 \begin_inset LatexCommand \index{interrupt}
 
 \end_inset 
 
- 2
+ (2)
 \newline 
 {
 \newline 
@@ -10584,7 +11416,7 @@ set_error(10);
 \newline 
 }
 \layout Standard
-
+\added_space_bottom bigskip 
 In the above example the parameter 
 \emph on 
 errcd
@@ -10630,7 +11462,7 @@ outines to be coded in C, with some extended keywords.
 
 
 \family typewriter 
-void timer_isr (void) interrupt 1 using 1 
+void timer_isr (void) __interrupt (1) __using (1) 
 \newline 
 { 
 \newline 
@@ -10668,7 +11500,7 @@ interrupt
 main
 \emph default 
 .
- The optional 
+ The optional (8051 specific) keyword 
 \emph on 
 using
 \begin_inset LatexCommand \index{using (mcs51, ds390 register bank)}
@@ -10682,15 +11514,23 @@ using
 
 
 \emph default 
- keyword can be used to tell the compiler to use the specified register
bank (8051 specific) when generating code for this function.
+ can be used to tell the compiler to use the specified register bank when
+ generating code for this function.
  
 \newline 
+Interrupt service routines open the door for some very interesting bugs:
+\layout Subsubsection
+
+
+\begin_inset LatexCommand \label{sub:Common-interrupt-pitfall-volatile}
 
+\end_inset 
+
+Common interrupt pitfall: variable not declared 
+\emph on 
+volatile
 \layout Standard
 
-Interrupt service routines open the door for some very interesting bugs:
-\newline 
 If an interrupt service routine changes variables which are accessed by
  other functions these variables have to be declared 
 \emph on 
@@ -10702,7 +11542,22 @@ volatile
 \end_inset 
 
 .
+ See 
+\begin_inset LatexCommand \url{http://en.wikipedia.org/wiki/Volatile_variable}
+
+\end_inset 
+
+ .
+\layout Subsubsection
+
+
+\begin_inset LatexCommand \label{sub:Common-interrupt-pitfall-non-atomic}
+
+\end_inset 
+
+Common interrupt pitfall: 
+\emph on 
+non-atomic access
 \layout Standard
 
 If the access to these variables is not 
@@ -10718,8 +11573,10 @@ atomic
  the processor needs more than one instruction for the access and could
  be interrupted while accessing the variable) the interrupt must be disabled
  during the access to avoid inconsistent data.
- Access to 16 or 32 bit variables is obviously not atomic on 8 bit CPUs
- and should be protected by disabling interrupts.
+\newline 
+Access to 16 or 32 bit variables is obviously not atomic on 8 bit CPUs and
+ should be protected by disabling interrupts.
  You're not automatically on the safe side if you use 8 bit variables though.
  We need an example here: f.e.
  on the 8051 the harmless looking 
@@ -10776,8 +11633,19 @@ counter\SpecialChar ~
 counter
 \family default 
  is located in data memory.
- Bugs like these are hard to reproduce and can cause a lot of trouble.
+\newline 
+Bugs like these are hard to reproduce and can cause a lot of trouble.
  
+\layout Subsubsection
+
+
+\begin_inset LatexCommand \label{sub:Common-interrupt-pitfall-stack-overflow}
+
+\end_inset 
+
+Common interrupt pitfall: 
+\emph on 
+stack overflow
 \layout Standard
 
 The return address and the registers used in the interrupt service routine
@@ -10808,6 +11676,16 @@ deepest
 
  subroutine when the stack is already in use for f.e.
  many return addresses.
+\layout Subsubsection
+
+
+\begin_inset LatexCommand \label{sub:Common-interrupt-pitfall-non-reentrant}
+
+\end_inset 
+
+Common interrupt pitfall: 
+\emph on 
+use of non-reentrant functions
 \layout Standard
 
 A special note here, int (16 bit) and long (32 bit) integer division
@@ -10830,8 +11708,7 @@ A special note here, int (16 bit) and long (32 bit) integer division
 
 \end_inset 
 
- operations are implemented using external support routines developed in
- ANSI-C.
+ operations are implemented using external support routines.
  If an interrupt service routine needs to do any of these operations then
  the support routines (as mentioned in a following section) will have to
  be recompiled using the
@@ -10873,8 +11750,39 @@ status Collapsed
 \end_inset 
 
  compiler option.
+\newline 
+Note, the type promotion
+\begin_inset LatexCommand \index{type promotion}
+
+\end_inset 
+
+ required by ANSI C can cause 16 bit routines to be used
+\begin_inset Marginal
+collapsed true
+
 \layout Standard
 
+
+\series bold 
+\SpecialChar ~
+!
+\end_inset 
+
+ without the programmer being aware of it.
+ See f.e.
+ the cast 
+\family typewriter 
+(unsigned char)(tail-1)
+\family default 
+ within the if clause in section 
+\begin_inset LatexCommand \ref{sub:A-Step-by Assembler Introduction}
+
+\end_inset 
+
+.
+\layout Standard
+\added_space_bottom bigskip 
 Calling other functions from an interrupt service routine is not recommended,
  avoid it if possible.
  Note that when some function is called from an interrupt service routine
@@ -10887,11 +11795,15 @@ nooverlay
  if it is not reentrant.
  Furthermore nonreentrant functions should not be called from the main program
  while the interrupt service routine might be active.
-\newline 
-
+ They also must not be called from low priority interrupt service routines
+ while a high priority interrupt service routine might be active.
+ You could use semaphores or make the function
+\emph on 
+ critical
+\emph default 
+ if all parameters are passed in registers.
 \newline 
-Also see section 
+ Also see section 
 \begin_inset LatexCommand \ref{sub:Overlaying}
 
 \end_inset 
@@ -10919,11 +11831,11 @@ Interrupt numbers and the corresponding address & descriptions for the Standard
 \align center 
 
 \begin_inset  Tabular
-<lyxtabular version="3" rows="7" columns="3">
+<lyxtabular version="3" rows="9" columns="3">
 <features>
 <column alignment="center" valignment="top" leftline="true" width="0in">
-<column alignment="center" valignment="top" leftline="true" width="0in">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -10998,7 +11910,7 @@ Timer 0
 
 \layout Standard
 
-0x000B
+0x000b
 \end_inset 
 </cell>
 </row>
@@ -11050,7 +11962,7 @@ Timer 1
 
 \layout Standard
 
-0x001B
+0x001b
 \end_inset 
 </cell>
 </row>
@@ -11080,8 +11992,8 @@ Serial
 \end_inset 
 </cell>
 </row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<row topline="true">
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -11102,7 +12014,57 @@ Timer 2 (8052)
 
 \layout Standard
 
-0x002B
+0x002b
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+...
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+...
+\end_inset 
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+n
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0x0003 + 8*n
 \end_inset 
 </cell>
 </row>
@@ -11140,7 +12102,7 @@ using
  This scheme may be advantageous for small interrupt service routines which
  have low register usage.
 \layout Standard
-
+\added_space_bottom bigskip 
 If the interrupt service routine is defined to be using a specific register
  bank then only 
 \emph on 
@@ -11148,16 +12110,31 @@ a, b, dptr
 \emph default 
  & psw are saved and restored, if such an interrupt service routine calls
  another function (using another register bank) then the entire register
- bank of the called function will be saved on the stack.
+ bank of the called function will be saved on the stack
+\begin_inset LatexCommand \index{stack}
+
+\end_inset 
+
+.
  This scheme is recommended for larger interrupt service routines.
 \layout Subsection
 
-HC08 Interrupt Service Routines
+HC08
+\begin_inset LatexCommand \index{HC08}
+
+\end_inset 
+
+ Interrupt Service Routines
 \layout Standard
+\added_space_bottom bigskip 
+Since the number of interrupts
+\begin_inset LatexCommand \index{HC08!interrupt}
+
+\end_inset 
 
-Since the number of interrupts available is chip specific and the interrupt
- vector table always ends at the last byte of memory, the interrupt numbers
corresponds to the interrupt vectors in reverse order of address.
+ available is chip specific and the interrupt vector table always ends at
+ the last byte of memory, the interrupt numbers corresponds to the interrupt
+ vectors in reverse order of address.
  For example, interrupt 1 will use the interrupt vector at 0xfffc, interrupt
  2 will use the interrupt vector at 0xfffa, and so on.
  However, interrupt 0 (the reset vector at 0xfffe) is not redefinable in
@@ -11172,16 +12149,25 @@ Since the number of interrupts available is chip specific and the interrupt
 Z80 Interrupt Service Routines
 \layout Standard
 
-The Z80 uses several different methods for determining the correct interrupt
+The Z80
+\begin_inset LatexCommand \index{Z80}
+
+\end_inset 
+
+ uses several different methods for determining the correct interrupt
+\begin_inset LatexCommand \index{Z80!interrupt}
+
+\end_inset 
+
  vector depending on the hardware implementation.
  Therefore, SDCC ignores the optional interrupt number and does not attempt
  to generate an interrupt vector table.
 \layout Standard
 
-By default, SDCC generates code for a maskable interrupt, which uses an
RETI instruction to return from the interrupt.
+By default, SDCC generates code for a maskable interrupt, which uses a RETI
+ instruction to return from the interrupt.
  To write an interrupt handler for the non-maskable interrupt, which needs
- an RETN instruction instead, add the 
+ a RETN instruction instead, add the 
 \emph on 
 critical
 \emph default 
@@ -11202,6 +12188,16 @@ void nmi_isr (void) critical interrupt
  
 \newline 
 }
+\layout Standard
+\added_space_bottom bigskip 
+However if you need to create a non-interruptable interrupt service routine
+ you would also require the 
+\emph on 
+critical
+\emph default 
+ keyword.
+ To distinguish between this and an nmi_isr you must provide an interrupt
+ number.
 \layout Section
 
 Enabling and Disabling Interrupts
@@ -11233,7 +12229,7 @@ critical
 
 
 \family typewriter 
-int foo () critical
+int foo () __critical
 \begin_inset LatexCommand \index{critical}
 
 \end_inset 
@@ -11279,7 +12275,7 @@ critical
 
 
 \family typewriter 
-critical{ i++; }
+__critical{ i++; }
 \layout Standard
 
 More than one statement could have been included in the block.
@@ -11434,7 +12430,12 @@ On other architectures which have seperate opcodes for enabling and disabling
 
 \end_inset 
 
- (HC08):
+ (HC08
+\begin_inset LatexCommand \index{HC08!interrupt}
+
+\end_inset 
+
+):
 \layout Verse
 
 
@@ -11708,7 +12709,23 @@ possible exception: if a function is called ONLY from 'interrupt' functions
 \newline 
 
 \emph on 
-(pending: I don't think this has been done yet)
+(pending: Note, nowadays the 
+\emph default 
+using
+\emph on 
+ attribute has an effect on
+\emph default 
+\emph on 
+the generated code for a 
+\emph default 
+non-interrupt
+\emph on 
+ function
+\emph default 
+.
+\emph on 
+)
 \layout Standard
 
 An 
@@ -11748,7 +12765,7 @@ used
  own: I suggest using the default bank zero and taking the small performance
  hit.
 \layout Standard
-
+\added_space_bottom bigskip 
 It is most efficient if your ISR calls no other functions.
  If your ISR must call other functions, it is most efficient if those functions
  use the same bank as the ISR (see note 1 below); the next best is if the
@@ -11816,7 +12833,12 @@ _sdcc_external_startup()
 \end_inset 
 
  memory has to be explicitly enabled before it can be accessed or if the
- watchdog needs to be disabled, this is the place to do it.
+ watchdog
+\begin_inset LatexCommand \index{watchdog}
+
+\end_inset 
+
+ needs to be disabled, this is the place to do it.
  The startup code clears all internal data memory, 256 bytes by default,
  but from 0 to n-1 if 
 \emph on 
  is used.
  (recommended for Chipcon CC1010).
 \layout Standard
-
-See also the compiler option 
+\added_space_bottom bigskip 
+See also the compiler options 
 \emph on 
 -
 \begin_inset ERT
@@ -11864,7 +12886,26 @@ opt
 
 \end_inset 
 
- and section 
+, 
+\emph on 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-main-return
+\emph default 
+
+\begin_inset LatexCommand \index{-\/-main-return}
+
+\end_inset 
+
+and section 
 \begin_inset LatexCommand \ref{sub:MCS51-variants}
 
 \end_inset 
@@ -11875,15 +12916,25 @@ about MCS51-variants.
 
 HC08 Startup Code
 \layout Standard
+\added_space_bottom bigskip 
+The HC08
+\begin_inset LatexCommand \index{HC08}
+
+\end_inset 
 
-The HC08 startup code follows the same scheme as the MCS51 startup code.
+ startup code follows the same scheme as the MCS51 startup code.
 \layout Subsection
 
 Z80 Startup Code
 \layout Standard
+\added_space_bottom bigskip 
+On the Z80
+\begin_inset LatexCommand \index{Z80}
 
-On the Z80 the startup code is inserted by linking with crt0.o which is generated
- from sdcc/device/lib/z80/crt0.s.
+\end_inset 
+
+ the startup code is inserted by linking with crt0.o which is generated from
+ sdcc/device/lib/z80/crt0.s.
  If you need a different startup code you can use the compiler option 
 \emph on 
 -
@@ -11939,7 +12990,7 @@ Starting from a small snippet of c-code this example shows for the MCS51
 
 \family typewriter 
 \size footnotesize 
-unsigned char far
+unsigned char __far
 \begin_inset LatexCommand \index{far (storage class)}
 
 \end_inset 
@@ -11949,7 +13000,7 @@ unsigned char far
 
 \end_inset 
 
- at
__at
 \begin_inset LatexCommand \index{at}
 
 \end_inset 
@@ -11959,14 +13010,92 @@ unsigned char far
 
 \end_inset 
 
- 0x7f00 buf[0x100];
+(0x7f00) buf[0x100];
 \begin_inset LatexCommand \index{Aligned array}
 
 \end_inset 
 
 
 \newline 
-unsigned char head,tail;
+unsigned char head, tail;\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/* if interrupts
+\begin_inset LatexCommand \index{interrupt}
+
+\end_inset 
+
+ are involved see
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+section 
+\begin_inset LatexCommand \ref{sub:Common-interrupt-pitfall-volatile}
+
+\end_inset 
+
+ about
+\series bold 
+ volatile
+\series default 
+ */
 \newline 
 
 \newline 
@@ -11978,7 +13107,34 @@ void to_buffer( unsigned char c )
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-if( head != tail-1 ) 
+if( head != (unsigned char)(tail-1) )\SpecialChar ~
+/* cast 
+\series bold 
+needed
+\series default 
+ to avoid promotion
+\begin_inset LatexCommand \index{promotion to signed int}
+
+\end_inset 
+
+
+\begin_inset LatexCommand \index{type promotion}
+
+\end_inset 
+
+ to integer */
+\begin_inset Marginal
+collapsed true
+
+\layout Standard
+
+
+\series bold 
+\SpecialChar ~
+!
+\end_inset 
+
+
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -11992,6 +13148,18 @@ buf[ head++ ] = c;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
 /* access to a 256 byte aligned array */
 \newline 
 } 
@@ -12062,7 +13230,22 @@ mov\SpecialChar ~
 \SpecialChar ~
 r2,dpl 
 \newline 
-;buffer.c if( head != tail-1 ) 
+;buffer.c if( head != (unsigned char)(tail-1) ) \SpecialChar ~
+/* cast 
+\series bold 
+needed
+\series default 
+ to avoid promotion
+\begin_inset LatexCommand \index{promotion to signed int}
+
+\end_inset 
+
+
+\begin_inset LatexCommand \index{type promotion}
+
+\end_inset 
+
+ to integer */
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -12199,9 +13382,9 @@ The new file buffer.c should compile with only one warning about the unreference
 
 \family typewriter 
 \size footnotesize 
-unsigned char far at 0x7f00 buf[0x100];
+unsigned char __far __at(0x7f00) buf[0x100];
 \newline 
-unsigned char head,tail;
+unsigned char head, tail;
 \newline 
 #define USE_ASSEMBLY (1)
 \newline 
@@ -12219,7 +13402,7 @@ void to_buffer( unsigned char c )
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-if( head != tail-1 )
+if( head != (unsigned char)(tail-1) )
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -12287,7 +13470,7 @@ _asm
 ; If we were still using r2,r3 we would have to push them here.
  
 \newline 
-; if( head != tail-1 )
+; if( head != (unsigned char)(tail-1) )
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -12464,13 +13647,8 @@ _endasm
 \layout Standard
 
 The inline assembler code can contain any valid code understood by the assembler
-, this includes any assembler directives and comment lines
-\begin_inset Foot
-collapsed false
-
-\layout Standard
-
-The assembler does not like some characters like ':' or ''' in comments.
+, this includes any assembler directives and comment lines.
+ The assembler does not like some characters like ':' or ''' in comments.
  You'll find an 100+ pages assembler manual in sdcc/as/doc/asxhtm.html
 \begin_inset LatexCommand \index{asXXXX (as-gbz80, as-hc08, asx8051, as-z80)}
 
@@ -12481,11 +13659,16 @@ The assembler does not like some characters like ':' or ''' in comments.
 
 \end_inset 
 
+ or online at 
+\begin_inset LatexCommand \url{http://svn.sourceforge.net/viewvc/*checkout*/sdcc/trunk/sdcc/as/doc/asxhtm.html}
 
 \end_inset 
 
+\SpecialChar ~
 .
- The compiler does not do any validation of the code within the 
+\layout Standard
+
+The compiler does not do any validation of the code within the 
 \family typewriter 
 _asm
 \begin_inset LatexCommand \index{\_asm}
@@ -12630,7 +13813,7 @@ volatile
 \newline 
 
 \newline 
-void simpleInterrupt(void) interrupt
+void simpleInterrupt(void) __interrupt
 \begin_inset LatexCommand \index{interrupt}
 
 \end_inset 
@@ -12640,7 +13823,7 @@ void simpleInterrupt(void) interrupt
 
 \end_inset 
 
- 1
+ (1)
 \newline 
 {
 \newline 
@@ -12654,7 +13837,7 @@ counter++;
 \newline 
 
 \newline 
-void nakedInterrupt(void) interrupt 2 _naked
+void nakedInterrupt(void) __interrupt (2) __naked
 \newline 
 {
 \newline 
@@ -12723,6 +13906,20 @@ For an 8051 target, the generated simpleInterrupt looks like:
 
 
 \family typewriter 
+Note, this is an 
+\emph on 
+outdated
+\emph default 
+ example, recent versions of SDCC generate
+\newline 
+the 
+\emph on 
+same
+\emph default 
+ code for simpleInterrupt() and nakedInterrupt()!
+\newline 
+
+\newline 
 _simpleInterrupt:
 \newline 
 \SpecialChar ~
@@ -13562,7 +14759,7 @@ pop  _bp
 \SpecialChar ~
 ret
 \layout Standard
-
+\added_space_bottom bigskip 
 The compiling and linking procedure remains the same, however note the extra
  entry & exit linkage required for the assembler code, _bp is the stack
  frame pointer and is used to compute the offset into the stack for parameters
@@ -13597,8 +14794,8 @@ For signed & unsigned int (16 bit) and long (32 bit) variables, division,
 \begin_inset  Tabular
 <lyxtabular version="3" rows="11" columns="2">
 <features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<column alignment="left" valignment="top" leftline="true" width="0">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -13878,9 +15075,9 @@ Floating Point Support
 
 \layout Standard
 
-SDCC supports IEEE (single precision 4 bytes) floating point numbers.The
- floating point support routines are derived from gcc's floatlib.c and consist
- of the following routines:
+SDCC supports IEEE (single precision 4 bytes) floating point numbers.
+ The floating point support routines are derived from gcc's floatlib.c and
consist of the following routines:
 \newline 
 
 \layout Standard
@@ -13891,8 +15088,8 @@ SDCC supports IEEE (single precision 4 bytes) floating point numbers.The
 \begin_inset  Tabular
 <lyxtabular version="3" rows="17" columns="2">
 <features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<column alignment="left" valignment="top" leftline="true" width="0">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -14513,7 +15710,7 @@ convert long to floating point number
 \newline 
 
 \layout Standard
-
+\added_space_bottom bigskip 
 These support routines are developed in ANSI-C so there is room for space
  and speed improvement
 \begin_inset Foot
@@ -14521,7 +15718,12 @@ collapsed false
 
 \layout Standard
 
-The floating point routines for the mcs51 are implemented in assembler
+These floating point routines (
+\emph on 
+not
+\emph default 
+ sinf(), cosf(), ...) for the mcs51 are implemented in assembler.
 \end_inset 
 
 .
@@ -14584,6 +15786,19 @@ putchar()
  routines.
  SDCC does not know whether the system connects to a serial line with or
  without handshake, LCD, keyboard or other device.
+ And whether a 
+\family typewriter 
+lf
+\family default 
+ to 
+\family typewriter 
+crlf
+\family default 
+ conversion within 
+\family typewriter 
+putchar()
+\family default 
+ is intended.
  You'll find examples for serial routines f.e.
  in sdcc/device/lib.
 \layout Standard
@@ -14624,7 +15839,7 @@ DUSE_FLOATS=1
  on the command line.
  Use
 \emph on 
--
+ -
 \begin_inset ERT
 status Collapsed
 
@@ -14671,33 +15886,134 @@ printf_tiny()
 
 
 \family default 
- and 
(subset of printf using less than 270 bytes) and 
 \family typewriter 
 printf_fast()
 \begin_inset LatexCommand \index{printf\_fast() (mcs51)}
 
 \end_inset 
 
-\family default 
-and
-\family typewriter 
- printf_fast_f()
-\begin_inset LatexCommand \index{printf\_fast\_f() (mcs51)}
+\family default 
+and
+\family typewriter 
+ printf_fast_f()
+\begin_inset LatexCommand \index{printf\_fast\_f() (mcs51)}
+
+\end_inset 
+
+
+\family default 
+ (floating-point aware version of printf_fast) which should fit the requirements
+ of many embedded systems (printf_fast() can be customized by unsetting
+ #defines to 
+\emph on 
+not
+\emph default 
+ support long variables and field widths).
+\layout Subsubsection
+
+<malloc.h>
+\begin_inset LatexCommand \index{malloc.h}
+
+\end_inset 
+
+
+\layout Standard
+
+Before using dynamic
+\begin_inset LatexCommand \index{dynamic}
+
+\end_inset 
+
+ memory allocation with SDCC, you have to provide heap
+\begin_inset LatexCommand \index{heap}
+
+\end_inset 
+
+ space for malloc to allocate memory from
+\family typewriter 
+.
+\family default 
+You can acomplish this by including the following code into your source:
+\layout Verse
+
+
+\family typewriter 
+#include <malloc.h>
+\begin_inset LatexCommand \index{malloc.h}
+
+\end_inset 
+
+ /* calloc
+\begin_inset LatexCommand \index{calloc}
+
+\end_inset 
+
+, malloc
+\begin_inset LatexCommand \index{malloc}
+
+\end_inset 
+
+, realloc
+\begin_inset LatexCommand \index{realloc}
 
 \end_inset 
 
+, and free
+\begin_inset LatexCommand \index{free}
+
+\end_inset 
+
+ */ 
+\newline 
+
+\newline 
+#define HEAPSIZE 0x1000 /* Adjust depending on available memory */ 
+\newline 
+unsigned char xdata myheap[HEAPSIZE]; /* The actual heap for dynamic memory
+ */ 
+\newline 
+
+\newline 
+void main (void) 
+\newline 
+{ 
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/* Your variable declarations come here*/
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+...
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+init_dynamic_memory((MEMHEADER xdata *)myheap, HEAPSIZE);
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+...
+ /* Rest of your code*/
+\newline 
+} 
+\newline 
 
-\family default 
- which should fit the requirements of many embedded systems (printf_fast()
- can be customized by unsetting #defines to 
-\emph on 
-not
-\emph default 
- support long variables and field widths).
 \layout Subsection
 
-Math functions (sin, pow, sqrt etc.)
+Math functions (sinf, powf, sqrtf etc.)
+\layout Subsubsection
+
+<math.h>
+\layout Standard
+
+See definitions in file <math.h>.
 \layout Subsection
 
 Other libraries
@@ -14745,7 +16061,9 @@ C, CAN, Ethernet, Profibus, Modbus, USB, SPI, JTAG ...), Media (IDE, Memory
 
 \SpecialChar ~
 would certainly like to hear about it.
- Programmers coding for embedded systems are not especially famous for being
+\layout Standard
+\added_space_bottom bigskip 
+Programmers coding for embedded systems are not especially famous for being
  enthusiastic, so don't expect a big hurray but as the mailing list is searchabl
 e these references are very valuable.
  Let's help to create a climate where information is shared.
@@ -15002,6 +16320,11 @@ status Collapsed
 \layout Section
 
 Pragmas
+\begin_inset LatexCommand \label{sec:Pragmas}
+
+\end_inset 
+
+
 \begin_inset LatexCommand \index{Pragmas}
 
 \end_inset 
@@ -15012,17 +16335,25 @@ Pragmas
 SDCC supports the following #pragma directives:
 \layout Itemize
 
+
+\series bold 
 save
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma save}
 
 \end_inset 
 
- - this will save all current options to the save/restore stack.
+ - this will save most current options to the save/restore stack.
  See #pragma\SpecialChar ~
 restore.
 \layout Itemize
 
+
+\series bold 
 restore
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma restore}
 
 \end_inset 
@@ -15037,7 +16368,11 @@ save.
 
 \layout Itemize
 
+
+\series bold 
 callee_saves
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma callee\_saves}
 
 \end_inset 
@@ -15083,7 +16418,11 @@ callee_saves
  is appended to the list of functions specified in the command line.
 \layout Itemize
 
+
+\series bold 
 exclude
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma exclude}
 
 \end_inset 
@@ -15135,7 +16474,11 @@ none
 .
 \layout Itemize
 
+
+\series bold 
 less_pedantic
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma less\_pedantic}
 
 \end_inset 
@@ -15144,7 +16487,11 @@ less_pedantic
  your own now ;-(
 \layout Itemize
 
-disable_warning <nnnn>
+
+\series bold 
+disable_warning
+\series default 
+ <nnnn>
 \begin_inset LatexCommand \index{\#pragma disable\_warning}
 
 \end_inset 
@@ -15152,7 +16499,11 @@ disable_warning <nnnn>
  - the compiler will not warn you anymore about warning number <nnnn>.
 \layout Itemize
 
+
+\series bold 
 nogcse
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma nogcse}
 
 \end_inset 
@@ -15160,7 +16511,11 @@ nogcse
  - will stop global common subexpression elimination.
 \layout Itemize
 
+
+\series bold 
 noinduction
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma noinduction}
 
 \end_inset 
@@ -15168,7 +16523,11 @@ noinduction
  - will stop loop induction optimizations.
 \layout Itemize
 
+
+\series bold 
 noinvariant
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma noinvariant}
 
 \end_inset 
@@ -15182,7 +16541,11 @@ noinvariant
 .
 \layout Itemize
 
+
+\series bold 
 noiv
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma noiv}
 
 \end_inset 
@@ -15207,7 +16570,11 @@ noiv
 about interrupts.
 \layout Itemize
 
+
+\series bold 
 nojtbound
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma nojtbound}
 
 \end_inset 
@@ -15222,7 +16589,11 @@ nojtbound
 .
 \layout Itemize
 
+
+\series bold 
 noloopreverse
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma noloopreverse}
 
 \end_inset 
@@ -15230,7 +16601,11 @@ noloopreverse
  - Will not do loop reversal optimization
 \layout Itemize
 
+
+\series bold 
 nooverlay
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma nooverlay}
 
 \end_inset 
@@ -15239,7 +16614,11 @@ nooverlay
  function.
 \layout Itemize
 
+
+\series bold 
 stackauto
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma stackauto}
 
 \end_inset 
@@ -15267,25 +16646,39 @@ status Collapsed
  Parameters and Local Variables.
 \layout Itemize
 
-opt_code_speed 
+
+\series bold 
+opt_code_speed
+\series default 
 \begin_inset LatexCommand \index{\#pragma opt\_code\_speed}
 
 \end_inset 
 
 - The compiler will optimize code generation towards fast code, possibly
  at the expense of code size.
+ Currently this has little effect.
 \layout Itemize
 
-opt_code_size 
+
+\series bold 
+opt_code_size
+\series default 
 \begin_inset LatexCommand \index{\#pragma opt\_code\_size}
 
 \end_inset 
 
 - The compiler will optimize code generation towards compact code, possibly
  at the expense of code speed.
+ Currently this has little effect.
 \layout Itemize
 
-opt_code_balanced 
+
+\series bold 
+opt_code_balanced
+\series default 
 \begin_inset LatexCommand \index{\#pragma opt\_code\_balanced}
 
 \end_inset 
@@ -15296,7 +16689,11 @@ opt_code_balanced
  
 \layout Itemize
 
-std_sdcc89 
+
+\series bold 
+std_sdcc89
+\series default 
 \begin_inset LatexCommand \index{\#pragma std\_sdcc89}
 
 \end_inset 
@@ -15305,7 +16702,11 @@ std_sdcc89
  with the standard (default).
 \layout Itemize
 
-std_c89 
+
+\series bold 
+std_c89
+\series default 
 \begin_inset LatexCommand \index{\#pragma std\_c89}
 
 \end_inset 
@@ -15314,7 +16715,11 @@ std_c89
  standard.
 \layout Itemize
 
-std_sdcc99 
+
+\series bold 
+std_sdcc99
+\series default 
 \begin_inset LatexCommand \index{\#pragma std\_sdcc99}
 
 \end_inset 
@@ -15323,7 +16728,11 @@ std_sdcc99
  with the standard (incomplete support).
 \layout Itemize
 
-std_c99 
+
+\series bold 
+std_c99
+\series default 
 \begin_inset LatexCommand \index{\#pragma std\_c99}
 
 \end_inset 
@@ -15332,34 +16741,135 @@ std_c99
  standard (incomplete support).
 \layout Itemize
 
-codeseg <name>
+
+\series bold 
+codeseg
+\series default 
+ <name>
 \begin_inset LatexCommand \index{\#pragma codeseg}
 
 \end_inset 
 
 - Use this name (max.
  8 characters) for the code segment.
+ See option -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-codeseg.
 \layout Itemize
 
-constseg <name>
+
+\series bold 
+constseg
+\series default 
+ <name>
 \begin_inset LatexCommand \index{\#pragma constseg}
 
 \end_inset 
 
 - Use this name (max.
  8 characters) for the const segment.
+ See option -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-constseg.
 \layout Standard
 
-SDCPP supports the following #pragma directives:
+The preprocessor SDCPP
+\begin_inset LatexCommand \index{sdcpp (preprocessor)}
+
+\end_inset 
+
+ supports the following #pragma directives:
 \layout Itemize
 
+
+\series bold 
 preproc_asm
+\series default 
+
 \begin_inset LatexCommand \index{\#pragma preproc\_asm}
 
 \end_inset 
 
  (+ | -) - switch _asm _endasm block preprocessing on / off.
  Default is on.
+ You use this prama to define multilines of assembly code.
+ This will prevent the preprocessor from changing the formating required
+ by assembly code.
+ Below is an example on how to use this pragma.
+\layout Verse
+
+
+\family typewriter 
+#pragma preproc_asm -
+\begin_inset LatexCommand \index{\#pragma preproc\_asm}
+
+\end_inset 
+
+
+\newline 
+#define MYDELAY _asm
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+nop ;my assembly comment...
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+nop
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+nop
+\newline 
+_endasm
+\newline 
+#pragma preproc_asm +
+\newline 
+
+\newline 
+void foo (void) 
+\newline 
+{ 
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+ ...
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+ MYDELAY;
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+ ...
+\newline 
+} 
+\newline 
+
 \layout Standard
 
 The pragma's are intended to be used to turn-on or off certain optimizations
@@ -15438,6 +16948,12 @@ int foo ()
 The compiler will generate a warning message when extra space is allocated.
  It is strongly recommended that the save and restore pragma's be used when
  changing options for a function.
+\newline 
+
+\newline 
+
+\newline 
+
 \layout Section
 
 Defines Created by the Compiler
@@ -15462,8 +16978,8 @@ The compiler creates the following #defines
 \begin_inset  Tabular
 <lyxtabular version="3" rows="11" columns="2">
 <features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<column alignment="left" valignment="top" leftline="true" width="3in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="3in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -15505,7 +17021,9 @@ SDCC
 
 \layout Standard
 
-this Symbol is always defined
+Always defined.
+ Since version 2.5.6 the version number as an int (ex.
+ 256)
 \end_inset 
 </cell>
 </row>
@@ -15530,7 +17048,7 @@ SDCC_mcs51
 
 \end_inset 
 
-, etc
+, etc.
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -15538,7 +17056,7 @@ SDCC_mcs51
 
 \layout Standard
 
-depending on the model used (e.g.: -mds390
+depending on the model used (e.g.: -mds390)
 \end_inset 
 </cell>
 </row>
@@ -15894,17 +17412,17 @@ sfr
 
 
 \family typewriter 
-sfr at 0x92 _XPAGE; /* Cypress EZ-USB family */
+__sfr __at (0x92) _XPAGE; /* Cypress EZ-USB family */
 \layout Verse
 
 
 \family typewriter 
-sfr at 0xaf _XPAGE; /* some Silicon Labs (Cygnal) chips */
+__sfr __at (0xaf) _XPAGE; /* some Silicon Labs (Cygnal) chips */
 \layout Verse
 
 
 \family typewriter 
-sfr at 0xaa _XPAGE; /* some Silicon Labs (Cygnal) chips */
+__sfr __at (0xaa) _XPAGE; /* some Silicon Labs (Cygnal) chips */
 \layout Standard
 
 For more exotic implementations further customizations may be needed.
@@ -15918,7 +17436,7 @@ For more exotic implementations further customizations may be needed.
 
 Other Features available by SFR
 \layout Standard
-
+\added_space_bottom bigskip 
 Some MCS51 variants offer features like Double DPTR
 \begin_inset LatexCommand \index{DPTR}
 
@@ -15932,8 +17450,18 @@ Some MCS51 variants offer features like Double DPTR
 
 DS400 port
 \layout Standard
+\added_space_bottom bigskip 
+The DS80C400
+\begin_inset LatexCommand \index{DS80C400}
+
+\end_inset 
+
+
+\begin_inset LatexCommand \index{DS400}
+
+\end_inset 
 
-The DS80C400 microcontroller has a rich set of peripherals.
+ microcontroller has a rich set of peripherals.
  In its built-in ROM library it includes functions to access some of the
  features, among them is a TCP stack with IP4 and IP6 support.
  Library headers (currently in beta status) and other files are provided
@@ -15951,7 +17479,7 @@ The DS80C400 microcontroller has a rich set of peripherals.
 The Z80 and gbz80 port
 \layout Standard
 
-SDCC can target both the Zilog 
+SDCC can target both the Zilog Z80
 \begin_inset LatexCommand \index{Z80}
 
 \end_inset 
@@ -15975,11 +17503,11 @@ regressions tests
  variables and bitfield support is fine.
  See mailing lists and forums about interrupt routines.
 \layout Standard
-
+\added_space_bottom bigskip 
 As always, the code is the authoritative reference - see z80/ralloc.c and
  z80/gen.c.
  The stack
-\begin_inset LatexCommand \index{stack}
+\begin_inset LatexCommand \index{Z80!stack}
 
 \end_inset 
 
@@ -15987,7 +17515,7 @@ As always, the code is the authoritative reference - see z80/ralloc.c and
  IX is used as the base pointer, HL and IY are used as a temporary registers,
  and BC and DE are available for holding variables.
  Return values
-\begin_inset LatexCommand \index{return value}
+\begin_inset LatexCommand \index{Z80!return value}
 
 \end_inset 
 
@@ -16000,7 +17528,7 @@ As always, the code is the authoritative reference - see z80/ralloc.c and
 
 The HC08 port
 \layout Standard
-
+\added_space_bottom bigskip 
 The port to the Motorola HC08
 \begin_inset LatexCommand \index{HC08}
 
@@ -16012,12 +17540,8 @@ The port to the Motorola HC08
  unoptimized.
  Some of the SDCC's standard C library functions have embedded non-HC08
  inline assembly and so are not yet usable.
-\newline 
-
-\newline 
-
 \layout Section
-
+\pagebreak_top 
 The PIC14 port
 \layout Standard
 
@@ -16081,15 +17605,19 @@ For devices that have multiple code pages it is more efficient to use the
 Creating a device include file 
 \layout Standard
 
-For generating a device include file use the support perl script inc2h.pl
- kept in directory support/script.
+For generating a device include file
+\begin_inset LatexCommand \index{PIC14!Header files}
+
+\end_inset 
+
+ use the support perl script inc2h.pl kept in directory support/script.
 \layout Subsection
 
 Interrupt code
 \layout Standard
 
 For the interrupt function, use the keyword 'interrupt'
-\begin_inset LatexCommand \index{interrupt}
+\begin_inset LatexCommand \index{PIC14!interrupt}
 
 \end_inset 
 
@@ -16259,7 +17787,12 @@ status Collapsed
 /
 \end_inset 
 
--debug-extra emit debug info in assembly output
+-debug-extra
+\begin_inset LatexCommand \index{PIC14!Options!-\/-debug-extra}
+
+\end_inset 
+
+ emit debug info in assembly output
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -16273,7 +17806,12 @@ status Collapsed
 /
 \end_inset 
 
--no-pcode-opt disable (slightly faulty) optimization on pCode
+-no-pcode-opt
+\begin_inset LatexCommand \index{PIC14!Options!-\/-no-pcode-opt}
+
+\end_inset 
+
+ disable (slightly faulty) optimization on pCode
 \layout Subsection
 
 The library
@@ -16320,7 +17858,12 @@ XXX
 \layout Standard
 
 This warning can usually be ignored due to the very good compatibility amongst
- 14 bit PIC devices.
+ 14 bit PIC
+\begin_inset LatexCommand \index{PIC14}
+
+\end_inset 
+
+ devices.
 \layout Standard
 
 You might also consider recompiling the library for your specific device
@@ -16354,8 +17897,23 @@ main()
 not
 \series default 
  be initialized.
-\layout Section
+\family typewriter 
+\size footnotesize 
+
+\begin_inset Marginal
+collapsed true
+
+\layout Standard
+
+
+\series bold 
+\SpecialChar ~
+!
+\end_inset 
 
+
+\layout Section
+\pagebreak_top 
 The PIC16
 \begin_inset LatexCommand \index{PIC16}
 
@@ -16613,7 +18171,12 @@ status Collapsed
 /
 \end_inset 
 
--callee-saves See -
+-callee-saves
+\begin_inset LatexCommand \index{PIC16!Options!-\/-callee-saves}
+
+\end_inset 
+
+ See -
 \begin_inset ERT
 status Collapsed
 
@@ -16637,7 +18200,12 @@ status Collapsed
 /
 \end_inset 
 
--all-callee-saves All function arguments are passed on stack by default.
+-all-callee-saves
+\begin_inset LatexCommand \index{PIC16!Options!-\/-all-callee-saves}
+
+\end_inset 
+
+ All function arguments are passed on stack by default.
  
 \emph on 
 There is no need to specify this in the command line.
@@ -16654,8 +18222,12 @@ status Collapsed
 /
 \end_inset 
 
--fommit-frame-pointer Frame pointer will be omitted when the function uses
- no local variables.
+-fommit-frame-pointer
+\begin_inset LatexCommand \index{PIC16!Options!-\/-fommit-frame-pointer}
+
+\end_inset 
+
+ Frame pointer will be omitted when the function uses no local variables.
 \layout Subsection
 
 Port Specific Options
@@ -16783,7 +18355,12 @@ status Collapsed
 /
 \end_inset 
 
--mplab-comp MPLAB compatibility option.
+-mplab-comp MPLAB
+\begin_inset LatexCommand \index{PIC16!MPLAB}
+
+\end_inset 
+
+ compatibility option.
  Currently only suppresses special gpasm directives.
 \layout Subsubsection
 
@@ -17058,8 +18635,12 @@ NO_REG_OPT do not perform pCode registers optimization.
 Preprocessor Macros
 \layout Standard
 
-PIC16 port defines the following preprocessor macros while translating a
- source.
+PIC16
+\begin_inset LatexCommand \index{PIC16}
+
+\end_inset 
+
+ port defines the following preprocessor macros while translating a source.
 \layout Standard
 \align center 
 
@@ -17440,12 +19021,27 @@ Pragmas
 
 \layout Standard
 
-PIC16 port currently supports the following pragmas:
+PIC16
+\begin_inset LatexCommand \index{PIC16}
+
+\end_inset 
+
+ port currently supports the following pragmas:
 \layout List
 \labelwidthstring 00.00.0000
 
-stack pragma stack forces the code generator to initialize the stack & frame
- pointers at a specific address.
+stack
+\begin_inset LatexCommand \index{PIC16!Pragmas!\#pragma stack}
+
+\end_inset 
+
+ pragma stack
+\begin_inset LatexCommand \index{PIC16!stack}
+
+\end_inset 
+
+ forces the code generator to initialize the stack & frame pointers at a
+ specific address.
  This is an adhoc solution for cases where no STACK directive is available
  in the linker script or gplink is not instructed to create a stack section.
 \newline 
@@ -17509,7 +19105,12 @@ This pragma is deprecated.
 \layout List
 \labelwidthstring 00.00.0000
 
-code place a function symbol at static FLASH address
+code
+\begin_inset LatexCommand \index{PIC16!Pragmas!\#pragma code}
+
+\end_inset 
+
+ place a function symbol at static FLASH address
 \layout LyX-Code
 
 Example:
@@ -17867,8 +19468,17 @@ Header Files
 
 \layout Standard
 
-There is one main header file that can be included to the source files using
- the pic16 port.
+There is one main header file
+\begin_inset LatexCommand \index{PIC16!Header files}
+
+\end_inset 
+
+ that can be included to the source files using the pic16
+\begin_inset LatexCommand \index{PIC16}
+
+\end_inset 
+
+ port.
  That file is the 
 \series bold 
 pic18fregs.h
@@ -17890,7 +19500,12 @@ The specific microcontroller is selected within the pic18fregs.h automatically,
 Libraries
 \layout Standard
 
-The libraries that PIC16
+The libraries
+\begin_inset LatexCommand \index{PIC16!Libraries}
+
+\end_inset 
+
+ that PIC16
 \begin_inset LatexCommand \index{PIC16}
 
 \end_inset 
@@ -18107,8 +19722,13 @@ The standard device libraries (see
 Stack
 \layout Standard
 
-The stack implementation for the PIC16 port uses two indirect registers,
- FSR1 and FSR2.
+The stack
+\begin_inset LatexCommand \index{PIC16!stack}
+
+\end_inset 
+
+ implementation for the PIC16 port uses two indirect registers, FSR1 and
+ FSR2.
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -18271,12 +19891,21 @@ These limitations are caused by the fact that only FSRxL is modified when
 Functions
 \layout Standard
 
-In addition to the standard SDCC function keywords, PIC16 port makes available
- two more:
+In addition to the standard SDCC function keywords, PIC16
+\begin_inset LatexCommand \index{PIC16}
+
+\end_inset 
+
+ port makes available two more:
 \layout List
 \labelwidthstring 00.00.0000
 
-wparam Use the WREG to pass one byte of the first function argument.
+wparam
+\begin_inset LatexCommand \index{PIC16!wparam}
+
+\end_inset 
+
+ Use the WREG to pass one byte of the first function argument.
  This improves speed but you may not use this for functions with arguments
  that are called via function pointers, otherwise the first byte of the
  first parameter will get lost.
@@ -18306,9 +19935,14 @@ This keyword replaces the deprecated wparam pragma.
 \layout List
 \labelwidthstring 00.00.0000
 
-shadowregs When entering/exiting an ISR, it is possible to take advantage
- of the PIC18F hardware shadow registers which hold the values of WREG,
- STATUS and BSR registers.
+shadowregs
+\begin_inset LatexCommand \index{PIC16!shadowregs}
+
+\end_inset 
+
+ When entering/exiting an ISR, it is possible to take advantage of the PIC18F
+ hardware shadow registers which hold the values of WREG, STATUS and BSR
+ registers.
  This can be done by adding the keyword 
 \emph on 
 shadowregs
@@ -18472,7 +20106,12 @@ on stack, FSR0 points to the beginning
 Interrupts
 \layout Standard
 
-An interrupt servive routine (ISR) is declared using the 
+An interrupt
+\begin_inset LatexCommand \index{PIC16!interrupt}
+
+\end_inset 
+
+ service routine (ISR) is declared using the 
 \emph on 
 interrupt
 \emph default 
@@ -18789,7 +20428,7 @@ rest of the pointer
 
 \layout Standard
 
-descrption
+description
 \end_inset 
 </cell>
 </row>
@@ -19403,7 +21042,7 @@ void main(void)
 {
 \layout LyX-Code
 
-    stdout = STREAM_USER;    /* this is not necessery, since stdout points
+    stdout = STREAM_USER;    /* this is not necessary, since stdout points
 \layout LyX-Code
 
                               * by default to STREAM_USER */
@@ -19997,7 +21636,12 @@ Here you can find some general tips for compiling programs with SDCC/pic16.
 Stack size
 \layout Standard
 
-The default stack size (that is 64 bytes) probably is enough for many programs.
+The default stack
+\begin_inset LatexCommand \index{PIC16!stack}
+
+\end_inset 
+
+ size (that is 64 bytes) probably is enough for many programs.
  One must take care that when there are many levels of function nesting,
  or there is excessive usage of stack, its size should be extended.
  An example of such a case is the printf/sprintf family of functions.
@@ -20027,13 +21671,269 @@ status Collapsed
  Other ways to reduce stack usage may exist.
 \layout Chapter
 
+Debugging
+\layout Standard
+
+There are several approaches to debugging your code.
+ This chapter is meant to show your options and to give detail on some of
+ them:
+\newline 
+
+\newline 
+When writing your code:
+\layout Itemize
+
+write your code with debugging in mind (avoid duplicating code, put conceptually
+ similar variables into structs, use structured code, have strategic points
+ within your code where all variables are consistent, ...)
+\layout Itemize
+
+run a syntax-checking tool like splint
+\begin_inset LatexCommand \index{splint (syntax checking tool)}
+
+\end_inset 
+
+
+\begin_inset LatexCommand \index{lint (syntax checking tool)}
+
+\end_inset 
+
+ (see -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-more-pedantic 
+\begin_inset LatexCommand \ref{lyx:more-pedantic-SPLINT}
+
+\end_inset 
+
+) over the code.
+\layout Itemize
+
+for the high level code use a C-compiler (like f.e.
+ GCC) to compile run and debug the code on your host.
+ See (see -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-more-pedantic 
+\begin_inset LatexCommand \ref{lyx:more-pedantic-SPLINT}
+
+\end_inset 
+
+ ) on howto handle syntax extensions like __xdata, __at(), ...
+\layout Itemize
+
+use another C-compiler to compile code for your target.
+ Always an option but not recommended:) And not very likely to help you.
+ If you seriously consider walking this path you should at least occasionally
+ check portability of your code.
+ Most commercial compiler vendors will offer an evaluation version so you
+ can test compile your code or snippets of your code.
+\layout Standard
+
+Debugging on a simulator:
+\layout Itemize
+
+there is a separate section about SDCDB (section 
+\begin_inset LatexCommand \ref{cha:Debugging-with-SDCDB}
+
+\end_inset 
+
+) below.
+\layout Itemize
+
+or (8051 specific) use a freeware/commercial simulator which interfaces
+ to the AOMF
+\begin_inset LatexCommand \index{AOMF, AOMF51}
+
+\end_inset 
+
+ file (see 
+\begin_inset LatexCommand \ref{OMF file}
+
+\end_inset 
+
+) optionally generated by SDCC.
+\layout Standard
+
+Debugging On-target: 
+\layout Itemize
+
+use a MCU port pin to serially output debug data to the RS232 port of your
+ host.
+ You'll probably want some level shifting device typically involving a MAX232
+ or similar IC.
+ If the hardware serial port of the MCU is not available search for 'Software
+ UART' in your favourite search machine.
+\layout Itemize
+
+use an on-target monitor.
+ In this context a monitor is a small program which usually accepts commands
+ via a serial line and allows to set program counter, to single step through
+ a program and read/write memory locations.
+ For the 8051 good examples of monitors are paulmon and cmon51 (see section
+\begin_inset LatexCommand \ref{sec:Related-open-source-tools}
+
+\end_inset 
+
+).
+\layout Itemize
+
+toggle MCU port pins at strategic points within your code and use an oscilloscop
+e.
+ A 
+\emph on 
+digital oscilloscope
+\emph default 
+
+\begin_inset LatexCommand \index{Oscilloscope}
+
+\end_inset 
+
+ with deep trace memory is really helpful especially if you have to debug
+ a realtime application.
+ If you need to monitor more pins than your oscilloscope provides you can
+ sometimes get away with a small R-2R network.
+ On a single channel oscilloscope you could f.e.
+ monitor 2 push-pull driven pins by connecting one via a 10\SpecialChar ~
+k
+\begin_inset Formula $\Omega$
+\end_inset 
+
+ resistor and the other one by a 5\SpecialChar ~
+k
+\begin_inset Formula $\Omega$
+\end_inset 
+
+ resistor to the oscilloscope probe (check output drive capability of the
+ pins you want to monitor).
+ If you need to monitor many more pins a 
+\emph on 
+logic analyzer
+\emph default 
+ will be handy.
+\layout Itemize
+
+use an ICE (
+\emph on 
+i
+\emph default 
+n 
+\emph on 
+c
+\emph default 
+ircuit 
+\emph on 
+e
+\emph default 
+mulator
+\begin_inset LatexCommand \index{ICE (in circuit emulator)}
+
+\end_inset 
+
+).
+ Usually very expensive.
+ And very nice to have too.
+ And usually locks you (for years...) to the devices the ICE can emulate.
+\layout Itemize
+
+use a remote debugger.
+ In most 8-bit systems the symbol information is not available on the target,
+ and a complete debugger is too bulky for the target system.
+ Therefore usually a debugger on the host system connects to an on-target
+ debugging stub which accepts only primitive commands.
+\newline 
+Terms to enter into your favourite search engine could be 'remote debugging',
+ 'gdb stub' or 'inferior debugger'.
+ (is there one?)
+\layout Itemize
+
+use an on target hardware debugger.
+ Some of the more modern MCUs include hardware support for setting break
+ points and monitoring/changing variables by using dedicated hardware pins.
+ This facility doesn't require additional code to run on the target and
+\emph on 
+usually
+\emph default 
+ doesn't affect runtime behaviour until a breakpoint is hit.
+ For the mcs51 most hardware debuggers use the AOMF
+\begin_inset LatexCommand \index{AOMF, AOMF51}
+
+\end_inset 
+
+ file (see 
+\begin_inset LatexCommand \ref{OMF file}
+
+\end_inset 
+
+) as input file.
+\layout Standard
+
+Last not least:
+\layout Itemize
+
+if you are not familiar with any of the following terms you're likely to
+ run into problems rather sooner than later: 
+\emph on 
+volatile
+\emph default 
+, 
+\emph on 
+atomic
+\emph default 
+, 
+\emph on 
+memory map
+\emph default 
+, 
+\emph on 
+overlay
+\emph default 
+.
+ As an embedded programmer you 
+\emph on 
+have
+\emph default 
+ to know them so why not look them up 
+\emph on 
+before
+\emph default 
+ you have problems?)
+\layout Itemize
+
+tell someone else about your problem (actually this is a surprisingly effective
+ means to hunt down the bug even if the listener is not familiar with your
+ environment).
+ As 'failure to communicate' is probably one of the job-induced deformations
+ of an embedded programmer this is highly encouraged.
+\layout Section
+
 Debugging with SDCDB
 \begin_inset LatexCommand \label{cha:Debugging-with-SDCDB}
 
 \end_inset 
 
 
-\begin_inset LatexCommand \index{sdcdb (debugger)}
+\begin_inset LatexCommand \index{SDCDB (debugger)}
 
 \end_inset 
 
@@ -20058,8 +21958,7 @@ on, which also builds and installs the debugger in the target directory
  specified during configuration.
  The debugger allows you debug BOTH at the C source and at the ASM source
  level.
- Sdcdb is currently not available on Win32 platforms.
-\layout Section
+\layout Subsection
 
 Compiling for Debugging
 \layout Standard
@@ -20081,7 +21980,7 @@ status Collapsed
 
  option must be specified for all files for which debug information is to
  be generated.
- The complier generates a .adb file for each of these files.
+ The compiler generates a .adb file for each of these files.
  The linker creates the .cdb
 \begin_inset LatexCommand \index{<file>.cdb}
 
@@ -20094,7 +21993,7 @@ status Collapsed
 
  files and the address information.
  This .cdb is used by the debugger.
-\layout Section
+\layout Subsection
 
 How the Debugger Works
 \layout Standard
@@ -20112,7 +22011,7 @@ status Collapsed
 -debug option is specified the compiler generates extra symbol information
  some of which are put into the assembler source and some are put into the
  .adb file.
 Then the linker creates the .cdb file from the individual .adb files with
+ Then the linker creates the .cdb file from the individual .adb files with
  the address information for the symbols.
  The debugger reads the symbolic information generated by the compiler &
  the address information generated by the linker.
@@ -20120,9 +22019,19 @@ status Collapsed
  execution is controlled by the debugger.
  When a command is issued for the debugger, it translates it into appropriate
  commands for the simulator.
-\layout Section
+ (Currently SDCDM only connects to the simulator but 
+\emph on 
+newcdb
+\emph default 
+ at 
+\begin_inset LatexCommand \url{http://ec2drv.sf.net/}
+
+\end_inset 
+
+ is an effort to connect directly to the hardware.) 
+\layout Subsection
 
-Starting the Debugger
+Starting the Debugger SDCDB
 \layout Standard
 
 The debugger can be started using the following command line.
@@ -20155,9 +22064,9 @@ foo.ihx - the Intel hex format
 \end_inset 
 
  object file.
-\layout Section
+\layout Subsection
 
-Command Line Options
+SDCDB Command Line Options
 \layout Itemize
 
 -
@@ -20222,9 +22131,9 @@ status Collapsed
 \layout Itemize
 
 -k <port number> passed to simulator see the simulator docs for details.
-\layout Section
+\layout Subsection
 
-Debugger Commands
+SDCDB Debugger Commands
 \layout Standard
 
 As mentioned earlier the command interface for the debugger has been deliberatel
@@ -20373,9 +22282,9 @@ quit
 "Watch me now.
  Iam going Down.
  My name is Bobby Brown"
-\layout Section
+\layout Subsection
 
-Interfacing with DDD
+Interfacing SDCDB with DDD
 \layout Comment
 
 The screenshot was converted from png to eps with: 
@@ -20391,13 +22300,26 @@ bmeps -c -e8f -p3 ddd_example.png >ddd_example.eps
 \layout Comment
 
 The screenshot was included in sdccman.lyx cvs version 1.120 but later removed
- as this broke the build system on Sourceforge (pdf-file was broken).
+ as this broke the build system on Sourceforge (pdf-file was broken.
+ pdflatex does not accept eps files).
 \layout Standard
 
-The .eps File 
+The 
+\emph on 
+p
+\emph default 
+ortable 
+\emph on 
+n
+\emph default 
+etwork 
+\emph on 
+g
+\emph default 
+raphics File 
 \size footnotesize 
 
-\begin_inset LatexCommand \url{http://cvs.sourceforge.net/viewcvs.py/*checkout*/sdcc/sdcc/doc/figures/ddd_example.eps}
+\begin_inset LatexCommand \url{http://svn.sourceforge.net/viewcvs.cgi/*checkout*/sdcc/trunk/sdcc/doc/figures/ddd_example.png}
 
 \end_inset 
 
@@ -20458,9 +22380,9 @@ and DDD was invoked with
 
 \newline 
 ddd -debugger 'sdcdb -cpu 8032 ddd_example'
-\layout Section
+\layout Subsection
 
-Interfacing with XEmacs
+Interfacing SDCDB with XEmacs
 \begin_inset LatexCommand \index{XEmacs}
 
 \end_inset 
@@ -21318,10 +23240,32 @@ Use the smallest data type to represent your data-value.
  If it is known in advance that the value is going to be less than 256 then
  use an 'unsigned char' instead of a 'short' or 'int'.
  Please note, that ANSI C requires both signed and unsigned chars to be
- promoted to 'signed int' before doing any operation.
+ promoted to 'signed int'
+\begin_inset LatexCommand \index{promotion to signed int}
+
+\end_inset 
+
+
+\begin_inset Marginal
+collapsed true
+
+\layout Standard
+
+
+\series bold 
+\SpecialChar ~
+!
+\end_inset 
+
+ before doing any operation.
  This promotion
 \begin_inset LatexCommand \index{type promotion}
 
+\end_inset 
+
+
+\begin_inset LatexCommand \label{type promotion}
+
 \end_inset 
 
  can be omitted, if the result is the same.
@@ -21399,6 +23343,8 @@ comp.lang.c FAQ
 :
 \layout Quote
 
+
+\emph on 
 If well-defined overflow characteristics are important and negative values
  are not, or if you want to steer clear of sign-extension problems when
  manipulating bits or bytes, use one of the corresponding unsigned types.
@@ -21502,6 +23448,186 @@ feeling
  for the code generation.
 \layout Section
 
+Porting code from or to other compilers
+\begin_inset LatexCommand \label{sec:Porting-code-to-other-compilers}
+
+\end_inset 
+
+
+\layout Itemize
+
+check whether endianness of the compilers differs and adapt where needed.
+\layout Itemize
+
+check the device specific header files
+\begin_inset LatexCommand \index{Header files}
+
+\end_inset 
+
+
+\begin_inset LatexCommand \index{Include files}
+
+\end_inset 
+
+ for compiler specific syntax.
+ Eventually include the file <compiler.h
+\begin_inset LatexCommand \index{compiler.h (include file)}
+
+\end_inset 
+
+> to allow using common header files.
+ (see f.e.
+ cc2510fx.h 
+\begin_inset LatexCommand \url{http://svn.sourceforge.net/viewvc/sdcc/trunk/sdcc/device/include/mcs51/P89c51RD2.h?view=markup}
+
+\end_inset 
+
+).
+\layout Itemize
+
+check whether the startup code contains the correct initialization (watchdog,
+ peripherals).
+\layout Itemize
+
+check whether the sizes of short, int, long match.
+\layout Itemize
+
+check if some 16 or 32 bit hardware registers require a specific addressing
+ order (least significant or most significant byte first) and adapt if needed
+ (
+\emph on 
+first
+\emph default 
+ and 
+\emph on 
+last
+\emph default 
+ relate to time and not to lower/upper memory location here, so this is
+\emph on 
+not
+\emph default 
+ the same as endianness).
+\layout Itemize
+
+check whether the keyword 
+\emph on 
+volatile
+\emph default 
+ is used where needed.
+ The compilers might differ in their optimization characteristics (as different
+ versions of the same compiler might also use more clever optimizations
+ this is good idea anyway).
+ See section 
+\begin_inset LatexCommand \ref{sub:Common-interrupt-pitfall-volatile}
+
+\end_inset 
+
+.
+\layout Itemize
+
+check that the compilers are not told to supress warnings.
+\layout Itemize
+
+check and convert compiler specific extensions (interrupts, memory areas,
+ pragmas etc.).
+\layout Itemize
+
+check for differences in type promotion.
+ Especially check for math operations on 
+\family typewriter 
+char
+\family default 
+ or 
+\family typewriter 
+unsigned char
+\family default 
+ variables.
+ For the sake of C99 compatibility SDCC will probably promote these to 
+\family typewriter 
+int
+\family default 
+ more often than other compilers.
+ Eventually insert explicit casts to 
+\family typewriter 
+(char) 
+\family default 
+or
+\family typewriter 
+ (unsigned char)
+\family default 
+.
+ Also check that the ~\SpecialChar ~
+operator
+\begin_inset LatexCommand \index{\~\/ Operator}
+
+\end_inset 
+
+ is not used on 
+\family typewriter 
+bit
+\begin_inset LatexCommand \index{bit}
+
+\end_inset 
+
+
+\family default 
+ variables, use the !\SpecialChar ~
+operator instead.
+ See sections 
+\begin_inset LatexCommand \ref{type promotion}
+
+\end_inset 
+
+ and 
+\begin_inset LatexCommand \ref{sec:Compatibility-with-previous}
+
+\end_inset 
+
+.
+\layout Itemize
+
+check the assembly code generated for interrupt routines (f.e.
+ for calls to possibly non-reentrant library functions).
+\layout Itemize
+
+check whether timing loops result in proper timing (or preferably consider
+ a rewrite of the code with timer based delays instead).
+\layout Itemize
+
+check for differences in printf parameters (some compilers push (va_arg
+\begin_inset LatexCommand \index{vararg, va\_arg}
+
+\end_inset 
+
+) char variables as 
+\family typewriter 
+int
+\family default 
+ others push them as 
+\family typewriter 
+char
+\family default 
+.
+ See section 
+\begin_inset LatexCommand \ref{sec:Compatibility-with-previous}
+
+\end_inset 
+
+).
+\layout Itemize
+
+check the resulting memory map
+\begin_inset LatexCommand \index{Memory map}
+
+\end_inset 
+
+.
+ Usage of different memory spaces: code, stack, data (for mcs51/ds390 additional
+ly idata, pdata, xdata).
+ Eventually check if unexpected library functions are included.
+\layout Section
+
 Tools
 \begin_inset LatexCommand \index{Tools}
 
@@ -21509,13 +23635,13 @@ Tools
 
  included in the distribution
 \layout Standard
-\align center 
+\align left 
 
 \begin_inset  Tabular
 <lyxtabular version="3" rows="12" columns="3">
 <features>
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0pt">
 <column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -21523,7 +23649,121 @@ Tools
 
 \layout Standard
 
-Name
+Name
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Purpose
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Directory
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+ucSsim
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Simulator for various architectures
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+sdcc/sim/ucsim
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+keil2sdcc.pl
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+header file
+\begin_inset LatexCommand \index{Header files}
+
+\end_inset 
+
+
+\begin_inset LatexCommand \index{Include files}
+
+\end_inset 
+
+ conversion
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+sdcc/support/scripts
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+mh2h.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+header file conversion
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+sdcc/support/scripts
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+as-gbz80
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -21531,7 +23771,7 @@ Name
 
 \layout Standard
 
-Purpose
+Assembler
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21539,7 +23779,16 @@ Purpose
 
 \layout Standard
 
-Directory
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+sdcc/bin
 \end_inset 
 </cell>
 </row>
@@ -21549,7 +23798,7 @@ Directory
 
 \layout Standard
 
-uCsim
+as-z80
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -21557,7 +23806,7 @@ uCsim
 
 \layout Standard
 
-Simulator for various architectures
+Assembler
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21565,7 +23814,16 @@ Simulator for various architectures
 
 \layout Standard
 
-sdcc/sim/ucsim
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+sdcc/bin
 \end_inset 
 </cell>
 </row>
@@ -21575,7 +23833,7 @@ sdcc/sim/ucsim
 
 \layout Standard
 
-keil2sdcc.pl
+asx8051
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -21583,7 +23841,7 @@ keil2sdcc.pl
 
 \layout Standard
 
-header file conversion
+Assembler
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21591,7 +23849,16 @@ header file conversion
 
 \layout Standard
 
-sdcc/support/scripts
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+sdcc/bin
 \end_inset 
 </cell>
 </row>
@@ -21601,7 +23868,7 @@ sdcc/support/scripts
 
 \layout Standard
 
-mh2h.c
+SDCDB
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -21609,7 +23876,7 @@ mh2h.c
 
 \layout Standard
 
-header file conversion
+Simulator
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21617,7 +23884,16 @@ header file conversion
 
 \layout Standard
 
-sdcc/support/scripts
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+sdcc/bin
 \end_inset 
 </cell>
 </row>
@@ -21627,7 +23903,7 @@ sdcc/support/scripts
 
 \layout Standard
 
-as-gbz80
+aslink
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -21635,7 +23911,7 @@ as-gbz80
 
 \layout Standard
 
-Assembler
+Linker
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21662,7 +23938,7 @@ sdcc/bin
 
 \layout Standard
 
-as-z80
+link-z80
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -21670,7 +23946,7 @@ as-z80
 
 \layout Standard
 
-Assembler
+Linker
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21697,7 +23973,7 @@ sdcc/bin
 
 \layout Standard
 
-asx8051
+link-gbz80
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -21705,7 +23981,7 @@ asx8051
 
 \layout Standard
 
-Assembler
+Linker
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21726,13 +24002,13 @@ sdcc/bin
 \end_inset 
 </cell>
 </row>
-<row topline="true">
+<row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-sdcdb
+packihx
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -21740,7 +24016,12 @@ sdcdb
 
 \layout Standard
 
-Simulator
+Intel Hex packer 
+\begin_inset LatexCommand \index{packihx (tool)}
+
+\end_inset 
+
+
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21761,21 +24042,54 @@ sdcc/bin
 \end_inset 
 </cell>
 </row>
-<row topline="true">
+</lyxtabular>
+
+\end_inset 
+
+
+\newline 
+
+\layout Section
+
+Documentation
+\begin_inset LatexCommand \index{Documentation}
+
+\end_inset 
+
+ included in the distribution
+\layout Standard
+\align left 
+
+\begin_inset  Tabular
+<lyxtabular version="3" rows="10" columns="2">
+<features>
+<column alignment="left" valignment="top" leftline="true" width="0">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-aslink
+Subject / Title
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Where to get / filename
 \end_inset 
 </cell>
+</row>
+<row topline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-Linker
+SDCC Compiler User Guide
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21783,16 +24097,25 @@ Linker
 
 \layout Standard
 
+You're reading it right now
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
-\family roman 
-\series medium 
-\shape up 
-\size normal 
-\emph off 
-\bar no 
-\noun off 
-\color none
-sdcc/bin
+\layout Standard
+
+Changelog of SDCC
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+sdcc/Changelog
 \end_inset 
 </cell>
 </row>
@@ -21802,15 +24125,50 @@ sdcc/bin
 
 \layout Standard
 
-link-z80
+ASXXXX
+\begin_inset LatexCommand \index{asXXXX (as-gbz80, as-hc08, asx8051, as-z80)}
+
+\end_inset 
+
+
+\begin_inset LatexCommand \index{Assembler documentation}
+
+\end_inset 
+
+ Assemblers and ASLINK
+\begin_inset LatexCommand \index{aslink}
+
+\end_inset 
+
+
+\begin_inset LatexCommand \index{Linker documentation}
+
+\end_inset 
+
+ Relocating Linker
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+sdcc/as/doc/asxhtm.html
 \end_inset 
 </cell>
+</row>
+<row topline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-Linker
+SDCC regression test
+\begin_inset LatexCommand \index{Regression test}
+
+\end_inset 
+
+
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21818,16 +24176,25 @@ Linker
 
 \layout Standard
 
+sdcc/doc/test_suite_spec.pdf
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Various notes
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
-\family roman 
-\series medium 
-\shape up 
-\size normal 
-\emph off 
-\bar no 
-\noun off 
-\color none
-sdcc/bin
+\layout Standard
+
+sdcc/doc/*
 \end_inset 
 </cell>
 </row>
@@ -21837,15 +24204,30 @@ sdcc/bin
 
 \layout Standard
 
-link-gbz80
+Notes on debugging with SDCDB
+\begin_inset LatexCommand \index{SDCDB (debugger)}
+
+\end_inset 
+
+
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+sdcc/debugger/README
 \end_inset 
 </cell>
+</row>
+<row topline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-Linker
+Software simulator for microcontrollers
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21854,33 +24236,57 @@ Linker
 \layout Standard
 
 
-\family roman 
-\series medium 
-\shape up 
-\size normal 
-\emph off 
-\bar no 
-\noun off 
-\color none
-sdcc/bin
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+sdcc/sim/ucsim/doc
+\family default 
+\series default 
+\shape default 
+\size default 
+\emph default 
+\bar default 
+\noun default 
+\color default
+/index.html
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Temporary notes on the pic16
+\begin_inset LatexCommand \index{PIC16}
+
+\end_inset 
+
+ port
 \end_inset 
 </cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-packihx
+sdcc/src/pic16/NOTES
 \end_inset 
 </cell>
+</row>
+<row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-ihx packer
+SDCC internal documentation (debugging file format)
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21888,7 +24294,7 @@ ihx packer
 
 \layout Standard
 
-
+sdcc/doc/
 \family roman 
 \series medium 
 \shape up 
@@ -21897,7 +24303,16 @@ ihx packer
 \bar no 
 \noun off 
 \color none
-sdcc/bin
+cdbfileformat.pd
+\family default 
+\series default 
+\shape default 
+\size default 
+\emph default 
+\bar default 
+\noun default 
+\color default
+f
 \end_inset 
 </cell>
 </row>
@@ -21910,19 +24325,25 @@ sdcc/bin
 
 \layout Section
 
-Documentation
-\begin_inset LatexCommand \index{Documentation}
+Related open source tools
+\begin_inset LatexCommand \label{sec:Related-open-source-tools}
 
 \end_inset 
 
- included in the distribution
+
+\begin_inset LatexCommand \index{Related tools}
+
+\end_inset 
+
+
 \layout Standard
-\align center 
+\align left 
 
 \begin_inset  Tabular
-<lyxtabular version="3" rows="10" columns="2">
+<lyxtabular version="3" rows="14" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="0">
+<column alignment="left" valignment="top" leftline="true" width="0pt">
+<column alignment="block" valignment="top" leftline="true" width="30line%">
 <column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -21930,7 +24351,15 @@ Documentation
 
 \layout Standard
 
-Subject / Title
+Name
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Purpose
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21938,7 +24367,7 @@ Subject / Title
 
 \layout Standard
 
-Where to get / filename
+Where to get
 \end_inset 
 </cell>
 </row>
@@ -21948,25 +24377,20 @@ Where to get / filename
 
 \layout Standard
 
-SDCC Compiler User Guide
+gpsim
+\begin_inset LatexCommand \index{gpsim (pic simulator)}
+
 \end_inset 
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
 
-\layout Standard
 
-You're reading it right now
 \end_inset 
 </cell>
-</row>
-<row topline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-Changelog of SDCC
+PIC simulator
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -21974,7 +24398,12 @@ Changelog of SDCC
 
 \layout Standard
 
-sdcc/Changelog
+
+\begin_inset LatexCommand \url{http://www.dattalo.com/gnupic/gpsim.html}
+
+\end_inset 
+
+
 \end_inset 
 </cell>
 </row>
@@ -21984,35 +24413,33 @@ sdcc/Changelog
 
 \layout Standard
 
-ASXXXX
-\begin_inset LatexCommand \index{asXXXX (as-gbz80, as-hc08, asx8051, as-z80)}
+gputils
+\begin_inset LatexCommand \index{gputils (pic tools)}
 
 \end_inset 
 
 
-\begin_inset LatexCommand \index{Assembler documentation}
-
 \end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
- Assemblers and ASLINK
-\begin_inset LatexCommand \index{aslink}
+\layout Standard
 
+GNU PIC utilities
 \end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
+\layout Standard
 
-\begin_inset LatexCommand \index{Linker documentation}
 
-\end_inset 
+\begin_inset LatexCommand \url{http://sourceforge.net/projects/gputils}
 
- Relocating Linker
 \end_inset 
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
 
-\layout Standard
 
-sdcc/as/doc/asxhtm.html
 \end_inset 
 </cell>
 </row>
@@ -22022,12 +24449,15 @@ sdcc/as/doc/asxhtm.html
 
 \layout Standard
 
-SDCC regression test
-\begin_inset LatexCommand \index{Regression test}
-
+flP5
 \end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
+\layout Standard
 
+PIC programmer
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22035,7 +24465,12 @@ SDCC regression test
 
 \layout Standard
 
-sdcc/doc/test_suite_spec.pdf
+
+\begin_inset LatexCommand \url{http://freshmeat.net/projects/flp5/}
+
+\end_inset 
+
+
 \end_inset 
 </cell>
 </row>
@@ -22045,48 +24480,52 @@ sdcc/doc/test_suite_spec.pdf
 
 \layout Standard
 
-Various notes
+ec2drv/newcdb
 \end_inset 
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-sdcc/doc/*
+Tools for Silicon Laboratories JTAG debug adapter, partly based on SDCDB
+ (Unix only)
 \end_inset 
 </cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-Notes on debugging with sdcdb
-\begin_inset LatexCommand \index{sdcdb (debugger)}
+
+\begin_inset LatexCommand \url{http://sourceforge.net/projects/ec2drv}
 
 \end_inset 
 
 
 \end_inset 
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-sdcc/debugger/README
+indent
+\begin_inset LatexCommand \index{indent (source formatting tool)}
+
+\end_inset 
+
+
 \end_inset 
 </cell>
-</row>
-<row topline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-Software simulator for microcontrollers
+Formats C source - Master of the white spaces
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22095,24 +24534,11 @@ Software simulator for microcontrollers
 \layout Standard
 
 
-\family roman 
-\series medium 
-\shape up 
-\size normal 
-\emph off 
-\bar no 
-\noun off 
-\color none
-sdcc/sim/ucsim/doc
-\family default 
-\series default 
-\shape default 
-\size default 
-\emph default 
-\bar default 
-\noun default 
-\color default
-/index.html
+\begin_inset LatexCommand \url{http://directory.fsf.org/GNU/indent.html}
+
+\end_inset 
+
+
 \end_inset 
 </cell>
 </row>
@@ -22122,30 +24548,20 @@ sdcc/sim/ucsim/doc
 
 \layout Standard
 
-Temporary notes on the pic16
-\begin_inset LatexCommand \index{PIC16}
-
-\end_inset 
+srecord
+\begin_inset LatexCommand \index{srecord (bin, hex, ... tool)}
 
- port
 \end_inset 
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
 
-\layout Standard
 
-sdcc/src/pic16/NOTES
 \end_inset 
 </cell>
-</row>
-<row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-SDCC internal documentation (debugging file format)
+Object file conversion, checksumming, ...
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22153,59 +24569,53 @@ SDCC internal documentation (debugging file format)
 
 \layout Standard
 
-sdcc/doc/
-\family roman 
-\series medium 
-\shape up 
-\size normal 
-\emph off 
-\bar no 
-\noun off 
-\color none
-cdbfileformat.pd
-\family default 
-\series default 
-\shape default 
-\size default 
-\emph default 
-\bar default 
-\noun default 
-\color default
-f
+
+\begin_inset LatexCommand \url{http://sourceforge.net/projects/srecord}
+
 \end_inset 
-</cell>
-</row>
-</lyxtabular>
+
 
 \end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
+\layout Standard
 
-\newline 
+objdump
+\begin_inset LatexCommand \index{objdump (tool)}
 
-\layout Section
+\end_inset 
 
-Related open source tools
-\begin_inset LatexCommand \index{Related tools}
 
 \end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
 
+Object file conversion, ...
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
 \layout Standard
-\align center 
 
-\begin_inset  Tabular
-<lyxtabular version="3" rows="11" columns="3">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="block" valignment="top" leftline="true" width="30line%">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
-<row topline="true" bottomline="true">
+Part of binutils (should be there anyway)
+\end_inset 
+</cell>
+</row>
+<row topline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-Name
+cmon51
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -22213,7 +24623,7 @@ Name
 
 \layout Standard
 
-Purpose
+8051 monitor (hex up-/download, single step, disassemble)
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22221,7 +24631,12 @@ Purpose
 
 \layout Standard
 
-Where to get
+
+\begin_inset LatexCommand \url{http://sourceforge.net/projects/cmon51}
+
+\end_inset 
+
+
 \end_inset 
 </cell>
 </row>
@@ -22231,8 +24646,8 @@ Where to get
 
 \layout Standard
 
-gpsim
-\begin_inset LatexCommand \index{gpsim (pic simulator)}
+doxygen
+\begin_inset LatexCommand \index{doxygen (source documentation tool)}
 
 \end_inset 
 
@@ -22244,7 +24659,7 @@ gpsim
 
 \layout Standard
 
-PIC simulator
+Source code documentation system
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22253,7 +24668,7 @@ PIC simulator
 \layout Standard
 
 
-\begin_inset LatexCommand \url{http://www.dattalo.com/gnupic/gpsim.html}
+\begin_inset LatexCommand \url{http://www.doxygen.org}
 
 \end_inset 
 
@@ -22267,12 +24682,7 @@ PIC simulator
 
 \layout Standard
 
-gputils
-\begin_inset LatexCommand \index{gputils (pic tools)}
-
-\end_inset 
-
-
+kdevelop
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -22280,7 +24690,7 @@ gputils
 
 \layout Standard
 
-GNU PIC utilities
+IDE (has anyone tried integrating SDCC & SDCDB? Unix only)
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22289,7 +24699,7 @@ GNU PIC utilities
 \layout Standard
 
 
-\begin_inset LatexCommand \url{http://sourceforge.net/projects/gputils}
+\begin_inset LatexCommand \url{http://www.kdevelop.org}
 
 \end_inset 
 
@@ -22303,7 +24713,7 @@ GNU PIC utilities
 
 \layout Standard
 
-flP5
+paulmon
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -22311,7 +24721,7 @@ flP5
 
 \layout Standard
 
-PIC programmer
+8051 monitor (hex up-/download, single step, disassemble)
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22320,7 +24730,7 @@ PIC programmer
 \layout Standard
 
 
-\begin_inset LatexCommand \url{http://freshmeat.net/projects/flp5/}
+\begin_inset LatexCommand \url{http://www.pjrc.com/tech/8051/paulmon2.html}
 
 \end_inset 
 
@@ -22334,8 +24744,8 @@ PIC programmer
 
 \layout Standard
 
-indent
-\begin_inset LatexCommand \index{indent (source formatting tool)}
+splint
+\begin_inset LatexCommand \index{splint (syntax checking tool)}
 
 \end_inset 
 
@@ -22347,7 +24757,12 @@ indent
 
 \layout Standard
 
-Formats C source - Master of the white spaces
+Statically checks c sources (see 
+\begin_inset LatexCommand \ref{lyx:more-pedantic-SPLINT}
+
+\end_inset 
+
+)
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22356,7 +24771,7 @@ Formats C source - Master of the white spaces
 \layout Standard
 
 
-\begin_inset LatexCommand \url{http://directory.fsf.org/GNU/indent.html}
+\begin_inset LatexCommand \url{http://www.splint.org}
 
 \end_inset 
 
@@ -22364,14 +24779,14 @@ Formats C source - Master of the white spaces
 \end_inset 
 </cell>
 </row>
-<row topline="true">
+<row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-srecord
-\begin_inset LatexCommand \index{srecord (bin, hex, ... tool)}
+ddd
+\begin_inset LatexCommand \index{ddd (debugger)}
 
 \end_inset 
 
@@ -22383,7 +24798,12 @@ srecord
 
 \layout Standard
 
-Object file conversion, checksumming, ...
+Debugger, serves nicely as GUI to SDCDB
+\begin_inset LatexCommand \index{SDCDB (debugger)}
+
+\end_inset 
+
+ (Unix only)
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22392,7 +24812,7 @@ Object file conversion, checksumming, ...
 \layout Standard
 
 
-\begin_inset LatexCommand \url{http://sourceforge.net/projects/srecord}
+\begin_inset LatexCommand \url{http://www.gnu.org/software/ddd/}
 
 \end_inset 
 
@@ -22400,18 +24820,32 @@ Object file conversion, checksumming, ...
 \end_inset 
 </cell>
 </row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
+</lyxtabular>
 
-\layout Standard
+\end_inset 
 
-objdump
-\begin_inset LatexCommand \index{objdump (tool)}
 
-\end_inset 
+\newline 
+
+\layout Section
+
+Related documentation / recommended reading
+\layout Standard
+\align left 
+
+\begin_inset  Tabular
+<lyxtabular version="3" rows="8" columns="3">
+<features>
+<column alignment="left" valignment="top" leftline="true" width="0pt">
+<column alignment="block" valignment="top" leftline="true" width="30line%">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
+\layout Standard
 
+Name
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -22419,7 +24853,7 @@ objdump
 
 \layout Standard
 
-Object file conversion, ...
+Subject / Title
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22427,7 +24861,7 @@ Object file conversion, ...
 
 \layout Standard
 
-Part of binutils (should be there anyway)
+Where to get
 \end_inset 
 </cell>
 </row>
@@ -22437,12 +24871,16 @@ Part of binutils (should be there anyway)
 
 \layout Standard
 
-doxygen
-\begin_inset LatexCommand \index{doxygen (source documentation tool)}
-
-\end_inset 
-
 
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+c-refcard.pdf
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -22450,7 +24888,12 @@ doxygen
 
 \layout Standard
 
-Source code documentation system
+C Reference Card
+\begin_inset LatexCommand \index{C Reference card}
+
+\end_inset 
+
+, 2 pages
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22459,7 +24902,7 @@ Source code documentation system
 \layout Standard
 
 
-\begin_inset LatexCommand \url{http://www.doxygen.org}
+\begin_inset LatexCommand \url{http://refcards.com/refcards/c/index.html}
 
 \end_inset 
 
@@ -22473,7 +24916,7 @@ Source code documentation system
 
 \layout Standard
 
-kdevelop
+c-faq
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -22481,7 +24924,7 @@ kdevelop
 
 \layout Standard
 
-IDE (has anyone tried integrating SDCC & sdcdb? Unix only)
+C-FAQ-list
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22490,7 +24933,7 @@ IDE (has anyone tried integrating SDCC & sdcdb? Unix only)
 \layout Standard
 
 
-\begin_inset LatexCommand \url{http://www.kdevelop.org}
+\begin_inset LatexCommand \url{http://www.eskimo.com/~scs/C-faq/top.html}
 
 \end_inset 
 
@@ -22504,12 +24947,48 @@ IDE (has anyone tried integrating SDCC & sdcdb? Unix only)
 
 \layout Standard
 
-splint
-\begin_inset LatexCommand \index{splint (syntax checking tool)}
+ISO/IEC 9899:TC2
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\begin_inset Quotes sld
+\end_inset 
+
+C-Standard
+\begin_inset Quotes srd
+\end_inset 
+
+
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\size footnotesize 
+
+\begin_inset LatexCommand \url{http://www.open-std.org/jtc1/sc22/wg14/www/standards.html#9899}
 
 \end_inset 
 
 
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+ISO/IEC DTR 18037
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -22517,12 +24996,15 @@ splint
 
 \layout Standard
 
-Statically checks c sources (see 
-\begin_inset LatexCommand \ref{lyx:more-pedantic-SPLINT}
 
+\begin_inset Quotes sld
 \end_inset 
 
-)
+Extensions for Embedded C
+\begin_inset Quotes srd
+\end_inset 
+
+
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22531,7 +25013,9 @@ Statically checks c sources (see
 \layout Standard
 
 
-\begin_inset LatexCommand \url{http://www.splint.org}
+\size footnotesize 
+
+\begin_inset LatexCommand \url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1021.pdf}
 
 \end_inset 
 
@@ -22539,31 +25023,45 @@ Statically checks c sources (see
 \end_inset 
 </cell>
 </row>
-<row topline="true" bottomline="true">
+<row topline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-ddd
-\begin_inset LatexCommand \index{ddd (debugger)}
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
 
+Latest datasheet of the target CPU
 \end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
+\layout Standard
 
+vendor
 \end_inset 
 </cell>
+</row>
+<row topline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-Debugger, serves nicely as GUI to sdcdb
-\begin_inset LatexCommand \index{sdcdb (debugger)}
-
 \end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
- (Unix only)
+\layout Standard
+
+Revision history of datasheet
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22571,12 +25069,35 @@ Debugger, serves nicely as GUI to sdcdb
 
 \layout Standard
 
+vendor
+\end_inset 
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
 
-\begin_inset LatexCommand \url{http://www.gnu.org/software/ddd/}
+S.
+ S.
+ Muchnick
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
+\layout Standard
+
+Advanced Compiler Design and Implementation
 \end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
+\layout Standard
 
+bookstore (very dedicated, probably read other books first)
 \end_inset 
 </cell>
 </row>
@@ -22589,31 +25110,83 @@ Debugger, serves nicely as GUI to sdcdb
 
 \layout Section
 
-Related documentation / recommended reading
+Application notes specifically for SDCC
 \layout Standard
-\align center 
+
+SDCC makes no claims about the completeness of this list and about up-to-datenes
+s or correctness of the application notes
+\begin_inset LatexCommand \index{Application notes}
+
+\end_inset 
+
+.
+\layout Standard
+\align left 
+
+\size footnotesize 
 
 \begin_inset  Tabular
-<lyxtabular version="3" rows="6" columns="3">
+<lyxtabular version="3" rows="7" columns="3">
 <features>
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="block" valignment="top" leftline="true" width="30line%">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="block" valignment="top" leftline="true" width="17col%">
+<column alignment="block" valignment="top" leftline="true" width="27col%">
+<column alignment="block" valignment="top" leftline="true" rightline="true" width="57col%">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
-Name
+
+\size footnotesize 
+Vendor
+\end_inset 
+</cell>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\size footnotesize 
+Subject / Title
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\size footnotesize 
+Where to get
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\size footnotesize 
+Maxim / Dallas
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
-\layout Standard
+\layout Standard
+
+
+\size footnotesize 
+Using the SDCC Compiler for the DS80C400
+\begin_inset LatexCommand \index{DS80C400}
+
+\end_inset 
+
 
-Subject / Title
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22621,7 +25194,14 @@ Subject / Title
 
 \layout Standard
 
-Where to get
+
+\size footnotesize 
+
+\begin_inset LatexCommand \url{http://pdfserv.maxim-ic.com/en/an/AN3346.pdf}
+
+\end_inset 
+
+
 \end_inset 
 </cell>
 </row>
@@ -22632,28 +25212,23 @@ Where to get
 \layout Standard
 
 
-\family roman 
-\series medium 
-\shape up 
-\size normal 
-\emph off 
-\bar no 
-\noun off 
-\color none
-c-refcard.pdf
+\size footnotesize 
+Maxim / Dallas
 \end_inset 
 </cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell multicolumn="1" alignment="left" valignment="top" topline="true" leftline="true" usebox="none" width="30line%">
 \begin_inset Text
 
 \layout Standard
 
-C Reference Card
-\begin_inset LatexCommand \index{C Reference card}
+
+\size footnotesize 
+Using the Free SDCC C Compiler to Develop Firmware for the DS89C420/430/440/450
+\begin_inset LatexCommand \index{DS89C4x0}
 
 \end_inset 
 
-, 2 pages
+ Family of Microcontrollers
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22662,7 +25237,9 @@ C Reference Card
 \layout Standard
 
 
-\begin_inset LatexCommand \url{http://refcards.com/refcards/c/index.html}
+\size footnotesize 
+
+\begin_inset LatexCommand \url{http://pdfserv.maxim-ic.com/en/an/AN3477.pdf}
 
 \end_inset 
 
@@ -22676,7 +25253,9 @@ C Reference Card
 
 \layout Standard
 
-c-faq
+
+\size footnotesize 
+Silicon Laboratories / Cygnal
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -22684,7 +25263,9 @@ c-faq
 
 \layout Standard
 
-C-FAQ-list
+
+\size footnotesize 
+Integrating SDCC 8051 Tools Into The Silicon Labs IDE
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22693,7 +25274,9 @@ C-FAQ-list
 \layout Standard
 
 
-\begin_inset LatexCommand \url{http://www.eskimo.com/~scs/C-faq/top.html}
+\size footnotesize 
+
+\begin_inset LatexCommand \url{http://www.silabs.com/public/documents/tpub_doc/anote/Microcontrollers/en/an198.pdf}
 
 \end_inset 
 
@@ -22707,6 +25290,9 @@ C-FAQ-list
 
 \layout Standard
 
+
+\size footnotesize 
+Ramtron / Goal Semiconductor
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -22714,7 +25300,9 @@ C-FAQ-list
 
 \layout Standard
 
-Latest datasheet of the target CPU
+
+\size footnotesize 
+Interfacing SDCC to Syn and Textpad
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22722,7 +25310,14 @@ Latest datasheet of the target CPU
 
 \layout Standard
 
-vendor
+
+\size footnotesize 
+
+\begin_inset LatexCommand \url{http://www.ramtron.com/doc/Products/Microcontroller/Support_Tools.asp}
+
+\end_inset 
+
+
 \end_inset 
 </cell>
 </row>
@@ -22732,6 +25327,9 @@ vendor
 
 \layout Standard
 
+
+\size footnotesize 
+Ramtron / Goal Semiconductor
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -22739,7 +25337,9 @@ vendor
 
 \layout Standard
 
-Revision history of datasheet
+
+\size footnotesize 
+Installing and Configuring SDCC and Crimson Editor 
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22747,7 +25347,14 @@ Revision history of datasheet
 
 \layout Standard
 
-vendor
+
+\size footnotesize 
+
+\begin_inset LatexCommand \url{http://www.ramtron.com/doc/Products/Microcontroller/Support_Tools.asp}
+
+\end_inset 
+
+
 \end_inset 
 </cell>
 </row>
@@ -22757,9 +25364,9 @@ vendor
 
 \layout Standard
 
-S.
- S.
- Muchnick
+
+\size footnotesize 
+Texas Instruments
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -22767,7 +25374,9 @@ S.
 
 \layout Standard
 
-Advanced Compiler Design and Implementation
+
+\size footnotesize 
+MSC12xx Programming with SDCC
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -22775,7 +25384,14 @@ Advanced Compiler Design and Implementation
 
 \layout Standard
 
-bookstore (very dedicated, probably read other books first)
+
+\size footnotesize 
+
+\begin_inset LatexCommand \url{http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=sbaa109&fileType=pdf}
+
+\end_inset 
+
+
 \end_inset 
 </cell>
 </row>
@@ -22784,8 +25400,6 @@ bookstore (very dedicated, probably read other books first)
 \end_inset 
 
 
-\newline 
-
 \layout Section
 
 Some Questions
@@ -22858,7 +25472,7 @@ Support
 
 SDCC has grown to be a large project.
  The compiler alone (without the preprocessor, assembler and linker) is
- well over 100,000 lines of code (blank stripped).
+ well over 150,000 lines of code (blank stripped).
  The open source nature of this project is a key to its continued growth
  and support.
  You gain the benefit and support of many active software developers and
@@ -22892,8 +25506,8 @@ The SDCC project is hosted on the SDCC sourceforge site at
 
 \end_inset 
 
- area and cvs code repository
-\begin_inset LatexCommand \index{cvs code repository}
+ area and Subversion code repository
+\begin_inset LatexCommand \index{Subversion code repository}
 
 \end_inset 
 
@@ -22941,7 +25555,7 @@ status Collapsed
 \end_inset 
 
  option can sometimes be useful in locating optimization problems.
- When reporting a bug please maker sure you:
+ When reporting a bug please make sure you:
 \layout Enumerate
 
 Attach the code you are compiling with SDCC.
@@ -22985,6 +25599,29 @@ Please have a short check that you are using a recent version of SDCC and
 
 \end_inset 
 
+.
+ With SDCC on average having more than 200 downloads
+\begin_inset LatexCommand \index{download}
+
+\end_inset 
+
+ on sourceforge per day
+\begin_inset Foot
+collapsed false
+
+\layout Standard
+
+220 daily downloads on average Jan-Sept 2006 and about 150 daily downloads
+ between 2002 and 2005.
+ This does not include other methods of distribution.
+\end_inset 
+
+ there must be some users.
+ So it's not exactly easy to find a new bug.
+ If you find one we need it: 
+\emph on 
+reporting bugs is good
+\emph default 
 .
 \layout Section
 
@@ -23110,7 +25747,7 @@ Traffic on sdcc-devel and sdcc-user is about 100 mails/month each not counting
 ChangeLog
 \layout Standard
 
-You can follow the status of the cvs version
+You can follow the status of the Subversion version
 \begin_inset LatexCommand \index{version}
 
 \end_inset 
@@ -23120,18 +25757,51 @@ You can follow the status of the cvs version
 
 \end_inset 
 
- in the cvs-repository
-\newline 
-
+ in the Subversion repository
 \size footnotesize 
-
-\begin_inset LatexCommand \htmlurl{http://cvs.sf.net/cgi-bin/viewcvs.cgi/*checkout*/sdcc/sdcc/ChangeLog?rev=HEAD&content-type=text/plain}
+\begin_inset LatexCommand \htmlurl{http://svn.sourceforge.net/viewcvs.cgi/*checkout*/sdcc/trunk/sdcc/ChangeLog}
 
 \end_inset 
 
 .
 \layout Section
 
+Subversion Source Code Repository
+\layout Standard
+
+The output of 
+\family sans 
+\series bold 
+sdcc --version
+\family default 
+\series default 
+ or the filenames of the snapshot versions of SDCC include date and its
+ Subversion
+\begin_inset LatexCommand \index{Subversion code repository}
+
+\end_inset 
+
+ number.
+ Subversion allows to download the source of recent or previous versions
+\begin_inset LatexCommand \url{http://sourceforge.net/svn/?group_id=599}
+
+\end_inset 
+
+ (by number or by date).
+ An on-line source code browser and detailled instructions are also available
+ there.
+ SDCC versions starting from 1999 up to now are available (currently the
+ versions prior to the conversion from cvs
+\begin_inset LatexCommand \index{cvs (see Subversion)}
+
+\end_inset 
+
+ to Subversion (April 2006) are either by accessible by Subversion or by
+ cvs).
+\layout Section
+
 Release policy
 \begin_inset LatexCommand \index{Release policy}
 
@@ -23279,6 +25949,132 @@ The pic port uses a different set of regression tests, you'll find them
 sdcc/src/regression
 \shape default 
 .
+\layout Section
+
+Use of SDCC in Education
+\layout Standard
+
+In short: 
+\emph on 
+highly
+\emph default 
+ encouraged
+\begin_inset Foot
+collapsed false
+
+\layout Standard
+
+the phrase "use in education" might evoke the association "
+\emph on 
+only
+\emph default 
+ fit for use in education".
+ This connotation is not intended but nevertheless risked as the licensing
+ of SDCC makes it difficult to offer educational discounts
+\end_inset 
+
+.
+ If your rationales are to:
+\layout Enumerate
+
+give students a chance to understand the 
+\emph on 
+complete
+\emph default 
+ steps of code generation
+\layout Enumerate
+
+have a curriculum that can be extended for years.
+ Then you could use an fpga board as target and your curriculum will seamlessly
+ extend from logic synthesis (
+\begin_inset LatexCommand \url[http://www.opencores.org]{opencores.org}
+
+\end_inset 
+
+, 
+\begin_inset LatexCommand \url[Oregano]{http://www.oregano.at/ip/ip01.htm}
+
+\end_inset 
+
+), over assembly programming, to C to FPGA compilers (
+\begin_inset LatexCommand \url[FPGAC]{http://sf.net/projects/fpgac}
+
+\end_inset 
+
+) and to C.
+\layout Enumerate
+
+be able to insert excursions about skills like using a revision control
+ system, submitting/applying patches, using a type-setting (as opposed to
+ word-processing) engine LyX/LaTeX, using 
+\begin_inset LatexCommand \url[SourceForge]{http://www.sf.net}
+
+\end_inset 
+
+, following some 
+\begin_inset LatexCommand \url[netiquette]{http://en.wikipedia.org/wiki/Netiquette}
+
+\end_inset 
+
+, understanding BSD/LGPL/GPL/Proprietary licensing, growth models of Open
+ Source Software, CPU simulation, compiler regression tests
+\begin_inset LatexCommand \index{Regression test}
+
+\end_inset 
+
+.
+\newline 
+And if there should be a shortage of ideas then you can always point students
+ to the ever-growing feature request list 
+\begin_inset LatexCommand \htmlurl{http://sourceforge.net/tracker/?group_id=599&atid=350599}
+
+\end_inset 
+
+.
+\layout Enumerate
+
+not tie students to a specific host platform and instead allow them to use
+ a host platform of 
+\emph on 
+their
+\emph default 
+ choice (among them Alpha, i386, i386_64, MacOs, Mips, Sparc, Windows and
+ eventually 
+\begin_inset LatexCommand \url[OLPC]{http://www.laptop.org}
+
+\end_inset 
+
+)
+\layout Enumerate
+
+not encourage students to use illegal copies of educational software
+\layout Enumerate
+
+be immune to licensing/availability/price changes of the chosen tool chain
+\layout Enumerate
+
+be able to change to a new target platform without having to adopt a new
+ tool chain
+\layout Enumerate
+
+have complete control over and insight into the tool chain
+\layout Enumerate
+
+make your students aware about the pros and cons of open source software
+ development
+\layout Enumerate
+
+give back to the public as you are probably at least partially publically
+ funded
+\layout Enumerate
+
+give students a chance to publically prove their skills and to possibly
+ see a world wide impact
+\layout Standard
+
+then SDCC is probably among the first choices.
+ Well, probably SDCC might be the only choice.
 \layout Chapter
 \pagebreak_top 
 SDCC Technical Data
@@ -26225,6 +29021,20 @@ ANSI-Compliance
 \end_inset 
 
 
+\layout Standard
+
+The latest publically available version of the standard 
+\emph on 
+ISO/IEC 9899 - Programming languages - C
+\emph default 
+ should be available at: 
+\begin_inset LatexCommand \url{http://www.open-std.org/jtc1/sc22/wg14/www/standards.html#9899}
+
+\end_inset 
+
+.
+\newline 
+
 \layout Standard
 
 Deviations from the compliance:
@@ -26257,9 +29067,23 @@ status Collapsed
  command line option is specified.
 \layout Itemize
 
-structures and unions cannot be assigned values directly, cannot be passed
- as function parameters or assigned to each other and cannot be a return
- value from a function, e.g.:
+structures
+\begin_inset LatexCommand \index{struct}
+
+\end_inset 
+
+ and unions
+\begin_inset LatexCommand \index{union}
+
+\end_inset 
+
+ cannot be assigned values directly, cannot be passed as function parameters
+ or assigned to each other and cannot be a return value
+\begin_inset LatexCommand \index{return value}
+
+\end_inset 
+
+ from a function, e.g.:
 \begin_deeper 
 \layout Verse
 
@@ -26296,8 +29120,15 @@ s1 = s2 ; /* is invalid in SDCC although allowed in ANSI */
 \newline 
 }
 \newline 
-struct s foo1 (struct s parms) /* invalid in SDCC although allowed in ANSI
- */
+
+\series bold 
+struct
+\series default 
+ s foo1 (
+\series bold 
+struct
+\series default 
+ s parms) /* invalid in SDCC although allowed in ANSI */
 \newline 
 { 
 \newline 
@@ -26318,7 +29149,7 @@ struct s rets;
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-return rets;/* is invalid in SDCC although allowed in ANSI */ 
+return rets; /* is invalid in SDCC although allowed in ANSI */ 
 \newline 
 }
 \end_deeper 
@@ -26330,7 +29161,12 @@ initialization of structure arrays must be fully braced.
 
 
 \family typewriter 
-struct s { char x } a[] = {1, 2}; /* invalid in SDCC */
+struct s { char x } a[] = {1, 2};\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/* invalid in SDCC */
 \newline 
 struct s { char x } a[] = {{1}, {2}}; /* OK */
 \end_deeper 
@@ -26362,19 +29198,6 @@ struct s { char x } a[] = {{1}, {2}}; /* OK */
 not supported.
 \layout Itemize
 
-No support for setjmp
-\begin_inset LatexCommand \index{setjmp (not supported)}
-
-\end_inset 
-
- and longjmp
-\begin_inset LatexCommand \index{longjmp (not supported)}
-
-\end_inset 
-
- (for now).
-\layout Itemize
-
 Old K&R style
 \begin_inset LatexCommand \index{K\&R style}
 
@@ -26403,6 +29226,38 @@ int i,j; /* are valid in ANSI but not valid in SDCC */
 \end_deeper 
 \layout Itemize
 
+Most enhancements in C99 are not supported, f.e.:
+\begin_deeper 
+\layout Verse
+
+
+\family typewriter 
+\series bold 
+inline
+\begin_inset LatexCommand \index{inline (not supported)}
+
+\end_inset 
+
+
+\series default 
+ int increment (int a) { return a+1; } /* is invalid in SDCC although allowed
+ in C99.
+ An empty define 
+\emph on 
+#define inline
+\emph default 
+ can be used as a work around */
+\newline 
+
+\newline 
+for (
+\series bold 
+int
+\series default 
+ i=0; i<10; i++) /* is invalid in SDCC although allowed in C99 */
+\end_deeper 
+\layout Itemize
+
 Certain words that are valid identifiers in the standard may be reserved
  words in SDCC unless the 
 \series bold