* src/SDCCglue.h: make tmpfileNameSet available for preOutName
[fw/sdcc] / doc / sdccman.lyx
index 3021789e8b40d3a909f3816a236c3188e01b8748..b961c03f6b1b3112e83bb261fbd9fb75c89b3a53 100644 (file)
@@ -1,5 +1,5 @@
-#LyX 1.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 218
+#LyX 1.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 220
 \textclass article
 \language english
 \inputencoding default
@@ -11,6 +11,8 @@
 \paperpackage a4
 \use_geometry 0
 \use_amsmath 0
+\use_natbib 0
+\use_numerical_citations 0
 \paperorientation portrait
 \secnumdepth 3
 \tocdepth 3
 \papersides 1
 \paperpagestyle fancy
 
+\layout Comment
+
+Please note: double dashed longoptions (e.g.
+ --version) need three dashes in this document to be visable in html and
+ pdf output.
 \layout Title
 
 SDCC Compiler User Guide
@@ -141,7 +148,7 @@ SDCC also comes with a companion source level debugger SDCDB, the debugger
 
 \newline 
 The latest version can be downloaded from 
-\begin_inset LatexCommand \htmlurl{http://sdcc.sourceforge.net/}
+\begin_inset LatexCommand \url{http://sdcc.sourceforge.net/}
 
 \end_inset 
 
@@ -161,12 +168,10 @@ opensource
 \emph on 
 freeware
 \emph default 
-; source code for all the sub-packages (asxxxx assembler/linker, pre-processor)
- is distributed with the package.
+; source code for all the sub-packages (pre-processor, assemblers, linkers
etc) is distributed with the package.
  This documentation is maintained using a freeware word processor (LyX).
-\layout Standard
-
+\newline 
 This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the Free
  Software Foundation; either version 2, or (at your option) any later version.
@@ -202,7 +207,7 @@ typewriter font.
 \family default 
  Interesting items and new terms are printed in 
 \emph on 
-italicised type.
+italic.
 \layout Subsection
 
 Compatibility with previous versions
@@ -218,11 +223,11 @@ This version has numerous bug fixes compared with the previous version.
 \layout Itemize
 
 short is now equivalent to int (16 bits), it used to be equivalent to char
- (8 bits)
+ (8 bits) which is not ANSI compliant
 \layout Itemize
 
-the default directory where include, library and documention files are stored
is no in /usr/local/share
+the default directory for gcc-builds where include, library and documention
files are stored is now in /usr/local/share
 \layout Itemize
 
 char type parameters to vararg functions are casted to int unless explicitly
@@ -245,10 +250,13 @@ n", a, (char)a);
  will push a as an int and as a char resp.
 \layout Itemize
 
-option --regextend has been removed
+option ---regextend has been removed
+\layout Itemize
+
+option ---noregparms has been removed
 \layout Itemize
 
-option --noreparms has been removed
+option ---stack-after-data has been removed
 \layout Standard
 
 
@@ -272,7 +280,7 @@ Other Resources
 \layout Standard
 
 The SDCC home page at 
-\begin_inset LatexCommand \htmlurl{http://sdcc.sourceforge.net/}
+\begin_inset LatexCommand \url{http://sdcc.sourceforge.net/}
 
 \end_inset 
 
@@ -298,17 +306,6 @@ There are (and always will be) some things that could be done.
 \layout Standard
 
 
-\family sans 
-\series bold 
-sdcc -c --model-large -o large _atoi.c
-\family default 
-\series default 
- (where large could be a different basename or a directory)
-\newline 
-
-\layout Standard
-
-
 \family typewriter 
 char KernelFunction3(char p) at 0x340;
 \newline 
@@ -333,12 +330,177 @@ If you can think of some more, please send them to the list.
 Installation
 \layout Subsection
 
-Linux/Unix Installation
+Install and search paths
+\layout Standard
+
+Linux (and other gcc-builds like Solaris, Cygwin, Mingw32 and OSX) by default
+ install in /usr/local.
+ You can override this when configuring with ---prefix-path.
+ Subdirs used will be bin, share/sdcc/include, share/sdcc/lib and share/sdcc/doc.
+\newline 
+Windows MSVC and Borland builds will install in one single tree (e.g.
+ /sdcc) with subdirs bin, lib, include and doc.
+\newline 
+
+\newline 
+The paths searched when running the compiler are as follows (the first catch
+ wins):
+\layout Enumerate
+
+Binary files (preprocessor, assembler and linker):
+\newline 
+- the path of argv[0] (if available)
+\newline 
+- getenv(
+\begin_inset Quotes sld
+\end_inset 
+
+SDCC_BIN_PATH
+\begin_inset Quotes srd
+\end_inset 
+
+)
+\newline 
+- getenv(
+\begin_inset Quotes sld
+\end_inset 
+
+SDCCHOME
+\begin_inset Quotes srd
+\end_inset 
+
+)/bin
+\newline 
+- $PATH
+\layout Enumerate
+
+Include files:
+\newline 
+- -I dir
+\newline 
+- getenv(
+\begin_inset Quotes sld
+\end_inset 
+
+SDCC_INCLUDE_PATH
+\begin_inset Quotes srd
+\end_inset 
+
+)
+\newline 
+- getenv(
+\begin_inset Quotes sld
+\end_inset 
+
+SDCCHOME
+\begin_inset Quotes srd
+\end_inset 
+
+)/include
+\newline 
+- /usr/local/share/sdcc/include (gcc builds)
+\newline 
+- path(arv[0])/../include and then /sdcc/include (as a last resort for windoze
+ msvc and borland builds)
+\layout Enumerate
+
+Library files (the 
+\shape italic 
+model
+\shape default 
+ is auto-appended by the compiler, e.g.
+ small, large, z80, ds390 etc.):
+\newline 
+- -L dir
+\newline 
+- getenv(
+\begin_inset Quotes sld
+\end_inset 
+
+SDCC_LIB_PATH
+\begin_inset Quotes srd
+\end_inset 
+
+)/
+\shape italic 
+model
+\shape default 
+
+\newline 
+- getenv(
+\begin_inset Quotes sld
+\end_inset 
+
+SDCCHOME
+\begin_inset Quotes srd
+\end_inset 
+
+)/lib/
+\shape italic 
+model
+\shape default 
+
+\newline 
+- /usr/local/share/sdcc/lib/
+\shape italic 
+model
+\shape default 
+ (gcc builds)
+\newline 
+- path(argv[0])/../lib/
+\shape italic 
+model
+\shape default 
+ and then /sdcc/lib/
+\shape italic 
+model
+\shape default 
+ (as a last resort for windoze msvc and borland builds)
+\layout Enumerate
+
+Documentation (although never really searched for, you have to do that yourself
+ :):
+\newline 
+- getenv(
+\begin_inset Quotes sld
+\end_inset 
+
+SDCCHOME
+\begin_inset Quotes srd
+\end_inset 
+
+)/doc
+\newline 
+- /usr/local/share/sdcc/doc (gcc builds)
+\newline 
+- /sdcc/doc (windoze msvc and borland builds)
+\layout Standard
+
+So, for windoze it is highly recommended to set the environment variable
+ SDCCHOME to prevent needless usage of -I and -L options.
+ For gcc-builds SDCCHOME should only be set when sdcc is installed in non-standa
+rd paths.
+\layout Subsection
+
+Linux and other gcc-based systems (cygwin, mingw32, osx)
 \layout Enumerate
 
 
 \series medium 
-Download the source package, it will be named something like sdcc-2.x.x.tgz.
+Download the source package
+\series default 
+ either from the SDCC CVS repository or from the 
+\begin_inset LatexCommand \url[nightly snapshots]{http://sdcc.sourceforge.net/snap.php}
+
+\end_inset 
+
+
+\series medium 
+, it will be named something like sdcc
+\series default 
+.src
+\series medium 
+.tgz.
 \layout Enumerate
 
 
@@ -351,7 +513,7 @@ Bring up a command line terminal, such as xterm.
 Unpack the file using a command like: 
 \family sans 
 \series bold 
-"tar -xzf sdcc-2.x.x.tgz
+"tar -xzf sdcc.src.tgz
 \family default 
 \series default 
 "
@@ -412,26 +574,7 @@ Type
  the documentation to the install directories.
 \layout Subsection
 
-Windows Installation
-\layout Standard
-
-
-\emph on 
-<pending: is this complete? where is borland, mingw>
-\newline 
-
-\newline 
-
-\emph default 
-For installation under Windows you first need to pick between a pre-compiled
- binary package, or installing the source package along with the Cygwin
- package.
- The binary package is the quickest to install, while the Cygwin package
- includes all of the open source power tools used to compile the complete
- SDCC source package in the Windows environment.
- If you are not familiar with the Unix command line environment, you may
- want to read the section on additional information for Windows users prior
- to your initial installation.
+Windows 
 \layout Subsubsection
 
 Windows Install Using a Binary Package
@@ -440,7 +583,8 @@ Windows Install Using a Binary Package
 Download the binary package and unpack it using your favorite unpacking
  tool (gunzip, WinZip, etc).
  This should unpack to a group of sub-directories.
- An example directory structure after unpacking is: c:
+ An example directory structure after unpacking the mingw32 package is:
+ c:
 \backslash 
 usr
 \backslash 
@@ -469,85 +613,236 @@ sdcc
 lib for the include and libraries.
 \layout Enumerate
 
-Adjust your environment PATH to include the location of the bin directory.
- For example, make a setsdcc.bat file with the following: set PATH=c:
+Adjust your environment variable PATH to include the location of the bin
+ directory or start sdcc using the full path.
+\layout Subsubsection
+
+Windows Install Using Cygwin and Mingw32
+\layout Standard
+
+Follow the instruction in 
+\series bold 
+Linux and other gcc-based systems
+\series default 
+.
+\layout Subsubsection
+
+Windows Install Using Microsoft Visual C++ 6.0/NET
+\layout Standard
+
+
+\series medium 
+Download the source package
+\series default 
+ either from the SDCC CVS repository or from the 
+\begin_inset LatexCommand \url[nightly snapshots]{http://sdcc.sourceforge.net/snap.php}
+
+\end_inset 
+
+
+\series medium 
+, it will be named something like sdcc
+\series default 
+.src
+\series medium 
+.tgz.
+
+\series default 
+ SDCC is distributed with all the projects, workspaces, and files you need
+ to build it using Visual C++ 6.0/NET.
+ The workspace name is 'sdcc.dsw'.
+ Please note that as it is now, all the executables are created in a folder
+ called sdcc
+\backslash 
+bin_vc.
+ Once built you need to copy the executables from sdcc
+\backslash 
+bin_vc to sdcc
+\backslash 
+bin before runnng 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.
+ One good place to get them is 
+\begin_inset LatexCommand \url[here]{http://unxutils.sourceforge.net}
+
+\end_inset 
+
+
+\newline 
+
+\newline 
+Download the file UnxUtils.zip.
+ Now you have to install the utilities and setup Visual C++ so it can locate
+ the required programs.
+ Here there are two alternatives (choose one!):
+\layout Enumerate
+
+The easy way:
+\newline 
+
+\newline 
+a) Extract UnxUtils.zip to your C:
 \backslash 
-usr
+ hard disk PRESERVING the original paths, otherwise bison won't work.
+ (If you are using WinZip make certain that 'Use folder names' is selected)
+\newline 
+
+\newline 
+b) In the Visual C++ IDE click Tools, Options, select the Directory tab,
+ in 'Show directories for:' select 'Executable files', and in the directories
+ window add a new path: 'C:
+\backslash 
+user
 \backslash 
 local
 \backslash 
-bin;%PATH%
+wbin', click ok.
+\newline 
+
+\newline 
+(As a side effect, you get a bunch of Unix utilities that could be useful,
+ such as diff and patch.)
 \layout Enumerate
 
-When you compile with sdcc, you may need to specify the location of the
- lib and include folders.
- For example, sdcc -I c:
+A more compact way:
+\newline 
+
+\newline 
+This one avoids extracting a bunch of files you may not use, but requires
+ some extra work:
+\newline 
+
+\newline 
+a) Create a directory were to put the tools needed, or use a directory already
+ present.
+ Say for example 'C:
 \backslash 
-usr
+util'.
+\newline 
+
+\newline 
+b) Extract 'bison.exe', 'bison.hairy', 'bison.simple', 'flex.exe', and gawk.exe
+ to such directory WITHOUT preserving the original paths.
+ (If you are using WinZip make certain that 'Use folder names' is not selected)
+\newline 
+
+\newline 
+c) Rename bison.exe to '_bison.exe'.
+\newline 
+
+\newline 
+d) Create a batch file 'bison.bat' in 'C:
 \backslash 
-local
+util
 \backslash 
-share
+' and add these lines: 
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+set BISON_SIMPLE=C:
 \backslash 
-sdcc
+util
 \backslash 
-include -L c:
+bison.simple 
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+set BISON_HAIRY=C:
 \backslash 
-usr
+util
 \backslash 
-local
+bison.hairy
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+_bison %1 %2 %3 %4 %5 %6 %7 %8 %9
+\newline 
+
+\newline 
+Steps 'c' and 'd' are needed because bison requires by default that the
+ files 'bison.simple' and 'bison.hairy' reside in some weird Unix directory,
+ '/usr/local/share/' I think.
+ So it is necessary to tell bison where those files are located if they
+ are not in such directory.
+ That is the function of the environment variables BISON_SIMPLE and BISON_HAIRY.
+\newline 
+
+\newline 
+e) In the Visual C++ IDE click Tools, Options, select the Directory tab,
+ in 'Show directories for:' select 'Executable files', and in the directories
+ window add a new path: 'c:
 \backslash 
-share
+util', click ok.
+ Note that you can use any other path instead of 'c:
 \backslash 
-sdcc
+util', even the path where the Visual C++ tools are, probably: 'C:
+\backslash 
+Program Files
 \backslash 
-lib
+Microsoft Visual Studio
 \backslash 
-small test.c
+Common
+\backslash 
+Tools'.
+ So you don't have to execute step 'e' :)
+\layout Standard
+
+That is it.
+ Open 'sdcc.dsw' in Visual Studio, click 'build all', when it finishes copy
+ the executables from sdcc
+\backslash 
+bin_vc to sdcc
+\backslash 
+bin, and you can compile using sdcc.
 \layout Subsubsection
 
-Windows Install Using Cygwin
+Windows Install Using Borland
 \layout Enumerate
 
