* as/xa51/xa_version.h,
authormaartenbrock <maartenbrock@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 6 Nov 2004 19:56:53 +0000 (19:56 +0000)
committermaartenbrock <maartenbrock@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 6 Nov 2004 19:56:53 +0000 (19:56 +0000)
* device/include/errno.h,
* device/include/regc515c.h,
* device/lib/_itoa.c,
* device/lib/_ltoa.c,
* device/lib/ser_ir_cts_rts.c,
* sim/ucsim/xa.src/glob.cc,
* sim/ucsim/xa.src/inst_gen.cc,
* sim/ucsim/xa.src/xa_bit.cc,
* sim/ucsim/xa.src/xa_sfr.cc,
* sim/ucsim/z80.src/inst_dd.cc,
* sim/ucsim/z80.src/inst_fdcb.cc,
* support/scripts/keil2sdcc.pl,
* src/pic16/pic16.dsp,
* src/pic16/pic16a.dsp: corrected cvs line endings
* device/lib/printf_large.c: fixed bug 1057979
* src/pic16/gen.c: fixed non-C standard code
* src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
* src/SDCCglobl.h: changed pack_iram to no_pack_iram
* support/regression/ports/mcs51/support.c: reload T1 asap
* doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
  pdata use and clear idata startup behaviour

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3568 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
device/lib/printf_large.c
doc/sdccman.lyx
src/SDCCglobl.h
src/SDCCmain.c
src/pic16/gen.c
src/pic16/pic16.dsp
src/pic16/pic16a.dsp
support/regression/ports/mcs51/support.c

index 60604307681ba024cf388e493ab16b3128115277..6b95b52e3472fc70ed97d3f3bbe1259aff25f6e8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2004-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
+
+       * as/xa51/xa_version.h,
+       * device/include/errno.h,
+       * device/include/regc515c.h,
+       * device/lib/_itoa.c,
+       * device/lib/_ltoa.c,
+       * device/lib/ser_ir_cts_rts.c,
+       * sim/ucsim/xa.src/glob.cc,
+       * sim/ucsim/xa.src/inst_gen.cc,
+       * sim/ucsim/xa.src/xa_bit.cc,
+       * sim/ucsim/xa.src/xa_sfr.cc,
+       * sim/ucsim/z80.src/inst_dd.cc,
+       * sim/ucsim/z80.src/inst_fdcb.cc,
+       * support/scripts/keil2sdcc.pl,
+       * src/pic16/pic16.dsp,
+       * src/pic16/pic16a.dsp: corrected cvs line endings
+       * device/lib/printf_large.c: fixed bug 1057979
+       * src/pic16/gen.c: fixed non-C standard code
+       * src/SDCCmain.c: made --pack-iram default, added --no-pack-iram
+       * src/SDCCglobl.h: changed pack_iram to no_pack_iram
+       * support/regression/ports/mcs51/support.c: reload T1 asap
+       * doc/sdccman.lyx: updated for options --pack-iram and --no-pack-iram,
+         pdata use and clear idata startup behaviour
+
 2004-11-04 Maarten Brock <sourceforge.brock AT dse.nl>
 
        * device/examples/ds390/ow390/ad26.h,
index ac621e036baef50e235a34e4c2bc2a6840b5d24e..e2a99447880e60247404003e548deed995ba5a80 100644 (file)
   #endif
 #endif
 
+#if defined(SDCC_mcs51)
+  #if defined(SDCC_STACK_AUTO)
+    #if defined(SDCC_USE_XSTACK)
+      #define NEAR pdata
+    #else
+      //strange enough "idata" doesn't work
+      #define NEAR data
+    #endif
+  #elif defined(SDCC_MODEL_LARGE)
+    #define NEAR xdata
+  #else
+    #define NEAR data
+  #endif
+#else
+  #define NEAR
+#endif
+
 #if defined(__ds390)
 #define USE_FLOATS 1
 #endif
