* 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
+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,
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
SOURCES = $(patsubst %.rel,%.c,$(OBJECTS))
CPPFLAGS = -I$(srcdir)/../../include
-CFLAGS = -mds390 $(CPPFLAGS) $(VERBOSE)
+CFLAGS = -mds390 $(CPPFLAGS) $(VERBOSE) --std-c89
all: $(OBJECTS) libds390.lib
//#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) ; }
// 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);
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);
#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
pop dph
pop dpx
ret
-_endasm;
+__endasm;
}
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))
SOURCES = $(patsubst %.rel,%.c,$(OBJECTS))
CPPFLAGS = -I$(srcdir)/../../include
-CFLAGS = -mds400 $(CPPFLAGS) $(VERBOSE)
+CFLAGS = -mds400 $(CPPFLAGS) $(VERBOSE) --std-c89
all: $(OBJECTS) libds400.lib
#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
// 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
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
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;
}
// 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
; 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
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)
// 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
pop dph
pop dpx
ret
-_endasm;
+__endasm;
}
LIB = gbz80.lib
CC = $(SCC)
AS = $(SAS)
-CFLAGS = -I$(srcdir)/../../include -I.
+CFLAGS = -I$(srcdir)/../../include -I. --std-c89
all: $(LIB) crt0.o
AS = $(SAS)
ASFLAGS = -plosgff
-CFLAGS = -I$(srcdir)/../../include -I.
+CFLAGS = -I$(srcdir)/../../include -I. --std-c89
all: $(LIB)
rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.asm *.lib
distclean: clean
- rm -f Makefile
\ No newline at end of file
+ rm -f Makefile
-data unsigned char _ret2;
-data unsigned char _ret3;
+__data unsigned char _ret2;
+__data unsigned char _ret3;
AS = $(SAS)
ASFLAGS = -plosgff
-CFLAGS = -I$(top_srcdir)/include
+CFLAGS = -I$(top_srcdir)/include --std-c89
all: $(LIB)
rm -f *.rel *.sym *.lst *~ $(CLEANSPEC) *.dump* *.lib
distclean: clean
- rm -r Makefile
\ No newline at end of file
+ rm -r Makefile
AS = $(SAS)
ASFLAGS = -plosgff
-CFLAGS = -I$(srcdir)/../../include -I.
+CFLAGS = -I$(srcdir)/../../include -I. --std-c89
all: $(LIB) crt0.o