+From the sdcc directory, run the command "make -f Makefile.bcc".
+ This should regenerate all the .exe files in the bin directory except for
+ sdcdb.exe (which currently doesn't build under Borland C++).
+\layout Enumerate
 
-\series medium 
-Download and install the cygwin package from the redhat site
-\series default 
-
-\begin_inset LatexCommand \htmlurl{http://sources.redhat.com/cygwin/}
-
-\end_inset 
-
+If you modify any source files and need to rebuild, be aware that the dependanci
+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:
+\newline 
 
-\series medium 
-.
- Currently, this involved downloading a small install program which then
- automates downloading and installing 
-\series default 
-selected parts of
-\series medium 
- the package
-\series default 
- (a large 80M byte sized dowload for the whole thing)
-\series medium 
-.
+\newline 
 
-\series default 
+\family sans 
+\series bold 
+find .
  
-\layout Enumerate
+\backslash 
+( -name '*.obj' -o -name '*.lib' -o -name '*.rul' 
+\backslash 
+) -print -exec rm {} 
+\backslash 
+;
+\family default 
+\series default 
 
+\newline 
 
-\series medium 
-Bring up a 
-\series default 
-Unix/Bash 
-\series medium 
-command line terminal from the Cygwin menu.
-\layout Enumerate
+\newline 
+or on Windows NT/2000/XP from the command prompt with the commmand:
+\newline 
 
+\family sans 
+\series bold 
 
-\series medium 
-Follow the instructions in the preceding Linux/Unix installation section.
+\newline 
+del /s *.obj *.lib *.rul
+\family default 
+\series default 
+ from the sdcc directory.
 \layout Subsection
 
 Testing out the SDCC Compiler
@@ -558,7 +853,7 @@ The first thing you should do after installing your SDCC compiler is to
  Type 
 \family sans 
 \series bold 
-"sdcc --version"
+"sdcc ---version"
 \family default 
 \series default 
  at the prompt, and the program should run and tell you the version.
@@ -574,119 +869,46 @@ The first thing you should do after installing your SDCC compiler is to
 \newline 
 
 \series medium 
-SDCC binaries are commonly installed in a directory arrangement like this:
+SDCC 
 \series default 
+is commonly installed as described in section 
+\begin_inset Quotes sld
+\end_inset 
 
-\newline 
+Install and search paths
+\begin_inset Quotes srd
+\end_inset 
 
-\newline 
 
-\begin_inset  Tabular
-<lyxtabular version="2" rows="3" columns="2">
-<features rotate="false" islongtable="false" endhead="0" endfirsthead="0" endfoot="0" endlastfoot="0">
-<column alignment="left" valignment="top" leftline="true" rightline="false" width="" special="">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="" special="">
-<row topline="true" bottomline="true" newpage="false">
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
-\begin_inset Text
+\newline 
 
-\layout Standard
+\newline 
 
-/
 \series medium 
-usr/local/bin
-\end_inset 
-</cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special="">
-\begin_inset Text
-
-\layout Standard
-
-
-\series medium 
-Holds executables(sdcc, s51, aslink, 
+Make sure the compiler works on a very simple example.
+ Type in the following test.c program using your favorite 
 \series default 
-...
-\series medium 
-)
-\end_inset 
-</cell>
-</row>
-<row topline="true" bottomline="false" newpage="false">
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
-\begin_inset Text
-
-\layout Standard
-
-/
-\series medium 
-usr/local/share/sdcc/lib 
-\end_inset 
-</cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special="">
-\begin_inset Text
-
-\layout Standard
-
-
+ascii 
 \series medium 
-Holds common C 
+editor:
 \series default 
-libraries
-\end_inset 
-</cell>
-</row>
-<row topline="true" bottomline="true" newpage="false">
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
-\begin_inset Text
-
-\layout Standard
-
-/
-\series medium 
-usr/local/share/sdcc/include
-\end_inset 
-</cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special="">
-\begin_inset Text
-
-\layout Standard
-
-
-\series medium 
-Holds common C header files
-\end_inset 
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset 
-
-
-\newline 
 
 \newline 
 
-\series medium 
-Make sure the compiler works on a very simple example.
- Type in the following test.c program using your favorite editor:
-\series default 
+\family typewriter 
 
 \newline 
-
-\emph on 
-
+char test;
 \newline 
 
-\family typewriter 
-\emph default 
-int test(int t) {
+\newline 
+void main(void) {
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-return t+3;
+test=0;
 \newline 
 }
 \family default 
@@ -763,16 +985,18 @@ standard
 \newline 
 
 \newline 
+
+\family typewriter 
 #include <string.h>
 \newline 
-main() {
-\newline 
 
-\family typewriter 
+\newline 
 char str1[10];
 \newline 
-\SpecialChar ~
-\SpecialChar ~
+
+\newline 
+void main(void) {
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 strcpy(str1, "testing");
@@ -804,63 +1028,41 @@ Compile this by typing
 Install Trouble-shooting
 \layout Subsubsection
 
-SDCC cannot find libraries or header files.
+SDCC does not build correctly.
 \layout Standard
 
-The default installation assumes the libraries and header files are located
- at 
-\begin_inset Quotes eld
-\end_inset 
-
-/usr/local/share/sdcc/lib
-\begin_inset Quotes erd
-\end_inset 
-
- and 
-\begin_inset Quotes eld
-\end_inset 
+A thing to try is starting from scratch by unpacking the .tgz source package
+ again in an empty directory.
+ Confure it like:
+\newline 
 
-/usr/local/share/sdcc/include
-\begin_inset Quotes erd
-\end_inset 
+\newline 
 
-.
- An alternative is to specify these locations as compiler options like this:
 \family sans 
 \series bold 
-"sdcc\SpecialChar ~
--L\SpecialChar ~
-/usr/local/sdcc/lib/small\SpecialChar ~
--I\SpecialChar ~
-/usr/local/sdcc/include\SpecialChar ~
-test.c"
+./configure 2>&1 | tee configure.log
 \family default 
 \series default 
-.
-\layout Subsubsection
 
-SDCC does not compile correctly.
-\layout Standard
+\newline 
 
-A thing to try is starting from scratch by unpacking the .tgz source package
- again in an empty directory.
- Confure it again and build like:
+\newline 
+and build it like:
 \newline 
 
 \newline 
 
 \family sans 
 \series bold 
-make 2&>1 | tee make.log
+make 2>&1 | tee make.log
 \family default 
 \series default 
 
 \newline 
 
 \newline 
-After this you can review the make.log file to locate the problem.
- Or a relevant part of this be attached to an email that could be helpful
+If anything goes wrong, you can review the log files to locate the problem.
+ Or a relevant part of this can be attached to an email that could be helpful
  when requesting help from the mailing list.
 \layout Subsubsection
 
@@ -915,249 +1117,19 @@ make install
  command does.
 \layout Standard
 
-This will install the compiler, other executables and libraries in to the
- appropriate system directories.
- The default is to copy the executables to /usr/local/bin and the libraries
- and header files to /usr/local/share/sdcc/lib and /usr/local/share/sdcc/include.
-\layout Subsection
-
-Additional Information for Windows Users
-\layout Standard
-
-
-\emph on 
-<pending: is this up to date?>
-\newline 
-
-\newline 
-
-\emph default 
-The standard method of installing on a Unix system involves compiling the
- source package.
- This is easily done under Unix, but under Windows it can be a more difficult
- process.
- The Cygwin is a large package to download, and the compilation runs considerabl
-y slower under Windows due to the overhead of the Cygwin tool set.
- An alternative is to install a pre-compiled Windows binary package.
- There are various trade-offs between each of these methods.
-\layout Standard
-
-The Cygwin package allows a Windows user to run a Unix command line interface
- (bash shell) and also implements a Unix like file system on top of Windows.
- Included are many of the famous GNU software development tools which can
- augment the SDCC compiler.This is great if you have some experience with
- Unix command line tools and file system conventions, if not you may find
- it easier to start by installing a binary Windows package.
- The binary packages work with the Windows file system conventions.
-\layout Subsubsection
-
-Getting started with Cygwin
-\layout Standard
-
-SDCC is typically distributed as a tarred/gzipped file (.tgz).
- This is a packed file similar to a .zip file.
- Cygwin includes the tools you will need to unpack the SDCC distribution
- (tar and gzip).
- To unpack it, simply follow the instructions under the Linux/Unix install
- section.
- Before you do this you need to learn how to start a cygwin shell and some
- of the basic commands used to move files, change directory, run commands
- and so on.
- The change directory command is 
-\family sans 
-\series bold 
-
-\begin_inset Quotes eld
-\end_inset 
-
-cd
-\begin_inset Quotes erd
-\end_inset 
-
-
-\family default 
-\series default 
-, the move command is 
-\family sans 
-\series bold 
-
-\begin_inset Quotes eld
-\end_inset 
-
-mv
-\begin_inset Quotes erd
-\end_inset 
-
-
-\family default 
-\series default 
-.
- To print the current working directory, type 
-\family sans 
-\series bold 
-
-\begin_inset Quotes eld
-\end_inset 
-
-pwd
-\begin_inset Quotes erd
-\end_inset 
-
-
-\family default 
-\series default 
-.
- To make a directory, use 
-\family sans 
-\series bold 
-
-\begin_inset Quotes eld
-\end_inset 
-
-mkdir
-\begin_inset Quotes erd
-\end_inset 
-
-
-\family default 
-\series default 
-.
-\layout Standard
-
-There are some basic differences between Unix and Windows file systems you
- should understand.
- When you type in directory paths, Unix and the Cygwin bash prompt uses
- forward slashes '/' between directories while Windows traditionally uses
- '
-\backslash 
-' backward slashes.
- So when you work at the Cygwin bash prompt, you will need to use the forward
- '/' slashes.
- Unix does not have a concept of drive letters, such as 
-\begin_inset Quotes eld
+This will install the compiler, other executables libraries and include
+ files in to the appropriate directories.
+ See section 
+\begin_inset Quotes sld
 \end_inset 
 
-c:
-\begin_inset Quotes eld
+Install and Search PATHS
+\begin_inset Quotes srd
 \end_inset 
 
-, instead all files systems attach and appear as directories.
-\layout Subsubsection
-
-Running SDCC as Native Compiled Executables
-\layout Standard
-
-If you use the pre-compiled binaries, the install directories for the libraries
- and header files may need to be specified on the sdcc command line like
- this: 
-\family sans 
-\series bold 
-"sdcc -L c:
-\backslash 
-usr
-\backslash 
-local
-\backslash 
-sdcc
-\backslash 
-lib
-\backslash 
-small -I c:
-\backslash 
-usr
-\backslash 
-local
-\backslash 
-sdcc
-\backslash 
-include test.c"
-\family default 
-\series default 
- if you are running outside of a Unix bash shell.
-\layout Standard
-
-If you have successfully installed and compiled SDCC with the Cygwin package,
- it is possible to compile into native .exe files by using the additional
- makefiles included for this purpose.
- For example, with the Borland 32-bit compiler you would run 
-\family sans 
-\series bold 
-"make -f Makefile.bcc"
-\family default 
-\series default 
 .
- A command line version of the Borland 32-bit compiler can be downloaded
- from the Inprise web site.
-\layout Subsection
-
-SDCC on Other Platforms
-\layout Itemize
-
-
-\series bold 
-FreeBSD and other non-GNU Unixes 
-\series default 
-- Make sure the GNU make is installed as the default make tool.
-\layout Itemize
-
-SDCC has been ported to run under a variety of operating systems and processors.
- If you can run GNU GCC/make then chances are good SDCC can be compiled
- and run on your system.
-\layout Subsection
-
-Advanced Install Options
-\layout Standard
-
-The 
-\begin_inset Quotes eld
-\end_inset 
-
-configure
-\begin_inset Quotes erd
-\end_inset 
-
- command has several options.
- The most commonly used option is --prefix=<directory name>, where <directory
- name> is the final location for the sdcc executables and libraries, (default
- location is /usr/local).
- The installation process will create the following directory structure
- under the <directory name> specified (if they do not already exist).
-\newline 
-
-\newline 
-bin/ - binary exectables (add to PATH environment variable)
-\newline 
-bin/share/
-\newline 
-bin/share/sdcc/include/ - include header files
-\newline 
-bin/share/sdcc/lib/
-\newline 
-bin/share/sdcc/lib/small/ - Object & library files for small model library
 \newline 
-bin/share/sdcc/lib/large/ - Object & library files for large model library
-\newline 
-bin/share/sdcc/lib/ds390/ - Object & library files forDS80C390 library
-\newline 
-
-\newline 
-The command 
-\family sans 
-\series bold 
-
-\begin_inset Quotes sld
-\end_inset 
-
-./configure --prefix=/usr/local
-\begin_inset Quotes erd
-\end_inset 
-
-\family default 
-\series default 
-will configure the compiler to be installed in directory /usr/local.
+On most systems you will need super-user privilages to do this.
 \layout Subsection
 
 Components of SDCC
@@ -1174,7 +1146,7 @@ SDCC is not just a compiler, but a collection of tools by various developers.
 
 \newline 
 You might want to look at the files which are installed in <installdir>.
- At the time of this writing, we find the following programs:
+ At the time of this writing, we find the following programs for gcc-builds:
 \newline 
  
 \newline 
@@ -1213,7 +1185,7 @@ s51 - The ucSim 8051 simulator.
 sdcdb - The source debugger.
 \layout Itemize
 
-packihx - A tool to pack Intel hex files.
+packihx - A tool to pack (compress) Intel hex files.
 \layout Standard
 
 In <installdir>/share/sdcc/include
@@ -1225,8 +1197,8 @@ the include files
 In <installdir>/share/sdcc/lib
 \layout Itemize
 
-the sources of the runtime library and the subdirs small large and ds390
with the precompiled relocatables.
+the subdirs src and small, large, z80, gbz80 and ds390 with the precompiled
+ relocatables.
 \layout Standard
 
 In <installdir>/share/sdcc/doc
@@ -1246,7 +1218,7 @@ This is the actual compiler, it in turn uses the c-preprocessor and invokes
  the assembler and linkage editor.
 \layout Subsubsection
 
-sdcpp (C-Preprocessor)
+sdcpp - The C-Preprocessor
 \layout Standard
 
 The preprocessor is a modified version of the GNU preprocessor.
@@ -1254,8 +1226,8 @@ The preprocessor is a modified version of the GNU preprocessor.
  statements, #defines and so on.
 \layout Subsubsection
 
-asx8051, as-z80, as-gbz80, aslink, link-z80, link-gbz80 (The Assemblers
- and Linkage Editors)
+asx8051, as-z80, as-gbz80, aslink, link-z80, link-gbz80 The Assemblers
+ and Linkage Editors
 \layout Standard
 
 This is retargettable assembler & linkage editor, it was developed by Alan
@@ -1264,7 +1236,7 @@ This is retargettable assembler & linkage editor, it was developed by Alan
  enhancements and bug fixes for it to work properly with the SDCC.
 \layout Subsubsection
 
-s51 - Simulator
+s51 - The Simulator
 \layout Standard
 
 S51 is a freeware, opensource simulator developed by Daniel Drotos (
@@ -1279,12 +1251,24 @@ S51 is a freeware, opensource simulator developed by Daniel Drotos (
 
 \end_inset 
 
- .
+.
+ It currently support the core mcs51, the Dallas DS80C390 and the Philips
+ XA51 family.
 \layout Subsubsection
 
 sdcdb - Source Level Debugger
 \layout Standard
 
+
+\family typewriter 
+\shape italic 
+<todo: is this thing still alive?>
+\newline 
+
+\newline 
+
+\family default 
+\shape default 
 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.
@@ -1326,11 +1310,20 @@ sourcefile.rel - Object file created by the assembler, input to Linkage editor
 sourcefile.map - The memory map for the load module, created by the Linker
 \newline 
 sourcefile.ihx - The load module in Intel hex format (you can select the
- Motorola S19 format with --out-fmt-s19)
+ Motorola S19 format with ---out-fmt-s19)
 \newline 
-sourcefile.cdb - An optional file (with --debug) containing debug information
+sourcefile.cdb - An optional file (with ---debug) containing debug information
 \newline 
+sourcefile.dump* - Dump file to debug the compiler it self (with ---dumpall)
+ (see section 
+\begin_inset Quotes sld
+\end_inset 
+
+Anatomy of the compiler
+\begin_inset Quotes srd
+\end_inset 
 
+).
 \layout Subsubsection
 
 Projects with Multiple Source Files
@@ -1549,7 +1542,7 @@ Processor Selection Options
 \series bold 
 -mavr
 \series default 
- Generate code for the Atmel AVR processor(In development, not complete).
+ Generate code for the Atmel AVR processor (In development, not complete).
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -1557,7 +1550,7 @@ Processor Selection Options
 \series bold 
 -mpic14
 \series default 
- Generate code for the PIC 14-bit processors(In development, not complete).
+ Generate code for the PIC 14-bit processors (In development, not complete).
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -1565,7 +1558,16 @@ Processor Selection Options
 \series bold 
 -mtlcs900h
 \series default 
- Generate code for the Toshiba TLCS-900H processor(In development, not complete).
+ Generate code for the Toshiba TLCS-900H processor (In development, not
+ complete).
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+-mxa51
+\series default 
+ Generate code for the Philips XA51 processor (In development, not complete).
 \layout Subsubsection
 
 Preprocessor Options
@@ -1714,7 +1716,7 @@ Linker Options
 
 \series bold 
 -L\SpecialChar ~
---lib-path
+---lib-path
 \bar under 
  
 \series default 
@@ -1729,78 +1731,72 @@ Linker Options
 
 
 \series bold 
---xram-loc
+---xram-loc
 \series default 
 <Value> The start location of the external ram, default value is 0.
- The value entered can be in Hexadecimal or Decimal format, e.g.: --xram-loc
- 0x8000 or --xram-loc 32768.
+ The value entered can be in Hexadecimal or Decimal format, e.g.: ---xram-loc
+ 0x8000 or ---xram-loc 32768.
 \layout List
 \labelwidthstring 00.00.0000
 
 
 \series bold 
---code-loc
+---code-loc
 \series default 
 <Value> The start location of the code segment, default value 0.
  Note when this option is used the interrupt vector table is also relocated
  to the given address.
- The value entered can be in Hexadecimal or Decimal format, e.g.: --code-loc
- 0x8000 or --code-loc 32768.
-\layout List
-\labelwidthstring 00.00.0000
-
-
-\series bold 
---stack-loc
-\series default 
-<Value> The initial value of the stack pointer.
- The default value of the stack pointer is 0x07 if only register bank 0
- is used, if other register banks are used then the stack pointer is initialized
- to the location above the highest register bank used.
- eg.
- if register banks 1 & 2 are used the stack pointer will default to location
- 0x18.
- The value entered can be in Hexadecimal or Decimal format, eg.
- --stack-loc 0x20 or --stack-loc 32.
- If all four register banks are used the stack will be placed after the
- data segment (equivalent to --stack-after-data)
+ The value entered can be in Hexadecimal or Decimal format, e.g.: ---code-loc
+ 0x8000 or ---code-loc 32768.
 \layout List
 \labelwidthstring 00.00.0000
 
 
 \series bold 
---stack-after-data
+---stack-loc
 \series default 
- This option will cause the stack to be located in the internal ram after
- the data segment.
+<Value> By default the stack is placed after the data segment.
+ Using this option the stack can be placed anywhere in the internal memory
+ space of the 8051.
+ The value entered can be in Hexadecimal or Decimal format, e.g.
+ ---stack-loc 0x20 or ---stack-loc 32.
+ Since the sp register is incremented before a push or call, the initial
+ sp will be set to one byte prior the provided value.
+ The provided value should not overlap any other memory areas such as used
+ register banks or the data segment and with enough space for the current
+ application.
 \layout List
 \labelwidthstring 00.00.0000
 
 
 \series bold 
---data-loc
+---data-loc
 \series default 
-<Value> The start location of the internal ram data segment, the default
- value is 0x30.The value entered can be in Hexadecimal or Decimal format,
- eg.
- --data-loc 0x20 or --data-loc 32.
+<Value> The start location of the internal ram data segment.
+ The value entered can be in Hexadecimal or Decimal format, eg.
+ ---data-loc 0x20 or ---data-loc 32.
+ (By default, the start location of the internal ram data segment  is set
+ as low as possible in memory, taking into account the used register banks
+ and the bit segment at address 0x20.
+ For example if register banks 0 and 1 are used without bit variables, the
+ data segment will be set, if ---data-loc is not used, to location 0x10.)
 \layout List
 \labelwidthstring 00.00.0000
 
 
 \series bold 
---idata-loc
+---idata-loc
 \series default 
 <Value> The start location of the indirectly addressable internal ram, default
  value is 0x80.
  The value entered can be in Hexadecimal or Decimal format, eg.
- --idata-loc 0x88 or --idata-loc 136.
+ ---idata-loc 0x88 or ---idata-loc 136.
 \layout List
 \labelwidthstring 00.00.0000
 
 
 \series bold 
---out-fmt-ihx
+---out-fmt-ihx
 \bar under 
  
 \series default 
@@ -1812,7 +1808,7 @@ The linker output (final object code) is in Intel Hex format.
 
 
 \series bold 
---out-fmt-s19
+---out-fmt-s19
 \bar under 
  
 \series default 
@@ -1826,7 +1822,7 @@ MCS51 Options
 
 
 \series bold 
---model-large
+---model-large
 \series default 
  Generate code for Large model programs see section Memory Models for more
  details.
@@ -1839,7 +1835,7 @@ MCS51 Options
 
 
 \series bold 
---model-small
+---model-small
 \series default 
 \size large 
 \emph on 
@@ -1857,7 +1853,7 @@ DS390 Options
 
 
 \series bold 
---model-flat24
+---model-flat24
 \series default 
 \size large 
 \emph on 
@@ -1877,7 +1873,7 @@ Generate 24-bit flat mode code.
 
 
 \series bold 
---stack-10bit
+---stack-10bit
 \series default 
  Generate code for the 10 bit stack mode of the Dallas DS80C390 part.
  This is the one and only that the ds390 code generator supports right now
@@ -1900,18 +1896,18 @@ Generate 24-bit flat mode code.
  any re-entrant functions compiled with this option.
  In principle, this should work with the 
 \emph on 
---stack-auto
+---stack-auto
 \emph default 
  option, but that has not been tested.
  It is incompatible with the 
 \emph on 
---xstack
+---xstack
 \emph default 
  option.
  It also only makes sense if the processor is in 24 bit contiguous addressing
  mode (see the 
 \emph on 
---model-flat24 option
+---model-flat24 option
 \emph default 
 ).
 \layout Subsubsection
@@ -1922,7 +1918,7 @@ Optimization Options
 
 
 \series bold 
---nogcse
+---nogcse
 \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
@@ -1937,7 +1933,7 @@ NOGCSE can be used
 
 
 \series bold 
---noinvariant
+---noinvariant
 \series default 
  Will not do loop invariant optimizations, this may be turned off for reasons
  explained for the previous option.
@@ -1950,7 +1946,7 @@ NOINVARIANT can be used
 
 
 \series bold 
---noinduction
+---noinduction
 \series default 
  Will not do loop induction optimizations, see section strength reduction
  for more details.It is recommended that this option is NOT used, #pragma\SpecialChar ~
@@ -1962,7 +1958,7 @@ ION can be used to turn off induction optimizations for a given function
 
 
 \series bold 
---nojtbound
+---nojtbound
 \size large 
 \bar under 
  
@@ -1981,12 +1977,21 @@ NOJTBOUND can be
 
 
 \series bold 
---noloopreverse
+---noloopreverse
 \series default 
 \size large 
  
 \size default 
 Will not do loop reversal optimization.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+---no-xinit-opt
+\series default 
+ This will disable the memcpy of initialized data in far space from code
+ space
 \layout Subsubsection
 
 Other Options
@@ -1996,13 +2001,22 @@ Other Options
 
 \series bold 
 -c\SpecialChar ~
---compile-only
+---compile-only
 \series default 
  will compile and assemble the source, but will not call the linkage editor.
 \layout List
 \labelwidthstring 00.00.0000
 
 
+\series bold 
+--c1mode
+\series default 
+ reads the preprocessed source from standard input and compiles it.
+ The file name for the assembler output must be specified using the -o option.
+\layout List
+\labelwidthstring 00.00.0000
+
+
 \series bold 
 -E
 \series default 
@@ -2014,7 +2028,20 @@ Other Options
 
 
 \series bold 
---stack-auto
+-o\SpecialChar ~
+<path/file> 
+\series default 
+The output path resp.
+ file where everything will be placed.
+ If the parameter is a path, it must have a trailing slash (or backslash
+ for the Windows binaries) to be recognized as a path.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+---stack-auto
 \series default 
 \size large 
 \emph on 
@@ -2036,7 +2063,7 @@ reentrant
 
 
 \series bold 
---xstack
+---xstack
 \series default 
  Uses a pseudo stack in the first 256 bytes in the external ram for allocating
  variables and passing parameters.
@@ -2046,7 +2073,7 @@ reentrant
 
 
 \series bold 
---callee-saves function1[,function2][,function3]....
+---callee-saves function1[,function2][,function3]....
 
 \series default 
  The compiler by default uses a caller saves convention for register saving
@@ -2064,7 +2091,7 @@ reentrant
  option is used for a library function the appropriate library function
  needs to be recompiled with the same option.
  If the project consists of multiple source files then all the source file
- should be compiled with the same --callee-saves option string.
+ should be compiled with the same ---callee-saves option string.
  Also see #pragma\SpecialChar ~
 CALLEE-SAVES.
 \layout List
@@ -2072,7 +2099,7 @@ CALLEE-SAVES.
 
 
 \series bold 
---debug
+---debug
 \bar under 
  
 \series default 
@@ -2086,28 +2113,7 @@ When this option is used the compiler will generate debug information, that
 
 
 \series bold 
-\emph on 
---regextend
-\bar under 
-\series default 
-\bar default 
- This option is obsolete and isn't supported anymore.
-\layout List
-\labelwidthstring 00.00.0000
-
-
-\series bold 
-\emph on 
---noregparms
-\series default 
- This option is obsolete and isn't supported anymore.
-\layout List
-\labelwidthstring 00.00.0000
-
-
-\series bold 
---peep-file
+---peep-file
 \series default 
 <filename> This option can be used to use additional rules to be used by
  the peep hole optimizer.
@@ -2149,7 +2155,7 @@ Stop after the stage of compilation proper; do not assemble.
 
 
 \series bold 
---int-long-reent
+---int-long-reent
 \series default 
 \size large 
  
@@ -2162,7 +2168,7 @@ Stop after the stage of compilation proper; do not assemble.
 
 
 \series bold 
---cyclomatic
+---cyclomatic
 \bar under 
  
 \series default 
@@ -2185,7 +2191,7 @@ cyclomatic complexity
 
 
 \series bold 
---float-reent
+---float-reent
 \bar under 
  
 \series default 
@@ -2197,7 +2203,7 @@ cyclomatic complexity
 
 
 \series bold 
---nooverlay
+---nooverlay
 \series default 
   The compiler will not overlay parameters and local variables of any function,
  see section Parameters and local variables for more details.
@@ -2206,7 +2212,7 @@ cyclomatic complexity
 
 
 \series bold 
---main-return
+---main-return
 \series default 
  This option can be used when the code generated is called by a monitor
  program.
@@ -2218,7 +2224,7 @@ cyclomatic complexity
 
 
 \series bold 
---no-peep
+---no-peep
 \series default 
   Disable peep-hole optimization.
 \layout List
@@ -2226,7 +2232,7 @@ cyclomatic complexity
 
 
 \series bold 
---peep-asm
+---peep-asm
 \series default 
   Pass the inline assembler code through the peep hole optimizer.
  This can cause unexpected changes to inline assembler code, please go through
@@ -2237,16 +2243,34 @@ cyclomatic complexity
 
 
 \series bold 
---iram-size
+---iram-size
+\series default 
+<Value> Causes the linker to check if the internal ram usage is within limits
+ of the given value.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+---xram-size
 \series default 
-<Value> Causes the linker to check if the interal ram usage is within limits
+<Value> Causes the linker to check if the external ram usage is within limits
  of the given value.
 \layout List
 \labelwidthstring 00.00.0000
 
 
 \series bold 
---nostdincl
+---code-size
+\series default 
+<Value> Causes the linker to check if the code usage is within limits of
+ the given value.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+---nostdincl
 \series default 
  This will prevent the compiler from passing on the default include path
  to the preprocessor.
@@ -2255,7 +2279,7 @@ cyclomatic complexity
 
 
 \series bold 
---nostdlib
+---nostdlib
 \series default 
  This will prevent the compiler from passing on the default library path
  to the linker.
@@ -2264,7 +2288,7 @@ cyclomatic complexity
 
 
 \series bold 
---verbose
+---verbose
 \series default 
  Shows the various actions the compiler is performing.
 \layout List
@@ -2275,6 +2299,24 @@ cyclomatic complexity
 -V
 \series default 
  Shows the actual commands the compiler is executing.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+---no-c-code-in-asm
+\series default 
+ Hides your ugly and inefficient c-code from the asm file, so you can always
+ blame the compiler :).
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+---i-code-in-asm
+\series default 
+ Include i-codes in the asm file.
+ Looks like noise but is most helpfull for debugging the compiler itself.
 \layout Subsubsection
 
 Intermediate Dump Options
@@ -2291,7 +2333,7 @@ The following options are provided for the purpose of retargetting and debugging
 
 
 \series bold 
---dumpraw
+---dumpraw
 \series default 
  This option will cause the compiler to dump the intermediate code into
  a file of named 
@@ -2307,7 +2349,7 @@ The following options are provided for the purpose of retargetting and debugging
 
 
 \series bold 
---dumpgcse
+---dumpgcse
 \series default 
  Will create a dump of iCode's, after global subexpression elimination,
  into a file named 
@@ -2318,7 +2360,7 @@ The following options are provided for the purpose of retargetting and debugging
 
 
 \series bold 
---dumpdeadcode
+---dumpdeadcode
 \series default 
  Will create a dump of iCode's, after deadcode elimination, into a file
  named 
@@ -2329,7 +2371,7 @@ The following options are provided for the purpose of retargetting and debugging
 
 
 \series bold 
---dumploop
+---dumploop
 \series default 
 \size large 
  
@@ -2343,7 +2385,7 @@ Will create a dump of iCode's, after loop optimizations, into a file named
 
 
 \series bold 
---dumprange
+---dumprange
 \series default 
 \size large 
  
@@ -2357,7 +2399,7 @@ Will create a dump of iCode's, after live range analysis, into a file named
 
 
 \series bold 
---dumlrange
+---dumlrange
 \series default 
  Will dump the life ranges for all symbols.
 \layout List
@@ -2365,7 +2407,7 @@ Will create a dump of iCode's, after live range analysis, into a file named
 
 
 \series bold 
---dumpregassign
+---dumpregassign
 \bar under 
  
 \series default 
@@ -2379,7 +2421,7 @@ Will create a dump of iCode's, after register assignment, into a file named
 
 
 \series bold 
---dumplrange
+---dumplrange
 \series default 
  Will create a dump of the live ranges of iTemp's
 \layout List
@@ -2387,7 +2429,7 @@ Will create a dump of iCode's, after register assignment, into a file named
 
 
 \series bold 
---dumpall
+---dumpall
 \size large 
 \bar under 
  
@@ -2397,6 +2439,116 @@ Will create a dump of iCode's, after register assignment, into a file named
 Will cause all the above mentioned dumps to be created.
 \layout Subsection
 
+Environment variables
+\layout Standard
+
+SDCC recognizes the following environment variables:
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+SDCC_LEAVE_SIGNALS
+\series default 
+ SDCC installs a signal handler to be able to delete temporary files after
+ an user break (^C) or an exception.
+ If this environment variable is set, SDCC won't install the signal handler
+ in order to be able to debug SDCC.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+TMP,\SpecialChar ~
+TEMP,\SpecialChar ~
+TMPDIR
+\series default 
+ Path, where temporary files will be created.
+ The order of the variables is the search order.
+ In a standard *nix environment these variables are not set, and there's
+ no need to set them.
+ On Windows it's recommended to set one of them.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+(coming\SpecialChar ~
+soon:\SpecialChar ~
+SDCC_BIN_PATH)
+\series default 
+ Path, see 
+\begin_inset Quotes sld
+\end_inset 
+
+2.1 Install and search paths
+\begin_inset Quotes srd
+\end_inset 
+
+.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+(coming\SpecialChar ~
+soon:\SpecialChar ~
+SDCC_INCLUDE_PATH)
+\series default 
+ Path, see 
+\begin_inset Quotes sld
+\end_inset 
+
+2.1 Install and search paths
+\begin_inset Quotes srd
+\end_inset 
+
+.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+(coming\SpecialChar ~
+soon:\SpecialChar ~
+SDCC_LIB_PATH)
+\series default 
+ Path, see 
+\begin_inset Quotes sld
+\end_inset 
+
+2.1 Install and search paths
+\begin_inset Quotes srd
+\end_inset 
+
+.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+SDCCDIR\SpecialChar ~
+(soon\SpecialChar ~
+replaced\SpecialChar ~
+by:\SpecialChar ~
+SDCCPATH)
+\series default 
+ Path, see 
+\begin_inset Quotes sld
+\end_inset 
+
+2.1 Install and search paths
+\begin_inset Quotes srd
+\end_inset 
+
+.
+\layout Standard
+
+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.
+\layout Subsection
+
 MCS51/DS390 Storage Class Language Extensions
 \layout Standard
 
@@ -2491,11 +2643,8 @@ Pointers
 
 SDCC allows (via language extensions) pointers to explicitly point to any
  of the memory spaces of the 8051.
- In addition to the explicit pointers, the compiler also allows a 
-\emph on 
-_generic
-\emph default 
- class of pointers which can be used to point to any of the memory spaces.
+ In addition to the explicit pointers, the compiler uses (by default) generic
+ pointers which can be used to point to any of the memory spaces.
 \newline 
 
 \newline 
@@ -2543,49 +2692,12 @@ Well you get the idea.
 \newline 
 
 \newline 
-
-\emph on 
-For compatibility with the previous version of the compiler, the following
- syntax for pointer declaration is still supported but will disappear int
- the near future.
-\newline 
-
-\newline 
-
-\family typewriter 
-unsigned char _xdata *ucxdp; /* pointer to data in external ram */ 
-\newline 
-unsigned char _data \SpecialChar ~
-*ucdp ; /* pointer to data in internal ram */ 
-\newline 
-unsigned char _code \SpecialChar ~
-*uccp ; /* pointer to data in R/O code space */
-\newline 
-unsigned char _idata *uccp; \SpecialChar ~
-/* pointer to upper 128 bytes of ram */
-\family default 
-\size small 
-\emph default 
-
-\newline 
-
-\newline 
-
-\size default 
 All unqualified pointers are treated as 3-byte (4-byte for the ds390) 
 \emph on 
 generic
 \emph default 
  pointers.
- These type of pointers can also to be explicitly declared.
-\newline 
-
-\newline 
-
-\family typewriter 
-unsigned char _generic *ucgp;
-\family default 
 \size small 
 
 \newline 
@@ -2607,8 +2719,6 @@ generic
  These are useful for developing reusable library routines.
  Explicitly specifying the pointer type will generate the most efficient
  code.
- Pointers declared using a mixture of OLD and NEW style could have unpredictable
- results.
 \layout Subsection
 
 Parameters & Local Variables
@@ -2617,19 +2727,20 @@ Parameters & Local Variables
 Automatic (local) variables and parameters to functions can either be placed
  on the stack or in data-space.
  The default action of the compiler is to place these variables in the internal
- RAM (for small model) or external RAM (for Large model).
+ RAM (for small model) or external RAM (for large model).
  This in fact makes them 
 \emph on 
 static
 \emph default 
  so by default functions are non-reentrant.
-\layout Standard
+\newline 
 
+\newline 
 They can be placed on the stack either by using the
 \emph on 
- --stack-auto
+ ---stack-auto
 \emph default 
compiler option or by using the 
+ option or by using the 
 \emph on 
 reentrant
 \emph default 
@@ -2661,7 +2772,7 @@ reentrant
 \emph default 
 keyword or the
 \emph on 
- --stack-auto
+ ---stack-auto
 \emph default 
  option should be used sparingly.
  Note that the reentrant keyword just means that the parameters & local
@@ -2728,13 +2839,13 @@ bvar
  in internal ram.
  When compiled with 
 \emph on 
---stack-auto
+---stack-auto
 \emph default 
  or when a function is declared as 
 \emph on 
 reentrant
 \emph default 
- this can only be done for static variables.
+ this should only be done for static variables.
 \layout Standard
 
 Parameters however are not allowed any storage class, (storage classes for
@@ -2892,11 +3003,11 @@ ation & modulus operations are implemented using external support routines
  these operations then the support routines (as mentioned in a following
  section) will have to be recompiled using the
 \emph on 
- --stack-auto
+ ---stack-auto
 \emph default 
  option and the source file will need to be compiled using the 
 \emph on 
---int-long-ren
+---int-long-ren
 \emph default 
 t compiler option.
 \layout Standard
@@ -2920,13 +3031,13 @@ Interrupt Numbers and the corresponding address & descriptions for the Standard
 
 
 \begin_inset  Tabular
-<lyxtabular version="2" rows="6" columns="3">
-<features rotate="false" islongtable="false" endhead="0" endfirsthead="0" endfoot="0" endlastfoot="0">
-<column alignment="center" valignment="top" leftline="true" rightline="false" width="" special="">
-<column alignment="center" valignment="top" leftline="true" rightline="false" width="" special="">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="" special="">
-<row topline="true" bottomline="true" newpage="false">
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
+<lyxtabular version="3" rows="6" columns="3">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0pt">
+<column alignment="center" valignment="top" leftline="true" width="0pt">
+<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">
 \begin_inset Text
 
 \layout Standard
@@ -2934,7 +3045,7 @@ Interrupt Numbers and the corresponding address & descriptions for the Standard
 Interrupt #
 \end_inset 
 </cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -2942,7 +3053,7 @@ Interrupt #
 Description
 \end_inset 
 </cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special="">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -2951,8 +3062,8 @@ Vector Address
 \end_inset 
 </cell>
 </row>
-<row topline="true" bottomline="false" newpage="false">
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -2960,7 +3071,7 @@ Vector Address
 0
 \end_inset 
 </cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -2968,7 +3079,7 @@ Vector Address
 External 0
 \end_inset 
 </cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special="">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -2977,8 +3088,8 @@ External 0
 \end_inset 
 </cell>
 </row>
-<row topline="true" bottomline="false" newpage="false">
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -2986,7 +3097,7 @@ External 0
 1
 \end_inset 
 </cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -2994,7 +3105,7 @@ External 0
 Timer 0
 \end_inset 
 </cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special="">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -3003,8 +3114,8 @@ Timer 0
 \end_inset 
 </cell>
 </row>
-<row topline="true" bottomline="false" newpage="false">
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -3012,7 +3123,7 @@ Timer 0
 2
 \end_inset 
 </cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -3020,7 +3131,7 @@ Timer 0
 External 1
 \end_inset 
 </cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special="">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -3029,8 +3140,8 @@ External 1
 \end_inset 
 </cell>
 </row>
-<row topline="true" bottomline="false" newpage="false">
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -3038,7 +3149,7 @@ External 1
 3
 \end_inset 
 </cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -3046,7 +3157,7 @@ External 1
 Timer 1
 \end_inset 
 </cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special="">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -3055,8 +3166,8 @@ Timer 1
 \end_inset 
 </cell>
 </row>
-<row topline="true" bottomline="true" newpage="false">
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -3064,7 +3175,7 @@ Timer 1
 4
 \end_inset 
 </cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="false" rotate="false" usebox="none" width="" special="">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -3072,7 +3183,7 @@ Timer 1
 Serial
 \end_inset 
 </cell>
-<cell multicolumn="0" alignment="center" valignment="top" topline="true" bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" width="" special="">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \layout Standard
@@ -3123,6 +3234,14 @@ Also see the _naked modifier.
 Critical Functions
 \layout Standard
 
+
+\shape italic 
+<TODO: this isn't implemented at all!>
+\shape default 
+
+\newline 
+
+\newline 
 A special keyword may be associated with a function declaring it as 
 \emph on 
 critical
@@ -3432,7 +3551,7 @@ reti\SpecialChar ~
 \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 is is recommended that you stick to inline assembler.
+ and it is recommended that you stick to inline assembler.
 \layout Subsection
 
 Functions using private banks
@@ -3461,7 +3580,9 @@ using
 non-interrupt
 \emph default 
  function (but may occasionally be useful anyway
-\begin_float footnote 
+\begin_inset Foot
+collapsed true
+
 \layout Standard
 
 possible exception: if a function is called ONLY from 'interrupt' functions
@@ -3471,7 +3592,8 @@ possible exception: if a function is called ONLY from 'interrupt' functions
  call memcpy(), it might make sense to create a specialized version of memcpy()
  'using 1', since this would prevent the ISR from having to save bank zero
  to the stack on entry and switch to bank zero before calling the function
-\end_float 
+\end_inset 
+
 ).
 \newline 
 
@@ -3621,7 +3743,7 @@ per function
  be placed in a separate line (as the example shows).
  When the 
 \emph on 
---peep-asm
+---peep-asm
 \emph default 
  command line option is used, the inline assembler code will be passed through
  the peephole optimizer.
@@ -3774,7 +3896,7 @@ The same goes the other way, ie.
  labels defines in inline assembly CANNOT be accessed by C statements.
 \layout Subsection
 
-int(16 bit) and long (32 bit) Support
+int (16 bit) and long (32 bit) Support
 \layout Standard
 
 For signed & unsigned int (16 bit) and long (32 bit) variables, division,
@@ -3832,11 +3954,11 @@ non-reentrant
  If this is unavoidable then the above routines will need to be compiled
  with the 
 \emph on 
---stack-auto
+---stack-auto
 \emph default 
  option, after which the source program will have to be compiled with 
 \emph on 
---int-long-rent
+---int-long-rent
 \emph default 
  option.
 \layout Subsection
@@ -3977,7 +4099,7 @@ tinibios
 \newline 
 Like the 
 \emph on 
---model-large
+---model-large
 \emph default 
  option, variables will by default be placed into the XDATA segment.
  
@@ -3985,7 +4107,7 @@ Like the
 
 \newline 
 Segments may be placed anywhere in the 4 meg address space using the usual
- --*-loc options.
+ ---*-loc options.
  Note that if any segments are located above 64K, the -r flag must be passed
  to the linker to generate the proper segment relocations, and the Intel
  HEX output format must be used.
@@ -4016,28 +4138,28 @@ __mcs51 or __ds390 or __z80, etc - depending on the model used (e.g.
 
 SDCC_STACK_AUTO - this symbol is defined when 
 \emph on 
---stack-auto
+---stack-auto
 \emph default 
  option is used.
 \layout Itemize
 
 SDCC_MODEL_SMALL - when 
 \emph on 
---model-small
+---model-small
 \emph default 
  is used.
 \layout Itemize
 
 SDCC_MODEL_LARGE - when 
 \emph on 
---model-large
+---model-large
 \emph default 
  is used.
 \layout Itemize
 
 SDCC_USE_XSTACK - when 
 \emph on 
---xstack
+---xstack
 \emph default 
  option is used.
 \layout Itemize
@@ -4275,7 +4397,7 @@ on causes an increase in register pressure, which may cause unwanted spilling
  The compiler will generate a warning message when it is forced to allocate
  extra space either on the stack or data space.
  If this extra space allocation is undesirable then induction optimization
- can be eliminated either for the entire source file (with --noinduction
+ can be eliminated either for the entire source file (with ---noinduction
  option) or for a given function only using #pragma\SpecialChar ~
 NOINDUCTION.
 \newline 
@@ -4434,18 +4556,6 @@ The loop control variable does NOT participate in any arithmetic operation
 \layout Itemize
 
 There are NO switch statements in the loop.
-\layout Standard
-
-Note djnz instruction can be used for 8-bit values 
-\emph on 
-only
-\emph default 
-, therefore it is advantageous to declare loop control symbols as 
-\emph on 
-char
-\emph default 
-.
- Ofcourse this may not be possible on all situations.
 \layout Subsubsection
 
 Algebraic Simplifications
@@ -5109,7 +5219,7 @@ copt
  A default set of rules are compiled into the compiler, additional rules
  may be added with the 
 \emph on 
---peep-file <filename>
+---peep-file <filename>
 \emph default 
  option.
  The rule language is best illustrated with examples.
@@ -5199,7 +5309,7 @@ will remain unmodified.
 \newline 
 Other special case optimizations may be added by the user (via 
 \emph on 
---peep-file option
+---peep-file option
 \emph default 
 ).
  E.g.
@@ -5336,7 +5446,8 @@ The optimizer will apply to the rules one by one from the top in the sequence
  the rules again from the top, this option for a rule is expensive (performance)
 , it is intended to be used in situations where a transformation will trigger
  the same rule again.
- A good example of this the following rule:
+ An example of this (not a good one, it has side effects) is the following
+ rule:
 \newline 
 
 \newline 
@@ -5495,7 +5606,7 @@ g the variable bindings is passed as a parameter).
  have some better means.
  If you are looking at this file, you will also see the default rules that
  are compiled into the compiler, you can add your own rules in the default
- set there if you get tired of specifying the --peep-file option.
+ set there if you get tired of specifying the ---peep-file option.
 \layout Subsection
 
 Pragmas
@@ -5539,6 +5650,14 @@ EXCLUDE\SpecialChar ~
 none.
 \layout Itemize
 
+NOIV - Do not generate interrupt vector table entries for all ISR functions
+ defined after the pragma.
+ This is useful in cases where the interrupt vector table must be defined
+ manually, or when there is a secondary, manually defined interrupt vector
+ table (e.g.
+ for the autovector feature of the Cypress EZ-USB FX2).
+\layout Itemize
+
 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
@@ -5551,7 +5670,7 @@ CALLEE-SAVES function1[,function2[,function3...]] - The compiler by default
  reduce code & improve run time performance of the generated code.
  In future the compiler (with interprocedural analysis) will be able to
  determine the appropriate scheme to use for each function call.
- If --callee-saves command line option is used, the function names specified
+ If ---callee-saves command line option is used, the function names specified
  in #pragma\SpecialChar ~
 CALLEE-SAVES is appended to the list of functions specified inthe
  command line.
@@ -5612,37 +5731,89 @@ The compiler will generate a warning message when extra space is allocated.
 <pending: this is messy and incomplete>
 \emph default 
  Library Routines
-\layout Standard
+\layout Enumerate
+
+Compiler support routines (_gptrget, _mulint etc)
+\layout Enumerate
+
+Stdclib functions (puts, printf, strcat etc)
+\layout Enumerate
+
+Math functions (sin, pow, sqrt etc)
+\layout Subsection
+
+Interfacing with Assembly Routines
+\layout Subsubsection
 
-The following library routines are provided for your convenience.
+Global Registers used for Parameter Passing
 \layout Standard
 
-stdio.h - Contains the following functions printf & sprintf these routines
- are developed by Martijn van Balen <balen@natlab.research.philips.com>.
+The compiler always uses the global registers 
+\emph on 
+DPL,DPH,B 
+\emph default 
+and
+\emph on 
+ ACC
+\emph default 
+ to pass the first parameter to a routine.
+ The second parameter onwards is either allocated on the stack (for reentrant
+ routines or if ---stack-auto is used) or in the internal / external ram
+ (depending on the memory model).
  
-\layout Standard
+\layout Subsubsection
 
-%[flags][width][b|B|l|L]type
+Assembler Routine(non-reentrant)
 \layout Standard
 
+In the following example the function cfunc calls an assembler routine asm_func,
+ which takes two parameters.
+\newline 
+
+\newline 
+
+\family typewriter 
+extern int asm_func(unsigned char, unsigned char);
+\newline 
+
+\newline 
+int c_func (unsigned char i, unsigned char j)
+\newline 
+{
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+return asm_func(i,j);
+\newline 
+}
+\newline 
+
+\newline 
+int main()
+\newline 
+{
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- flags: -\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- left justify output in specified field width 
+return c_func(10,9);
+\newline 
+}
+\newline 
+
+\newline 
+
+\family default 
+The corresponding assembler function is:
+\newline 
+
+\newline 
+
+\family typewriter 
+.globl _asm_func_PARM_2 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -5652,6 +5823,8 @@ stdio.h - Contains the following functions printf & sprintf these routines
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+.globl _asm_func 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -5660,17 +5833,20 @@ stdio.h - Contains the following functions printf & sprintf these routines
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- +\SpecialChar ~
+.area OSEG 
+\newline 
+_asm_func_PARM_2:
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- prefix output with +/- sign if output is signed type 
-\newline 
 \SpecialChar ~
 \SpecialChar ~
+.ds      1 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -5679,16 +5855,19 @@ stdio.h - Contains the following functions printf & sprintf these routines
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+.area CSEG 
+\newline 
+_asm_func: 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- space\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- prefix output with a blank if it's a signed positive value 
+mov     a,dpl 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -5698,8 +5877,8 @@ stdio.h - Contains the following functions printf & sprintf these routines
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
- width:\SpecialChar ~
+add     a,_asm_func_PARM_2 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -5708,7 +5887,7 @@ stdio.h - Contains the following functions printf & sprintf these routines
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- specifies minimum number of characters outputted for numbers 
+mov     dpl,a 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -5718,6 +5897,8 @@ stdio.h - Contains the following functions printf & sprintf these routines
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+mov     dpl,#0x00 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -5726,1443 +5907,364 @@ stdio.h - Contains the following functions printf & sprintf these routines
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ret
+\newline 
+
+\newline 
+
+\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','
+b' & 'acc' for four byte values.
+\layout Standard
+
+The parameter naming convention is _<function_name>_PARM_<n>, where n is
+ the parameter number starting from 1, and counting from the left.
+ The first parameter is passed in 
+\begin_inset Quotes eld
+\end_inset 
+
+dpl
+\begin_inset Quotes erd
+\end_inset 
+
+ for One bye parameter, 
+\begin_inset Quotes eld
+\end_inset 
+
+dptr
+\begin_inset Quotes erd
+\end_inset 
+
+ if two bytes, 
+\begin_inset Quotes eld
+\end_inset 
+
+b,dptr
+\begin_inset Quotes erd
+\end_inset 
+
+ for three bytes and 
+\begin_inset Quotes eld
+\end_inset 
+
+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.
+\newline 
+
+\newline 
+Assemble the assembler routine with the following command:
+\newline 
+
+\newline 
+
+\family sans 
+\series bold 
+asx8051 -losg asmfunc.asm
+\newline 
+
+\newline 
+
+\family default 
+\series default 
+Then compile and link the assembler routine to the C source file with the
+ following command:
+\newline 
+
+\newline 
+
+\family sans 
+\series bold 
+sdcc cfunc.c asmfunc.rel
+\layout Subsubsection
+
+Assembler Routine(reentrant)
+\layout Standard
+
+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 
+
+\newline 
+
+\family typewriter 
+extern int asm_func(unsigned char, unsigned char);
+\newline 
+
+\newline 
+int c_func (unsigned char i, unsigned char j) reentrant 
+\newline 
+{ 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+return asm_func(i,j); 
+\newline 
+} 
+\newline 
+
+\newline 
+int main() 
+\newline 
+{ 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
- or strings.
+return c_func(10,9); 
+\newline 
+}
+\newline 
+
+\family default 
+
+\newline 
+The corresponding assembler routine is:
+\newline 
+
+\newline 
+
+\family typewriter 
+.globl _asm_func 
+\newline 
+_asm_func: 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+push  _bp 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+mov  _bp,sp 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+mov  r2,dpl
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+mov  a,_bp 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+clr  c 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
- - For numbers, spaces are added on the left when needed.
+add  a,#0xfd 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+mov  r0,a 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+add  a,#0xfc
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+mov  r1,a 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+mov  a,@r0 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+add  a,r2
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- If width starts with a zero character, zeroes and used 
+mov  dpl,a 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+mov  dph,#0x00 
+\newline 
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+mov  sp,_bp 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+pop  _bp 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ret
+\newline 
+
+\newline 
+
+\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
+ and local variables.
+\layout Subsection
+
+External Stack
+\layout Standard
+
+The external stack is located at the start of the external ram segment,
+ and is 256 bytes in size.
+ When ---xstack option is used to compile the program, the parameters and
+ local variables of all reentrant functions are allocated in this area.
+ This option is provided for programs with large stack space requirements.
+ When used with the ---stack-auto option, all parameters and local variables
+ are allocated on the external stack (note support libraries will need to
+ be recompiled with the same options).
+\layout Standard
+
+The compiler outputs the higher order address byte of the external ram segment
+ into PORT P2, therefore when using the External Stack option, this port
+ MAY NOT be used by the application program.
+\layout Subsection
+
+ANSI-Compliance
+\layout Standard
+
+Deviations from the compliancy.
+\layout Itemize
+
+functions are not always reentrant.
+\layout Itemize
+
+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 
+
+\newline 
+
+\newline 
+struct s { ...
+ }; 
+\newline 
+struct s s1, s2; 
+\newline 
+foo() 
+\newline 
+{ 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+...
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+s1 = s2 ; /* is invalid in SDCC although allowed in ANSI */ 
+\newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- instead of spaces.
+...
  
 \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 ~
- - For strings, spaces are are added on the left or right (when 
+}
 \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 ~
- flag '-' is used) when needed.
+struct s foo1 (struct s parms) /* is invalid in SDCC although allowed in
+ ANSI */ 
 \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 ~
+{ 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- b/B:\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- byte argument (used by d, u, o, x, X) 
+struct s rets; 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- l/L:\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- long argument (used by d, u, o, x, X)
+...
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- type:\SpecialChar ~
- d\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- decimal number 
+return rets;/* is invalid in SDCC although allowed in ANSI */ 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- u\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- unsigned decimal number 
+}
+\layout Itemize
+
+'long long' (64 bit integers) not supported.
+\layout Itemize
+
+'double' precision floating point not supported.
+\layout Itemize
+
+No support for setjmp and longjmp (for now).
+\layout Itemize
+
+Old K&R style function declarations are NOT allowed.
 \newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- o\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- unsigned octal number 
+
+\family typewriter 
+
 \newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- x\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- unsigned hexadecimal number (0-9, a-f) 
+foo(i,j) /* this old style of function declarations */ 
 \newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- X\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- unsigned hexadecimal number (0-9, A-F) 
+int i,j; /* are valid in ANSI but not valid in SDCC */ 
+\newline 
+{ 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- c\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- character 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- s\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- string (generic pointer) 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- p\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- generic pointer (I:data/idata, C:code, X:xdata, P:paged) 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- f\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- float (still to be implemented)
-\layout Standard
-
-Also contains a very simple version of printf (printf_small).
- This simplified version of printf supports only the following formats.
-\layout Standard
-
-format\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-output\SpecialChar ~
-type\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-argument-type 
-\newline 
-%d \SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-decimal \SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- short/int 
-\newline 
-%ld\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-decimal\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-long 
-\newline 
-%hd\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-decimal\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-char 
-\newline 
-%x\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-hexadecimal\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-short/int 
-\newline 
-%lx\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-hexadecimal\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-long 
-\newline 
-%hx\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-hexadecimal\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-char 
-\newline 
-%o\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-octal\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-short/int 
-\newline 
-%lo\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-octal\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-long 
-\newline 
-%ho\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-octal\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-char 
-\newline 
-%c\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-character\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-char 
-\newline 
-%s\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-character\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-_generic pointer
-\layout Standard
-
-The routine is very stack intesive, --stack-after-data parameter should
- be used when using this routine, the routine also takes about 1K of code
- space.
- It also expects an external function named putchar(char) to be present
- (this can be changed).
- When using the %s format the string / pointer should be cast to a generic
- pointer.
- eg.
-\layout Standard
-
-printf_small(
-\begin_inset Quotes eld
-\end_inset 
-
-my str %s, my int %d
-\backslash 
-n
-\begin_inset Quotes erd
-\end_inset 
-
-,(char _generic *)mystr,myint);
-\layout Itemize
-
-stdarg.h - contains definition for the following macros to be used for variable
- parameter list, note that a function can have a variable parameter list
- if and only if it is 'reentrant'
-\begin_deeper 
-\layout Standard
-
-va_list, va_start, va_arg, va_end.
-\end_deeper 
-\layout Itemize
-
-setjmp.h - contains defintion for ANSI setjmp & longjmp routines.
- Note in this case setjmp & longjmp can be used between functions executing
- within the same register bank, if long jmp is executed from a function
- that is using a different register bank from the function issuing the setjmp
- function, the results may be unpredictable.
- The jump buffer requires 3 bytes of data (the stack pointer & a 16 byte
- return address), and can be placed in any address space.
-\layout Itemize
-
-stdlib.h - contains the following functions.
-\begin_deeper 
-\layout Standard
-
-atoi, atol.
-\end_deeper 
-\layout Itemize
-
-string.h - contains the following functions.
-\begin_deeper 
-\layout Standard
-
-strcpy, strncpy, strcat, strncat, strcmp, strncmp, strchr, strrchr, strspn,
- strcspn, strpbrk, strstr, strlen, strtok, memcpy, memcmp, memset.
-\end_deeper 
-\layout Itemize
-
-ctype.h - contains the following routines.
-\begin_deeper 
-\layout Standard
-
-iscntrl, isdigit, isgraph, islower, isupper, isprint, ispunct, isspace,
- isxdigit, isalnum, isalpha.
-\end_deeper 
-\layout Itemize
-
-malloc.h - The malloc routines are developed by Dmitry S.
- Obukhov (dso@usa.net).
- These routines will allocate memory from the external ram.
- Here is a description on how to use them (as described by the author).
-\begin_deeper 
-\layout Standard
-
-//Example: 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- #define DYNAMIC_MEMORY_SIZE 0x2000 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- .....
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- unsigned char xdata dynamic_memory_pool[DYNAMIC_MEMORY_SIZE]; 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- unsigned char xdata * current_buffer; 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- .....
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- void main(void) 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- { 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- ...
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-//\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- init_dynamic_memory(dynamic_memory_pool,DYNAMIC_MEMORY_SIZE); 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //Now it's possible to use malloc.
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- ...
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- current_buffer = malloc(0x100); 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
- //
-\end_deeper 
-\layout Itemize
-
-serial.h - Serial IO routines are also developed by Dmitry S.
- Obukhov (dso@usa.net).
- These routines are interrupt driven with a 256 byte circular buffer, they
- also expect external ram to be present.
- Please see documentation in file SDCCDIR/sdcc51lib/serial.c.
- Note the header file 
-\begin_inset Quotes eld
-\end_inset 
-
-serial.h
-\begin_inset Quotes erd
-\end_inset 
-
- MUST be included in the file containing the 'main' function.
-\layout Itemize
-
-ser.h - Alternate serial routine provided by Wolfgang Esslinger <wolfgang@WiredMi
-nds.com> these routines are more compact and faster.
- Please see documentation in file SDCCDIR/sdcc51lib/ser.c
-\layout Itemize
-
-ser_ir.h - Another alternate set of serial routines provided by Josef Wolf
- <jw@raven.inka.de>, these routines do not use the external ram.
-\layout Itemize
-
-reg51.h - contains register definitions for a standard 8051
-\layout Itemize
-
-float.h - contains min, max and other floating point related stuff.
-\layout Standard
-
-All library routines are compiled as --model-small, they are all non-reentrant,
- if you plan to use the large model or want to make these routines reentrant,
- then they will have to be recompiled with the appropriate compiler option.
-\layout Standard
-
-Have not had time to do the more involved routines like printf, will get
- to them shortly.
-\layout Subsection
-
-Interfacing with Assembly Routines
-\layout Subsubsection
-
-Global Registers used for Parameter Passing
-\layout Standard
-
-The compiler always uses the global registers 
-\emph on 
-DPL,DPH,B 
-\emph default 
-and
-\emph on 
- ACC
-\emph default 
- to pass the first parameter to a routine.
- The second parameter onwards is either allocated on the stack (for reentrant
- routines or if --stack-auto is used) or in the internal / external ram
- (depending on the memory model).
-\layout Subsubsection
-
-Assembler Routine(non-reentrant)
-\layout Standard
-
-In the following example the function cfunc calls an assembler routine asm_func,
- which takes two parameters.
-\newline 
-
-\newline 
-
-\family typewriter 
-extern int asm_func(unsigned char, unsigned char);
-\newline 
-
-\newline 
-int c_func (unsigned char i, unsigned char j)
-\newline 
-{
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-return asm_func(i,j);
-\newline 
-}
-\newline 
-
-\newline 
-int main()
-\newline 
-{
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-return c_func(10,9);
-\newline 
-}
-\newline 
-
-\newline 
-
-\family default 
-The corresponding assembler function is:
-\newline 
-
-\newline 
-
-\family typewriter 
-.globl _asm_func_PARM_2 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-.globl _asm_func 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-.area OSEG 
-\newline 
-_asm_func_PARM_2:
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-.ds      1 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-.area CSEG 
-\newline 
-_asm_func: 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-mov     a,dpl 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-add     a,_asm_func_PARM_2 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-mov     dpl,a 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-mov     dpl,#0x00 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-ret
-\newline 
-
-\newline 
-
-\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','
-b' & 'acc' for four byte values.
-\layout Standard
-
-The parameter naming convention is _<function_name>_PARM_<n>, where n is
- the parameter number starting from 1, and counting from the left.
- The first parameter is passed in 
-\begin_inset Quotes eld
-\end_inset 
-
-dpl
-\begin_inset Quotes erd
-\end_inset 
-
- for One bye parameter, 
-\begin_inset Quotes eld
-\end_inset 
-
-dptr
-\begin_inset Quotes erd
-\end_inset 
-
- if two bytes, 
-\begin_inset Quotes eld
-\end_inset 
-
-b,dptr
-\begin_inset Quotes erd
-\end_inset 
-
- for three bytes and 
-\begin_inset Quotes eld
-\end_inset 
-
-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.
-\newline 
-
-\newline 
-Assemble the assembler routine with the following command:
-\newline 
-
-\newline 
-
-\family sans 
-\series bold 
-asx8051 -losg asmfunc.asm
-\newline 
-
-\newline 
-
-\family default 
-\series default 
-Then compile and link the assembler routine to the C source file with the
- following command:
-\newline 
-
-\newline 
-
-\family sans 
-\series bold 
-sdcc cfunc.c asmfunc.rel
-\layout Subsubsection
-
-Assembler Routine(reentrant)
-\layout Standard
-
-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 
-
-\newline 
-
-\family typewriter 
-extern int asm_func(unsigned char, unsigned char);
-\newline 
-
-\newline 
-int c_func (unsigned char i, unsigned char j) reentrant 
-\newline 
-{ 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-return asm_func(i,j); 
-\newline 
-} 
-\newline 
-
-\newline 
-int main() 
-\newline 
-{ 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-return c_func(10,9); 
-\newline 
-}
-\newline 
-
-\family default 
-
-\newline 
-The corresponding assembler routine is:
-\newline 
-
-\newline 
-
-\family typewriter 
-.globl _asm_func 
-\newline 
-_asm_func: 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-push  _bp 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-mov  _bp,sp 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-mov  r2,dpl
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-mov  a,_bp 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-clr  c 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-add  a,#0xfd 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-mov  r0,a 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-add  a,#0xfc
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-mov  r1,a 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-mov  a,@r0 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-add  a,r2
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-mov  dpl,a 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-mov  dph,#0x00 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-mov  sp,_bp 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-pop  _bp 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-ret
-\newline 
-
-\newline 
-
-\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
- and local variables.
-\layout Subsection
-
-External Stack
-\layout Standard
-
-The external stack is located at the start of the external ram segment,
- and is 256 bytes in size.
- When --xstack option is used to compile the program, the parameters and
- local variables of all reentrant functions are allocated in this area.
- This option is provided for programs with large stack space requirements.
- When used with the --stack-auto option, all parameters and local variables
- are allocated on the external stack (note support libraries will need to
- be recompiled with the same options).
-\layout Standard
-
-The compiler outputs the higher order address byte of the external ram segment
- into PORT P2, therefore when using the External Stack option, this port
- MAY NOT be used by the application program.
-\layout Subsection
-
-ANSI-Compliance
-\layout Standard
-
-Deviations from the compliancy.
-\layout Itemize
-
-functions are not always reentrant.
-\layout Itemize
-
-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 
-
-\newline 
-
-\newline 
-struct s { ...
- }; 
-\newline 
-struct s s1, s2; 
-\newline 
-foo() 
-\newline 
-{ 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-...
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-s1 = s2 ; /* is invalid in SDCC although allowed in ANSI */ 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-...
-\newline 
-}
-\newline 
-struct s foo1 (struct s parms) /* is invalid in SDCC although allowed in
- ANSI */ 
-\newline 
-{ 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-struct s rets; 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-...
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-return rets;/* is invalid in SDCC although allowed in ANSI */ 
-\newline 
-}
-\layout Itemize
-
-'long long' (64 bit integers) not supported.
-\layout Itemize
-
-'double' precision floating point not supported.
-\layout Itemize
-
-No support for setjmp and longjmp (for now).
-\layout Itemize
-
-Old K&R style function declarations are NOT allowed.
-\newline 
-
-\family typewriter 
-
-\newline 
-foo(i,j) /* this old style of function declarations */ 
-\newline 
-int i,j; /* are valid in ANSI but not valid in SDCC */ 
-\newline 
-{ 
-\newline 
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-...
+...
 \newline 
 }
 \layout Itemize
@@ -7231,7 +6333,7 @@ Here are a few guidelines that will help the compiler generate more efficient
 
 Use the smallest data type to represent your data-value.
  If it is known in advance that the value is going to be less than 256 then
- use a 'char' instead of a 'short' or 'int'.
+ use an 'unsigned char' instead of a 'short' or 'int'.
 \layout Itemize
 
 Use unsigned when it is known in advance that the value is not going to
@@ -7246,8 +6348,8 @@ Declare the variables to be local whenever possible, especially loop control
  variables (induction).
 \layout Itemize
 
-Since the compiler does not do implicit integral promotion, the programmer
- should do an explicit cast when integral promotion is required.
+Since the compiler does not always do implicit integral promotion, the programme
+r should do an explicit cast when integral promotion is required.
 \layout Itemize
 
 Reducing the size of division, multiplication & modulus operations can reduce
@@ -7275,8 +6377,8 @@ foobar(unsigned int p1, unsigned char ch)
 \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 _muduint()), and the result will be casted to an
int.
+ call to support routine _moduint()), and the result will be casted to a
char.
  If the code is changed to 
 \newline 
 
@@ -7345,32 +6447,32 @@ If any of the 128 bit variables are used, or near data is being used then
 \layout Standard
 
 The amount of stack being used is affected by the use of the "internal stack"
- to save registers before a subroutine call is made (--stack-auto will declare
- parameters and local variables on the stack) and the number of nested subroutin
-es.
+ to save registers before a subroutine call is made (---stack-auto will
+ declare parameters and local variables on the stack) and the number of
+ nested subroutines.
 \layout Standard
 
 If you detect that the stack is over writing you data, then the following
  can be done.
- --xstack will cause an external stack to be used for saving registers and
(if --stack-auto is being used) storing parameters and local variables.
+ ---xstack will cause an external stack to be used for saving registers
and (if ---stack-auto is being used) storing parameters and local variables.
  However this will produce more code which will be slower to execute.
  
 \layout Standard
 
---stack-loc will allow you specify the start of the stack, i.e.
+---stack-loc will allow you specify the start of the stack, i.e.
  you could start it after any data in the general purpose area.
  However this may waste the memory not used by the register banks and if
  the size of the "near data" increases, it may creep into the bottom of
  the stack.
 \layout Standard
 
---stack-after-data, similar to the --stack-loc, but it automatically places
+---stack-after-data, similar to the ---stack-loc, but it automatically places
  the stack after the end of the "near data".
  Again this could waste any spare register space.
 \layout Standard
 
---data-loc allows you to specify the start address of the near data.
+---data-loc allows you to specify the start address of the near data.
  This could be used to move the "near data" further away from the stack
  giving it more room to grow.
  This will only work if no bit variables are being used and the stack can
@@ -7385,9 +6487,9 @@ Conclusion.
 If you find that the stack is over writing your bit variables or "near data"
  then the approach which best utilised the internal memory is to position
  the "near data" after the last bank of used registers or, if you use bit
- variables, after the last bit variable by using the --data-loc, e.g.
- if two register banks are being used and no bit variables, --data-loc 16,
and use the --stack-after-data option.
+ variables, after the last bit variable by using the ---data-loc, e.g.
+ if two register banks are being used and no bit variables, ---data-loc
16, and use the ---stack-after-data option.
 \layout Standard
 
 If bit variables are being used, another method would be to try and squeeze
@@ -7417,7 +6519,7 @@ The second phase involves generating an intermediate code which can be easy
  The intermediate code generation assumes the target machine has unlimited
  number of registers, and designates them with the name iTemp.
  The compiler can be made to dump a human readable form of the code generated
- by using the --dumpraw option.
+ by using the ---dumpraw option.
 \layout Itemize
 
 This phase does the bulk of the standard optimizations and is also MCU independe
@@ -7503,7 +6605,7 @@ debug option must be specified for all files for which debug information
 How the Debugger Works
 \layout Standard
 
-When the --debug option is specified the compiler generates extra symbol
+When the ---debug option is specified the compiler generates extra symbol
  information some of which are put into the the assembler source and some
  are put into the .cdb file, the linker updates the .cdb file with the address
  information for the symbols.
@@ -7548,13 +6650,13 @@ foo.ihx - the intel hex format object file.
 Command Line Options.
 \layout Itemize
 
---directory=<source file directory> this option can used to specify the
+---directory=<source file directory> this option can used to specify the
  directory search list.
  The debugger will look into the directory list specified for source, cdb
  & ihx files.
  The items in the directory list must be separated by ':', e.g.
  if the source files can be in the directories /home/src1 and /home/src2,
- the --directory option should be --directory=/home/src1:/home/src2.
+ the ---directory option should be ---directory=/home/src1:/home/src2.
  Note there can be no spaces in the option.
  
 \layout Itemize
@@ -7789,18 +6891,159 @@ The following is a list of key mapping for the debugger interface.
 \layout Standard
 
 \SpecialChar ~
-
-\family typewriter 
-
-\newline 
-;; Current Listing :: 
-\newline 
-;;key\SpecialChar ~
+
+\family typewriter 
+
+\newline 
+;; Current Listing :: 
+\newline 
+;;key\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+binding\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+Comment 
+\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 ~
+-------- 
+\newline 
+;; 
+\newline 
+;; n\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+ sdcdb-next-from-src\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+SDCDB next command 
+\newline 
+;; b\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+ sdcdb-back-from-src\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+SDCDB back command 
+\newline 
+;; c\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ sdcdb-cont-from-src\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7810,7 +7053,10 @@ The following is a list of key mapping for the debugger interface.
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-binding\SpecialChar ~
+SDCDB continue command
+\newline 
+;; s\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7823,6 +7069,7 @@ binding\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ sdcdb-step-from-src\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7832,9 +7079,9 @@ binding\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-Comment 
+SDCDB step command 
 \newline 
-;;---\SpecialChar ~
+;; ?\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7848,8 +7095,8 @@ Comment
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ sdcdb-whatis-c-sexp\SpecialChar ~
 \SpecialChar ~
--------\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7858,6 +7105,9 @@ Comment
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+SDCDB ptypecommand for data at 
+\newline 
+;;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7871,11 +7121,6 @@ Comment
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-------- 
-\newline 
-;; 
-\newline 
-;; n\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7889,7 +7134,6 @@ Comment
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-next-from-src\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7899,9 +7143,19 @@ Comment
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-SDCDB next command 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+ buffer point 
 \newline 
-;; b\SpecialChar ~
+;; x\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7915,7 +7169,7 @@ SDCDB next command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-back-from-src\SpecialChar ~
+ sdcdbsrc-delete\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7925,9 +7179,13 @@ SDCDB next command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-SDCDB back command 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+SDCDB Delete all breakpoints if no arg 
 \newline 
-;; c\SpecialChar ~
+;;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7941,7 +7199,6 @@ SDCDB back command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-cont-from-src\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7951,9 +7208,6 @@ SDCDB back command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-SDCDB continue command
-\newline 
-;; s\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7967,7 +7221,6 @@ SDCDB continue command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-step-from-src\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7977,9 +7230,10 @@ SDCDB continue command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-SDCDB step command 
+\SpecialChar ~
+given or delete arg (C-u arg x) 
 \newline 
-;; ?\SpecialChar ~
+;; m\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -7993,7 +7247,7 @@ SDCDB step command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-whatis-c-sexp\SpecialChar ~
+ sdcdbsrc-frame\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8003,7 +7257,12 @@ SDCDB step command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-SDCDB ptypecommand for data at 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+SDCDB Display current frame if no arg, 
 \newline 
 ;;\SpecialChar ~
 \SpecialChar ~
@@ -8051,9 +7310,10 @@ SDCDB ptypecommand for data at
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- buffer point 
+\SpecialChar ~
+given or display frame arg 
 \newline 
-;; x\SpecialChar ~
+;;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8067,7 +7327,6 @@ SDCDB ptypecommand for data at
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdbsrc-delete\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8081,9 +7340,6 @@ SDCDB ptypecommand for data at
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-SDCDB Delete all breakpoints if no arg 
-\newline 
-;;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8104,6 +7360,9 @@ SDCDB Delete all breakpoints if no arg
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+buffer point 
+\newline 
+;; !\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8117,6 +7376,7 @@ SDCDB Delete all breakpoints if no arg
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ sdcdbsrc-goto-sdcdb\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8126,12 +7386,12 @@ SDCDB Delete all breakpoints if no arg
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+Goto the SDCDB output buffer 
+\newline 
+;; p\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-given or delete arg (C-u arg x) 
-\newline 
-;; m\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8142,10 +7402,10 @@ given or delete arg (C-u arg x)
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ sdcdb-print-c-sexp\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdbsrc-frame\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8153,6 +7413,9 @@ given or delete arg (C-u arg x)
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+SDCDB print command for data at 
+\newline 
+;;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8160,9 +7423,6 @@ given or delete arg (C-u arg x)
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-SDCDB Display current frame if no arg, 
-\newline 
-;;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8201,6 +7461,9 @@ SDCDB Display current frame if no arg,
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ buffer point 
+\newline 
+;; g\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8209,9 +7472,14 @@ SDCDB Display current frame if no arg,
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-given or display frame arg 
-\newline 
-;;\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+ sdcdbsrc-goto-sdcdb\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8219,6 +7487,10 @@ given or display frame arg
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+Goto the SDCDB output buffer 
+\newline 
+;; t\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8230,6 +7502,8 @@ given or display frame arg
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+\SpecialChar ~
+ sdcdbsrc-mode\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8245,12 +7519,19 @@ given or display frame arg
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+Toggles Sdcdbsrc mode (turns it off) 
+\newline 
+;; 
+\newline 
+;; C-c C-f\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ sdcdb-finish-from-src\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8258,15 +7539,19 @@ given or display frame arg
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-buffer point 
+SDCDB finish command 
 \newline 
-;; !\SpecialChar ~
+;; 
+\newline 
+;; C-x SPC\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ sdcdb-break\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8274,7 +7559,6 @@ buffer point
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdbsrc-goto-sdcdb\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8284,9 +7568,11 @@ buffer point
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-Goto the SDCDB output buffer 
+\SpecialChar ~
+Set break for line with point 
 \newline 
-;; p\SpecialChar ~
+;; ESC t\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8295,12 +7581,12 @@ Goto the SDCDB output buffer
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+ sdcdbsrc-mode\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-print-c-sexp\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8311,9 +7597,19 @@ Goto the SDCDB output buffer
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-SDCDB print command for data at 
+Toggle Sdcdbsrc mode 
 \newline 
-;;\SpecialChar ~
+;; ESC m\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+ sdcdbsrc-srcmode\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -8324,291 +7620,1336 @@ SDCDB print command for data at
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+\SpecialChar ~
+ Toggle list mode 
+\newline 
+;; 
+\family default 
+
+\newline 
+
+\layout Section
+
+Other Processors
+\layout Subsection
+
+The Z80 and gbz80 port
+\layout Standard
+
+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.
+ 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.
+ 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.
+\layout Section
+
+Support
+\layout Standard
+
+SDCC has grown to be a large project.
+ The compiler alone (without the preprocessor, assembler and linker) is
+ about 40,000 lines of code (blank stripped).
+ The open source nature of this project is a key to its continued growth
+ and support.
+ You gain the benefit and support of many active software developers and
+ end users.
+ Is SDCC perfect? No, that's why we need your help.
+ The developers take pride in fixing reported bugs.
+ You can help by reporting the bugs and helping other SDCC users.
+ There are lots of ways to contribute, and we encourage you to take part
+ in making SDCC a great software package.
+\layout Subsection
+
+Reporting Bugs
+\layout Standard
+
+Send an email to the mailing list at 'user-sdcc@sdcc.sourceforge.net' or 'devel-sd
+cc@sdcc.sourceforge.net'.
+ Bugs will be fixed ASAP.
+ When reporting a bug, it is very useful to include a small test program
+ 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 ---dumpall option can sometimes be useful
+ in locating optimization problems.
+\layout Section
+
+The anatomy of the compiler
+\layout Standard
+
+
+\shape italic 
+This is an excerpt from an atricle published in Circuit Cellar MagaZine
+ in august 2000.
+ It's a little outdated (the compiler is much more efficient now and user/devell
+oper friendly), but pretty well exposes the guts of it all.
+\shape default 
+
+\newline 
+
+\newline 
+The current version of SDCC can generate code for Intel 8051 and Z80 MCU.
+ It is fairly easy to retarget for other 8-bit MCU.
+ Here we take a look at some of the internals of the compiler.
+\layout Paragraph*
+
+Parsing 
+\layout Standard
+
+Parsing the input source file and creating an AST (Annotated Syntax Tree).
+ This phase also involves propagating types (annotating each node of the
+ parse tree with type information) and semantic analysis.
+ There are some MCU specific parsing rules.
+ For example the storage classes, the extended storage classes are MCU specific
+ while there may be a xdata storage class for 8051 there is no such storage
+ class for z80 or Atmel AVR.
+ SDCC allows MCU specific storage class extensions, i.e.
+ xdata will be treated as a storage class specifier when parsing 8051 C
+ code but will be treated as a C identifier when parsing z80 or ATMEL AVR
+ C code.
+\layout Paragraph*
+
+Generating iCode
+\layout Standard
+
+Intermediate code generation.
+ In this phase the AST is broken down into three-operand form (iCode).
+ These three operand forms are represented as doubly linked lists.
+ ICode is the term given to the intermediate form generated by the compiler.
+ ICode example section shows some examples of iCode generated for some simple
+ C source functions.
+\layout Paragraph*
+
+Optimizations.
+\layout Standard
+
+Bulk of the target independent optimizations is performed in this phase.
+ The optimizations include constant propagation, common sub-expression eliminati
+on, loop invariant code movement, strength reduction of loop induction variables
+ and dead-code elimination.
+\layout Paragraph*
+
+Live range analysis
+\layout Standard
+
+During intermediate code generation phase, the compiler assumes the target
+ machine has infinite number of registers and generates a lot of temporary
+ variables.
+ The live range computation determines the lifetime of each of these compiler-ge
+nerated temporaries.
+ A picture speaks a thousand words.
+ ICode example sections show the live range annotations for each of the
+ operand.
+ It is important to note here, each iCode is assigned a number in the order
+ of its execution in the function.
+ The live ranges are computed in terms of these numbers.
+ The from number is the number of the iCode which first defines the operand
+ and the to number signifies the iCode which uses this operand last.
+\layout Paragraph*
+
+Register Allocation
+\layout Standard
+
+The register allocation determines the type and number of registers needed
+ by each operand.
+ In most MCUs only a few registers can be used for indirect addressing.
+ In case of 8051 for example the registers R0 & R1 can be used to indirectly
+ address the internal ram and DPTR to indirectly address the external ram.
+ The compiler will try to allocate the appropriate register to pointer variables
+ if it can.
+ ICode example section shows the operands annotated with the registers assigned
+ to them.
+ The compiler will try to keep operands in registers as much as possible;
+ there are several schemes the compiler uses to do achieve this.
+ When the compiler runs out of registers the compiler will check to see
+ if there are any live operands which is not used or defined in the current
+ basic block being processed, if there are any found then it will push that
+ operand and use the registers in this block, the operand will then be popped
+ at the end of the basic block.
+\layout Standard
+
+There are other MCU specific considerations in this phase.
+ Some MCUs have an accumulator; very short-lived operands could be assigned
+ to the accumulator instead of general-purpose register.
+\layout Paragraph*
+
+Code generation
+\layout Standard
+
+Figure II gives a table of iCode operations supported by the compiler.
+ The code generation involves translating these operations into corresponding
+ assembly code for the processor.
+ This sounds overly simple but that is the essence of code generation.
+ Some of the iCode operations are generated on a MCU specific manner for
+ example, the z80 port does not use registers to pass parameters so the
+ SEND and RECV iCode operations will not be generated, and it also does
+ not support JUMPTABLES.
+\newline 
+
+\series bold 
+\shape italic 
+\color red
+<Where is Figure II ?>
+\layout Paragraph*
+
+ICode Example
+\layout Standard
+
+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 
+
+\newline 
+
+\family typewriter 
+1.\SpecialChar ~
+xdata int * p;
+\newline 
+2.\SpecialChar ~
+int gint;
+\newline 
+3.\SpecialChar ~
+/* This function does nothing useful.
+ It is used
+\newline 
+4.\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+for the purpose of explaining iCode */
+\newline 
+5.\SpecialChar ~
+short function (data int *x)
+\newline 
+6.\SpecialChar ~
+{
+\newline 
+7.\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+short i=10; /* dead initialization eliminated */
+\newline 
+8.\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+short sum=10; /* dead initialization eliminated */
+\newline 
+9.\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+short mul;
+\newline 
+10.\SpecialChar ~
 \SpecialChar ~
+int j ;
+\newline 
+11.\SpecialChar ~
 \SpecialChar ~
+while (*x) *x++ = *p++; 
+\newline 
+12.\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+sum = 0 ; 
+\newline 
+13.\SpecialChar ~
 \SpecialChar ~
+mul = 0;
+\newline 
+14.\SpecialChar ~
 \SpecialChar ~
+/* compiler detects i,j to be induction variables */
+\newline 
+15.\SpecialChar ~
 \SpecialChar ~
+for (i = 0, j = 10 ; i < 10 ; i++, j---) {
+\newline 
+16.\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+sum += i;
+\newline 
+17.\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+mul += i * 3; /* this multiplication remains */
+\newline 
+18.\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+gint += j * 3;/* this multiplication changed to addition */
+\newline 
+19.\SpecialChar ~
 \SpecialChar ~
+}
+\newline 
+20.\SpecialChar ~
 \SpecialChar ~
+return sum+mul;
+\newline 
+21.\SpecialChar ~
+}
+\newline 
+
+\newline 
+
+\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:
+\newline 
+
+\shape italic 
+\size footnotesize 
+Filename(linenumber: iCode Execution sequence number : ICode hash table
+ key : loop depth of the iCode).
+\shape default 
+\size default 
+
+\newline 
+Then follows the human readable form of the ICode operation.
+ Each operand of this triplet form can be of three basic types a) compiler
+ generated temporary b) user defined variable c) a constant value.
+ Note that local variables and parameters are replaced by compiler generated
+ temporaries.
+ Live ranges are computed only for temporaries (i.e.
+ live ranges are not computed for global variables).
+ Registers are allocated for temporaries only.
+ Operands are formatted in the following manner:
+\newline 
+
+\shape italic 
+\size footnotesize 
+Operand Name [lr live-from : live-to ] { type information } [ registers
+ allocated ].
+\shape default 
+\size default 
+
+\newline 
+As mentioned earlier the live ranges are computed in terms of the execution
+ sequence number of the iCodes, for example 
+\newline 
+the iTemp0 is live from (i.e.
+ first defined in iCode with execution sequence number 3, and is last used
+ in the iCode with sequence number 5).
+ For induction variables such as iTemp21 the live range computation extends
+ the lifetime from the start to the end of the loop.
+\newline 
+The register allocator used the live range information to allocate registers,
+ the same registers may be used for different temporaries if their live
+ ranges do not overlap, for example r0 is allocated to both iTemp6 and to
+ iTemp17 since their live ranges do not overlap.
+ In addition the allocator also takes into consideration the type and usage
+ of a temporary, for example itemp6 is a pointer to near space and is used
+ as to fetch data from (i.e.
+ used in GET_VALUE_AT_ADDRESS) so it is allocated a pointer registers (r0).
+ Some short lived temporaries are allocated to special registers which have
+ meaning to the code generator e.g.
+ iTemp13 is allocated to a pseudo register CC which tells the back end that
+ the temporary is used only for a conditional jump the code generation makes
+ use of this information to optimize a compare and jump ICode.
+\newline 
+There are several loop optimizations performed by the compiler.
+ It can detect induction variables iTemp21(i) and iTemp23(j).
+ Also note the compiler does selective strength reduction, i.e.
+ the multiplication of an induction variable in line 18 (gint = j * 3) is
+ changed to addition, a new temporary iTemp17 is allocated and assigned
+ a initial value, a constant 3 is then added for each iteration of the loop.
+ The compiler does not change the multiplication in line 17 however since
+ the processor does support an 8 * 8 bit multiplication.
+\newline 
+Note the dead code elimination optimization eliminated the dead assignments
+ in line 7 & 8 to I and sum respectively.
+\newline 
+
+\layout Standard
+
+
+\size footnotesize 
+Sample.c (5:1:0:0) _entry($9) :
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(5:2:1:0) proc _function [lr0:0]{function short}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:3:2:0) iTemp0 [lr3:5]{_near * int}[r2] = recv 
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:4:53:0) preHeaderLbl0($11) :
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:5:55:0) iTemp6 [lr5:16]{_near * int}[r0] := iTemp0 [lr3:5]{_near
+ * int}[r2]
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:6:5:1) _whilecontinue_0($1) :
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:7:7:1) iTemp4 [lr7:8]{int}[r2 r3] = @[iTemp6 [lr5:16]{_near *
+ int}[r0]]
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:8:8:1) if iTemp4 [lr7:8]{int}[r2 r3] == 0 goto _whilebreak_0($3)
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:9:14:1) iTemp7 [lr9:13]{_far * int}[DPTR] := _p [lr0:0]{_far
+ * int}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:10:15:1) _p [lr0:0]{_far * int} = _p [lr0:0]{_far * int} + 0x2
+ {short}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:13:18:1) iTemp10 [lr13:14]{int}[r2 r3] = @[iTemp7 [lr9:13]{_far
+ * int}[DPTR]]
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:14:19:1) *(iTemp6 [lr5:16]{_near * int}[r0]) := iTemp10 [lr13:14]{int
+}[r2 r3]
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:15:12:1) iTemp6 [lr5:16]{_near * int}[r0] = iTemp6 [lr5:16]{_near
+ * int}[r0] + 0x2 {short}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:16:20:1) goto _whilecontinue_0($1)
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(11:17:21:0)_whilebreak_0($3) :
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(12:18:22:0) iTemp2 [lr18:40]{short}[r2] := 0x0 {short}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(13:19:23:0) iTemp11 [lr19:40]{short}[r3] := 0x0 {short}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(15:20:54:0)preHeaderLbl1($13) :
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(15:21:56:0) iTemp21 [lr21:38]{short}[r4] := 0x0 {short}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(15:22:57:0) iTemp23 [lr22:38]{int}[r5 r6] := 0xa {int}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(15:23:58:0) iTemp17 [lr23:38]{int}[r7 r0] := 0x1e {int}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(15:24:26:1)_forcond_0($4) :
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(15:25:27:1) iTemp13 [lr25:26]{char}[CC] = iTemp21 [lr21:38]{short}[r4]
+ < 0xa {short}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(15:26:28:1) if iTemp13 [lr25:26]{char}[CC] == 0 goto _forbreak_0($7)
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(16:27:31:1) iTemp2 [lr18:40]{short}[r2] = iTemp2 [lr18:40]{short}[r2]
+ + ITemp21 [lr21:38]{short}[r4]
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(17:29:33:1) iTemp15 [lr29:30]{short}[r1] = iTemp21 [lr21:38]{short}[r4]
+ * 0x3 {short}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(17:30:34:1) iTemp11 [lr19:40]{short}[r3] = iTemp11 [lr19:40]{short}[r3]
+ + iTemp15 [lr29:30]{short}[r1]
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(18:32:36:1:1) iTemp17 [lr23:38]{int}[r7 r0]= iTemp17 [lr23:38]{int}[r7
+ r0]- 0x3 {short}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(18:33:37:1) _gint [lr0:0]{int} = _gint [lr0:0]{int} + iTemp17 [lr23:38]{
+int}[r7 r0]
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(15:36:42:1) iTemp21 [lr21:38]{short}[r4] = iTemp21 [lr21:38]{short}[r4]
+ + 0x1 {short}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(15:37:45:1) iTemp23 [lr22:38]{int}[r5 r6]= iTemp23 [lr22:38]{int}[r5
+ r6]- 0x1 {short}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(19:38:47:1) goto _forcond_0($4)
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(19:39:48:0)_forbreak_0($7) :
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(20:40:49:0) iTemp24 [lr40:41]{short}[DPTR] = iTemp2 [lr18:40]{short}[r2]
+ + ITemp11 [lr19:40]{short}[r3]
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(20:41:50:0) ret iTemp24 [lr40:41]{short}
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(20:42:51:0)_return($8) :
+\layout Standard
+
+
+\size footnotesize 
+Sample.c(20:43:52:0) eproc _function [lr0:0]{ ia0 re0 rm0}{function short}
+\size default 
+
+\newline 
+
+\newline 
+Finally the code generated for this function:
+\newline 
+
+\layout Standard
+
+
+\size footnotesize 
+.area DSEG (DATA)
+\layout Standard
+
+
+\size footnotesize 
+_p::
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+.ds 2
+\layout Standard
+
+
+\size footnotesize 
+_gint::
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+.ds 2
+\layout Standard
+
+
+\size footnotesize 
+; sample.c 5
+\layout Standard
+
+
+\size footnotesize 
+; ----------------------------------------------
+\layout Standard
+
+
+\size footnotesize 
+; function function
+\layout Standard
+
+
+\size footnotesize 
+; ----------------------------------------------
+\layout Standard
+
+
+\size footnotesize 
+_function:
+\layout Standard
+
+
+\size footnotesize 
+; iTemp0 [lr3:5]{_near * int}[r2] = recv 
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov r2,dpl
+\layout Standard
+
+
+\size footnotesize 
+; iTemp6 [lr5:16]{_near * int}[r0] := iTemp0 [lr3:5]{_near * int}[r2]
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
- buffer point 
-\newline 
-;; g\SpecialChar ~
+mov ar0,r2
+\layout Standard
+
+
+\size footnotesize 
+;_whilecontinue_0($1) :
+\layout Standard
+
+
+\size footnotesize 
+00101$:
+\layout Standard
+
+
+\size footnotesize 
+; iTemp4 [lr7:8]{int}[r2 r3] = @[iTemp6 [lr5:16]{_near * int}[r0]]
+\layout Standard
+
+
+\size footnotesize 
+; if iTemp4 [lr7:8]{int}[r2 r3] == 0 goto _whilebreak_0($3)
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov ar2,@r0
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+inc r0
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov ar3,@r0
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+dec r0
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov a,r2
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+orl a,r3
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
- sdcdbsrc-goto-sdcdb\SpecialChar ~
 \SpecialChar ~
