* src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
[fw/sdcc] / doc / sdccman.lyx
index 11ed4c7f6f451f1af75b4ae9bd67c095c62aba09..640018e3c3c285add02a32691123549719958259 100644 (file)
@@ -58,20 +58,40 @@ status Collapsed
 Two resp.
  three consecutive dashes simply result in a long resp.
  extra long dash.
+\layout Comment
+
+This document would need some rework: The Installation section is much to
+\layout Comment
+
+intimidating (as is the section about sdcdb).
+\layout Comment
+
+Architecture specific stuff (like memory models, code examples) should maybe
+ go
+\layout Comment
+
+into seperate sections/chapters/appendices (it is hard to document PIC or
+ Z80 in 
+\layout Comment
+
+a 8051 centered document)
 \layout Title
 
 SDCC Compiler User Guide
-\layout Standard
-\align center 
-2003-06-02
 \layout Comment
 
 The strings enclosed in $ are automatically updated by cvs:
 \layout Standard
 \align center 
 
-\size scriptsize 
-cvs: $Revision$ $Date$
+\size footnotesize 
+$Date$
+\layout Standard
+\align center 
+
+\size footnotesize 
+$Revision$
 \layout Standard
 
 
@@ -104,8 +124,8 @@ Sandeep Dutta
 \end_inset 
 
 , etc), Zilog Z80 based MCUs, and the Dallas DS80C390 variant.
- It can be retargetted for other microprocessors, support for PIC, AVR and
186 is under development.
+ It can be retargetted for other microprocessors, support for PIC, AVR is
+ under development.
  The entire source code for the compiler is distributed under GPL.
  SDCC uses ASXXXX & ASLINK, a Freeware, retargettable assembler & linker.
  SDCC has extensive language extensions suitable for utilizing various microcont
@@ -134,7 +154,7 @@ copy propagation,
 dead code elimination 
 \layout Itemize
 
-jumptables for 
+jump tables for 
 \emph on 
 switch
 \emph default 
@@ -202,7 +222,7 @@ SDCC also comes with a companion source level debugger SDCDB, the debugger
 
 \newline 
 The latest version can be downloaded from 
