* device/include/ds400rom.h,
authorMaartenBrock <MaartenBrock@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 18 Apr 2007 19:56:32 +0000 (19:56 +0000)
committerMaartenBrock <MaartenBrock@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Wed, 18 Apr 2007 19:56:32 +0000 (19:56 +0000)
* device/lib/ds390/lcd390.c,
* device/lib/ds390/memcpyx.c,
* device/lib/ds390/rtc390.c,
* device/lib/ds400/ds400rom.c,
* device/lib/ds400/memcpyx.c,
* device/lib/hc08/_ret.c: more replacements of keywords with their
  double underscore equivalents
* device/lib/ds390/Makefile.in,
* device/lib/ds400/Makefile.in,
* device/lib/gbz80/Makefile.in,
* device/lib/hc08/Makefile.in,
* device/lib/mcs51/Makefile.in,
* device/lib/z80/Makefile.in: added --std-c89 to CFLAGS

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

14 files changed:
ChangeLog
device/include/ds400rom.h
device/lib/ds390/Makefile.in
device/lib/ds390/lcd390.c
device/lib/ds390/memcpyx.c
device/lib/ds390/rtc390.c
device/lib/ds400/Makefile.in
device/lib/ds400/ds400rom.c
device/lib/ds400/memcpyx.c
device/lib/gbz80/Makefile.in
device/lib/hc08/Makefile.in
device/lib/hc08/_ret.c
device/lib/mcs51/Makefile.in
device/lib/z80/Makefile.in

index 1545674428be838a8a5ec7c0b8260d968a0b8719..9a12ceb03a71387afb16acd31cc7c266a3a8f62b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2007-04-18 Maarten Brock <sourceforge.brock AT dse.nl>
+
+       * device/include/ds400rom.h,
+       * device/lib/ds390/lcd390.c,
+       * device/lib/ds390/memcpyx.c,
+       * device/lib/ds390/rtc390.c,
+       * device/lib/ds400/ds400rom.c,
+       * device/lib/ds400/memcpyx.c,
+       * device/lib/hc08/_ret.c: more replacements of keywords with their
+         double underscore equivalents
+       * device/lib/ds390/Makefile.in,
+       * device/lib/ds400/Makefile.in,
+       * device/lib/gbz80/Makefile.in,
+       * device/lib/hc08/Makefile.in,
+       * device/lib/mcs51/Makefile.in,
+       * device/lib/z80/Makefile.in: added --std-c89 to CFLAGS
+
 2007-04-17 Borut Razem <borut.razem AT siol.net>
 
        * doc/sdccman.lyx, src/SDCCmain.c, src/SDCCglobal.h, src/ds390/gen.c,