+jz 00103$
+\layout Standard
+
+
+\size footnotesize 
+00114$:
+\layout Standard
+
+
+\size footnotesize 
+; iTemp7 [lr9:13]{_far * int}[DPTR] := _p [lr0:0]{_far * int}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov dpl,_p
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov dph,(_p + 1)
+\layout Standard
+
+
+\size footnotesize 
+; _p [lr0:0]{_far * int} = _p [lr0:0]{_far * int} + 0x2 {short}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov a,#0x02
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
-Goto the SDCDB output buffer 
-\newline 
-;; t\SpecialChar ~
+add a,_p
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov _p,a
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+clr a
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+addc a,(_p + 1)
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov (_p + 1),a
+\layout Standard
+
+
+\size footnotesize 
+; iTemp10 [lr13:14]{int}[r2 r3] = @[iTemp7 [lr9:13]{_far * int}[DPTR]]
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+movx a,@dptr
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov r2,a
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
- sdcdbsrc-mode\SpecialChar ~
 \SpecialChar ~
+inc dptr
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+movx a,@dptr
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov r3,a
+\layout Standard
+
+
+\size footnotesize 
+; *(iTemp6 [lr5:16]{_near * int}[r0]) := iTemp10 [lr13:14]{int}[r2 r3]
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov @r0,ar2
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+inc r0
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov @r0,ar3
+\layout Standard
+
+
+\size footnotesize 
+; iTemp6 [lr5:16]{_near * int}[r0] = 
+\layout Standard
+
+
+\size footnotesize 
+; iTemp6 [lr5:16]{_near * int}[r0] + 
+\layout Standard
+
+
+\size footnotesize 
+; 0x2 {short}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+inc r0
+\layout Standard
+
+
+\size footnotesize 
+; goto _whilecontinue_0($1)
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
-Toggles Sdcdbsrc mode (turns it off) 
-\newline 
-;; 
-\newline 
-;; C-c C-f\SpecialChar ~
+sjmp 00101$
+\layout Standard
+
+
+\size footnotesize 
+; _whilebreak_0($3) :
+\layout Standard
+
+
+\size footnotesize 
+00103$:
+\layout Standard
+
+
+\size footnotesize 
+; iTemp2 [lr18:40]{short}[r2] := 0x0 {short}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov r2,#0x00
+\layout Standard
+
+
+\size footnotesize 
+; iTemp11 [lr19:40]{short}[r3] := 0x0 {short}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov r3,#0x00
+\layout Standard
+
+
+\size footnotesize 
+; iTemp21 [lr21:38]{short}[r4] := 0x0 {short}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov r4,#0x00
+\layout Standard
+
+
+\size footnotesize 
+; iTemp23 [lr22:38]{int}[r5 r6] := 0xa {int}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
- sdcdb-finish-from-src\SpecialChar ~
 \SpecialChar ~