-\begin_inset LatexCommand \url{http://sdcc.sourceforge.net/}
+\begin_inset LatexCommand \url{http://sdcc.sourceforge.net/snap.php}
 
 \end_inset 
 
@@ -321,7 +341,7 @@ short is now equivalent to int (16 bits), it used to be equivalent to char
  (8 bits) which is not ANSI compliant
 \layout Itemize
 
-the default directory for gcc-builds where include, library and documention
+the default directory for gcc-builds where include, library and documentation
  files are stored is now in /usr/local/share
 \layout Itemize
 
@@ -419,10 +439,6 @@ The SDCC home page at
  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.
-\layout Comment
-
-ANSI C reference / related tools / recommended reading / compiler building:
- Muchnik?
 \layout Subsection
 
 Wishes for the future
@@ -486,7 +502,7 @@ Configure Options
 
 The install paths, search paths and other options are defined when running
  'configure'.
- The defaults can be overriden by:
+ The defaults can be overridden by:
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -500,7 +516,7 @@ status Collapsed
 /
 \end_inset 
 
--prefix see tabel below
+-prefix see table below
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -514,7 +530,7 @@ status Collapsed
 /
 \end_inset 
 
--exec_prefix see tabel below
+-exec_prefix see table below
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -528,7 +544,7 @@ status Collapsed
 /
 \end_inset 
 
--bindir see tabel below
+-bindir see table below
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -542,19 +558,19 @@ status Collapsed
 /
 \end_inset 
 
--datadir see tabel below
+-datadir see table below
 \layout List
 \labelwidthstring 00.00.0000
 
-docdir environment variable, see tabel below
+docdir environment variable, see table below
 \layout List
 \labelwidthstring 00.00.0000
 
-include_dir_suffix environment variable, see tabel below
+include_dir_suffix environment variable, see table below
 \layout List
 \labelwidthstring 00.00.0000
 
-lib_dir_suffix environment variable, see tabel below
+lib_dir_suffix environment variable, see table below
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -789,7 +805,8 @@ See the examples, how to pass the Win32 settings to 'configure'.
 These defaults are:
 \newline 
 
-\newline 
+\layout Standard
+\align center 
 
 \begin_inset  Tabular
 <lyxtabular version="3" rows="8" columns="3">
@@ -1058,15 +1075,15 @@ lib
 
 \newline 
 
-\newline 
-
-\newline 
+\layout Standard
+\noindent 
 'configure' also computes relative paths.
  This is needed for full relocatability of a binary package and to complete
  search paths (see section search paths below):
 \newline 
  
-\newline 
+\layout Standard
+\align center 
 
 \begin_inset  Tabular
 <lyxtabular version="3" rows="4" columns="3">
@@ -1192,14 +1209,24 @@ share/sdcc
 
 \newline 
 
-\newline 
+\layout Standard
+\noindent 
 Examples:
 \layout LyX-Code
 
 ./configure
-\layout LyX-Code
+\newline 
+./configure -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
 
-./configure --prefix=
+-prefix=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1207,7 +1234,17 @@ Examples:
 \begin_inset Quotes srd
 \end_inset 
 
- --datadir=
+ -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-datadir=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1216,21 +1253,39 @@ Examples:
 \end_inset 
 
 
-\layout LyX-Code
+\newline 
+./configure -
+\begin_inset ERT
+status Collapsed
 
-./configure --disable-avr-port --disable-xa51-port
 \layout Standard
 
-To crosscompile on linux for Mingw32 (see also 'sdcc/support/scripts/sdcc_mingw3
-2'):
-\layout LyX-Code
+\backslash 
+/
+\end_inset 
+
+-disable-avr-port -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
 
-./configure 
 \backslash 
+/
+\end_inset 
+
+-disable-xa51-port
+\layout Standard
 
+To cross compile on linux for Mingw32 (see also 'sdcc/support/scripts/sdcc_mingw
+32'):
 \layout LyX-Code
 
-  CC=
+./configure 
+\backslash 
+
+\newline 
+CC=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1248,10 +1303,9 @@ i586-mingw32msvc-g++
 
  
 \backslash 
-
-\layout LyX-Code
-
-  RANLIB=
+\newline 
+RANLIB=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1262,9 +1316,8 @@ i586-mingw32msvc-ranlib
  
 \backslash 
 
-\layout LyX-Code
-
-  STRIP=
+\newline 
+STRIP=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1275,9 +1328,18 @@ i586-mingw32msvc-strip
  
 \backslash 
 
-\layout LyX-Code
+\newline 
+-
+\begin_inset ERT
+status Collapsed
 
-  --prefix=
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-prefix=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1288,9 +1350,18 @@ i586-mingw32msvc-strip
  
 \backslash 
 
-\layout LyX-Code
+\newline 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
 
-  --datadir=
+-datadir=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1301,9 +1372,8 @@ i586-mingw32msvc-strip
  
 \backslash 
 
-\layout LyX-Code
-
-  docdir=
+\newline 
+docdir=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1314,9 +1384,8 @@ i586-mingw32msvc-strip
  
 \backslash 
 
-\layout LyX-Code
-
-  include_dir_suffix=
+\newline 
+include_dir_suffix=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1327,9 +1396,8 @@ include
  
 \backslash 
 
-\layout LyX-Code
-
-  lib_dir_suffix=
+\newline 
+lib_dir_suffix=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1340,9 +1408,8 @@ lib
  
 \backslash 
 
-\layout LyX-Code
-
-  sdccconf_h_dir_separator=
+\newline 
+sdccconf_h_dir_separator=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1361,19 +1428,56 @@ lib
  
 \backslash 
 
-\layout LyX-Code
+\newline 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
 
-  --disable-device-lib-build
 \backslash 
+/
+\end_inset 
 
-\layout LyX-Code
+-disable-device-lib-build
+\backslash 
 
-  --disable-ucsim
+\newline 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-disable-ucsim
 \backslash 
 
-\layout LyX-Code
+\newline 
+-
+\begin_inset ERT
+status Collapsed
 
-  --host=i586-mingw32msvc --build=unknown-unknown-linux-gnu
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-host=i586-mingw32msvc -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-build=unknown-unknown-linux-gnu
 \layout Standard
 
 To 
@@ -1391,9 +1495,8 @@ compile on Cygwin for Mingw32(see also sdcc/support/scripts/sdcc_cygwin_mingw32)
 ./configure -C 
 \backslash 
 
-\layout LyX-Code
-
-  CFLAGS=
+\newline 
+CFLAGS=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1404,9 +1507,8 @@ compile on Cygwin for Mingw32(see also sdcc/support/scripts/sdcc_cygwin_mingw32)
  
 \backslash 
 
-\layout LyX-Code
-
-  LDFLAGS=
+\newline 
+LDFLAGS=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1417,9 +1519,18 @@ compile on Cygwin for Mingw32(see also sdcc/support/scripts/sdcc_cygwin_mingw32)
  
 \backslash 
 
-\layout LyX-Code
+\newline 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
 
-  --prefix=
+-prefix=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1430,9 +1541,18 @@ compile on Cygwin for Mingw32(see also sdcc/support/scripts/sdcc_cygwin_mingw32)
  
 \backslash 
 
-\layout LyX-Code
+\newline 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
 
-  --datadir=
+-datadir=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1443,9 +1563,8 @@ compile on Cygwin for Mingw32(see also sdcc/support/scripts/sdcc_cygwin_mingw32)
  
 \backslash 
 
-\layout LyX-Code
-
-  docdir=
+\newline 
+docdir=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1455,10 +1574,9 @@ compile on Cygwin for Mingw32(see also sdcc/support/scripts/sdcc_cygwin_mingw32)
 
  
 \backslash 
-
-\layout LyX-Code
-
-  include_dir_suffix=
+\newline 
+include_dir_suffix=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1469,9 +1587,8 @@ include
  
 \backslash 
 
-\layout LyX-Code
-
-  lib_dir_suffix=
+\newline 
+lib_dir_suffix=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1482,9 +1599,8 @@ lib
  
 \backslash 
 
-\layout LyX-Code
-
-  sdccconf_h_dir_separator=
+\newline 
+sdccconf_h_dir_separator=
 \begin_inset Quotes srd
 \end_inset 
 
@@ -1503,9 +1619,18 @@ lib
  
 \backslash 
 
-\layout LyX-Code
+\newline 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
 
-  --disable-ucsim
+\backslash 
+/
+\end_inset 
+
+-disable-ucsim
 \layout Standard
 
 'configure' is quite slow on Cygwin (at least on windows before Win2000/XP).
@@ -1531,24 +1656,33 @@ Install paths
 
 
 \layout Standard
-
-1.
- Binary files (preprocessor, assembler and linker)
-\layout Standard
-
+\added_space_top medskip \align center 
 
 \begin_inset  Tabular
-<lyxtabular version="3" rows="2" columns="3">
+<lyxtabular version="3" rows="5" columns="4">
 <features>
-<column alignment="block" valignment="top" leftline="true" width="0in">
-<column alignment="block" valignment="top" leftline="true" width="0in">
-<column alignment="block" valignment="top" leftline="true" rightline="true" width="0in">
+<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">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
 
+
+\series bold 
+Description
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\series bold 
 Path
 \end_inset 
 </cell>
@@ -1557,7 +1691,9 @@ Path
 
 \layout Standard
 
-default
+
+\series bold 
+Default
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -1565,11 +1701,21 @@ default
 
 \layout Standard
 
+
+\series bold 
 Win32 builds
 \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
+
+Binary files*
+\end_inset 
+</cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
@@ -1601,62 +1747,23 @@ bin
 \end_inset 
 </cell>
 </row>
-</lyxtabular>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
 
+Include files
 \end_inset 
-
-\newline 
-
-\newline 
-2.
- Include files
-\layout Standard
-
-
-\begin_inset  Tabular
-<lyxtabular version="3" rows="2" columns="3">
-<features>
-<column alignment="block" valignment="top" leftline="true" width="1.6in">
-<column alignment="block" valignment="top" leftline="true" width="0in">
-<column alignment="block" 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
-
-\layout Standard
-
-Path
-\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" rightline="true" usebox="none">
-\begin_inset Text
-
-\layout Standard
-
-Win32 builds
-\end_inset 
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
 \layout Standard
 
 
 \emph on 
-$DATADIR/
-\newline 
-$INCLUDE_DIR_SUFFIX
+$DATADIR/ $INCLUDE_DIR_SUFFIX
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -1680,57 +1787,15 @@ include
 \end_inset 
 </cell>
 </row>
-</lyxtabular>
-
-\end_inset 
-
-
-\newline 
-
-\newline 
-3.
- Library files (the 
-\shape italic 
-model
-\shape default 
- is auto-appended by the compiler, e.g.
- small, large, z80, ds390 etc.)
-\layout Standard
-
-
-\begin_inset  Tabular
-<lyxtabular version="3" rows="2" columns="3">
-<features>
-<column alignment="block" valignment="top" leftline="true" width="0in">
-<column alignment="block" valignment="top" leftline="true" width="0in">
-<column alignment="block" 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
-
-\layout Standard
-
-Path
-\end_inset 
-</cell>
+<row topline="true">
 <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" rightline="true" usebox="none">
-\begin_inset Text
-
-\layout Standard
-
-Win32 builds
+Library file**
 \end_inset 
 </cell>
-</row>
-<row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
@@ -1762,52 +1827,15 @@ lib
 \end_inset 
 </cell>
 </row>
-</lyxtabular>
-
-\end_inset 
-
-
-\newline 
-
-\newline 
-4.
- Documentation
-\layout Standard
-
-
-\begin_inset  Tabular
-<lyxtabular version="3" rows="2" columns="3">
-<features>
-<column alignment="block" valignment="top" leftline="true" width="0in">
-<column alignment="block" valignment="top" leftline="true" width="0in">
-<column alignment="block" 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
 
 \layout Standard
 
-Path
-\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" rightline="true" usebox="none">
-\begin_inset Text
-
-\layout Standard
-
-Win32 builds
+Documentation
 \end_inset 
 </cell>
-</row>
-<row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
@@ -1844,9 +1872,20 @@ doc
 \end_inset 
 
 
-\newline 
+\layout Verse
+
 
+\size footnotesize 
+*compiler, preprocessor, assembler, and linker
 \newline 
+**the 
+\shape italic 
+model
+\shape default 
+ is auto-appended by the compiler, e.g.
+ small, large, z80, ds390 etc
+\layout Standard
+\noindent 
 The install paths can still be changed during `make install` with e.g.:
 \layout LyX-Code
 
@@ -1881,7 +1920,10 @@ The paths searched when running the compiler are as follows (the first catch
 1.
  Binary files (preprocessor, assembler and linker)
 \newline 
+
+\layout Standard
+\align center 
+
 \begin_inset  Tabular
 <lyxtabular version="3" rows="4" columns="3">
 <features>
@@ -2003,11 +2045,15 @@ $PATH
  
 \newline 
 
-\newline 
+\layout Standard
+\noindent 
 2.
  Include files
 \newline 
+
+\layout Standard
+\align center 
+
 \begin_inset  Tabular
 <lyxtabular version="3" rows="6" columns="3">
 <features>
@@ -2285,8 +2331,9 @@ include
  
 \newline 
 
-\newline 
- The option -
+\layout Standard
+\noindent 
+The option -
 \begin_inset ERT
 status Collapsed
 
@@ -2303,6 +2350,9 @@ status Collapsed
 3.
  Library files 
 \newline 
+
+\layout Standard
+
 With the exception of 
 \begin_inset Quotes sld
 \end_inset 
@@ -2330,6 +2380,9 @@ model
  
 \newline 
 
+\layout Standard
+\align center 
+
 \begin_inset  Tabular
 <lyxtabular version="3" rows="6" columns="3">
 <features>
@@ -2671,6 +2724,8 @@ lib/
 \end_inset 
 
 
+\newline 
+
 \layout Comment
 
 Don't delete any of the stray spaces in the table above without checking
@@ -2813,10 +2868,10 @@ On OSX 2.x it was reported, that the default gcc (version 3.1 20020420 (prerelea
 ./configure CC=gcc2 CXX=g++2
 \layout Subsubsection
 
-Crosscompiling SDCC on Linux for Windows
+Cross compiling SDCC on Linux for Windows
 \layout Standard
 
-With the Mingw32 gcc crosscompiler it's easy to compile SDCC for Win32.
+With the Mingw32 gcc cross compiler it's easy to compile SDCC for Win32.
  See section 'Configure Options'.
 \layout Subsubsection
 
@@ -2961,7 +3016,17 @@ rxvt is a nice console with history.
  Replace in your cygwin.bat the line
 \layout LyX-Code
 
-bash --login -i 
+bash -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-login -i 
 \layout Standard
 
 with (one line):
@@ -2970,7 +3035,17 @@ with (one line):
 rxvt -sl 1000 -fn "Lucida Console-12" -sr -cr red
 \layout LyX-Code
 
-     -bg black -fg white -geometry 100x65 -e bash --login
+     -bg black -fg white -geometry 100x65 -e bash -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-login
 \layout Standard
 
 Text selected with the mouse is automatically copied to the clipboard, pasting
@@ -3002,7 +3077,7 @@ SDCC sources use the unix line ending LF.
  Make sure not to commit files with windows line endings.
 \layout Subsubsection
 
-Windows Install Using Microsoft Visual C++ 6.0/NET
+Building SDCC Using Microsoft Visual C++ 6.0/NET (MSVC)
 \layout Standard
 
 
@@ -3024,7 +3099,8 @@ 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.
+ to build it using Visual C++ 6.0/NET (except for sdcdb.exe which currently
+ doesn't build under MSVC).
  The workspace name is 'sdcc.dsw'.
  Please note that as it is now, all the executables are created in a folder
  called sdcc
@@ -3034,13 +3110,13 @@ bin_vc.
 \backslash 
 bin_vc to sdcc
 \backslash 
-bin before runnng SDCC.
+bin before running SDCC.
  
 \newline 
 
 \newline 
-In order to build SDCC with Visual C++ 6.0/NET you need win32 executables
of bison.exe, flex.exe, and gawk.exe.
+In order to build SDCC with MSVC you need win32 executables of bison.exe,
+ flex.exe, and gawk.exe.
  One good place to get them is 
 \begin_inset LatexCommand \url[here]{http://unxutils.sourceforge.net}
 
@@ -3056,8 +3132,8 @@ Download the file UnxUtils
 \end_inset 
 
 .zip.
- Now you have to install the utilities and setup Visual C++ so it can locate
the required programs.
+ Now you have to install the utilities and setup MSVC so it can locate the
+ required programs.
  Here there are two alternatives (choose one!):
 \layout Enumerate
 
@@ -3180,7 +3256,7 @@ bin_vc to sdcc
 bin, and you can compile using sdcc.
 \layout Subsubsection
 
-Windows Install Using Borland
+Building SDCC Using Borland
 \layout Enumerate
 
 From the sdcc directory, run the command "make -f Makefile.bcc".
@@ -3188,10 +3264,10 @@ From the sdcc directory, run the command "make -f Makefile.bcc".
  sdcdb.exe (which currently doesn't build under Borland C++).
 \layout Enumerate
 
-If you modify any source files and need to rebuild, be aware that the dependanci
+If you modify any source files and need to rebuild, be aware that the dependenci
 es may not be correctly calculated.
  The safest option is to delete all .obj files and run the build again.
- From a Cygwin BASH prompt, this can easily be done with the commmand:
+ From a Cygwin BASH prompt, this can easily be done with the command:
 \newline 
 
 \newline 
@@ -3212,7 +3288,7 @@ find .
 \newline 
 
 \newline 
-or on Windows NT/2000/XP from the command prompt with the commmand:
+or on Windows NT/2000/XP from the command prompt with the command:
 \newline 
 
 \family sans 
@@ -3290,16 +3366,13 @@ Install and search paths
 Make sure the compiler works on a very simple example.
  Type in the following test.c program using your favorite 
 \series default 
-ascii 
+ASCII 
 \series medium 
 editor:
-\series default 
+\layout Verse
 
-\newline 
 
 \family typewriter 
-
-\newline 
 char test;
 \newline 
 
@@ -3313,16 +3386,10 @@ void main(void) {
 test=0;
 \newline 
 }
-\family default 
-
-\newline 
-
-\emph on 
+\layout Standard
 
-\newline 
 
 \series medium 
-\emph default 
 Compile this using the following command: 
 \family sans 
 \series bold 
@@ -3382,11 +3449,8 @@ standard
 \series medium 
  header files and libraries.
  Edit test.c and change it to the following:
-\series default 
+\layout Verse
 
-\newline 
-
-\newline 
 
 \family typewriter 
 #include <string.h>
@@ -3404,11 +3468,9 @@ void main(void) {
 strcpy(str1, "testing");
 \newline 
 }
-\newline 
+\layout Standard
 
-\newline 
 
-\family default 
 \series medium 
 Compile this by typing 
 \family sans 
@@ -3425,6 +3487,28 @@ Compile this by typing
  
 \series medium 
 (see the Install trouble-shooting section for suggestions).
+
+\series default 
+ Use option 
+\series bold 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-print-search-dirs
+\series default 
+
+\begin_inset LatexCommand \index{-\/-print-search-dirs}
+
+\end_inset 
+
+ to find exactly where SDCC is looking for the include and lib files.
 \layout Subsection
 
 Install Trouble-shooting
@@ -3536,7 +3620,7 @@ Install and Search PATHS
 
 .
 \newline 
-On most systems you will need super-user privilages to do this.
+On most systems you will need super-user privileges to do this.
 \layout Subsection
 
 Components of SDCC
@@ -3663,13 +3747,13 @@ S51 is a freeware, opensource simulator developed by Daniel Drotos (
 
 ).
  The simulator is built as part of the build process.
- For more information visit Daniel's website at: 
+ For more information visit Daniel's web site at: 
 \begin_inset LatexCommand \url{http://mazsola.iit.uni-miskolc.hu/~drdani/embedded/s51}
 
 \end_inset 
 
 .
- It currently support the core mcs51, the Dallas DS80C390 and the Philips
+ It currently support the core mcs51, the Dallas DS80C390 and the Phillips
  XA51 family.
 \layout Subsubsection
 
@@ -3682,8 +3766,12 @@ sdcdb
 \layout Standard
 
 Sdcdb is the companion source level debugger.
- The current version of the debugger uses Daniel's Simulator S51, but can
- be easily changed to use other simulators.
+ The current version of the debugger uses Daniel's Simulator S51
+\begin_inset LatexCommand \index{s51}
+
+\end_inset 
+
+, but can be easily changed to use other simulators.
 \layout Section
 \pagebreak_top 
 Using SDCC
@@ -4047,6 +4135,14 @@ first
 \noun default 
  file specified in the command line, since the linkage editor processes
  file in the order they are presented to it.
+ The linker is invoked from sdcc using a script file with extension .lnk
+\begin_inset LatexCommand \index{.lnk}
+
+\end_inset 
+
+.
+ You can view this file to troubleshoot linking problems such as those arising
+ from missing libraries.
 \layout Subsubsection
 
 Projects with Additional Libraries
@@ -4106,9 +4202,14 @@ Note here that
 \newline 
 
 \newline 
-The most efficient way to use libraries is to keep seperate modules in seperate
+The most efficient way to use libraries is to keep separate modules in separate
  source files.
- The lib file now should name all the modules.rel files.
+ The lib file now should name all the modules.rel
+\begin_inset LatexCommand \index{rel}
+
+\end_inset 
+
+ files.
  For an example see the standard library file 
 \emph on 
 libsdcc.lib
@@ -4245,7 +4346,7 @@ Processor Selection Options
 
  processor (In development, not complete).
  AVR users should probably have a look at avr-gcc 
-\begin_inset LatexCommand \url[FIXME: official URL?]{ http://savannah.nongnu.org/download/avr-libc/snapshots/}
+\begin_inset LatexCommand \url{ http://savannah.nongnu.org/download/avr-libc/snapshots/}
 
 \end_inset 
 
@@ -4272,7 +4373,7 @@ I think it is fair to direct users there for now.
 
 \end_inset 
 
--bit processors (In development, not complete).
+-bit processors (Microchip p16f84 and variants).
 \layout Comment
 
 p16f627 p16f628 p16f84 p16f873 p16f877?
@@ -4280,6 +4381,24 @@ p16f627 p16f628 p16f84 p16f873 p16f877?
 \labelwidthstring 00.00.0000
 
 
+\series bold 
+-mpic16
+\begin_inset LatexCommand \index{-mpic16}
+
+\end_inset 
+
+
+\series default 
+ Generate code for the PIC 16
+\begin_inset LatexCommand \index{PIC16}
+
+\end_inset 
+
+-bit processors (Microchip p18f452 and variants).
+\layout List
+\labelwidthstring 00.00.0000
+
+
 \series bold 
 -mtlcs900h
 \series default 
@@ -4301,7 +4420,7 @@ p16f627 p16f628 p16f84 p16f873 p16f877?
 
 
 \series default 
- Generate code for the Philips XA51
+ Generate code for the Phillips XA51
 \begin_inset LatexCommand \index{XA51}
 
 \end_inset 
@@ -5117,13 +5236,13 @@ status Collapsed
 ).
 \layout Subsubsection
 
-Optimization Options
-\begin_inset LatexCommand \index{Options optimization}
+Z80 Options
+\begin_inset LatexCommand \index{Options Z80}
 
 \end_inset 
 
 
-\begin_inset LatexCommand \index{Optimization options}
+\begin_inset LatexCommand \index{Z80 options}
 
 \end_inset 
 
@@ -5143,26 +5262,93 @@ status Collapsed
 /
 \end_inset 
 
--nogcse
-\begin_inset LatexCommand \index{-\/-nogcse}
-
-\end_inset 
-
-
+-callee-saves-bc
 \series default 
- Will not do global subexpression elimination, this option may be used when
- the compiler creates undesirably large stack/data spaces to store compiler
- temporaries.
- A warning message will be generated when this happens and the compiler
- will indicate the number of extra bytes it allocated.
- It recommended that this option NOT be used, #pragma\SpecialChar ~
-NOGCSE
-\begin_inset LatexCommand \index{\#pragma NOGCSE}
+
+\begin_inset LatexCommand \index{-\/-callee-saves-bc}
 
 \end_inset 
 
- can be used to turn off global subexpression elimination
-\begin_inset LatexCommand \index{Subexpression elimination}
+
+\size large 
+\emph on 
+\size default 
+\emph default 
+Force a called function to always save BC.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-no-std-crt0
+\series default 
+
+\begin_inset LatexCommand \index{-\/-no-std-crt0}
+
+\end_inset 
+
+ When linking, skip the standard crt0.o object file.
+ You must provide your own crt0.o for your system when linking.
+\layout Subsubsection
+
+Optimization Options
+\begin_inset LatexCommand \index{Options optimization}
+
+\end_inset 
+
+
+\begin_inset LatexCommand \index{Optimization options}
+
+\end_inset 
+
+
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-nogcse
+\begin_inset LatexCommand \index{-\/-nogcse}
+
+\end_inset 
+
+
+\series default 
+ Will not do global subexpression elimination, this option may be used when
+ the compiler creates undesirably large stack/data spaces to store compiler
+ temporaries.
+ A warning message will be generated when this happens and the compiler
+ will indicate the number of extra bytes it allocated.
+ It recommended that this option NOT be used, #pragma\SpecialChar ~
+NOGCSE
+\begin_inset LatexCommand \index{\#pragma NOGCSE}
+
+\end_inset 
+
+ can be used to turn off global subexpression elimination
+\begin_inset LatexCommand \index{Subexpression elimination}
 
 \end_inset 
 
@@ -5549,7 +5735,7 @@ status Collapsed
 
 \series default 
  The compiler by default uses a caller saves convention for register saving
- across function calls, however this can cause unneccessary register pushing
+ across function calls, however this can cause unnecessary register pushing
  & popping when calling small functions from larger functions.
  This option can be used to switch the register saving convention for the
  function names specified.
@@ -5557,7 +5743,7 @@ status Collapsed
  code will be generated at the entry & exit for these functions to save
  & restore the registers used by these functions, this can SUBSTANTIALLY
  reduce code & improve run time performance of the generated code.
- In the future the compiler (with interprocedural analysis) will be able
+ In the future the compiler (with inter procedural analysis) will be able
  to determine the appropriate scheme to use for each function call.
  DO NOT use this option for built-in functions such as _mulint..., if this
  option is used for a library function the appropriate library function
@@ -6098,7 +6284,7 @@ status Collapsed
 
 \series default 
  Include i-codes in the asm file.
- Sounds like noise but is most helpfull for debugging the compiler itself.
+ Sounds like noise but is most helpful for debugging the compiler itself.
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -6146,6 +6332,53 @@ status Collapsed
 
 \series default 
  Display the directories in the compiler's search path
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-vc
+\begin_inset LatexCommand \index{-\/-vc}
+
+\end_inset 
+
+
+\series default 
+ Display errors and warnings using MSVC style, so you can use SDCC with
+ visual studio
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-use-stderr
+\begin_inset LatexCommand \index{-\/-use-stdout}
+
+\end_inset 
+
+
+\series default 
+ Send errors and warnings to stdout instead of stderr
 \layout Subsubsection
 
 Intermediate Dump Options
@@ -6572,7 +6805,7 @@ SDCC_LIB
 
 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 documentated.
+ They can change or disappear very quickly, and will never be documented.
 \layout Subsection
 
 MCS51/DS390 Storage Class
@@ -6595,16 +6828,15 @@ xdata
 
 \layout Standard
 
-Variables declared with this storage class will be placed in the extern
+Variables declared with this storage class will be placed in the external
  RAM.
  This is the 
 \series bold 
 default
 \series default 
  storage class for Large Memory model, e.g.:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 xdata unsigned char xduc;
@@ -6623,11 +6855,10 @@ This is the
 default
 \series default 
  storage class for Small Memory model.
- Variables declared with this storage class will be allocated in the internal
RAM, e.g.:
-\newline 
+ Variables declared with this storage class will be allocated in the directly
addressable portion of the internal RAM of a 8051, e.g.:
+\layout Verse
 
-\newline 
 
 \family typewriter 
 data int iramdata;
@@ -6643,9 +6874,8 @@ idata
 
 Variables declared with this storage class will be allocated into the indirectly
  addressable portion of the internal ram of a 8051, e.g.:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 idata int idi;
@@ -6662,9 +6892,8 @@ bit
 This is a data-type and a storage class specifier.
  When a variable is declared as a bit, it is allocated into the bit addressable
  memory of 8051, e.g.:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 bit iFlag;
@@ -6689,12 +6918,16 @@ sfr / sbit
 \emph default 
 signifies both a data-type and storage class, they are used to describe
  the special function registers and special bit variables of a 8051, eg:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
-sfr at 0x80 P0; /* special function register P0 at location 0x80 */
+sfr at
+\begin_inset LatexCommand \index{at}
+
+\end_inset 
+
+ 0x80 P0; /* special function register P0 at location 0x80 */
 \newline 
 sbit at 0xd7 CY; /* CY (Carry Flag
 \begin_inset LatexCommand \index{Flags}
@@ -6730,14 +6963,10 @@ SDCC allows (via language extensions) pointers to explicitly point to any
 
 \newline 
 Pointer declaration examples:
-\newline 
-
-\size small 
+\layout Verse
 
-\newline 
 
 \family typewriter 
-\size default 
 /* pointer physically in xternal ram pointing to object in internal ram
  */ 
 \newline 
@@ -6757,17 +6986,12 @@ code unsigned char * code p;
 \newline 
 
 \newline 
-/* the folowing is a generic pointer physically located in xdata space */
+/* the following is a generic pointer physically located in xdata space
+ */
 \newline 
 char * xdata p;
-\family default 
-\size small 
-
-\newline 
-
-\newline 
+\layout Standard
 
-\size default 
 Well you get the idea.
  
 \newline 
@@ -6876,14 +7100,10 @@ reentrant
 
 \emph default 
  keyword in the function declaration, e.g.:
-\newline 
-
-\size small 
+\layout Verse
 
-\newline 
 
 \family typewriter 
-\size default 
 unsigned char foo(char i) reentrant 
 \newline 
 { 
@@ -6892,11 +7112,8 @@ unsigned char foo(char i) reentrant
  
 \newline 
 }
-\newline 
-
-\family default 
+\layout Standard
 
-\newline 
 Since stack space on 8051 is limited, the 
 \emph on 
 reentrant 
@@ -6931,9 +7148,8 @@ Local variables can be assigned storage classes and absolute
 \end_inset 
 
  addresses, e.g.: 
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 unsigned char foo() {
@@ -6954,7 +7170,7 @@ bit bvar;
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-data at 0x31 unsiged char j;
+data at 0x31 unsigned char j;
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -6964,11 +7180,8 @@ data at 0x31 unsiged char j;
  
 \newline 
 }
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
 In the above example the variable 
 \emph on 
 i
@@ -7080,9 +7293,8 @@ tion
 
  will NOT be overlayed since these are implemented using external functions,
  e.g.:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 #pragma SAVE 
@@ -7144,11 +7356,8 @@ set_error(10);
  
 \newline 
 }
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
 In the above example the parameter 
 \emph on 
 errcd
@@ -7171,12 +7380,11 @@ Interrupt Service Routines
 
 SDCC allows interrupt service routines to be coded in C, with some extended
  keywords.
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
-void timer_isr (void) interrupt 2 using 1 
+void timer_isr (void) interrupt 1 using 1 
 \newline 
 { 
 \newline 
@@ -7184,12 +7392,9 @@ void timer_isr (void) interrupt 2 using 1
  
 \newline 
 }
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
-The number following the 
+The optional number following the 
 \emph on 
 interrupt
 \begin_inset LatexCommand \index{interrupt}
@@ -7199,14 +7404,14 @@ interrupt
 
 \emph default 
  keyword is the interrupt number this routine will service.
- The compiler will insert a call to this routine in the interrupt vector
- table for the interrupt number specified.
+ When present, the compiler will insert a call to this routine in the
interrupt vector table for the interrupt number specified.
  The 
 \emph on 
 using
 \emph default 
- keyword is used to tell the compiler to use the specified register bank
- (8051 specific) when generating code for this function.
+ keyword can be used to tell the compiler to use the specified register
bank (8051 specific) when generating code for this function.
  Note that when some function is called from an interrupt service routine
  it should be preceded by a #pragma\SpecialChar ~
 NOOVERLAY
@@ -7215,7 +7420,23 @@ NOOVERLAY
 \end_inset 
 
  if it is not reentrant.
- A special note here, int (16 bit) and long (32 bit) integer division
+ Furthermore nonreentrant functions should not be called from the main program
+ while the interrupt service routine might be active.
+ If the interrupt service routines changes variables which are accessed
+ by other functions these variables should be declared 
+\emph on 
+volatile
+\emph default 
+
+\begin_inset LatexCommand \index{volatile}
+
+\end_inset 
+
+.
+\layout Standard
+
+A special note here, int (16 bit) and long (32 bit) integer division
 \begin_inset LatexCommand \index{Division}
 
 \end_inset 
@@ -7283,21 +7504,21 @@ main
 .
 \layout Standard
 
-Interrupt Numbers and the corresponding address & descriptions for the Standard
- 8051 are listed below.
+Interrupt numbers and the corresponding address & descriptions for the Standard
+ 8051/8052 are listed below.
  SDCC will automatically adjust the interrupt vector table to the maximum
  interrupt number specified.
 \newline 
 
 \layout Standard
-
+\align center 
 
 \begin_inset  Tabular
-<lyxtabular version="3" rows="6" columns="3">
+<lyxtabular version="3" rows="7" columns="3">
 <features>
-<column alignment="block" valignment="top" leftline="true" width="0in">
-<column alignment="block" valignment="top" leftline="true" width="0in">
-<column alignment="block" valignment="top" leftline="true" rightline="true" width="0in">
+<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">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -7428,7 +7649,7 @@ Timer 1
 \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
 
@@ -7454,6 +7675,32 @@ Serial
 \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
+
+5
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Timer 2 (8052)
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0x002B
+\end_inset 
+</cell>
+</row>
 </lyxtabular>
 
 \end_inset 
@@ -7461,7 +7708,8 @@ Serial
 
 \newline 
 
-\newline 
+\layout Standard
+
 If the interrupt service routine is defined without 
 \emph on 
 using
@@ -7517,14 +7765,10 @@ critical
  SDCC will generate code to disable all interrupts upon entry to a critical
  function and enable them back before returning.
  Note that nesting critical functions may cause unpredictable results.
-\newline 
-
-\size small 
+\layout Verse
 
-\newline 
 
 \family typewriter 
-\size default 
 int foo () critical 
 \newline 
 { 
@@ -7536,11 +7780,8 @@ int foo () critical
  
 \newline 
 }
-\newline 
-
-\family default 
+\layout Standard
 
-\newline 
 The critical attribute maybe used with other attributes like 
 \emph on 
 reentrant.
@@ -7591,12 +7832,16 @@ return
  This is particularly useful for interrupt functions, which can have a large
  (and often unnecessary) prologue/epilogue.
  For example, compare the code generated by these two functions:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
-data unsigned char counter;
+volatile
+\begin_inset LatexCommand \index{volatile}
+
+\end_inset 
+
+ data unsigned char counter;
 \newline 
 void simpleInterrupt(void) interrupt
 \begin_inset LatexCommand \index{interrupt}
@@ -7655,7 +7900,7 @@ reti\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-; MUST explicitly include ret in _naked function.
+; MUST explicitly include ret or reti in _naked function.
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -7669,15 +7914,11 @@ _endasm
 ;
 \newline 
 }
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 For an 8051 target, the generated simpleInterrupt looks like:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 _simpleIterrupt:
@@ -7814,15 +8055,11 @@ acc
 \SpecialChar ~
 \SpecialChar ~
 reti
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 whereas nakedInterrupt looks like:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 _nakedInterrupt:
@@ -7845,11 +8082,8 @@ reti\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 ; MUST explicitly include ret(i) in _naked function.
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 While there is nothing preventing you from writing C code inside a _naked
  function, there are many ways to shoot yourself in the foot doing this,
  and it is recommended that you stick to inline assembler.
@@ -7897,7 +8131,7 @@ non-interrupt
 \emph default 
  function (but may occasionally be useful anyway
 \begin_inset Foot
-collapsed true
+collapsed false
 
 \layout Standard
 
@@ -7977,9 +8211,8 @@ at
  <address>
 \emph default 
  keyword, in addition to a storage class, e.g.:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 xdata
@@ -7992,19 +8225,11 @@ xdata
 
 \end_inset 
 
- 0x8000 unsigned char PORTA_8255 ;
-\newline 
-
-\family default 
+ 0x7ffe unsigned int chksum;
+\layout Standard
 
-\newline 
-In the above example the PORTA_8255 will be allocated to the location 0x8000
+In the above example the variable chksum will located at 0x7ffe and 0x7fff
  of the external ram.
- Note that this feature is provided to give the programmer access to 
-\emph on 
-memory mapped
-\emph default 
- devices attached to the controller.
  The compiler does not actually reserve any space for variables declared
  in this way (they are implemented with an equate in the assembler).
  Thus it is left to the programmer to make sure there are no overlaps with
@@ -8024,15 +8249,41 @@ memory mapped
 
 \end_inset 
 
-) are a good places to look for such overlaps.
-\newline 
+) are good places to look for such overlaps.
+\layout Standard
+
+In case of memory mapped I/O devices the keyword 
+\emph on 
+volatile
+\emph default 
+ should be used to tell the compiler that accesses might not be optimized
+ away:
+\layout Verse
+
+
+\family typewriter 
+volatile
+\begin_inset LatexCommand \index{volatile}
+
+\end_inset 
+
+ xdata
+\begin_inset LatexCommand \index{xdata}
+
+\end_inset 
+
+ at
+\begin_inset LatexCommand \index{at}
+
+\end_inset 
+
+ 0x8000 unsigned char PORTA_8255;
+\layout Standard
 
-\newline 
 Absolute address can be specified for variables in all storage classes,
  e.g.:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 bit
@@ -8046,15 +8297,165 @@ bit
 \end_inset 
 
  0x02 bvar;
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
 The above example will allocate the variable at offset 0x02 in the bit-addressab
 le space.
  There is no real advantage to assigning absolute addresses to variables
  in this manner, unless you want strict control over all the variables allocated.
+ One possible use would be to write hardware portable code.
+ For example, if you have a routine that uses one or more of the microcontroller
+ I/O pins, and such pins are different for two different hardwares, you
+ can declare the I/O pins in you routine using
+\layout Verse
+
+
+\family typewriter 
+extern bit SDI;
+\newline 
+extern bit SCLK;
+\newline 
+extern bit CPOL;
+\newline 
+
+\newline 
+void DS1306_put(unsigned char value)
+\newline 
+{
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+unsigned char mask=0x80;
+\newline 
+
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+while(mask)
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+{
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+SDI=(value & mask)?1:0;
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+SCLK=!CPOL;
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+SCLK=CPOL;
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+mask/=2;
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+}
+\newline 
+}
+\layout Standard
+
+Then, someplace in the code for the first hardware you would use
+\layout Verse
+
+
+\family typewriter 
+bit at 0x80 SDI;\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/*I/O port 0, bit 0*/
+\newline 
+bit at 0x81 SCLK;\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/*I/O port 0, bit 1*/
+\newline 
+bit CPOL;\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/*This is a variable, let the linker allocate this one*/
+\layout Standard
+
+Similarly, for the second hardware you would use
+\layout Verse
+
+
+\family typewriter 
+bit at 0x83 SDI;\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/*I/O port 0, bit 3*/
+\newline 
+bit at 0x91 SCLK;\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/*I/O port 1, bit 1*/
+\newline 
+bit CPOL;\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/*This is a variable, let the linker allocate this one*/
+\layout Standard
+
+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
+ specified in the whole project.
 \layout Subsection
 
 Startup Code
@@ -8153,14 +8554,13 @@ status Collapsed
 
 .
  This might cause some unexpected changes in the inline assembler code.
- Please go throught the peephole optimizer rules defined in file 
+ Please go through the peephole optimizer rules defined in file 
 \emph on 
 SDCCpeeph.def
 \emph default 
  carefully before using this option.
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 _asm
@@ -8199,14 +8599,8 @@ _endasm
 \end_inset 
 
  ;
-\family default 
-\size small 
-
-\newline 
-
-\newline 
+\layout Standard
 
-\size default 
 The inline assembler code can contain any valid code understood by the assembler
 , this includes any assembler directives and comment lines.
  The compiler does not do any validation of the code within the 
@@ -8226,9 +8620,8 @@ Inline assembler code cannot reference any C-Labels, however it can reference
 \end_inset 
 
  defined by the inline assembler, e.g.:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 foo() { 
@@ -8302,17 +8695,11 @@ _endasm ;
 /* some more c code */
 \newline 
 }
-\newline 
-
-\newline 
-
-\family default 
-In other words inline assembly code can access labels defined in inline
- assembly within the scope of the funtion.
 \layout Standard
 
-The same goes the other way, ie.
+In other words inline assembly code can access labels defined in inline
+ assembly within the scope of the function.
+ The same goes the other way, ie.
  labels defines in inline assembly CANNOT be accessed by C statements.
 \layout Subsection
 
@@ -8332,93 +8719,278 @@ int (16 bit)
 For signed & unsigned int (16 bit) and long (32 bit) variables, division,
  multiplication and modulus operations are implemented by support routines.
  These support routines are all developed in ANSI-C to facilitate porting
- to other MCUs, although some model specific assembler optimations are used.
+ to other MCUs, although some model specific assembler optimizations are
+ used.
  The following files contain the described routine, all of them can be found
  in <installdir>/share/sdcc/lib.
 \newline 
 
-\newline 
-
-\emph on 
-<pending: tabularise this>
-\emph default 
+\layout Standard
+\align center 
 
-\newline 
+\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">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
-\newline 
-_mulint.c - 16 bit multiplication
-\newline 
-_divsint.c - signed 16 bit division (calls _divuint)
-\newline 
-_divuint.c - unsigned 16 bit division
-\newline 
-_modsint.c - signed 16 bit modulus (call _moduint)
-\newline 
-_moduint.c - unsigned 16 bit modulus
-\newline 
-_mullong.c - 32 bit multiplication
-\newline 
-_divslong.c - signed 32 division (calls _divulong)
-\newline 
-_divulong.c - unsigned 32 division
-\newline 
-_modslong.c - signed 32 bit modulus (calls _modulong)
-\newline 
-_modulong.c - unsigned 32 bit modulus 
-\size footnotesize 
+\layout Standard
 
-\newline 
 
-\newline 
+\series bold 
+Function
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
-\size default 
-Since they are compiled as 
-\emph on 
-non-reentrant
-\emph default 
+\layout Standard
 
-\begin_inset LatexCommand \index{reentrant}
 
+\series bold 
+Description
 \end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
-, interrupt
-\begin_inset LatexCommand \index{interrupt}
+\layout Standard
 
+_mulint.c 
 \end_inset 
-
- service routines should not do any of the above operations.
- If this is unavoidable then the above routines will need to be compiled
- with the 
-\emph on 
--
-\begin_inset ERT
-status Collapsed
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
 \layout Standard
 
-\backslash 
-/
+16 bit multiplication
 \end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
--stack-auto
-\begin_inset LatexCommand \index{-\/-stack-auto}
+\layout Standard
 
+_divsint.c 
 \end_inset 
-
-
-\emph default 
- option, after which the source program will have to be compiled with 
-\emph on 
--
-\begin_inset ERT
-status Collapsed
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
 \layout Standard
 
-\backslash 
-/
+ signed 16 bit division (calls _divuint)
 \end_inset 
-
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+_divuint.c 
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+ unsigned 16 bit division
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+_modsint.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+signed 16 bit modulus (calls _moduint)
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+_moduint.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+unsigned 16 bit modulus
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+_mullong.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+32 bit multiplication
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+_divslong.c 
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+ signed 32 division (calls _divulong)
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+_divulong.c 
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+unsigned 32 division
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+_modslong.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+ signed 32 bit modulus (calls _modulong)
+\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
+
+_modulong.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+unsigned 32 bit modulus
+\end_inset 
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset 
+
+
+\newline 
+
+\layout Standard
+
+Since they are compiled as 
+\emph on 
+non-reentrant
+\emph default 
+
+\begin_inset LatexCommand \index{reentrant}
+
+\end_inset 
+
+, interrupt
+\begin_inset LatexCommand \index{interrupt}
+
+\end_inset 
+
+ service routines should not do any of the above operations.
+ If this is unavoidable then the above routines will need to be compiled
+ with the 
+\emph on 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-stack-auto
+\begin_inset LatexCommand \index{-\/-stack-auto}
+
+\end_inset 
+
+
+\emph default 
+ option, after which the source program will have to be compiled with 
+\emph on 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
 -int-long-rent
 \begin_inset LatexCommand \index{-\/-int-long-rent}
 
@@ -8427,6 +8999,9 @@ status Collapsed
 
 \emph default 
  option.
+ Notice that you don't have to call this routines directly.
+ The compiler will use them automatically every time a integer operation
+ is required.
 \layout Subsection
 
 Floating Point Support
@@ -8437,62 +9012,649 @@ Floating Point Support
 
 \layout Standard
 
-SDCC supports IEEE (single precision 4bytes) floating point numbers.The floating
- point support routines are derived from gcc's floatlib.c and consists 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 consists
of the following routines:
 \newline 
 
-\newline 
+\layout Standard
+\align center 
 
-\emph on 
-<pending: tabularise this>
-\emph default 
+\size footnotesize 
 
-\newline 
+\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">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
-\newline 
-_fsadd.c - add floating point numbers
-\newline 
-_fssub.c - subtract floating point numbers
-\newline 
-_fsdiv.c - divide floating point numbers
-\newline 
-_fsmul.c - multiply floating point numbers
-\newline 
-_fs2uchar.c - convert floating point to unsigned char
-\newline 
-_fs2char.c - convert floating point to signed char
-\newline 
-_fs2uint.c - convert floating point to unsigned int
-\newline 
-_fs2int.c - convert floating point to signed int
-\newline 
-_fs2ulong.c - convert floating point to unsigned long
-\newline 
-_fs2long.c - convert floating point to signed long
-\newline 
-_uchar2fs.c - convert unsigned char to floating point
-\newline 
-_char2fs.c - convert char to floating point number
-\newline 
-_uint2fs.c - convert unsigned int to floating point
-\newline 
-_int2fs.c - convert int to floating point numbers
-\newline 
-_ulong2fs.c - convert unsigned long to floating point number
-\newline 
-_long2fs.c - convert long to floating point number
-\size footnotesize 
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+Function 
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Description
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_fsadd.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+add floating point numbers
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_fssub.c 
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+subtract floating point numbers 
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_fsdiv.c 
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+divide floating point numbers 
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_fsmul.c 
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+multiply floating point numbers 
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_fs2uchar.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+convert floating point to unsigned char
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_fs2char.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+convert floating point to signed char
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_fs2uint.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+convert floating point to unsigned int
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_fs2int.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+convert floating point to signed int
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_fs2ulong.
+\family default 
+\series default 
+\shape default 
+\size default 
+\emph default 
+\bar default 
+\noun default 
+\color default
+c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+convert floating point to unsigned long
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_fs2long.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+convert floating point to signed long
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_uchar2fs.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+convert unsigned char to floating point
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_char2fs.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+convert char to floating point number
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_uint2fs.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+convert unsigned int to floating point
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_int2fs.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+convert int to floating point numbers
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_ulong2fs.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+convert unsigned long to floating point number
+\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
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+_long2fs.c
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\family roman 
+\series medium 
+\shape up 
+\size normal 
+\emph off 
+\bar no 
+\noun off 
+\color none
+convert long to floating point number
+\end_inset 
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset 
 
-\newline 
 
 \newline 
 
-\size default 
+\layout Standard
+
 Note if all these routines are used simultaneously the data space might
  overflow.
  For serious floating point usage it is strongly recommended that the large
  model be used.
+ Also notice that you don't have to call this routines directly.
+ The compiler will use them automatically every time a floating point operation
+ is required.
 \layout Subsection
 
 MCS51 Memory Models
@@ -8516,7 +9678,7 @@ never
  be combined together or the results would be unpredictable.
  The library routines supplied with the compiler are compiled as both small
  and large.
- The compiled library modules are contained in seperate directories as small
+ The compiled library modules are contained in separate directories as small
  and large so that you can link to either set.
  
 \layout Standard
@@ -8541,7 +9703,7 @@ Judicious usage of the processor specific storage classes
  and the 'reentrant' function type will yield much more efficient code,
  than using the large model.
  Several optimizations are disabled when the program is compiled using the
- large model, it is therefore strongly recommdended that the small model
+ large model, it is therefore strongly recommended that the small model
  be used unless absolutely required.
 \layout Subsection
 
@@ -8657,67 +9819,371 @@ Defines Created by the Compiler
 
 \layout Standard
 
-The compiler creates the following #defines
-\begin_inset LatexCommand \index{\#defines}
+The compiler creates the following #defines
+\begin_inset LatexCommand \index{\#defines}
+
+\end_inset 
+
+:
+\newline 
+
+\layout Standard
+
+
+\begin_inset  Tabular
+<lyxtabular version="3" rows="10" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" 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
+
+\layout Standard
+
+
+\series bold 
+#define
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\series bold 
+Description
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+SDCC
+\begin_inset LatexCommand \index{SDCC}
+
+\end_inset 
+
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+this Symbol is always defined
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+SDCC_mcs51
+\begin_inset LatexCommand \index{SDCC\_mcs51}
+
+\end_inset 
+
+ or SDCC_ds390
+\begin_inset LatexCommand \index{SDCC\_ds390}
+
+\end_inset 
+
+ or SDCC_z80
+\begin_inset LatexCommand \index{SDCC\_z80}
+
+\end_inset 
+
+, etc
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+depending on the model used (e.g.: -mds390
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+__mcs51
+\begin_inset LatexCommand \index{\_\_mcs51}
+
+\end_inset 
+
+ or __ds390
+\begin_inset LatexCommand \index{\_\_ds390}
+
+\end_inset 
+
+ or __z80
+\begin_inset LatexCommand \index{\_\_z80}
+
+\end_inset 
+
+, etc
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+depending on the model used (e.g.
+ -mz80)
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+SDCC_STACK_AUTO
+\begin_inset LatexCommand \index{SDCC\_STACK\_AUTO}
+
+\end_inset 
+
+
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+when 
+\emph on 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-stack-auto
+\emph default 
+ option is used
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+SDCC_MODEL_SMALL
+\begin_inset LatexCommand \index{SDCC\_MODEL\_SMALL}
+
+\end_inset 
+
+
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+when 
+\emph on 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-model-small
+\emph default 
+ is used
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+SDCC_MODEL_LARGE
+\begin_inset LatexCommand \index{SDCC\_MODEL\_LARGE}
+
+\end_inset 
+
+
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+when 
+\emph on 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-model-large
+\emph default 
+ is used
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+SDCC_USE_XSTACK
+\begin_inset LatexCommand \index{SDCC\_USE\_XSTACK}
+
+\end_inset 
+
+
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+when 
+\emph on 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
 
+-xstack
+\emph default 
+ option is used
 \end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
-.
-\layout Itemize
+\layout Standard
 
-SDCC
-\begin_inset LatexCommand \index{SDCC}
+SDCC_STACK_TENBIT
+\begin_inset LatexCommand \index{SDCC\_STACK\_TENBIT}
 
 \end_inset 
 
- - this Symbol is always defined.
-\layout Itemize
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
-SDCC_mcs51
-\begin_inset LatexCommand \index{SDCC\_mcs51}
+\layout Standard
 
+when 
+\emph on 
+-mds390
+\emph default 
+ is used
 \end_inset 
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
 
- or SDCC_ds390
-\begin_inset LatexCommand \index{SDCC\_ds390}
+\layout Standard
+
+SDCC_MODEL_FLAT24
+\begin_inset LatexCommand \index{SDCC\_MODEL\_FLAT24}
 
 \end_inset 
 
- or SDCC_z80
-\begin_inset LatexCommand \index{SDCC\_z80}
 
 \end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
 
-, etc - depending on the model used (e.g.: -mds390)
-\layout Itemize
+\layout Standard
 
-__mcs51
-\begin_inset LatexCommand \index{\_\_mcs51}
+when 
+\emph on 
+-mds390
+\emph default 
+ is used
+\end_inset 
+</cell>
+</row>
+</lyxtabular>
 
 \end_inset 
 
- or __ds390
-\begin_inset LatexCommand \index{\_\_ds390}
 
-\end_inset 
+\newline 
 
- or __z80
-\begin_inset LatexCommand \index{\_\_z80}
+\layout Subsection
 
+Redirecting output on Windows Shells
+\layout Standard
+
+By default SDCC writes it's error messages to 
+\begin_inset Quotes sld
 \end_inset 
 
-, etc - depending on the model used (e.g.
- -mz80)
-\layout Itemize
+standard error
+\begin_inset Quotes srd
+\end_inset 
 
-SDCC_STACK_AUTO
-\begin_inset LatexCommand \index{SDCC\_STACK\_AUTO}
+.
+ To force all messages to 
+\begin_inset Quotes sld
+\end_inset 
 
+standard output
+\begin_inset Quotes srd
 \end_inset 
 
- - this symbol is defined when 
-\emph on 
+ use 
+\series bold 
 -
+\series default 
+\emph on 
+
 \begin_inset ERT
 status Collapsed
 
@@ -8727,19 +10193,22 @@ status Collapsed
 /
 \end_inset 
 
--stack-auto
-\emph default 
- option is used.
-\layout Itemize
 
-SDCC_MODEL_SMALL
-\begin_inset LatexCommand \index{SDCC\_MODEL\_SMALL}
+\series bold 
+\emph default 
+-
+\series default 
+use-stdout
+\begin_inset LatexCommand \index{-\/-use-stdout}
 
 \end_inset 
 
- - when 
+.
+ Aditionaly, if you happen to have visual studio installed in your windows
+ machine, you can use it to compile your sources using a custom build and
+ the SDCC -
 \emph on 
--
+
 \begin_inset ERT
 status Collapsed
 
@@ -8749,19 +10218,30 @@ status Collapsed
 /
 \end_inset 
 
--model-small
-\emph default 
- is used.
-\layout Itemize
 
-SDCC_MODEL_LARGE
-\begin_inset LatexCommand \index{SDCC\_MODEL\_LARGE}
+\emph default 
+-vc
+\begin_inset LatexCommand \index{-\/-vc}
 
 \end_inset 
 
- - when 
+ option.
+ Something like this should work:
+\newline 
+
+\newline 
+
+\series bold 
+c:
+\backslash 
+sdcc
+\backslash 
+bin
+\backslash 
+sdcc.exe -
+\series default 
 \emph on 
--
+
 \begin_inset ERT
 status Collapsed
 
@@ -8771,19 +10251,13 @@ status Collapsed
 /
 \end_inset 
 
--model-large
-\emph default 
- is used.
-\layout Itemize
-
-SDCC_USE_XSTACK
-\begin_inset LatexCommand \index{SDCC\_USE\_XSTACK}
-
-\end_inset 
 
- - when 
+\series bold 
+\emph default 
+-vc -
+\series default 
 \emph on 
--
+
 \begin_inset ERT
 status Collapsed
 
@@ -8793,33 +10267,10 @@ status Collapsed
 /
 \end_inset 
 
--xstack
-\emph default 
- option is used.
-\layout Itemize
-
-SDCC_STACK_TENBIT
-\begin_inset LatexCommand \index{SDCC\_STACK\_TENBIT}
-
-\end_inset 
-
- - when 
-\emph on 
--mds390
-\emph default 
- is used
-\layout Itemize
-
-SDCC_MODEL_FLAT24
-\begin_inset LatexCommand \index{SDCC\_MODEL\_FLAT24}
-
-\end_inset 
 
- - when 
-\emph on 
--mds390
+\series bold 
 \emph default 
- is used
+-model-large -c $(InputPath)
 \layout Section
 \pagebreak_top 
 SDCC Technical Data
@@ -8848,23 +10299,18 @@ Sub-expression Elimination
 
 The compiler does local and global common subexpression elimination, e.g.:
  
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 i = x + y + 1; 
 \newline 
 j = x + y;
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 will be translated to
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 iTemp = x + y 
@@ -8872,30 +10318,22 @@ iTemp = x + y
 i = iTemp + 1 
 \newline 
 j = iTemp
-\newline 
-
-\family default 
+\layout Standard
 
-\newline 
 Some subexpressions are not as obvious as the above example, e.g.:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 a->b[i].c = 10; 
 \newline 
 a->b[i].d = 11;
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 In this case the address arithmetic a->b[i] will be computed only once;
  the equivalent code in C would be.
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 iTemp = a->b[i]; 
@@ -8903,11 +10341,8 @@ iTemp = a->b[i];
 iTemp.c = 10; 
 \newline 
 iTemp.d = 11;
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 The compiler will try to keep these temporary variables in registers.
 \layout Subsubsection
 
@@ -8917,7 +10352,7 @@ Dead-Code Elimination
 \end_inset 
 
 
-\layout Standard
+\layout Verse
 
 
 \family typewriter 
@@ -8953,15 +10388,11 @@ global = 3;\SpecialChar ~
 /* unreachable */ 
 \newline 
 }
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 will be changed to
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 int global; void f () 
@@ -8985,7 +10416,7 @@ Copy-Propagation
 \end_inset 
 
 
-\layout Standard
+\layout Verse
 
 
 \family typewriter 
@@ -9008,41 +10439,34 @@ j = i;
 return j; 
 \newline 
 }
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 will be changed to 
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 int f() { 
 \newline 
 \SpecialChar ~
- \SpecialChar ~
- int i,j; 
+\SpecialChar ~
+int i, j; 
 \newline 
 \SpecialChar ~
- \SpecialChar ~
- i = 10; 
+\SpecialChar ~
+i = 10; 
 \newline 
 \SpecialChar ~
- \SpecialChar ~
- j = 10; 
+\SpecialChar ~
+j = 10; 
 \newline 
 \SpecialChar ~
- \SpecialChar ~
- return 10; 
+\SpecialChar ~
+return 10; 
 \newline 
 }
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
 Note: the dead stores created by this copy propagation will be eliminated
  by dead-code elimination.
 \layout Subsubsection
@@ -9096,25 +10520,20 @@ NOINDUCTION
 
 \newline 
 Loop Invariant:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 for (i = 0 ; i < 100 ; i ++) 
 \newline 
- \SpecialChar ~
- \SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
 f += k + l;
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 changed to
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 itemp = k + l; 
@@ -9124,11 +10543,8 @@ for (i = 0; i < 100; i++)
 \SpecialChar ~
 \SpecialChar ~
 f += itemp;
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 As mentioned previously some loop invariants are not as apparent, all static
  address computations are also moved out of the loop.
 \newline 
@@ -9140,9 +10556,8 @@ Strength Reduction
 \end_inset 
 
 , this optimization substitutes an expression by a cheaper expression:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 for (i=0;i < 100; i++)
@@ -9150,15 +10565,11 @@ for (i=0;i < 100; i++)
 \SpecialChar ~
 \SpecialChar ~
 ar[i*5] = i*3;
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 changed to
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 itemp1 = 0; 
@@ -9167,24 +10578,27 @@ itemp2 = 0;
 \newline 
 for (i=0;i< 100;i++) { 
 \newline 
- \SpecialChar ~
- \SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
 ar[itemp1] = itemp2; 
 \newline 
- \SpecialChar ~
- \SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
 itemp1 += 5; 
 \newline 
- \SpecialChar ~
- \SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
 itemp2 += 3; 
 \newline 
 }
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 The more expensive multiplication
 \begin_inset LatexCommand \index{Multiplication}
 
@@ -9223,8 +10637,8 @@ The 'for' loop is of the form
 \newline 
 
 \family typewriter 
-for (<symbol> = <expression> ; <sym> [< | <=] <expression> ; [<sym>++ |
<sym> += 1])
+for(<symbol> = <expression>; <sym> [< | <=] <expression>; [<sym>++ | <sym>
+ += 1])
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -9269,9 +10683,8 @@ Algebraic Simplifications
 
 SDCC does numerous algebraic simplifications, the following is a small sub-set
  of these optimizations.
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 i = j + 0 ; /* changed to */ i = j; 
@@ -9281,11 +10694,8 @@ i /= 2; /* changed to */ i >>= 1;
 i = j - j ; /* changed to */ i = 0; 
 \newline 
 i = j / 1 ; /* changed to */ i = j;
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 Note the subexpressions
 \begin_inset LatexCommand \index{Subexpression}
 
@@ -9314,119 +10724,208 @@ SDCC changes switch statements to jump tables
 
 The case labels are in numerical sequence, the labels need not be in order,
  and the starting number need not be one or zero.
-\newline 
+\begin_deeper 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 switch(i) {\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 ~
 switch (i) { 
 \newline 
-case 4:...
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+case 4: ...\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 ~
 case 1: ...
  
 \newline 
-case 5:...
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+case 5: ...\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 ~
 case 2: ...
  
 \newline 
-case 3:...
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+case 3: ...\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 ~
 case 3: ...
  
 \newline 
-case 6:...
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
- \SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+case 6: ...\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 ~
 case 4: ...
  
 \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 ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
 }
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
 Both the above switch statements will be implemented using a jump-table.
+\end_deeper 
 \layout Itemize
 
 The number of case labels is at least three, since it takes two conditional
@@ -9435,105 +10934,142 @@ The number of case labels is at least three, since it takes two conditional
 
 The number of case labels is less than 84, since each label takes 3 bytes
  and a jump-table can be utmost 256 bytes long.
 \layout Standard
 
 Switch statements which have gaps in the numeric sequence or those that
  have more that 84 case labels can be split into more than one switch statement
  for efficient code generation, e.g.:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 switch (i) { 
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 1: ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 2: ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 3: ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 4: ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 9: ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 10: ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 11: ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 12: ...
  
 \newline 
 }
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 If the above switch statement is broken down into two switch statements
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 switch (i) { 
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 1: ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 2: ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 3: ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 4: ...
  
 \newline 
 }
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
 and
-\family typewriter 
+\layout Verse
 
-\newline 
 
-\newline 
+\family typewriter 
 switch (i) { 
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 9: \SpecialChar ~
 ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 10: ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 11: ...
  
 \newline 
+\SpecialChar ~
+\SpecialChar ~
 case 12:\SpecialChar ~
 ...
  
 \newline 
 }
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
 then both the switch statements will be implemented using jump-tables whereas
  the unmodified switch statement will not be.
+ The pragma NOJTBOUND
+\begin_inset LatexCommand \index{\#pragma NOJTBOUND}
+
+\end_inset 
+
+ can be used to turn off checking the 
+\emph on 
+j
+\emph default 
+ump 
+\emph on 
+t
+\emph default 
+able 
+\emph on 
+bound
+\emph default 
+aries.
 \layout Subsubsection
 
 Bit-shifting Operations
@@ -9548,11 +11084,10 @@ Bit shifting is one of the most frequently used operation in embedded programmin
 g.
  SDCC tries to implement bit-shift operations in the most efficient way
  possible, e.g.:
-\newline 
+\layout Verse
 
-\family typewriter 
 
-\newline 
+\family typewriter 
 unsigned char i;
 \newline 
 ...
@@ -9561,17 +11096,13 @@ unsigned char i;
 i>>= 4; 
 \newline 
 ...
-\newline 
-
-\family default 
+\layout Standard
 
-\newline 
 generates the following code:
-\newline 
+\layout Verse
 
-\family typewriter 
 
-\newline 
+\family typewriter 
 mov a,_i 
 \newline 
 swap a 
@@ -9579,16 +11110,12 @@ swap a
 anl a,#0x0f 
 \newline 
 mov _i,a
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 In general SDCC will never setup a loop if the shift count is known.
  Another example:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 unsigned int i; 
@@ -9599,15 +11126,11 @@ unsigned int i;
 i >>= 9; 
 \newline 
 ...
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 will generate:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 mov a,(_i + 1) 
@@ -9619,11 +11142,8 @@ clr c
 rrc a 
 \newline 
 mov _i,a
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 Note that SDCC stores numbers in little-endian format (i.e.
  lowest order first).
 \layout Subsubsection
@@ -9638,9 +11158,8 @@ Bit-rotation
 
 A special case of the bit-shift operation is bit rotation, SDCC recognizes
  the following expression to be a left bit-rotation:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 unsigned char i; 
@@ -9652,14 +11171,14 @@ i = ((i << 1) | (i >> 7));
 \family default 
 
 \newline 
+
+\family typewriter 
 ...
-\newline 
+\layout Standard
 
-\newline 
 will generate the following code:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 mov a,_i 
@@ -9667,16 +11186,12 @@ mov a,_i
 rl a 
 \newline 
 mov _i,a
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 SDCC uses pattern matching on the parse tree to determine this operation.Variatio
 ns of this case will also be recognized as bit-rotation, i.e.: 
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 i = ((i >> 7) | (i << 1)); /* left-bit rotation */
@@ -9694,10 +11209,9 @@ It is frequently required to obtain the highest order bit of an integral
  type (long, int, short or char types).
  SDCC recognizes the following expression to yield the highest order bit
  and generates optimized code for it, e.g.:
-\newline 
+\layout Verse
+
 
-\newline 
 \family typewriter 
 unsigned int gint; 
 \newline 
@@ -9722,20 +11236,13 @@ hob = (gint >> 15) & 1;
  
 \newline 
 }
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 will generate the following code:
-\newline 
+\layout Verse
 
-\family typewriter 
 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
+\family typewriter 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -9764,9 +11271,7 @@ will generate the following code:
  61 ;\SpecialChar ~
  hob.c 7 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
- 000A E5*01\SpecialChar ~
+000A E5*01\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -9790,11 +11295,10 @@ will generate the following code:
 \SpecialChar ~
 \SpecialChar ~
  mov\SpecialChar ~
+\SpecialChar ~
  a,(_gint + 1) 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
- 000C 33\SpecialChar ~
+000C 23\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -9820,45 +11324,12 @@ will generate the following code:
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- rlc\SpecialChar ~
- a 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
- 000D E4\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
+ rl\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- 64\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- clr\SpecialChar ~
  a 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
- 000E 13\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
+000D 54 01\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -9873,21 +11344,21 @@ will generate the following code:
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ 64\SpecialChar ~
 \SpecialChar ~
- 65\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ anl\SpecialChar ~
 \SpecialChar ~
- rrc\SpecialChar ~
- a 
+ a,#0x01 
 \newline 
+000F F5*02\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- 000F F5*02\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -9900,9 +11371,7 @@ will generate the following code:
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- 66\SpecialChar ~
+ 65\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -9911,12 +11380,10 @@ will generate the following code:
 \SpecialChar ~
 \SpecialChar ~
  mov\SpecialChar ~
+\SpecialChar ~
  _foo_hob_1_1,a
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
 Variations of this case however will 
 \emph on 
 not
@@ -9926,17 +11393,13 @@ not
  way to get the highest order bit, (it is portable).
  Of course it will be recognized even if it is embedded in other expressions,
  e.g.:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 xyz = gint + ((gint >> 15) & 1);
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 will still be recognized.
 \layout Subsubsection
 
@@ -9978,9 +11441,8 @@ status Collapsed
 \emph default 
  option.
  The rule language is best illustrated with examples.
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 replace { 
@@ -10000,69 +11462,46 @@ mov a,%1
 mov %1,a
 \newline 
 }
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 The above rule will change the following assembly
 \begin_inset LatexCommand \index{Assembler routines}
 
 \end_inset 
 
  sequence:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
-\SpecialChar ~
-\SpecialChar ~
 mov r1,a 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
 mov a,r1
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 to
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 mov r1,a
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 Note: All occurrences of a 
 \emph on 
 %n
 \emph default 
  (pattern variable) must denote the same string.
  With the above rule, the assembly sequence:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
-\SpecialChar ~
-\SpecialChar ~
 mov r1,a 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
 mov a,r2
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 will remain unmodified.
 \newline 
 
@@ -10107,21 +11546,15 @@ ajmp
  and 
 \family typewriter 
 acall
-\family default 
-
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 replace { lcall %1 } by { acall %1 } 
 \newline 
-replace { ljmp %1 } by { ajmp %1 }
-\family default 
-
-\newline 
+replace { ljmp %1 } by { ajmp %1 }
+\layout Standard
 
-\newline 
 The 
 \emph on 
 inline-assembler code
@@ -10136,9 +11569,8 @@ e is MCU independent.
 
 \newline 
 The syntax for a rule is as follows:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 rule := replace [ restart ] '{' <assembly sequence> '
  '}' [if <functionName> ] '
 \backslash 
 n' 
-\newline 
-
-\family default 
+\layout Standard
 
-\newline 
 <assembly sequence> := assembly instruction (each instruction including
  labels must be on a separate line).
 \newline 
@@ -10218,9 +11647,8 @@ The optimizer will apply to the rules one by one from the top in the sequence
  the same rule again.
  An example of this (not a good one, it has side effects) is the following
  rule:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 replace restart { 
@@ -10238,90 +11666,56 @@ push %1 } by {
 ; nop 
 \newline 
 }
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 Note that the replace pattern cannot be a blank, but can be a comment line.
  Without the 'restart' option only the inner most 'pop' 'push' pair would
  be eliminated, i.e.:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
-\SpecialChar ~
-\SpecialChar ~
 pop ar1 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
 pop ar2 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
 push ar2 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
 push ar1
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 would result in:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
-\SpecialChar ~
-\SpecialChar ~
 pop ar1 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
 ; nop 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
 push ar1
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 
 \emph on 
 with
 \emph default 
  the restart option the rule will be applied again to the resulting code
  and then all the pop-push pairs will be eliminated to yield:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
-\SpecialChar ~
-\SpecialChar ~
 ; nop 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
 ; nop
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 A conditional function can be attached to a rule.
  Attaching rules are somewhat more involved, let me illustrate this with
  an example.
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 replace { 
@@ -10343,11 +11737,8 @@ sjmp %5
 %2:
 \newline 
 } if labelInRange
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 The optimizer does a look-up of a function name table defined in function
  
 \emph on 
@@ -10526,7 +11917,7 @@ CALLEE-SAVES
 
  function1[,function2[,function3...]] - The compiler by default uses a caller
  saves convention for register saving across function calls, however this
- can cause unneccessary register pushing & popping when calling small functions
+ can cause unnecessary register pushing & popping when calling small functions
  from larger functions.
  This option can be used to switch off the register saving convention for
  the function names specified.
@@ -10534,7 +11925,7 @@ CALLEE-SAVES
  code need to be manually inserted at the entry & exit for these functions
  to save & restore the registers used by these functions, this can SUBSTANTIALLY
  reduce code & improve run time performance of the generated code.
- In the future the compiler (with interprocedural analysis) may be able
+ In the future the compiler (with inter procedural analysis) may be able
  to determine the appropriate scheme to use for each function call.
  If -
 \begin_inset ERT
@@ -10564,9 +11955,8 @@ The pragma's are intended to be used to turn-off certain optimizations which
  are used to control options & optimizations for a given function; pragmas
  should be placed before and/or after a function, placing pragma's inside
  a function body could have unpredictable results.
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 #pragma SAVE
@@ -10616,11 +12006,8 @@ int foo ()
 \end_inset 
 
  /* turn the optimizations back on */
-\family default 
-
-\newline 
+\layout Standard
 
-\newline 
 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.
@@ -10714,11 +12101,10 @@ Assembler Routine(non-reentrant
 
 \layout Standard
 
-In the following example the function cfunc calls an assembler routine asm_func,
- which takes two parameters.
-\newline 
+In the following example the function c_func calls an assembler routine
asm_func, which takes two parameters.
+\layout Verse
 
-\newline 
 
 \family typewriter 
 extern int asm_func(unsigned char, unsigned char);
@@ -10750,15 +12136,11 @@ int main()
 return c_func(10,9);
 \newline 
 }
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
 The corresponding assembler function is:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 .globl _asm_func_PARM_2 
@@ -10793,7 +12175,7 @@ _asm_func_PARM_2:
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-.ds      
+.ds     1 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -10835,7 +12217,7 @@ add    a,_asm_func_PARM_2
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-mov     dpl,a 
+mov    dpl,a 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -10845,7 +12227,11 @@ mov     dpl,a
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-mov   dpl
+mov\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+dpl
 \begin_inset LatexCommand \index{DPTR, DPH, DPL}
 
 \end_inset 
@@ -10861,11 +12247,8 @@ mov   dpl
 \SpecialChar ~
 \SpecialChar ~
 ret
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
 Note here that the return values are placed in 'dpl' - One byte return value,
  'dpl' LSB & 'dph' MSB for two byte values.
  'dpl', 'dph' and 'b' for three byte values (generic pointers) and 'dpl','dph','
@@ -10906,8 +12289,8 @@ acc,b,dptr
 \begin_inset Quotes erd
 \end_inset 
 
- for four bytes, the varible name for the second parameter will be _<function_na
-me>_PARM_2.
+ for four bytes, the variable name for the second parameter will be _<function_n
+ame>_PARM_2.
 \newline 
 
 \newline 
@@ -10953,9 +12336,8 @@ In this case the second parameter onwards will be passed on the stack, the
  parameters are pushed from right to left i.e.
  after the call the left most parameter will be on the top of the stack.
  Here is an example:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 extern int asm_func(unsigned char, unsigned char);
@@ -10987,15 +12369,11 @@ int main()
 return c_func(10,9); 
 \newline 
 }
-\newline 
-
-\family default 
+\layout Standard
 
-\newline 
 The corresponding assembler routine is:
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 .globl _asm_func 
@@ -11097,11 +12475,8 @@ pop  _bp
 \SpecialChar ~
 \SpecialChar ~
 ret
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
 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
@@ -11164,7 +12539,7 @@ ANSI-Compliance
 
 \layout Standard
 
-Deviations from the compliancy.
+Deviations from the compliance:
 \layout Itemize
 
 functions are not always reentrant.
@@ -11173,11 +12548,11 @@ functions are not always reentrant.
 structures 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.:
-\family typewriter 
+\begin_deeper 
+\layout Verse
 
-\newline 
 
-\newline 
+\family typewriter 
 struct s { ...
  }; 
 \newline 
@@ -11209,8 +12584,8 @@ s1 = s2 ; /* is invalid in SDCC although allowed in ANSI */
 \newline 
 }
 \newline 
-struct s foo1 (struct s parms) /* is invalid in SDCC although allowed in
- ANSI */ 
+struct s foo1 (struct s parms) /* invalid in SDCC although allowed in ANSI
+ */
 \newline 
 { 
 \newline 
@@ -11234,6 +12609,7 @@ struct s rets;
 return rets;/* is invalid in SDCC although allowed in ANSI */ 
 \newline 
 }
+\end_deeper 
 \layout Itemize
 
 'long long
@@ -11271,11 +12647,11 @@ Old K&R style
 \end_inset 
 
  function declarations are NOT allowed.
-\newline 
+\begin_deeper 
+\layout Verse
 
-\family typewriter 
 
-\newline 
+\family typewriter 
 foo(i,j) /* this old style of function declarations */ 
 \newline 
 int i,j; /* are valid in ANSI but not valid in SDCC */ 
@@ -11290,14 +12666,15 @@ int i,j; /* are valid in ANSI but not valid in SDCC */
  
 \newline 
 }
+\end_deeper 
 \layout Itemize
 
 functions declared as pointers must be dereferenced during the call.
-\newline 
+\begin_deeper 
+\layout Verse
 
-\family typewriter 
 
-\newline 
+\family typewriter 
 int (*foo)();
 \newline 
 ...
@@ -11305,7 +12682,8 @@ int (*foo)();
 \newline 
 /* has to be called like this */ 
 \newline 
-(*foo)(); /* ansi standard allows calls to be made like 'foo()' */
+(*foo)(); /* ANSI standard allows calls to be made like 'foo()' */
+\end_deeper 
 \layout Subsection
 
 Cyclomatic Complexity
@@ -11383,53 +12761,61 @@ r should do an explicit cast when integral promotion is required.
 Reducing the size of division, multiplication & modulus operations can reduce
  code size substantially.
  Take the following code for example.
-\family typewriter 
+\begin_deeper 
+\layout Verse
 
-\newline 
 
-\newline 
+\family typewriter 
 foobar(unsigned int p1, unsigned char ch)
 \newline 
 {
 \newline 
-    unsigned char ch1 = p1 % ch ;
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+unsigned char ch1 = p1 % ch ;
 \newline 
-    ....
-    
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+....
 \newline 
 }
-\newline 
-
-\family default 
+\layout Standard
 
-\newline 
 For the modulus operation the variable ch will be promoted to unsigned int
  first then the modulus operation will be performed (this will lead to a
  call to support routine _moduint()), and the result will be casted to a
  char.
  If the code is changed to 
-\newline 
+\layout Verse
 
-\family typewriter 
 
-\newline 
+\family typewriter 
 foobar(unsigned int p1, unsigned char ch)
 \newline 
 {
 \newline 
-    unsigned char ch1 = (unsigned char)p1 % ch ;
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+unsigned char ch1 = (unsigned char)p1 % ch ;
 \newline 
-    ....
-    
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+....
 \newline 
 }
-\newline 
-
-\family default 
+\layout Standard
 
-\newline 
 It would substantially reduce the code generated (future versions of the
- compiler will be smart enough to detect such optimization oppurtunities).
+ compiler will be smart enough to detect such optimization opportunities).
+\end_deeper 
 \layout Subsection
 
 Notes on MCS51 memory
@@ -11450,22 +12836,22 @@ The 8051 family of microcontrollers have a minimum of 128 bytes of internal
 \newline 
 - Bytes 20-2F - 16 bytes to hold 128 bit variables and, 
 \newline 
-- Bytes 30-7F - 60 bytes for general purpose use.
+- Bytes 30-7F - 80 bytes for general purpose use.
 \newline 
 
 \layout Standard
 
-Adittionally some members of the MCS51 family may have up to 128 bytes of
+Additionally some members of the MCS51 family may have up to 128 bytes of
  additional, indirectly addressable, internal RAM memory (
 \emph on 
 idata
 \emph default 
 ).
- Furtermore, some chips may have some built in external memory (
+ Furthermore, some chips may have some built in external memory (
 \emph on 
 xdata
 \emph default 
-) which should not be confused with the internal, direclty addressable RAM
+) which should not be confused with the internal, directly addressable RAM
  memory (
 \emph on 
 data
@@ -11506,7 +12892,7 @@ data
 \end_inset 
 
  grows, it will use up the remaining register banks, and the 16 bytes used
- by the 128 bit variables, and 60 bytes for general purpose use.
+ by the 128 bit variables, and 80 bytes for general purpose use.
  If any bit variables are used, the data variables will be placed after
  the byte holding the last bit variable.
  For example, if register banks 0 and 1 are used, and there are 9 bit variables
@@ -11575,8 +12961,8 @@ status Collapsed
 
  allows you to specify the start of the stack, i.e.
  you could start it after any data in the general purpose area.
- If your microcontroller has aditional indirectly addressable internal RAM
- (
+ If your microcontroller has additional indirectly addressable internal
RAM (
 \emph on 
 idata
 \emph default 
@@ -11648,7 +13034,7 @@ status Collapsed
 
 .
  If in doubt, don't specify any options and see if the resulting memory
- layout is appropiate, then you can twik it.
+ layout is appropriate, then you can adjust it.
 \layout Standard
 
 The 8051 linker generates two files with memory allocation information.
@@ -11668,8 +13054,10 @@ Tools
 \end_inset 
 
  included in the distribution
-\layout Standard
+\newline 
 
+\layout Standard
+\align center 
 
 \begin_inset  Tabular
 <lyxtabular version="3" rows="12" columns="3">
@@ -11921,7 +13309,7 @@ sdcc/bin
 \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
 
@@ -11956,7 +13344,7 @@ sdcc/bin
 \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
 
@@ -11991,7 +13379,7 @@ sdcc/bin
 \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
 
@@ -12066,6 +13454,8 @@ sdcc/bin
 \end_inset 
 
 
+\newline 
+
 \layout Subsection
 
 Related open source tools
@@ -12074,14 +13464,16 @@ Related open source tools
 \end_inset 
 
 
-\layout Standard
+\newline 
 
+\layout Standard
+\align center 
 
 \begin_inset  Tabular
-<lyxtabular version="3" rows="7" columns="3">
+<lyxtabular version="3" rows="8" columns="3">
 <features>
 <column alignment="center" valignment="top" leftline="true" width="0pt">
-<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">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -12142,6 +13534,37 @@ PIC simulator
 \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
+
+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">
+\begin_inset Text
+
+\layout Standard
+
+
+\begin_inset LatexCommand \url{http://digilander.libero.it/fbradasc/FLP5.html}
+
+\end_inset 
+
+
 \end_inset 
 </cell>
 </row>
@@ -12309,6 +13732,15 @@ Debugger, serves nicely as GUI to sdcdb
 \end_inset 
 
 
+\begin_inset Foot
+collapsed false
+
+\layout Standard
+
+(sdcdb and ddd are available for Unix only)
+\end_inset 
+
+
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -12330,17 +13762,21 @@ Debugger, serves nicely as GUI to sdcdb
 \end_inset 
 
 
+\newline 
+
 \layout Subsection
 
 Related documentation / recommended reading
-\layout Standard
+\newline 
 
+\layout Standard
+\align center 
 
 \begin_inset  Tabular
 <lyxtabular version="3" rows="5" columns="3">
 <features>
 <column alignment="center" valignment="top" leftline="true" width="0pt">
-<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">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -12521,6 +13957,8 @@ sdcc/doc
 \end_inset 
 
 
+\newline 
+
 \layout Section
 \pagebreak_top 
 Retargetting for other MCUs.
@@ -12643,6 +14081,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 available on Unix platforms only.
 \layout Subsection
 
 Compiling for Debugging
@@ -12710,7 +14149,7 @@ foo.c - the source file.
 foo.cdb - the debugger symbol information file.
 \layout Itemize
 
-foo.ihx - the intel hex format
+foo.ihx - the Intel hex format
 \begin_inset LatexCommand \index{Intel hex format}
 
 \end_inset 
@@ -13749,15 +15188,15 @@ The Z80 and gbz80 port
 
 SDCC can target both the Zilog Z80 and the Nintendo Gameboy's Z80-like gbz80.
  The port is incomplete - long support is incomplete (mul, div and mod are
- unimplimented), and both float and bitfield support is missing.
+ unimplemented), and both float and bitfield support is missing.
  Apart from that the code generated is correct.
 \layout Standard
 
 As always, the code is the authoritave reference - see z80/ralloc.c and z80/gen.c.
  The stack frame is similar to that generated by the IAR Z80 compiler.
  IX is used as the base pointer, HL is used as a temporary register, and
- BC and DE are available for holding varibles.
- IY is currently unusued.
+ BC and DE are available for holding variables.
+ IY is currently unused.
  Return values are stored in HL.
  One bad side effect of using IX as the base pointer is that a functions
  stack frame is limited to 127 bytes - this will be fixed in a later version.
@@ -13837,7 +15276,7 @@ The recommended way of reporting bugs is using the infrastructure of the
 Bug reports are automatically forwarded to the developer mailing list and
  will be fixed ASAP.
  When reporting a bug, it is very useful to include a small test program
- which reproduces the problem.
(the smaller the better) which reproduces the problem.
  If you can isolate the problem by looking at the generated assembly code,
  this can be very helpful.
  Compiling your program with the -
@@ -13856,6 +15295,36 @@ status Collapsed
 \end_inset 
 
  option can sometimes be useful in locating optimization problems.
+ When reporting a bug please maker sure you:
+\layout Enumerate
+
+Attach the code you are compiling with SDCC.
+\layout Enumerate
+
+Specify the exact command you use to run SDCC, or attach your Makefile.
+\layout Enumerate
+
+Specify the SDCC version (type "sdcc -v"), your platform, and operating
+ system.
+\layout Enumerate
+
+Provide an exact copy of any error message or incorrect output.
+\layout Enumerate
+
+Put something meaningful in the subject of your message.
+\layout Standard
+
+Please attempt to include these 5 important parts, as applicable, in all
+ requests for support or when reporting any problems or bugs with SDCC.
+ Though this will make your message lengthy, it will greatly improve your
+ chance that SDCC users and developers will be able to help you.
+ Some SDCC developers are frustrated by bug reports without code provided
+ that they can use to reproduce and ultimately fix the problem, so please
+ be sure to provide sample code if you are reporting a bug! 
 \layout Standard
 
 Please have a short check that you are using a recent version of SDCC and
@@ -13918,7 +15387,7 @@ Traffic on sdcc-devel and sdcc-user is about 100 mails/month each not counting
  a similar problem.
 \layout Subsection
 
-Changelog
+ChangeLog
 \begin_inset LatexCommand \index{Changelog}
 
 \end_inset 
@@ -13952,7 +15421,19 @@ Historically there often were long delays between official releases and
  Current excuses might refer to problems with live range analysis, but if
  this is fixed, the next problem rising is that another excuse will have
  to be found.
- Kidding aside, we have to get better there!
+ Kidding aside, we have to get better there! On the other hand there are
+ daily snapshots available at 
+\begin_inset LatexCommand \htmlurl[snap]{http://sdcc.sourceforge.net/snap.php}
+
+\end_inset 
+
+, and you can always built the very last version (hopefully with many bugs
+ fixed, and features added) from the source code available at 
+\begin_inset LatexCommand \htmlurl[Source]{http://sdcc.sourceforge.net/snap.php#Source}
+
+\end_inset 
+
+.
 \layout Subsection
 
 Examples
@@ -13967,7 +15448,7 @@ You'll find some small examples in the directory sdcc/device/examples/
 \layout Comment
 
 Maybe we should include some links to real world applications.
- Preferrably pointer to pointers (one for each architecture) so this stays
+ Preferably pointer to pointers (one for each architecture) so this stays
  manageable here?
 \layout Subsection
 
@@ -14053,7 +15534,7 @@ The anatomy of the compiler
 
 
 \shape italic 
-This is an excerpt from an atricle published in Circuit Cellar MagaZine
+This is an excerpt from an article published in Circuit Cellar Magazine
  in august 2000.
  It's a little outdated (the compiler is much more efficient now and user/develo
 per friendly), but pretty well exposes the guts of it all.
@@ -14210,9 +15691,8 @@ ICode Example
 This section shows some details of iCode.
  The example C code does not do anything useful; it is used as an example
  to illustrate the intermediate code generated by the compiler.
-\newline 
+\layout Verse
 
-\newline 
 
 \family typewriter 
 1.\SpecialChar ~
@@ -14276,7 +15756,21 @@ mul = 0;
 \newline 
 15.\SpecialChar ~
 \SpecialChar ~
-for (i = 0, j = 10 ; i < 10 ; i++, j--) {
+for (i = 0, j = 10 ; i < 10 ; i++, j
+\family default 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-
+\family typewriter 
+) {
 \newline 
 16.\SpecialChar ~
 \SpecialChar ~
@@ -14306,11 +15800,8 @@ return sum+mul;
 \newline 
 21.\SpecialChar ~
 }
-\newline 
-
-\newline 
+\layout Standard
 
-\family default 
 In addition to the operands each iCode contains information about the filename
  and line it corresponds to in the source file.
  The first field in the listing should be interpreted as follows: