\begin_layout Date
\size normal
-SDCC 2.6.5
+SDCC 2.7.3
\size footnotesize
\newline
freeware
\emph default
; source code for all the sub-packages (pre-processor, assemblers, linkers
- etc) is distributed with the package.
+ etc.) is distributed with the package.
This documentation is maintained using a free open source word processor
(LyX).
\newline
\begin_layout Itemize
short is now equivalent to int (16 bits), it used to be equivalent to char
(8 bits) which is not ANSI compliant.
- To maintain compatibility, old programs may be compiled using the --short-is-8b
-its commandline option (see
+ To maintain compatibility, old programs may be compiled using the -
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-short-is-8bits commandline option (see
\begin_inset LatexCommand \vref{lyx:--short-is-8bits}
\end_inset
\end_inset
--disable-pic-port Excludes the PIC port
+-disable-pic-port Excludes the PIC14 port
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+-
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-disable-pic16-port Excludes the PIC16 port
\end_layout
\begin_layout List
\end_inset
--help` and the man/info pages of `configure` for details.
+-help' and the man/info pages of `configure' for details.
\newline
\newline
The names of the
standard libraries STD_LIB, STD_INT_LIB, STD_LONG_LIB, STD_FP_LIB, STD_DS390_LI
B, STD_XA51_LIB and the environment variables SDCC_DIR_NAME, SDCC_INCLUDE_NAME,
- SDCC_LIB_NAME are defined by `configure` too.
+ SDCC_LIB_NAME are defined by `configure' too.
At the moment it's not possible to change the default settings (it was
simply never required).
\newline
\begin_layout Standard
\noindent
-The install paths can still be changed during `make install` with e.g.:
+The install paths can still be changed during `make install' with e.g.:
\end_layout
\begin_layout LyX-Code
generated files are not scattered between the source files.
And the best thing is: if you want to change a file you can leave the original
file untouched in the source directory.
- Simply copy it to the build directory, edit it, enter `make clean`, `rm
- Makefile.dep` and `make`.
+ Simply copy it to the build directory, edit it, enter `make clean', `rm
+ Makefile.dep' and `make'.
\series bold
make
\family sans
\series bold
sdcclib libint.lib _mulint.rel
+\family default
+\series default
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+Or, if you preffer:
+\family sans
+\series bold
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\family sans
+\series bold
+sdcclib libint.lib _divsint.rel _divuint.rel _modsint.rel _moduint.rel _mulint.rel
+\family default
\series default
\newline
\begin_layout Standard
If the file already exists in the library, it will be replaced.
- To see what modules and symbols are included in the library, options -s
+ If a list of .rel files is available, you can tell sdcclib to add those
+ files to a library.
+ For example, if the file 'myliblist.txt' contains
+\family sans
+\series bold
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\family sans
+\series bold
+_divsint.rel
+\end_layout
+
+\begin_layout Standard
+
+\family sans
+\series bold
+_divuint.rel
+\end_layout
+
+\begin_layout Standard
+
+\family sans
+\series bold
+_modsint.rel
+\end_layout
+
+\begin_layout Standard
+
+\family sans
+\series bold
+_moduint.rel
+\end_layout
+
+\begin_layout Standard
+
+\family sans
+\series bold
+_mulint.rel
+\family default
+\series default
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+Use
+\family sans
+\series bold
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\family sans
+\series bold
+sdcclib -l libint.lib myliblist.txt
+\family default
+\series default
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+Additionally, you can instruct sdcclib to compiles the files before adding
+ them to the library.
+ This is achieved using the environment variables SDCCLIB_CC and/or SDCCLIB_AS.
+ For example:
+\family sans
+\series bold
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+
+\family sans
+\series bold
+set SDCCLIB_CC=sdcc -c
+\end_layout
+
+\begin_layout Standard
+
+\family sans
+\series bold
+sdcclib -l libint.lib myliblist.txt
+\family default
+\series default
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+To see what modules and symbols are included in the library, options -s
and -m are available.
For example:
\newline
Causes the linker to use old style for allocating memory areas.
\end_layout
+\begin_layout List
+\labelwidthstring 00.00.0000
+
+\series bold
+-
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-acall-ajmp
+\series default
+\InsetSpace ~
+
+\begin_inset LatexCommand \index{-\/-acall-ajmp}
+
+\end_inset
+
+ Replaces the three byte instructions lcall/ljmp with the two byte instructions
+ acall/ajmp.
+ Only use this option if your code is in the same 2k block of memory.
+ You may need to use this option for some 8051 derivatives which lack the
+ lcall/ljmp instructions..
+\end_layout
+
\begin_layout Standard
\begin_inset VSpace bigskip
\end_inset
\labelwidthstring 00.00.0000
\series bold
---stack-8-bit - switches off the 10-bit mode
+-
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-stack-8-bit - switches off the 10-bit mode
\end_layout
\end_inset
\series bold
-
\begin_inset ERT
-status collapsed
+status open
\begin_layout Standard
When linking, skip the standard crt0.o object file.
You must provide your own crt0.o for your system when linking.
-
\end_layout
+\begin_layout List
+\labelwidthstring 00.00.0000
+
+\series bold
+-
+\begin_inset ERT
+status collapsed
+
\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-portmode=
+\series default
+<Value>
+\begin_inset LatexCommand \index{Z80!Options!-\/-portmode=<Value>}
+
+\end_inset
+
+ Determinate PORT I/O mode (<Value> is z80 or z180).
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+
+\series bold
+-
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-asm=
+\series default
+<Value>
+\begin_inset LatexCommand \index{Z80!Options!-\/-asm=<Value>}
+
+\end_inset
+
+ Define assembler name (<Value> is rgbds, asxxxx, isas or z80asm).
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+
+\series bold
+-
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-codeseg
+\series default
+\InsetSpace ~
+<Value>
+\begin_inset LatexCommand \index{Z80!Options!-\/-codeseg <Value>}
+
+\end_inset
+
+ Use <Value> for the code segment name.
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+
+\series bold
+-
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-constseg
+\series default
+\InsetSpace ~
+<Value>
+\begin_inset LatexCommand \index{Z80!Options!-\/-constseg <Value>}
+
+\end_inset
+
+ Use <Value> for the const segment name.
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
\begin_inset VSpace bigskip
\end_inset
\end_layout
\begin_layout Subsection
-Optimization Options
-\begin_inset LatexCommand \index{Options optimization}
+GBZ80 Options
+\begin_inset LatexCommand \index{Options GBZ80}
\end_inset
-\begin_inset LatexCommand \index{Optimization options}
+\begin_inset LatexCommand \index{GBZ80}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+
+\series bold
+-
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-callee-saves-bc
+\series default
+
+\begin_inset LatexCommand \index{GBZ80!Options!-\/-callee-saves-bc}
+
+\end_inset
+
+
+\size large
+\emph on
+
+\size default
+\emph default
+Force a called function to always save BC.
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+
+\series bold
+-bo
+\series default
+\InsetSpace ~
+<Num>
+\begin_inset LatexCommand \index{GBZ80!Options!-bo <Num>}
+
+\end_inset
+
+ Use code bank <Num>.
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+
+\series bold
+-ba
+\series default
+\InsetSpace ~
+<Num>
+\begin_inset LatexCommand \index{GBZ80!Options!-ba <Num>}
+
+\end_inset
+
+ Use data bank <Num>.
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+
+\series bold
+-
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-codeseg
+\series default
+\InsetSpace ~
+<Value>
+\begin_inset LatexCommand \index{GBZ80!Options!-\/-codeseg <Value>}
+
+\end_inset
+
+ Use <Value> for the code segment name.
+\end_layout
+
+\begin_layout List
+\labelwidthstring 00.00.0000
+
+\series bold
+-
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+-constseg
+\series default
+\InsetSpace ~
+<Value>
+\begin_inset LatexCommand \index{GBZ80!Options!-\/-constseg <Value>}
+
+\end_inset
+
+ Use <Value> for the const segment name.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace bigskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Optimization Options
+\begin_inset LatexCommand \index{Options optimization}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{Optimization options}
\end_inset
Parameters and Local Variables for more details.
If this option is used all source files in the project should be compiled
with this option.
- It automatically implies --int-long-reent and --float-reent.
+ It automatically implies -
+\series bold
+
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+
+\series default
+-int-long-reent and -
+\series bold
+
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+
+\series default
+-float-reent.
\end_layout
unsigned
\family default
.
- To set the signess for characters to unsigned, use the option --funsigned-char.
+ To set the signess for characters to unsigned, use the option -
+\series bold
+
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+
+\series default
+-funsigned-char.
If this option is set and no signedness keyword (unsigned/signed) is given,
a char will be signed.
All other types are unaffected.
\series default
- Don't include peep-hole comments in the generated asm files even if --fverbose-
-asm option is specified.
+ Don't include peep-hole comments in the generated asm files even if -
+\series bold
+
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+
+\series default
+-fverbose-asm option is specified.
\end_layout
\begin_layout List
\series default
- Will create a dump of iCode's, after global subexpression elimination
+ Will create a dump of iCodes, after global subexpression elimination
\begin_inset LatexCommand \index{Global subexpression elimination}
\end_inset
\series default
- Will create a dump of iCode's, after deadcode elimination
+ Will create a dump of iCodes, after deadcode elimination
\begin_inset LatexCommand \index{Dead-code elimination}
\end_inset
\size large
\size default
-Will create a dump of iCode's, after loop optimizations
+Will create a dump of iCodes, after loop optimizations
\begin_inset LatexCommand \index{Loop optimization}
\end_inset
\size large
\size default
-Will create a dump of iCode's, after live range analysis
+Will create a dump of iCodes, after live range analysis
\begin_inset LatexCommand \index{Live range analysis}
\end_inset
\series default
\bar default
-Will create a dump of iCode's, after register assignment
+Will create a dump of iCodes, after register assignment
\begin_inset LatexCommand \index{Register assignment}
\end_inset
\end_layout
\begin_layout Standard
-By default SDCC writes it's error messages to
+By default SDCC writes its error messages to
\begin_inset Quotes sld
\end_inset
\end_inset
) are good places to look for such overlaps.
- Variables with an absolute address are
-\emph on
-not
-\begin_inset Marginal
-status collapsed
+\end_layout
\begin_layout Standard
-
-\series bold
-\InsetSpace ~
-!
-\end_layout
+If however you provide an initializer
+\begin_inset LatexCommand \index{Variable initialization}
\end_inset
+ actual memory allocation will take place and overlaps will be detected
+ by the linker.
+ E.g.:
+\end_layout
-\emph default
- initialized
-\begin_inset LatexCommand \index{Variable initialization}
+\begin_layout Verse
+\family typewriter
+__code __at (0x7ff0) char Id[5] =
+\begin_inset Quotes sld
\end_inset
-.
+SDCC
+\begin_inset Quotes srd
+\end_inset
+
+;
+\end_layout
+
+\begin_layout Standard
+In the above example the variable Id will be located from 0x7ff0 to 0x7ff4
+ in code memory.
\end_layout
\begin_layout Standard
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 medium or large model).
This in fact makes them similar to
\emph on
static
called crt<something>.
Only the necessary ones are linked, for instance crtxstack.asm (GSINIT1,
- GSINIT5) is not linked unless the --xstack option is used.
+ GSINIT5) is not linked unless the -
+\series bold
+
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+
+\series default
+-xstack option is used.
These modules are highly entangled by the use of special segments/areas,
but a common layout is shown below:
\end_layout
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
+orl a,#(l_PSEG
+ >> 8)
+\newline
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
jz 00006$
\newline
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
-mov
- r1,#s_PSEG
+mov r1,#s_PSEG
\newline
\InsetSpace ~
\InsetSpace ~
clr a
\newline
00005$:\InsetSpace ~
-movx @r1,a
+movx
+ @r1,a
\newline
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
djnz r0,00005$
\newline
-0
-0006$:
+00006$:
\newline
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
-orl a,#(l_XSEG >> 8)
+orl a,#(l_XSEG >>
+ 8)
\newline
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
-mov r1,#((l_XSEG
- + 255) >> 8)
+mov r1,#((l_XSEG + 255) >> 8)
\newline
\InsetSpace ~
\InsetSpace ~
clr a
\newline
00007$:\InsetSpace ~
-movx @dptr,a
+movx
+ @dptr,a
\newline
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
-djnz
- r1,00007$
+djnz r1,00007$
\newline
00008$:
\end_layout
\end_inset
about MCS51-variants.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+While these initialization modules are meant as generic startup code there
+ might be the need for customization.
+ Let's assume the return value of
+\emph on
+_sdcc_external_startup()
+\emph default
+ in
+\emph on
+crtstart.asm
+\emph default
+ should not be checked (or
+\emph on
+_sdcc_external_startup()
+\emph default
+ should not be called at all).
+ The recommended way would be to copy
+\emph on
+crtstart.asm
+\emph default
+ (f.e.
+ from
+\begin_inset LatexCommand \url{http://sdcc.svn.sourceforge.net/viewvc/*checkout*/sdcc/trunk/sdcc/device/lib/mcs51/crtstart.asm}
+
+\end_inset
+
+) into the source directory, adapt it there, then assemble it with
+\emph on
+asx8051 -plosgff
+\begin_inset Foot
+status open
+
+\begin_layout Standard
+\begin_inset Quotes sld
+\end_inset
+
+-plosgff
+\begin_inset Quotes srd
+\end_inset
+
+ are the assembler options used in
+\begin_inset LatexCommand \url{http://sdcc.svn.sourceforge.net/viewvc/sdcc/trunk/sdcc/device/lib/mcs51/Makefile.in?view=markup }
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+ crtstart.asm
+\emph default
+ and when linking your project explicitely specify
+\emph on
+crtstart.rel
+\emph default
+.
+ As a bonus a listing of the relocated object file
+\emph on
+crtstart.rst
+\emph default
+ is generated.
+\end_layout
+
+\begin_layout Standard
\begin_inset VSpace bigskip
\end_inset
\begin_layout Standard
SDCC allows the use of in-line assembler with a few restrictions regarding
labels.
- In older versions of the compiler all labels defined within inline assembler
- code had to be of the form
+ All labels defined within inline assembler code have to be of the form
+
\emph on
nnnnn$
\emph default
)
\noun default
.
+\begin_inset Foot
+status open
+
+\begin_layout Standard
+This is a slightly more stringent rule than absolutely necessary, but stays
+ always on the safe side.
+ Labels in the form of nnnnn$ are local labels in the assembler, locality
+ of which is confined within two labels of the standard form.
+ The compiler uses the same form for labels within a function (but starting
+ from nnnnn=00100); and places always a standard label at the beginning
+ of a function, thus limiting the locality of labels within the scope of
+ the function.
+ So, if the inline assembler part would be embedded into C-code, an improperly
+ placed non-local label in the assembler would break up the reference space
+ for labels created by the compiler for the C-code, leading to an assembling
+ error.
+\end_layout
+
+\begin_layout Standard
+The numeric part of local labels does not need to have 5 digits (although
+ this is the form of labels output by the compiler), any valid integer will
+ do.
+ Please refer to the assemblers documentation for further details.
+\end_layout
+
+\end_inset
+
\end_layout
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
-ljmp $0003
+ljmp 0003$
\newline
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
/* inline assembler cannot reference this
label */
+\begin_inset Foot
+status open
+
+\begin_layout Standard
+Here, the C-label
+\family typewriter
+clabel
+\family default
+ is translated by the compiler into a local label, so the locality of labels
+ within the function is not broken.
+\end_layout
+
+\end_inset
+
+
\newline
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
-$0003: ;label (can be referenced by inline assembler only)
-
+0003$: ;label (can be referenced by inline assembler only)
\newline
\InsetSpace ~
\InsetSpace ~
\emph default
- to pass the first parameter to a function, and also to pass the return
- value
+ to pass the first (non-bit) parameter to a function, and also to pass the
+ return value
\begin_inset LatexCommand \index{return value}
\end_inset
\end_inset
-stack-auto is used) or in data/xdata memory (depending on the memory model).
-
+\end_layout
+
+\begin_layout Standard
+Bit parameters are passed in a virtual register called 'bits' in bit-addressable
+ space for reentrant functions or allocated directly in bit memory otherwise.
+\end_layout
+
+\begin_layout Standard
+Functions (with two or more parameters or bit parameters) that are called
+ through function pointers
+\begin_inset LatexCommand \index{function pointers}
+
+\end_inset
+
+ must therefor be reentrant so the compiler knows how to pass the parameters.
\end_layout
\begin_layout Subsection
\end_inset
-- the compiler will not warn you anymore for obvious mistakes, you'r on
+- the compiler will not warn you anymore for obvious mistakes, you're on
your own now ;-( .
See also the command line option -
\begin_inset ERT
\begin_layout Standard
The compiler will generate a warning message when extra space is allocated.
- It is strongly recommended that the save and restore pragma's be used when
+ It is strongly recommended that the save and restore pragmas be used when
changing options for a function.
\newline
\end_layout
\begin_layout Section
-The PIC14 port
-\end_layout
+The PIC14
+\begin_inset LatexCommand \index{PIC14}
-\begin_layout Standard
-The PIC14 port adds support for Microchip(TM)'s 14
-\begin_inset ERT
-status open
+\end_inset
+
+ port
+\end_layout
\begin_layout Standard
+The PIC14 port adds support for Microchip
+\begin_inset LatexCommand \index{Microchip}
+\end_inset
-\backslash
-,
-\end_layout
+\begin_inset Formula $^{\text{TM}}$
\end_inset
-bit PIC
+ PIC
\begin_inset LatexCommand \index{PIC14}
\end_inset
- MCUs.
+
+\begin_inset Formula $^{\text{TM}}$
+\end_inset
+
+ MCUs with 14 bit wide instructions.
This port is not yet mature and still lacks many features.
However, it can work for simple code.
\end_layout
\begin_layout Enumerate
And as for any 8 bit micro (especially for PIC14 as they have a very simple
- instruction set), use 'unsigned char' wherever possible instead of 'int'.
+ instruction set), use `unsigned char' wherever possible instead of `int'.
\end_layout
\begin_layout Subsection
\end_layout
\begin_layout Standard
-For the interrupt function, use the keyword '__interrupt'
+For the interrupt function, use the keyword `__interrupt'
\begin_inset LatexCommand \index{PIC14!interrupt}
\end_inset
\end_layout
\begin_layout Subsubsection
-error: missing definition for symbol
-\begin_inset Quotes sld
-\end_inset
-
-__gptrget1
-\begin_inset Quotes srd
-\end_inset
-
-
+error: missing definition for symbol ``__gptrget1''
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Subsubsection
-Processor mismatch in file
-\begin_inset Quotes sld
-\end_inset
-
-XXX
-\begin_inset Quotes srd
-\end_inset
-
-.
+Processor mismatch in file ``XXX''.
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Standard
-The PIC16
-\begin_inset LatexCommand \index{PIC16}
+The PIC16 port adds support for Microchip
+\begin_inset LatexCommand \index{Microchip}
\end_inset
- port is the portion of SDCC that is responsible to produce code for the
- Microchip
-\begin_inset LatexCommand \index{Microchip}
+\begin_inset Formula $^{\text{TM}}$
\end_inset
-(TM) microcontrollers with 16 bit core.
- Currently this family of microcontrollers contains the PIC18Fxxx and PIC18Fxxxx.
- Currently supported devices are:
+ PIC
+\begin_inset LatexCommand \index{PIC}
+
+\end_inset
+
+
+\begin_inset Formula $^{\text{TM}}$
+\end_inset
+
+ MCUs with 16 bit wide instructions.
+ Currently this family of microcontrollers contains the PIC18Fxxx and PIC18Fxxxx
+; devices supported by the port include:
\end_layout
\begin_layout Standard
\end_layout
\begin_layout Standard
-18F: 2220, 2221, 2320, 2321, 2331, 2431, 2455, 2525, 2550, 2620
+18F: 2220, 2221, 2320, 2321, 2331, 2431, 2455, 24j10, 2525, 2550, 25j10,
+ 2620
\end_layout
\begin_layout Standard
-18F: 4220, 4221, 4320, 4321, 4331, 4431, 4455, 4520, 4525, 4550, 4620
+18F: 4220, 4221, 4320, 4321, 4331, 4431, 4455, 44j10, 4520, 4525, 4550,
+ 45j10, 4620
\end_layout
\begin_layout Standard
Address of the specific interrupt.
This is not a problem for the LOW priority interrupts, but it is a problem
for the RESET and the HIGH priority interrupts because code may be written
- at the next interrupt´s vector address and cause undeterminate program
+ at the next interrupt's vector address and cause undeterminate program
behaviour if that interrupt is raised.
\begin_inset Foot
status open
\end_layout
\begin_layout Enumerate
-when the ISR is small enough not to reach the next interrupt´s vector address.
+when the ISR is small enough not to reach the next interrupt's vector address.
\end_layout
\end_inset
\emph on
n
\emph default
- is possible to be omitted.
+ may be omitted.
This way a function is generated similar to an ISR, but it is not assigned
to any interrupt.
\end_layout
\begin_layout Standard
\align left
\begin_inset Tabular
-<lyxtabular version="3" rows="14" columns="3">
+<lyxtabular version="3" rows="16" columns="3">
<features>
<column alignment="left" valignment="top" leftline="true" width="0pt">
<column alignment="block" valignment="top" leftline="true" width="30line%">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="40col%">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\end_inset
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+d52
+\begin_inset LatexCommand \index{d52}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{d52 (disassembler)}
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Disassembler, can count instruction cycles
+\begin_inset LatexCommand \index{instruction cycles (count)}
+
+\end_inset
+
+, use with options -pnd
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset LatexCommand \url{http://www.8052.com/users/disasm/}
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+cmake
+\begin_inset LatexCommand \index{cmake}
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Cross platform build system, generates Makefiles
+\begin_inset LatexCommand \index{Makefile}
+
+\end_inset
+
+ and project workspaces
+\begin_inset LatexCommand \index{project workspace}
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset LatexCommand \url{http://www.cmake.org}
+
+\end_inset
+
+ \InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+\InsetSpace ~
+and a dedicated wiki entry:
+\begin_inset LatexCommand \url{http://www.cmake.org/Wiki/CmakeSdcc}
+
+\end_inset
+
+
\end_layout
\end_inset
The output of
\family sans
\series bold
-sdcc --version
+sdcc -
+\family default
+
+\begin_inset ERT
+status open
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+
+\family sans
+-version
\family default
\series default
or the filenames of the snapshot versions of SDCC include date and its
\end_inset
.
- A release wiki
+ The SDCC Wiki
\begin_inset LatexCommand \index{wiki}
\end_inset
-\begin_inset LatexCommand \index{Release wiki}
+\begin_inset LatexCommand \index{SDCC Wiki}
\end_inset
at
-\begin_inset LatexCommand \url{http://sdcc.sf.net/release_wiki/}
+\begin_inset LatexCommand \url{http://sdcc.wiki.sourceforge.net/}
\end_inset
replace { ljmp %1 } by { ajmp %1 }
\end_layout
+\begin_layout Standard
+(NOTE: from version 2.7.3 on, you can use option -
+\emph on
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+/
+\end_layout
+
+\end_inset
+
+
+\emph default
+-acall-ajmp
+\begin_inset LatexCommand \index{-\/-acall-ajmp}
+
+\end_inset
+
+, which also takes care of aligning the interrupt vectors properly.)
+\newline
+
+\end_layout
+
\begin_layout Standard
The
\emph on
\family typewriter
foo(i,j) /* this old style of function declarations */
\newline
-int i,j; /* are valid
+int i,j; /* is valid
in ANSI but not valid in SDCC */
\newline
{
\end_deeper
\begin_layout Itemize
-Most enhancements in C99 are not supported, f.e.:
+Most enhancements in C99 are not supported, e.g.:
+\end_layout
+
+\begin_deeper
+\begin_layout Verse
+
+\family typewriter
+for (
+\series bold
+int
+\series default
+ i=0; i<10; i++) /* is invalid in SDCC although allowed in C99 */
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+But some have been added recently in SDCC 2.7.0.
+ They must be considered alpha quality however.
\end_layout
\begin_deeper
\series default
- int increment (int a) { return a+1; } /* is invalid in SDCC although allowed
- in C99.
- An empty define
-\emph on
-#define inline
-\emph default
- can be used as a work around */
+ int increment (int a) { return a+1; } /* inlines the increment without
+ function call overhead */
\newline
-
-\newline
-for (
+int *
\series bold
-int
+restrict
+\begin_inset LatexCommand \index{inline (not supported)}
+
+\end_inset
+
+
\series default
- i=0; i<10; i++) /* is invalid in SDCC although allowed in C99 */
+ p; /* accepted but ignored */
\end_layout
\end_deeper
\end_layout
\begin_layout Standard
-More information is available in a wiki
+More information is available on SDCC Wiki
\begin_inset LatexCommand \index{wiki}
\end_inset
(preliminary link
-\begin_inset LatexCommand \url{http://sdcc.sourceforge.net/release_wiki/index.php?page=SDCC+internals+and+porting}
+\begin_inset LatexCommand \url{http://sdcc.wiki.sourceforge.net/SDCC+internals+and+porting}
\end_inset
\newline
\emph on
-Also thanks to Sourceforge
+Thanks to Sourceforge
\begin_inset LatexCommand \url{http://www.sf.net}
\end_inset
which has hosted the project since 1999 and donates significant download
- bandwidth and probably more than
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-$10^{13}$
-\end_layout
-
-\end_inset
+ bandwidth.
+\emph default
-CPU cycles per day.
\newline
-
-\begin_inset Note Note
-status open
-\begin_layout Standard
-more than 10^13 is an estimate: on my Athlon 2800+ it takes about (0.5+6.5+20)
- minutes for (configure+make+regression test), and there is (i386, amd64,
- alpha, ppc64, (mingw32), sparc, Mac OS X).
-
-\end_layout
-
-\end_inset
+\newline
+\emph on
+Also thanks to all SDCC Distributed Compile Farm members for donating CPU
+ cycles and bandwidth for snapshot builds.
+\newline
\end_layout