+mov r5,#0x0A
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov r6,#0x00
+\layout Standard
+
+
+\size footnotesize 
+; iTemp17 [lr23:38]{int}[r7 r0] := 0x1e {int}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov r7,#0x1E
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
-SDCDB finish command 
-\newline 
-;; 
-\newline 
-;; C-x SPC\SpecialChar ~
+mov r0,#0x00
+\layout Standard
+
+
+\size footnotesize 
+; _forcond_0($4) :
+\layout Standard
+
+
+\size footnotesize 
+00104$:
+\layout Standard
+
+
+\size footnotesize 
+; iTemp13 [lr25:26]{char}[CC] = iTemp21 [lr21:38]{short}[r4] < 0xa {short}
+\layout Standard
+
+
+\size footnotesize 
+; if iTemp13 [lr25:26]{char}[CC] == 0 goto _forbreak_0($7)
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+clr c
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov a,r4
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+xrl a,#0x80
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
- sdcdb-break\SpecialChar ~
 \SpecialChar ~
+subb a,#0x8a
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+jnc 00107$
+\layout Standard
+
+
+\size footnotesize 
+00115$:
+\layout Standard
+
+
+\size footnotesize 
+; iTemp2 [lr18:40]{short}[r2] = iTemp2 [lr18:40]{short}[r2] + 
+\layout Standard
+
+
+\size footnotesize 
+; iTemp21 [lr21:38]{short}[r4]
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov a,r4
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+add a,r2
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov r2,a
+\layout Standard
+
+
+\size footnotesize 
+; iTemp15 [lr29:30]{short}[r1] = iTemp21 [lr21:38]{short}[r4] * 0x3 {short}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov b,#0x03
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov a,r4
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mul ab
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
-Set break for line with point 
-\newline 
-;; ESC t\SpecialChar ~
+mov r1,a
+\layout Standard
+
+
+\size footnotesize 
+; iTemp11 [lr19:40]{short}[r3] = iTemp11 [lr19:40]{short}[r3] + 
+\layout Standard
+
+
+\size footnotesize 
+; iTemp15 [lr29:30]{short}[r1]
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+add a,r3
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov r3,a
+\layout Standard
+
+
+\size footnotesize 
+; iTemp17 [lr23:38]{int}[r7 r0]= iTemp17 [lr23:38]{int}[r7 r0]- 0x3 {short}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov a,r7
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+add a,#0xfd
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
- sdcdbsrc-mode\SpecialChar ~
 \SpecialChar ~
