Variable | default | Win32 builds |
PREFIX | /usr/local | sdcc |
EXEC_PREFIX | $PREFIX | $PREFIX |
BINDIR | $EXECPREFIX/bin | $EXECPREFIXbin |
DATADIR | $PREFIX/share | $PREFIX |
DOCDIR | $DATADIR/sdcc/doc | $DATADIRdoc |
INCLUDE_DIR_SUFFIX | sdcc/include | include |
LIB_DIR_SUFFIX | sdcc/lib | lib |
Variable (computed) | default | Win32 builds |
BIN2DATA_DIR | ../share | .. |
PREFIX2BIN_DIR | bin | bin |
PREFIX2DATA_DIR | share/sdcc |
Description | Path | Default | Win32 builds |
Binary files* | $EXEC_PREFIX | /usr/local/bin | sdccbin |
Include files | $DATADIR/ $INCLUDE_DIR_SUFFIX | /usr/local/share/sdcc/include | sdccinclude |
Library file** | $DATADIR/$LIB_DIR_SUFFIX | /usr/local/share/sdcc/lib | sdcclib |
Documentation | $DOCDIR | /usr/local/share/sdcc/doc | sdccdoc |
Search path | default | Win32 builds |
$SDCC_HOME/$PPREFIX2BIN_DIR | $SDCC_HOME/bin | $SDCC_HOMEbin |
Path of argv[0] (if available) | Path of argv[0] | Path of argv[0] |
$PATH | $PATH | $PATH |
Search path | default | Win32 builds |
--I dir | --I dir | --I dir |
$SDCC_INCLUDE | $SDCC_INCLUDE | $SDCC_INCLUDE |
[t]1.5in$SDCC_HOME/ $PREFIX2DATA_DIR/ $INCLUDE_DIR_SUFFIX |
[t]1.5in$SDCC_ HOME/ share/sdcc/ include |
$SDCC_HOMEinclude |
[t]1.5inpath(argv[0])/ $BIN2DATADIR/ $INCLUDE_DIR_SUFFIX |
[t]1.5inpath(argv[0])/ ../sdcc/include |
path(argv[0])..include |
[t]1.5in$DATADIR/ $INCLUDE_DIR_SUFFIX |
[t]1.5in/usr/local/share/sdcc/ include |
(not on Win32) |
Search path | default | Win32 builds |
--L dir | --L dir | --L dir |
[t]1.7in$SDCC_LIB/ <model> |
[t]1.2in$SDCC_LIB/ <model> |
[t]1.2in$SDCC_LIB <model> |
[t]1.7in$SDCC_HOME/ $PREFIX2DATA_DIR/ $LIB_DIR_SUFFIX/<model> |
[t]1.2in$SDCC_HOME/ share/sdcc/ lib/<model> |
[t]1.2in$SDCC_HOMElib <model> |
[t]1.7inpath(argv[0])/ $BIN2DATADIR/ $LIB_DIR_SUFFIX/<model> |
[t]1.2inpath(argv[0])/ ../sdcc/lib/<model> |
[t]1.2inpath(argv[0]) ..lib<model> |
[t]1.7in$DATADIR/ $LIB_DIR_SUFFIX/<model> |
[t]1.2in/usr/local/share/sdcc/ lib/<model> |
(not on Win32) |
Interrupt # | Description | Vector Address |
0 | External 0 | 0x0003 |
1 | Timer 0 | 0x000B |
2 | External 1 | 0x0013 |
3 | Timer 1 | 0x001B |
4 | Serial | 0x0023 |
5 | Timer 2 (8052) | 0x002B |
Function | Description |
_mulint.c | 16 bit multiplication |
_divsint.c | signed 16 bit division (calls _divuint) |
_divuint.c | unsigned 16 bit division |
_modsint.c | signed 16 bit modulus (calls _moduint) |
_moduint.c | unsigned 16 bit modulus |
_mullong.c | 32 bit multiplication |
_divslong.c | signed 32 division (calls _divulong) |
_divulong.c | unsigned 32 division |
_modslong.c | signed 32 bit modulus (calls _modulong) |
_modulong.c | unsigned 32 bit modulus |
Function | Description |
_fsadd.c | add floating point numbers |
_fssub.c | subtract floating point numbers |
_fsdiv.c | divide floating point numbers |
_fsmul.c | multiply floating point numbers |
_fs2uchar.c | convert floating point to unsigned char |
_fs2char.c | convert floating point to signed char |
_fs2uint.c | convert floating point to unsigned int |
_fs2int.c | convert floating point to signed int |
_fs2ulong.c | convert floating point to unsigned long |
_fs2long.c | convert floating point to signed long |
_uchar2fs.c | convert unsigned char to floating point |
_char2fs.c | convert char to floating point number |
_uint2fs.c | convert unsigned int to floating point |
_int2fs.c | convert int to floating point numbers |
_ulong2fs.c | convert unsigned long to floating point number |
_long2fs.c | convert long to floating point number |
Macro | Description |
pic18fxxxx | MCU Identification. xxxx is the microcontrol identification number, i.e. 452, 6620, etc |
Directory | Description | Target | Command prefix |
PREFIX/sdcc/include/pic16 | PIC16 specific headers | Compiler | -I |
PREFIX/sdcc/lib/pic16 | PIC16 specific libraries | Linker | -L |
Pointer sizes according to memory model | small model | large model |
code pointers | 16-bits | 24-bits |
data pointers | 16-bits | 16-bits |
Stack & Frame pointer sizes according to stack model | small | large |
Stack pointer FSR1 | 8-bits | 16-bits |
Frame pointer FSR2 | 8-bits | 16-bits |
size | destination register |
8 bits | WREG |
16 bits | PRODL:WREG |
24 bits | PRODH:PRODL:WREG |
32 bits | FSR0L:PRODH:PRODL:WREG |
>32 bits | on stack, FSR0 points to the beginning |
If well-defined overflow characteristics are important and negative values are not, or if you want to steer clear of sign-extension problems when manipulating bits or bytes, use one of the corresponding unsigned types. (Beware when mixing signed and unsigned values in expressions, though.)
Although character types (especially unsigned char) can be used as "tiny" integers, doing so is sometimes more trouble than it's worth, due to unpredictable sign extension and increased code size.
Name | Purpose | Directory |
uCsim | Simulator for various architectures | sdcc/sim/ucsim |
keil2sdcc.pl | header file conversion | sdcc/support/scripts |
mh2h.c | header file conversion | sdcc/support/scripts |
as-gbz80 | Assembler | sdcc/bin |
as-z80 | Assembler | sdcc/bin |
asx8051 | Assembler | sdcc/bin |
sdcdb | Simulator | sdcc/bin |
aslink | Linker | sdcc/bin |
link-z80 | Linker | sdcc/bin |
link-gbz80 | Linker | sdcc/bin |
packihx | ihx packer | sdcc/bin |
Name | Purpose | Where to get |
gpsim | PIC simulator | http://www.dattalo.com/gnupic/gpsim.html |
gputils | GNU PIC utilities | http://gputils.sourceforge.net/ |
flP5 | PIC programmer | http://digilander.libero.it/fbradasc/FLP5.html |
indent | Formats C source - Master of the white spaces | http://home.hccnet.nl/d.ingamells/beautify.html |
srecord | Object file conversion, checksumming, ... | http://srecord.sourceforge.net/ |
objdump | Object file conversion, ... | Part of binutils (should be there anyway) |
doxygen | Source code documentation system | http://www.doxygen.org |
kdevelop | IDE (has anyone tried integrating SDCC & sdcdb? Unix only) | http://www.kdevelop.org |
splint | Statically checks c sources | http://www.splint.org |
ddd | Debugger, serves nicely as GUI to sdcdb (Unix only) | http://www.gnu.org/software/ddd/ |
Name | Subject / Title | Where to get |
c-refcard.pdf | C Reference Card, 2 pages | http://www.refcards.com/about/c.html |
c-faq | C-FAQ-list | http://www.eskimo.com/~scs/C-faq/top.html |
Latest datasheet of the target CPU | vendor | |
Revision history of datasheet | vendor | |
S. S. Muchnick | Advanced Compiler Design and Implementation | bookstore (very dedicated, probably read other books first) |
|
|
This document was translated from LATEX by HEVEA.