@@ -160,7 +177,7 @@ static void calculate_digit( value_t* value, unsigned char radix )
 
   for( i = 32; i != 0; i-- )
   {
-    value->byte[4] = (value->byte[4] << 1) | (value->ul >> 31) & 0x01;
+    value->byte[4] = (value->byte[4] << 1) | ((value->ul >> 31) & 0x01);
     value->ul <<= 1;
 
     if (radix <= value->byte[4] )
@@ -177,7 +194,7 @@ static void calculate_digit( unsigned char radix )
 
   for( i = 32; i != 0; i-- )
   {
-    value.byte[4] = (value.byte[4] << 1) | (value.ul >> 31) & 0x01;
+    value.byte[4] = (value.byte[4] << 1) | ((value.ul >> 31) & 0x01);
     value.ul <<= 1;
 
     if (radix <= value.byte[4] )
@@ -622,7 +639,10 @@ get_conversion_spec:
       {
         // Apperently we have to output an integral type
         // with radix "radix"
-        unsigned char store = 0;
+#ifndef ASM_ALLOWED
+        unsigned char store[6];
+        unsigned char NEAR *pstore = &store[5];
+#endif
 
         // store value in byte[0] (LSB) ... byte[3] (MSB)
         if (char_argument)
@@ -684,11 +704,12 @@ _endasm;
 #else
           if (!lsd)
           {
-            store = (value.byte[4] << 4) | (value.byte[4] >> 4) | store;
+            *pstore = (value.byte[4] << 4) | (value.byte[4] >> 4) | *pstore;
+            pstore--;
           }
           else
           {
-            store = value.byte[4];
+            *pstore = value.byte[4];
           }
 #endif
           length++;
@@ -779,11 +800,12 @@ _endasm;
 #else
           if (!lsd)
           {
-            value.byte[4] = store >> 4;
+            pstore++;
+            value.byte[4] = *pstore >> 4;
           }
           else
           {
-            value.byte[4] = store & 0x0F;
+            value.byte[4] = *pstore & 0x0F;
           }
 #endif
 #ifdef SDCC_STACK_AUTO
index 5a54930de135e087111ba83ff777d7f621b0476c..6a3972f42081a68a25485db7ec6b9ee5100ba7b1 100644 (file)
@@ -6043,7 +6043,33 @@ status Collapsed
 
 \end_inset 
 
- Causes the linker use unused register banks for data variables or stack.
+ Causes the linker to use unused register banks for data variables and pack
+ data, idata and stack together.
+ This is the default now.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-no-pack-iram
+\series default 
+\SpecialChar ~
+
+\begin_inset LatexCommand \index{-\/-pack-iram}
+
+\end_inset 
+
+ Causes the linker to use old style for allocating memory areas.
 \layout Subsection
 
 DS390 / DS400 Options
@@ -6905,6 +6931,7 @@ reentrant
  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.
  
 \layout List
 \labelwidthstring 00.00.0000
@@ -8245,8 +8272,10 @@ pdata
 
 \layout Standard
 
-Paged xdata access is currently not as straightforward as using the other
- addressing modes of a 8051.
+Paged xdata access is just as straightforward as using the other addressing
+ modes of a 8051.
+ It is typically located at the start of xdata and has a maximum size of
+ 256 bytes.
  The following example writes 0x01 to the address pointed to.
  Please note, pdata access physically accesses xdata memory.
  The high byte of the address is determined by port P2 
@@ -8329,7 +8358,7 @@ F2\SpecialChar ~
 movx @r0,a 
 \layout Standard
 
-Be extremely carefull if you use pdata together with the -
+If the -
 \begin_inset ERT
 status Collapsed
 
@@ -8344,7 +8373,8 @@ status Collapsed
 
 \end_inset 
 
- option.
+ option is used the pdata memory area is followed by the xstack memory area
+ and the sum of their sizes is limited to 256 bytes.
 \layout Subsubsection
 
 code
@@ -8775,14 +8805,15 @@ data
 
  grows, it will use up the remaining register banks, and the 16 bytes used
  by the 128 bit variables, and 80 bytes for general purpose use.
- If any bit variables are used, the data variables will be placed after
- the byte holding the last bit variable.
+ If any bit variables are used, the data variables will be placed in unused
register banks and after the byte holding the last bit variable.
  For example, if register banks 0 and 1 are used, and there are 9 bit variables
  (two bytes used), 
 \emph on 
 data
 \emph default 
- variables will be placed starting at address 0x22.
+ variables will be placed starting from address 0x10 to 0x20 and continue
+ at address 0x22.
  You can also use -
 \begin_inset ERT
 status Collapsed
@@ -8824,7 +8855,7 @@ idata
  
 \layout Standard
 
-By default the 8051 linker will place the stack after the last byte of data
+By default the 8051 linker will place the stack after the last byte of (i)data
  variables.
  Option -
 \begin_inset ERT
@@ -11060,10 +11091,30 @@ _sdcc_external_startup()
  or perform some other critical operation prior to static & global variable
  initialization.
  On some mcs51 variants xdata has to be explicitly enabled before it can
- be accessed, this is the place to do it.
- The startup code clears the complete 256 byte of idata memory, this might
- cause problems for 128 byte devices (endless loop reported for Chipcon
- CC1010).
+ be accessed or if the watchdog needs to be disabled, this is the place
+ to do it.
+ The startup code clears all internal data memory, 256 bytes by default,
+ but from 0 to n-1 if 
+\emph on 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-iram-size
+\begin_inset LatexCommand \index{-\/-iram-size}
+
+\end_inset 
+
+n
+\emph default 
+ is used.
+ (recommended for Chipcon CC1010).
 \layout Standard
 
 See also the compiler option 
index 93a85f33a8226b05e6058a53d78a4339496750ce..850c06331d1c5cb92ca51f1a6c124c23eb24bd0e 100644 (file)
@@ -20,7 +20,7 @@
 
 #ifdef _WIN32       /* WIN32 native */
 
-#  define NATIVE_WIN32                 1
+#  define NATIVE_WIN32          1
 #  ifdef __MINGW32__  /* GCC MINGW32 depends on configure */
 #    include "sdccconf.h"
 #  else
@@ -37,9 +37,9 @@
 #define SPACE ' '
 #define ZERO  0
 
-#include <limits.h>            /* PATH_MAX                  */
-#ifndef PATH_MAX               /* POSIX, but not required   */
-#  define PATH_MAX 255         /* define a reasonable value */
+#include <limits.h>             /* PATH_MAX                  */
+#ifndef PATH_MAX                /* POSIX, but not required   */
+#  define PATH_MAX 255          /* define a reasonable value */
 #endif
 
 #define  MAX_REG_PARMS  1
@@ -93,7 +93,7 @@ typedef int bool;
 #ifdef UNIX
 #define EMPTY(x)        (x##StackPtr <= 1 ? 1 : 0)
 #else
-#define EMPTY(x)       (x##StackPtr == 0 ? 1 : 0)
+#define EMPTY(x)        (x##StackPtr == 0 ? 1 : 0)
 #endif
 
 
@@ -161,7 +161,7 @@ struct optimize
 
 /** Build model.
     Used in options.model.A bit each as port.supported_models is an OR
-    of these. 
+    of these.
 */
 enum
   {
@@ -176,7 +176,7 @@ enum
 /* overlay segment name and the functions
    that belong to it. used by pragma overlay */
 typedef struct {
-    char *osname;      /* overlay segment name */
+    char *osname;       /* overlay segment name */
     int  nfuncs;        /* number of functions in this overlay */
     char *funcs[128];   /* function name that belong to this */
 } olay;
@@ -188,64 +188,64 @@ typedef struct {
  */
 struct options
   {
-    int model;                 /* see MODEL_* defines above */
-    int stackAuto;             /* Stack Automatic  */
-    int useXstack;             /* use Xternal Stack */
-    int stack10bit;            /* use 10 bit stack (flat24 model only) */
-    int dump_raw;              /* dump after intermediate code generation */
-    int dump_gcse;             /* dump after gcse */
-    int dump_loop;             /* dump after loop optimizations */
-    int dump_kill;             /* dump after dead code elimination */
-    int dump_range;            /* dump after live range analysis */
-    int dump_pack;             /* dump after register packing */
-    int dump_rassgn;           /* dump after register assignment */
+    int model;                  /* see MODEL_* defines above */
+    int stackAuto;              /* Stack Automatic  */
+    int useXstack;              /* use Xternal Stack */
+    int stack10bit;             /* use 10 bit stack (flat24 model only) */
+    int dump_raw;               /* dump after intermediate code generation */
+    int dump_gcse;              /* dump after gcse */
+    int dump_loop;              /* dump after loop optimizations */
+    int dump_kill;              /* dump after dead code elimination */
+    int dump_range;             /* dump after live range analysis */
+    int dump_pack;              /* dump after register packing */
+    int dump_rassgn;            /* dump after register assignment */
     int dump_tree;              /* dump front-end tree before lowering to iCode */
-    int cc_only;               /* compile only flag              */
-    int intlong_rent;          /* integer & long support routines reentrant */
-    int float_rent;            /* floating point routines are reentrant */
-    int out_fmt;               /* 1 = motorola S19 format 0 = intel Hex format */
-    int cyclomatic;            /* print cyclomatic information */
-    int noOverlay;             /* don't overlay local variables & parameters */
-    int mainreturn;            /* issue a return after main */
+    int cc_only;                /* compile only flag              */
+    int intlong_rent;           /* integer & long support routines reentrant */
+    int float_rent;             /* floating point routines are reentrant */
+    int out_fmt;                /* 1 = motorola S19 format 0 = intel Hex format */
+    int cyclomatic;             /* print cyclomatic information */
+    int noOverlay;              /* don't overlay local variables & parameters */
+    int mainreturn;             /* issue a return after main */
     int xram_movc;              /* use movc instead of movx to read xram (mcs51) */
-    int nopeep;                        /* no peep hole optimization */
-    int asmpeep;               /* pass inline assembler thru peep hole */
-    int debug;                 /* generate extra debug info */
-    int c1mode;                        /* Act like c1 - no pre-proc, asm or link */
-    char *peep_file;           /* additional rules for peep hole */
-    int nostdlib;              /* Don't use standard lib files */
-    int nostdinc;              /* Don't use standard include files */
+    int nopeep;                 /* no peep hole optimization */
+    int asmpeep;                /* pass inline assembler thru peep hole */
+    int debug;                  /* generate extra debug info */
+    int c1mode;                 /* Act like c1 - no pre-proc, asm or link */
+    char *peep_file;            /* additional rules for peep hole */
+    int nostdlib;               /* Don't use standard lib files */
+    int nostdinc;               /* Don't use standard include files */
     int noRegParams;            /* Disable passing some parameters in registers */
-    int verbose;               /* Show what the compiler is doing */
+    int verbose;                /* Show what the compiler is doing */
     int shortis8bits;           /* treat short like int or char */
     int lessPedantic;           /* disable some warnings */
     int profile;                /* Turn on extra profiling information */
-    int ommitFramePtr;         /* Turn off the frame pointer. */
-    int useAccelerator;                /* use ds390 Arithmetic Accelerator */
-    int noiv;                  /* do not generate irq vector table entries */
-    int all_callee_saves;      /* callee saves for all functions */
+    int ommitFramePtr;          /* Turn off the frame pointer. */
+    int useAccelerator;         /* use ds390 Arithmetic Accelerator */
+    int noiv;                   /* do not generate irq vector table entries */
+    int all_callee_saves;       /* callee saves for all functions */
     int stack_probe;            /* insert call to function __stack_probe */
-    int tini_libid;            /* library ID for TINI */
-    int protect_sp_update;     /* DS390 - will disable interrupts during ESP:SP updates */
-    int parms_in_bank1;        /* DS390 - use reg bank1 to pass parameters */
-    int stack_size;            /* MCS51/DS390 - Tells the linker to allocate this space for stack */
-    int pack_iram;             /* MCS51/DS390 - Tells the linker to pack variables in internal ram */
+    int tini_libid;             /* library ID for TINI */
+    int protect_sp_update;      /* DS390 - will disable interrupts during ESP:SP updates */
+    int parms_in_bank1;         /* DS390 - use reg bank1 to pass parameters */
+    int stack_size;             /* MCS51/DS390 - Tells the linker to allocate this space for stack */
+    int no_pack_iram;           /* MCS51/DS390 - Tells the linker not to pack variables in internal ram */
     /* starting address of the segments */
-    int xstack_loc;            /* initial location of external stack */
-    int stack_loc;             /* initial value of internal stack pointer */
-    int xdata_loc;             /* xternal ram starts at address */
-    int data_loc;              /* interram start location       */
-    int idata_loc;             /* indirect address space        */
-    int code_loc;              /* code location start           */
-    int iram_size;             /* internal ram size (used only for error checking) */   
-    int xram_size;             /* external ram size (used only for error checking) */
+    int xstack_loc;             /* initial location of external stack */
+    int stack_loc;              /* initial value of internal stack pointer */
+    int xdata_loc;              /* xternal ram starts at address */
+    int data_loc;               /* interram start location       */
+    int idata_loc;              /* indirect address space        */
+    int code_loc;               /* code location start           */
+    int iram_size;              /* internal ram size (used only for error checking) */
+    int xram_size;              /* external ram size (used only for error checking) */
     bool xram_size_set;         /* since xram_size=0 is a possibility */
-    int code_size;             /* code size (used only for error checking) */    
+    int code_size;              /* code size (used only for error checking) */
     int verboseExec;            /* show what we are doing */
     int noXinitOpt;             /* don't optimize initialized xdata */
     int noCcodeInAsm;           /* hide c-code from asm */
     int iCodeInAsm;             /* show i-code in asm */
-    int noPeepComments;                /* hide peephole optimizer comments */
+    int noPeepComments;         /* hide peephole optimizer comments */
     int printSearchDirs;        /* display the directories in the compiler's search path */
     int vc_err_style;           /* errors and warnings are compatible with Micro$oft visual studio */
     int use_stdout;             /* send errors to stdout instead of stderr */
@@ -260,31 +260,31 @@ struct options
 extern int noAssemble;         /* no assembly, stop after code generation */
 extern char *yytext;
 extern char *currFname;
-extern char *fullSrcFileName;  /* full name for the source file; */
-                               /* can be NULL while linking without compiling */
-extern char *fullDstFileName;  /* full name for the output file; */
-                               /* only given by -o, otherwise NULL */
-extern char *dstFileName;      /* destination file name without extension */
-extern char *dstPath;          /* path for the output files; */
-                               /* "" is equivalent with cwd */
-extern char *moduleName;       /* module name is source file without path and extension */
-                               /* can be NULL while linking without compiling */
-extern int seqPointNo;         /* current sequence point */
-extern int currLineno;         /* current line number    */
-extern int mylineno;           /* line number of the current file SDCC.lex */
-extern FILE *yyin;             /* */
-extern FILE *asmFile;          /* assembly output file */
-extern FILE *cdbFile;          /* debugger symbol file */
-extern int NestLevel;          /* NestLevel                 SDCC.y   */
-extern int stackPtr;           /* stack pointer             SDCC.y   */
-extern int xstackPtr;          /* external stack pointer    SDCC.y   */
-extern int reentrant;          /* /X flag has been sent     SDCC.y */
+extern char *fullSrcFileName;   /* full name for the source file; */
+                                /* can be NULL while linking without compiling */
+extern char *fullDstFileName;   /* full name for the output file; */
+                                /* only given by -o, otherwise NULL */
+extern char *dstFileName;       /* destination file name without extension */
+extern char *dstPath;           /* path for the output files; */
+                                /* "" is equivalent with cwd */
+extern char *moduleName;        /* module name is source file without path and extension */
+                                /* can be NULL while linking without compiling */
+extern int seqPointNo;          /* current sequence point */
+extern int currLineno;          /* current line number    */
+extern int mylineno;            /* line number of the current file SDCC.lex */
+extern FILE *yyin;              /* */
+extern FILE *asmFile;           /* assembly output file */
+extern FILE *cdbFile;           /* debugger symbol file */
+extern int NestLevel;           /* NestLevel                 SDCC.y   */
+extern int stackPtr;            /* stack pointer             SDCC.y   */
+extern int xstackPtr;           /* external stack pointer    SDCC.y   */
+extern int reentrant;           /* /X flag has been sent     SDCC.y */
 extern char buffer[PATH_MAX * 2];/* general buffer           SDCCmain.c   */
-extern int currRegBank;                /* register bank being used  SDCCgens.c   */
-extern int RegBankUsed[4];     /* JCF: register banks used  SDCCmain.c   */
-extern struct symbol *currFunc;        /* current function    SDCCgens.c */
-extern int cNestLevel;         /* block nest level  SDCCval.c      */
-extern int currBlockno;                /* sequentail block number */
+extern int currRegBank;         /* register bank being used  SDCCgens.c   */
+extern int RegBankUsed[4];      /* JCF: register banks used  SDCCmain.c   */
+extern struct symbol *currFunc; /* current function    SDCCgens.c */
+extern int cNestLevel;          /* block nest level  SDCCval.c      */
+extern int currBlockno;         /* sequentail block number */
 extern struct optimize optimize;
 extern struct options options;
 extern unsigned maxInterrupts;
@@ -314,7 +314,7 @@ char *tempfilename (void);
 /** An assert() macro that will go out through sdcc's error
     system.
 */
-#define wassertl(a,s)  ((a) ? 0 : \
+#define wassertl(a,s)   ((a) ? 0 : \
         (werror (E_INTERNAL_ERROR,__FILE__,__LINE__, s), 0))
 
 #define wassert(a)    wassertl(a,"code generator internal error")
index 9ffc2f0494029098a996f7e9cfcfa2ee43ad9b5d..75dbcf8c5e0ebedbf3feb5a6f16bbf3dc5a9eac1 100644 (file)
@@ -130,6 +130,7 @@ char buffer[PATH_MAX * 2];
 #define OPTION_MSVC_ERROR_STYLE "--vc"
 #define OPTION_USE_STDOUT       "--use-stdout"
 #define OPTION_PACK_IRAM        "--pack-iram"
+#define OPTION_NO_PACK_IRAM     "--no-pack-iram"
 #define OPTION_NO_PEEP_COMMENTS "--no-peep-comments"
 #define OPTION_OPT_CODE_SPEED   "--opt-code-speed"
 #define OPTION_OPT_CODE_SIZE    "--opt-code-size"
@@ -250,7 +251,8 @@ optionsTable[] = {
     { 0,    OPTION_IDATA_LOC,       NULL, NULL },
 #if !OPT_DISABLE_DS390 || !OPT_DISABLE_MCS51
     { 0,    OPTION_STACK_SIZE,      NULL,"MCS51/DS390 - Tells the linker to allocate this space for stack"},
-    { 0,    OPTION_PACK_IRAM,       &options.pack_iram,"MCS51/DS390 - Tells the linker to pack variables in internal ram"},
+    { 0,    OPTION_PACK_IRAM,       NULL,"MCS51/DS390 - Tells the linker to pack variables in internal ram (default)"},
+    { 0,    OPTION_NO_PACK_IRAM,    &options.no_pack_iram,"MCS51/DS390 - Tells the linker not to pack variables in internal ram"},
 #endif
     
     /* End of options */
@@ -1410,7 +1412,7 @@ linkEdit (char **envp)
       else /*For all the other ports.  Including pics???*/
         {
           fprintf (lnkfile, "-myux%c\n", out_fmt);
-          if(options.pack_iram)
+          if(!options.no_pack_iram)
               fprintf (lnkfile, "-Y\n");
         }
 
index 668eccf2f42fe3a180d381e89ae2e249279d9b59..19d484ebef5fab41e6b81725bf47bfc29a086bde 100644 (file)
@@ -11817,6 +11817,9 @@ static void genJumpTab (iCode *ic)
 {
     symbol *jtab;
     char *l;
+    pCodeOp *jt_offs;
+    pCodeOp *jt_offs_hi;
+    pCodeOp *jt_label;
 
     DEBUGpic16_emitcode ("; ***","%s  %d",__FUNCTION__,__LINE__);
 
@@ -11843,9 +11846,9 @@ static void genJumpTab (iCode *ic)
 
 #else
 
-    pCodeOp *jt_offs = pic16_popGetTempReg(0);
-    pCodeOp *jt_offs_hi = pic16_popGetTempReg(1);
-    pCodeOp *jt_label = pic16_popGetLabel (jtab->key);
+    jt_offs = pic16_popGetTempReg(0);
+    jt_offs_hi = pic16_popGetTempReg(1);
+    jt_label = pic16_popGetLabel (jtab->key);
     //fprintf (stderr, "Creating jump table...\n");
 
     // calculate offset into jump table (idx * sizeof (GOTO))
index 204022b01eac18203b846fb7cbcdc8d4cf9c184a..626ee0d1a67ff8008d7021c2b7ed7103718b2868 100644 (file)
 # Microsoft Developer Studio Project File - Name="pic16" - Package Owner=<4>
-
 # Microsoft Developer Studio Generated Build File, Format Version 6.00
-
 # ** DO NOT EDIT **
 
-
-
 # TARGTYPE "Win32 (x86) Static Library" 0x0104
 
-
-
 CFG=pic16 - Win32 Release
-
 !MESSAGE This is not a valid makefile. To build this project using NMAKE,
-
 !MESSAGE use the Export Makefile command and run
-
-!MESSAGE 
-
+!MESSAGE
 !MESSAGE NMAKE /f "pic16.mak".
-
-!MESSAGE 
-
+!MESSAGE
 !MESSAGE You can specify a configuration when running NMAKE
-
 !MESSAGE by defining the macro CFG on the command line. For example:
-
-!MESSAGE 
-
+!MESSAGE
 !MESSAGE NMAKE /f "pic16.mak" CFG="pic16 - Win32 Release"
-
-!MESSAGE 
-
+!MESSAGE
 !MESSAGE Possible choices for configuration are:
-
-!MESSAGE 
-
+!MESSAGE
 !MESSAGE "pic16 - Win32 Debug" (based on "Win32 (x86) Static Library")
-
 !MESSAGE "pic16 - Win32 Release" (based on "Win32 (x86) Static Library")
-
-!MESSAGE 
-
-
+!MESSAGE
 
 # Begin Project
-
 # PROP AllowPerConfigDependencies 0
-
 # PROP Scc_ProjName ""
-
 # PROP Scc_LocalPath ""
-
 CPP=cl.exe
-
 RSC=rc.exe
 
-
-
 !IF  "$(CFG)" == "pic16 - Win32 Debug"
 
-
-
 # PROP BASE Use_MFC 0
-
 # PROP BASE Use_Debug_Libraries 1
-
 # PROP BASE Output_Dir "Debug"
-
 # PROP BASE Intermediate_Dir "Debug"
-
 # PROP BASE Target_Dir ""
-
 # PROP Use_MFC 0
-
 # PROP Use_Debug_Libraries 1
-
 # PROP Output_Dir "Debug"
-
 # PROP Intermediate_Dir "Debug"
-
 # PROP Target_Dir ""
-
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I ".." /I "." /I "..\.." /I "..\..\support\util" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /FD /GZ /Zm500 /c
-
 # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".." /I "." /I "..\.." /I "..\..\support\util" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /FD /GZ /Zm1000 /c
-
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
-
 # ADD RSC /l 0x409 /d "_DEBUG"
-
 BSC32=bscmake.exe
-
 # ADD BASE BSC32 /nologo
-
 # ADD BSC32 /nologo
-
 LIB32=link.exe -lib
-
 # ADD BASE LIB32 /nologo /out:"Debug\port.lib"
-
 # ADD LIB32 /nologo /out:"Debug\port.lib"
 
-
-
 !ELSEIF  "$(CFG)" == "pic16 - Win32 Release"
 
-
-
 # PROP BASE Use_MFC 0
-
 # PROP BASE Use_Debug_Libraries 1
-
 # PROP BASE Output_Dir "Release"
-
 # PROP BASE Intermediate_Dir "Release"
-
 # PROP BASE Target_Dir ""
-
 # PROP Use_MFC 0
-
 # PROP Use_Debug_Libraries 1
-
 # PROP Output_Dir "Release"
-
 # PROP Intermediate_Dir "Release"
-
 # PROP Target_Dir ""
-
 # ADD BASE CPP /nologo /ML /W3 /GX /O2 /I ".." /I "." /I "..\.." /I "..\..\support\util" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /Zm500 /c
-
 # ADD CPP /nologo /ML /W3 /GX /O2 /I ".." /I "." /I "..\.." /I "..\..\support\util" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /Zm1000 /c
-
 # ADD BASE RSC /l 0x409 /d "NDEBUG"
-
 # ADD RSC /l 0x409 /d "NDEBUG"
-
 BSC32=bscmake.exe
-
 # ADD BASE BSC32 /nologo
-
 # ADD BSC32 /nologo
-
 LIB32=link.exe -lib
-
 # ADD BASE LIB32 /nologo /out:"Release\port.lib"
-
 # ADD LIB32 /nologo /out:"Release\port.lib"
 
-
-
-!ENDIF 
-
-
+!ENDIF
 
 # Begin Target
 
-
-
 # Name "pic16 - Win32 Debug"
-
 # Name "pic16 - Win32 Release"
-
 # Begin Group "Source Files"
 
-
-
 # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-
 # Begin Source File
 
-
-
 SOURCE=.\device.c
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\gen.c
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\genarith.c
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\genutils.c
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\glue.c
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\main.c
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\pcode.c
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\pcodeflow.c
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\pcodepeep.c
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\pcoderegs.c
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\ralloc.c
-
 # End Source File
-
 # End Group
-
 # Begin Group "Header Files"
 
-
-
 # PROP Default_Filter "h;hpp;hxx;hm;inl"
-
 # Begin Source File
 
-
-
 SOURCE=.\device.h
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\gen.h
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\glue.h
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\main.h
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\pcode.h
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\pcodeflow.h
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\pcoderegs.h
-
 # End Source File
-
 # Begin Source File
 
-
-
 SOURCE=.\ralloc.h
-
 # End Source File
-
 # End Group
-
 # End Target
-
 # End Project
-
index fa6a27e84066feffc52b8ea6c4e3b51b304e0bb3..dde302d7bfdfd5c854de70d95245bebd2246a28c 100644 (file)
@@ -7,19 +7,19 @@
 CFG=pic16a - Win32 Release
 !MESSAGE This is not a valid makefile. To build this project using NMAKE,
 !MESSAGE use the Export Makefile command and run
-!MESSAGE 
+!MESSAGE
 !MESSAGE NMAKE /f "pic16a.mak".
-!MESSAGE 
+!MESSAGE
 !MESSAGE You can specify a configuration when running NMAKE
 !MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
+!MESSAGE
 !MESSAGE NMAKE /f "pic16a.mak" CFG="pic16a - Win32 Release"
-!MESSAGE 
+!MESSAGE
 !MESSAGE Possible choices for configuration are:
-!MESSAGE 
+!MESSAGE
 !MESSAGE "pic16a - Win32 Debug" (based on "Win32 (x86) Generic Project")
 !MESSAGE "pic16a - Win32 Release" (based on "Win32 (x86) Generic Project")
-!MESSAGE 
+!MESSAGE
 
 # Begin Project
 # PROP AllowPerConfigDependencies 0
@@ -53,7 +53,7 @@ MTL=midl.exe
 # PROP Intermediate_Dir ""
 # PROP Target_Dir ""
 
-!ENDIF 
+!ENDIF
 
 # Begin Target
 
@@ -83,7 +83,7 @@ InputPath=.\peeph.def
 
 # End Custom Build
 
-!ENDIF 
+!ENDIF
 
 # End Source File
 # End Target
index 5ef3dadea1a0d3a4bfcec5b393d705cd0ea4ae86..ddb75582bc5f9e2c2285aaad60c98998e9324e26 100644 (file)
@@ -11,6 +11,7 @@ _sdcc_external_startup (void)
   TCON = 0;     /* timer control register, byte operation */
 
   TH1  = 0xFA;  /* serial reload value, 9,600 baud at 11.0952Mhz */
+  TL1  = 0xFF;  /* reload asap */
   TR1  = 1;     /* start serial timer */
 
   TI   = 1;     /* enable transmission of first byte */