+mov r7,a
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov a,r0
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+addc a,#0xff
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov r0,a
+\layout Standard
+
+
+\size footnotesize 
+; _gint [lr0:0]{int} = _gint [lr0:0]{int} + iTemp17 [lr23:38]{int}[r7 r0]
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov a,r7
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+add a,_gint
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov _gint,a
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
-Toggle Sdcdbsrc mode 
-\newline 
-;; ESC m\SpecialChar ~
+mov a,r0
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+addc a,(_gint + 1)
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov (_gint + 1),a
+\layout Standard
+
+
+\size footnotesize 
+; iTemp21 [lr21:38]{short}[r4] = iTemp21 [lr21:38]{short}[r4] + 0x1 {short}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+inc r4
+\layout Standard
+
+
+\size footnotesize 
+; iTemp23 [lr22:38]{int}[r5 r6]= iTemp23 [lr22:38]{int}[r5 r6]- 0x1 {short}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+dec r5
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
- sdcdbsrc-srcmode\SpecialChar ~
 \SpecialChar ~
+cjne r5,#0xff,00104$
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+dec r6
+\layout Standard
+
+
+\size footnotesize 
+; goto _forcond_0($4)
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+sjmp 00104$
+\layout Standard
+
+
+\size footnotesize 
+; _forbreak_0($7) :
+\layout Standard
+
+
+\size footnotesize 
+00107$:
+\layout Standard
+
+
+\size footnotesize 
+; ret iTemp24 [lr40:41]{short}
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+mov a,r3
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
+add a,r2
+\layout Standard
+
+
+\size footnotesize 
 \SpecialChar ~
 \SpecialChar ~
