diff -crB sdcc/ChangeLog sdcc-asix/ChangeLog *** sdcc/ChangeLog 2007-11-17 20:23:59.000000000 +0100 --- sdcc-asix/ChangeLog 2007-11-30 05:16:07.136379144 +0100 *************** *** 1,3 **** --- 1,8 ---- + 2007-11-30 Christian Klippel + + * src/ds390/main.c: added ax110xx target to ds390 (option --use-asix) + * src/SDCCglobl.h: added ax110xx target to ds390 (option --use-asix) + 2007-11-17 Raphael Neider * src/pic/main.c (_asmCmd): include debug arguments (-g as $3) diff -crB sdcc/src/ds390/main.c sdcc-asix/src/ds390/main.c *** sdcc/src/ds390/main.c 2007-06-18 20:24:42.000000000 +0200 --- sdcc-asix/src/ds390/main.c 2007-11-30 05:12:58.453530081 +0100 *************** *** 21,26 **** --- 21,27 ---- #define OPTION_STACK_8BIT "--stack-8bit" #define OPTION_FLAT24_MODEL "--model-flat24" #define OPTION_STACK_SIZE "--stack-size" + #define OPTION_USE_ASIX "--use-asix" static OPTION _ds390_options[] = { *************** *** 33,38 **** --- 34,40 ---- { 0, "--use-accelerator", &options.useAccelerator, "generate code for ds390 arithmetic accelerator"}, { 0, "--protect-sp-update", &options.protect_sp_update, "will disable interrupts during ESP:SP updates"}, { 0, "--parms-in-bank1", &options.parms_in_bank1, "use Bank1 for parameter passing"}, + { 0, OPTION_USE_ASIX, &options.use_asix, "generate code for the asix chip" }, { 0, NULL } }; *************** *** 253,258 **** --- 255,265 ---- fputs ("ma\t=\t0xD3\n", of); fputs ("mb\t=\t0xD4\n", of); fputs ("mc\t=\t0xD5\n", of); + if(options.use_asix) + { + fputs ("ta\t=\t0xEB\n", of); + fputs ("acon\t=\t0x9D\n", of); + } fputs ("F1\t=\t0xD1\t; user flag\n", of); if (options.parms_in_bank1) { int i ; *************** *** 290,295 **** --- 297,311 ---- return TRUE; } + if(options.use_asix) + { + fprintf (stderr, + "*** warning: targeting for asix\n"); + dbuf_printf (oBuf, ".flat24 off\n"); + dbuf_printf (oBuf, "\tljmp\t__reset_vect\n"); + dbuf_printf (oBuf, ".flat24 on\n"); + } + else dbuf_printf (oBuf, "\tajmp\t__reset_vect\n"); /* now for the other interrupts */ *************** *** 305,310 **** --- 321,336 ---- } } + if(options.use_asix) + { + dbuf_printf (oBuf, ".flat24 off\n"); + dbuf_printf (oBuf, "__reset_vect:\n"); + dbuf_printf (oBuf, "\tmov ta,#0xAA\n"); + dbuf_printf (oBuf, "\tmov ta,#0x55\n"); + dbuf_printf (oBuf, "\tmov acon,#0x02\n"); + dbuf_printf (oBuf, ".flat24 on\n"); + } + else dbuf_printf (oBuf, "__reset_vect:\n\tljmp\t__sdcc_gsinit_startup\n"); return TRUE; diff -crB sdcc/src/SDCCglobl.h sdcc-asix/src/SDCCglobl.h *** sdcc/src/SDCCglobl.h 2007-07-27 22:23:22.000000000 +0200 --- sdcc-asix/src/SDCCglobl.h 2007-11-30 05:06:54.000000000 +0100 *************** *** 291,296 **** --- 291,297 ---- int unsigned_char; /* use unsigned for char without signed/unsigned modifier */ char *code_seg; /* segment name to use instead of CSEG */ char *const_seg; /* segment name to use instead of CONST */ + bool use_asix; /* since xram_size=0 is a possibility */ /* sets */ set *calleeSavesSet; /* list of functions using callee save */ set *excludeRegsSet; /* registers excluded from saving */