index 9f0141d02ed59c3b43a559e558dee4c15a423995..11bacd3589de569fe9240f4c9621c2f72d405b81 100644 (file)
@@ -8,7 +8,7 @@ extern unsigned char init_rom(void __xdata *loMem,
 
 extern unsigned long task_gettimemillis_long(void) __naked;
 
-extern unsigned char task_getthreadID(void) _naked;
+extern unsigned char task_getthreadID(void) __naked;
 
 /** Timer reload value for 14.746 MHz crystal. */
 #define RELOAD_14_746 0xfb33
index b9d1be79f4efdf9a5433824dd000682e13d16ec9..d1dd7814c89785ab2d4608f0b1b92f4c6ee35a6c 100755 (executable)
@@ -10,7 +10,7 @@ OBJECTS = tinibios.rel memcpyx.rel  lcd390.rel i2c390.rel rtc390.rel putchar.rel
 SOURCES = $(patsubst %.rel,%.c,$(OBJECTS))
 
 CPPFLAGS = -I$(srcdir)/../../include
-CFLAGS = -mds390 $(CPPFLAGS) $(VERBOSE)
+CFLAGS = -mds390 $(CPPFLAGS) $(VERBOSE) --std-c89
 
 all: $(OBJECTS) libds390.lib
 
index d9d071fb8bec78701d7d36832d3a379c3c81257c..6b0feda1fc6c75b09adc9141fb650f8fda64504e 100644 (file)
@@ -41,13 +41,13 @@ static unsigned char lcdLinesStart[LCD_ROWS]={0, 0x40, 0x14, 0x54};
 
 //#define LCD_RW
 
-xdata at 0x380002 static unsigned char lcdIwr;
-xdata at 0x38000a static unsigned char lcdDwr;
+__xdata __at (0x380002) static unsigned char lcdIwr;
+__xdata __at (0x38000a) static unsigned char lcdDwr;
 
 #ifdef LCD_RW
 
-xdata at 0x380003 static unsigned char lcdIrd;
-xdata at 0x38000b static unsigned char lcdDrd;
+__xdata __at (0x380003) static unsigned char lcdIrd;
+__xdata __at (0x38000b) static unsigned char lcdDrd;
 
 #define LcdWait { while (lcdIrd&0x80) ; }
 
@@ -147,7 +147,7 @@ void LcdLPutString (unsigned int collumnRow, char *string) {
 // however they will :), so to be sure
 static char lcdPrintfBuffer[LCD_COLLUMNS*4];
 
-void LcdPrintf (const char *format, ...) reentrant {
+void LcdPrintf (const char *format, ...) __reentrant {
   va_list arg;
 
   va_start (arg, format);
@@ -158,7 +158,7 @@ void LcdPrintf (const char *format, ...) reentrant {
   va_end (arg);
 }
 
-void LcdLPrintf (unsigned int collumnRow, const char *format, ...) reentrant {
+void LcdLPrintf (unsigned int collumnRow, const char *format, ...) __reentrant {
   va_list arg;
 
   LcdGoto(collumnRow);
index 56e5e3a951b9bec0e367a4265de205480e6eec34..efab45048394575d2f00db649dc8e6b338f85370 100644 (file)
@@ -1,17 +1,17 @@
 #include <string.h>
 
-void xdata * memcpyx (
-       void xdata * dst,
-       void xdata * src,
+void __xdata * memcpyx (
+       void __xdata * dst,
+       void __xdata * src,
        int count
-       ) _naked
+       ) __naked
 {
     /* Shut compiler up about unused parameters. */
     dst; src; count;
     
 /* AUTO_TOGGLE uses the '390 DPTS toggle bit. */    
 #define AUTO_TOGGLE    
-_asm
+__asm
     ; Destination is in DPTR. Save it on stack so we can return it at end.
     
     push dpx
@@ -88,6 +88,6 @@ _memcpy_done:
     pop dph
     pop dpx
     ret
-_endasm;    
+__endasm;    
     
 }
index 5eff84cc6f5342f46b245bd1bcf09c1d189491ac..ec07e98dcfbb9c4f5e1aed00952972a509f0e18c 100755 (executable)
    range since the chip only uses CE3*
 */
 
-xdata at 0x310000 static volatile unsigned char rtc;
+__xdata __at (0x310000) static volatile unsigned char rtc;
 
 // this is the 64bit pattern that has to be recognized by the ds1315
-code unsigned char rtcMagic[8]={0xc5,0x3a,0xa3,0x5c,0xc5,0x3a,0xa3,0x5c};
+__code unsigned char rtcMagic[8]={0xc5,0x3a,0xa3,0x5c,0xc5,0x3a,0xa3,0x5c};
 
 #define BCDtoINT(x) (((x)&0x0f)+((x)>>4)*10)
 #define INTtoBCD(x) (((x)%10)+(((x)/10)<<4))
index d4dd1dc49ce18f323e287e5da6f32773f3577397..92287c2d9c97b7eaab8f4b4b0f7d343a8c314fd2 100755 (executable)
@@ -10,7 +10,7 @@ OBJECTS = tinibios.rel memcpyx.rel ds400rom.rel
 SOURCES = $(patsubst %.rel,%.c,$(OBJECTS))
 
 CPPFLAGS = -I$(srcdir)/../../include
-CFLAGS = -mds400 $(CPPFLAGS) $(VERBOSE)
+CFLAGS = -mds400 $(CPPFLAGS) $(VERBOSE) --std-c89
 
 all: $(OBJECTS) libds400.lib
 
index 7bba973a8fb7807c097b8e3774ce0dfc66c49682..b3b9cf57f4627c076caefa0a0c211c2de057ed14 100644 (file)
 #include <ds400rom.h>
 
 // ROM globals, taken from startup400.a51
-data unsigned char at 0x68 DSS_wos_crit_count;
-data unsigned int at 0x6b DSS_timerReload;
-data unsigned char at 0x6d DSS_curr_pc[3];
-data unsigned char at 0x72 DSS_sched[3];
-data unsigned char at 0x74 DSS_ms_count[5];
-data unsigned char at 0x7b DSS_hb_chandle[5];
+__data unsigned char __at (0x68) DSS_wos_crit_count;
+__data unsigned int  __at (0x6b) DSS_timerReload;
+__data unsigned char __at (0x6d) DSS_curr_pc[3];
+__data unsigned char __at (0x72) DSS_sched[3];
+__data unsigned char __at (0x74) DSS_ms_count[5];
+__data unsigned char __at (0x7b) DSS_hb_chandle[5];
     
 // Register bank 3 equates.
 #define R0_B3     0x18
@@ -241,9 +241,9 @@ data unsigned char at 0x7b DSS_hb_chandle[5];
     
 
 // expects function number in R6_B3 (low byte) & R7_B3 (high byte)
-void _romcall(void) _naked
+void _romcall(void) __naked
 {
-_asm    
+__asm    
       push  dpx                               ; dptr0 preserved here
       push  dph
       push  dpl
@@ -286,13 +286,13 @@ _asm
       ret                                     ; this is not a ret, it is a call!
        
       ; the called function ends with a ret which will return to our original caller.
-_endasm ;
+__endasm ;
 }
 
 // expects function number in R6_B3 (low byte) & R7_B3 (high byte)
-void _romredirect(void) _naked
+void _romredirect(void) __naked
 {
-_asm
+__asm
       push  dpx
       push  dph
       push  dpl
@@ -323,7 +323,7 @@ _asm
       ret                       ; this is not a ret, it is a call!
 
       ; the called function ends with a ret which will return to our original caller.
-_endasm;       
+__endasm;      
 }
 
 
@@ -343,14 +343,14 @@ _endasm;
 
 
 // init_rom: the ds400 ROM_INIT ROM function.
-unsigned char init_rom(void xdata *loMem,
-                      void xdata *hiMem) _naked
+unsigned char init_rom(void __xdata *loMem,
+                      void __xdata *hiMem) __naked
 {    
     // shut compiler up about unused parameters.
     loMem;
     hiMem;
     
-_asm
+__asm
        ; load params.
        ; loMem is already in DPTR.
        mov     r2, dpx
@@ -367,14 +367,14 @@ _asm
        ; result is in acc, move to dpl for C convention.
        mov     dpl, a
        ret
-_endasm        ;
+__endasm       ;
 }
 
 // DSS_gettimemillis: note that the ROM actually returns 5 bytes of time,
 // we're discarding the high byte here.
-unsigned long task_gettimemillis_long(void) _naked
+unsigned long task_gettimemillis_long(void) __naked
 {
-_asm    
+__asm    
     ; no parameters to load. 
     ROMREDIRECT(ROMRT_GETTIMEMILLIS)
    ; results in r4 - r0, return in DPTR/B
@@ -383,18 +383,18 @@ _asm
    mov dpx, r2
    mov b, r3
    ret
-_endasm;
+__endasm;
 }
 
-unsigned char task_getthreadID(void) _naked
+unsigned char task_getthreadID(void) __naked
 {
-_asm    
+__asm    
     ; no parameters to load. 
     ROMREDIRECT(ROMRT_GETTHREADID)
    ; results in acc, return in dpl
    mov dpl, a
    ret
-_endasm;    
+__endasm;    
 }
 
 unsigned int task_gettickreload(void)
index fb9e2991e95cde13d633bd37de5ada8bbea7bc84..7f9d81382ffbdc808d7d644280faad71c50837c2 100644 (file)
@@ -2,16 +2,16 @@
 
 // FIXME: can optimize even further on '400 with auto-increment/auto-toggle.
 
-void xdata * memcpyx (
-       void xdata * dst,
-       void xdata * src,
+void __xdata * memcpyx (
+       void __xdata * dst,
+       void __xdata * src,
        int count
-       ) _naked
+       ) __naked
 {
     /* Shut compiler up about unused parameters. */
     dst; src; count;
     
-_asm
+__asm
     ; Destination is in DPTR. Save it on stack so we can return it at end.
     
     push dpx
@@ -73,6 +73,6 @@ _memcpy_done:
     pop dph
     pop dpx
     ret
-_endasm;    
+__endasm;    
     
 }
index 04433cd40bfd4d153d29e5a39404c0784b914040..cc38628a509ce82ab412db17a2e3b817a39bbc63 100644 (file)
@@ -13,7 +13,7 @@ OBJ = div.o mul.o putchar.o printf.o shift.o stubs.o crt0_rle.o heap.o fstubs.o
 LIB = gbz80.lib
 CC = $(SCC)
 AS = $(SAS)
-CFLAGS = -I$(srcdir)/../../include -I.
+CFLAGS = -I$(srcdir)/../../include -I. --std-c89
 
 all: $(LIB) crt0.o
 
index b5a81c6004ed3800e04951adc389033baeadd36d..5482da00044996276fecea21a5df8444c6d7f7ad 100644 (file)
@@ -15,7 +15,7 @@ CC = $(SCC)
 AS = $(SAS)
 ASFLAGS = -plosgff
 
-CFLAGS = -I$(srcdir)/../../include -I.
+CFLAGS = -I$(srcdir)/../../include -I. --std-c89
 
 all: $(LIB)
 
@@ -35,4 +35,4 @@ clean:
        rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
 
 distclean: clean
-       rm -f Makefile
\ No newline at end of file
+       rm -f Makefile
index bdfbf40bc81c0fe9b8215e967eba099a38c7d064..c522c6c2c255c933129f09558fa9feedb995a9ed 100644 (file)
@@ -1,3 +1,3 @@
 
-data unsigned char _ret2;
-data unsigned char _ret3;
+__data unsigned char _ret2;
+__data unsigned char _ret3;
index 33fe0d1e053514e26bf0b044145d8654d588399e..294048428a0eeacd867e19b95567c34b7a5b5cc4 100644 (file)
@@ -16,7 +16,7 @@ CC = $(SCC)
 AS = $(SAS)
 ASFLAGS = -plosgff
 
-CFLAGS = -I$(top_srcdir)/include
+CFLAGS = -I$(top_srcdir)/include --std-c89
 
 all: $(LIB)
 
@@ -37,4 +37,4 @@ clean:
        rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.lib
 
 distclean: clean
-       rm -r Makefile
\ No newline at end of file
+       rm -r Makefile
index 39976cf4125e8564597e1419a77d0ed55aec3f9d..31b5c64f7c2a8ec1de73e5624a22a3506415650f 100644 (file)
@@ -15,7 +15,7 @@ CC = $(SCC)
 AS = $(SAS)
 ASFLAGS = -plosgff
 
-CFLAGS = -I$(srcdir)/../../include -I.
+CFLAGS = -I$(srcdir)/../../include -I. --std-c89
 
 all: $(LIB) crt0.o