- Toggle list mode 
-\newline 
-;; 
-\family default 
+mov dpl,a
+\layout Standard
 
-\newline 
 
-\layout Section
+\size footnotesize 
+; _return($8) :
+\layout Standard
 
-Other Processors
-\layout Subsection
 
-The Z80 and gbz80 port
+\size footnotesize 
+00108$:
 \layout Standard
 
-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.
- 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.
- 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.
+\size footnotesize 
+\SpecialChar ~
+\SpecialChar ~
+ret
+\size default 
+
+\newline 
+
 \layout Section
 
-Support
+Acknowledgments
 \layout Standard
 
-SDCC has grown to be a large project.
- The compiler alone (without the preprocessor, assembler and linker) is
- about 40,000 lines of code (blank stripped).
- The open source nature of this project is a key to its continued growth
- and support.
- You gain the benefit and support of many active software developers and
- end users.
- Is SDCC perfect? No, that's why we need your help.
- The developers take pride in fixing reported bugs.
- You can help by reporting the bugs and helping other SDCC users.
- There are lots of ways to contribute, and we encourage you to take part
- in making SDCC a great software package.
-\layout Subsection
 
-Reporting Bugs
-\layout Standard
+\begin_inset LatexCommand \url{http://sdcc.sourceforge.net#Who}
 
-Send an email to the mailing list at 'user-sdcc@sdcc.sourceforge.net' or 'devel-sd
-cc@sdcc.sourceforge.net'.
- Bugs will be fixed ASAP.
- When reporting a bug, it is very useful to include a small test program
- 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 --dumpall option can sometimes be useful
- in locating optimization problems.
-\layout Section
+\end_inset 
 
-Acknowledgments
-\layout Standard
 
-Sandeep Dutta (sandeep.dutta@usa.net) - SDCC, the compiler, MCS51 code generator,
- Debugger, AVR port
-\newline 
-Alan Baldwin (baldwin@shop-pdp.kent.edu) - Initial version of ASXXXX & ASLINK.
-\newline 
-John Hartman (jhartman@compuserve.com) - Porting ASXXX & ASLINK for 8051
-\newline 
-Dmitry S.
- Obukhov (dso@usa.net) - malloc & serial i/o routines.
-\newline 
-Daniel Drotos (drdani@mazsola.iit.uni-miskolc.hu) - for his Freeware simulator
-\newline 
-Malini Dutta(malini_dutta@hotmail.com) - my wife for her patience and support.
-\newline 
-Unknown - for the GNU C - preprocessor.
-\newline 
-Michael Hope - The Z80 and Z80GB port, 186 development
-\newline 
-Kevin Vigor - The DS390 port.
-\newline 
-Johan Knol - Lots of fixes and enhancements, DS390/TINI libs.
-\newline 
-Scott Datallo - The PIC port.
 \newline 
 
 \newline