diff -ub -r -N cc65-2.13.3.orig/asminc/ser-kernel.inc cc65-2.13.3/asminc/ser-kernel.inc --- cc65-2.13.3.orig/asminc/ser-kernel.inc 2009-12-15 21:38:00.000000000 +0100 +++ cc65-2.13.3/asminc/ser-kernel.inc 2012-12-29 20:05:05.637384137 +0100 @@ -156,6 +156,7 @@ .global _ser_put .global _ser_status .global _ser_ioctl + .global _ser_load_driver .global _ser_clear_ptr diff -ub -r -N cc65-2.13.3.orig/asminc/stdio.inc cc65-2.13.3/asminc/stdio.inc --- cc65-2.13.3.orig/asminc/stdio.inc 2005-04-19 15:15:52.000000000 +0200 +++ cc65-2.13.3/asminc/stdio.inc 2012-12-29 20:05:05.638384137 +0100 @@ -43,7 +43,7 @@ EOF = -1 .if .defined(__APPLE2__) .or .defined(__APPLE2ENH__) FILENAME_MAX = 64+1 -.elseif .defined(__ATARI__) +.elseif .defined(__ATARI__) .or .defined(__EC65K__) FILENAME_MAX = 12+1 .elseif .defined(__LUNIX__) FILENAME_MAX = 80+1 diff -ub -r -N cc65-2.13.3.orig/doc/Makefile cc65-2.13.3/doc/Makefile --- cc65-2.13.3.orig/doc/Makefile 2010-07-30 21:35:43.000000000 +0200 +++ cc65-2.13.3/doc/Makefile 2012-12-29 20:05:05.638384137 +0100 @@ -50,7 +50,8 @@ pet.sgml \ plus4.sgml \ supervision.sgml\ - vic20.sgml + vic20.sgml \ + ec65k.sgml TXT = $(SGML:.sgml=.txt) HTML = $(SGML:.sgml=.html) diff -ub -r -N cc65-2.13.3.orig/doc/funcref.sgml cc65-2.13.3/doc/funcref.sgml --- cc65-2.13.3.orig/doc/funcref.sgml 2012-02-06 22:25:15.000000000 +0100 +++ cc65-2.13.3/doc/funcref.sgml 2012-12-29 20:05:05.641384137 +0100 @@ -212,6 +212,11 @@ (incomplete) +

+ +(incomplete) + +

diff -ub -r -N cc65-2.13.3.orig/doc/index.sgml cc65-2.13.3/doc/index.sgml --- cc65-2.13.3.orig/doc/index.sgml 2010-03-07 13:24:29.000000000 +0100 +++ cc65-2.13.3/doc/index.sgml 2012-12-29 20:05:05.641384137 +0100 @@ -118,6 +118,9 @@ Topics specific to the Oric Atmos. + + Topics specific to the EC-65K. + Topics specific to the Commodore 128. diff -ub -r -N cc65-2.13.3.orig/doc/ld65.sgml cc65-2.13.3/doc/ld65.sgml --- cc65-2.13.3.orig/doc/ld65.sgml 2010-11-18 23:04:40.000000000 +0100 +++ cc65-2.13.3/doc/ld65.sgml 2012-12-29 20:05:05.642384137 +0100 @@ -166,6 +166,7 @@ cbm510 (CBM-II series with 40 column video) cbm610 (all CBM series-II computers with 80 column video) pet (all CBM PET systems except the 2001) + ec65k (EC-65K with DOS/65) geos lunix nes diff -ub -r -N cc65-2.13.3.orig/doc/library.sgml cc65-2.13.3/doc/library.sgml --- cc65-2.13.3.orig/doc/library.sgml 2008-03-26 09:39:36.000000000 +0100 +++ cc65-2.13.3/doc/library.sgml 2012-12-29 20:05:05.642384137 +0100 @@ -165,6 +165,7 @@ apple2enh atari atmos + EC-65K (with DOS/65) c16 (works also for the c116 with up to 32K memory) c64 c128 diff -ub -r -N cc65-2.13.3.orig/include/conio.h cc65-2.13.3/include/conio.h --- cc65-2.13.3.orig/include/conio.h 2007-08-21 15:16:53.000000000 +0200 +++ cc65-2.13.3/include/conio.h 2012-12-29 20:05:05.643384137 +0100 @@ -77,6 +77,8 @@ # include #elif defined(__NES__) # include +#elif defined(__EC65K__) +# include #endif diff -ub -r -N cc65-2.13.3.orig/include/dirent.h cc65-2.13.3/include/dirent.h --- cc65-2.13.3.orig/include/dirent.h 2012-02-05 19:41:59.000000000 +0100 +++ cc65-2.13.3/include/dirent.h 2012-12-29 20:05:05.643384137 +0100 @@ -79,6 +79,12 @@ char d_name[13]; /* 8.3 + trailing 0 */ }; +#elif defined(__EC65K__) + +struct dirent { + char d_name[13]; +}; + #else /* __APPLE2__ or __APPLE2ENH__ */ struct dirent { diff -ub -r -N cc65-2.13.3.orig/include/stdio.h cc65-2.13.3/include/stdio.h --- cc65-2.13.3.orig/include/stdio.h 2009-09-27 14:03:07.000000000 +0200 +++ cc65-2.13.3/include/stdio.h 2012-12-29 20:05:05.644384137 +0100 @@ -71,7 +71,7 @@ /* Standard defines that are platform dependent */ #if defined(__APPLE2__) || defined(__APPLE2ENH__) # define FILENAME_MAX (64+1) -#elif defined(__ATARI__) +#elif defined(__ATARI__) || defined(__EC65K__) # define FILENAME_MAX (12+1) #elif defined(__LUNIX__) # define FILENAME_MAX (80+1) diff -ub -r -N cc65-2.13.3.orig/include/time.h cc65-2.13.3/include/time.h --- cc65-2.13.3.orig/include/time.h 2012-02-06 21:20:18.000000000 +0100 +++ cc65-2.13.3/include/time.h 2012-12-29 20:05:05.645384137 +0100 @@ -99,6 +99,9 @@ #elif defined(__GEOS__) # define CLK_TCK 1 /* POSIX */ # define CLOCKS_PER_SEC 1 /* ANSI */ +#elif defined(__EC65K__) +# define CLK_TCK 64 /* POSIX */ +# define CLOCKS_PER_SEC 64 /* ANSI */ #elif defined(__LYNX__) /* The clock-rate depends on the video scan-rate; ** so, read it at run-time. */ diff -ub -r -N cc65-2.13.3.orig/libsrc/Makefile cc65-2.13.3/libsrc/Makefile --- cc65-2.13.3.orig/libsrc/Makefile 2009-09-22 23:43:57.000000000 +0200 +++ cc65-2.13.3/libsrc/Makefile 2012-12-29 20:05:05.645384137 +0100 @@ -24,6 +24,7 @@ cbm610 \ geos \ lynx \ + ec65k \ nes \ pet \ plus4 \ @@ -39,6 +40,18 @@ done #----------------------------------------------------------------------------- +# EC-65K + +ec65klib: + for i in ec65k common runtime conio dbg em serial zlib; do \ + $(MAKE) SYS=ec65k -C $$i || exit 1; \ + $(AR) a ec65k.lib $$i/*.o;\ + done + mv ec65k/crt0.o ec65k.o + cp ec65k/*.emd . + cp ec65k/*.ser . + +#----------------------------------------------------------------------------- # Apple ][ apple2lib: diff -ub -r -N cc65-2.13.3.orig/src/ca65/main.c cc65-2.13.3/src/ca65/main.c --- cc65-2.13.3.orig/src/ca65/main.c 2009-09-28 22:12:43.000000000 +0200 +++ cc65-2.13.3/src/ca65/main.c 2012-12-29 20:05:05.762384139 +0100 @@ -268,6 +268,10 @@ NewSymbol ("__LYNX__", 1); break; + case TGT_EC65K: + NewSymbol ("__EC65K__", 1); + break; + default: AbEnd ("Invalid target name: `%s'", Sys); diff -ub -r -N cc65-2.13.3.orig/src/cc65/main.c cc65-2.13.3/src/cc65/main.c --- cc65-2.13.3.orig/src/cc65/main.c 2009-09-28 22:12:43.000000000 +0200 +++ cc65-2.13.3/src/cc65/main.c 2012-12-29 20:05:05.763384139 +0100 @@ -230,6 +230,10 @@ DefineNumericMacro ("__LYNX__", 1); break; + case TGT_EC65K: + DefineNumericMacro ("__EC65K__", 1); + break; + default: AbEnd ("Unknown target system type %d", Target); } diff -ub -r -N cc65-2.13.3.orig/src/common/target.c cc65-2.13.3/src/common/target.c --- cc65-2.13.3.orig/src/common/target.c 2009-09-13 13:46:04.000000000 +0200 +++ cc65-2.13.3/src/common/target.c 2012-12-29 20:05:05.763384139 +0100 @@ -71,7 +71,8 @@ "atmos", "nes", "supervision", - "lynx" + "lynx", + "ec65k" }; @@ -98,6 +99,7 @@ CPU_6502, /* nes */ CPU_65SC02, /* supervision */ CPU_65C02, /* lynx */ + CPU_65C02, /* ec65k */ }; diff -ub -r -N cc65-2.13.3.orig/src/common/target.h cc65-2.13.3/src/common/target.h --- cc65-2.13.3.orig/src/common/target.h 2009-09-13 13:46:04.000000000 +0200 +++ cc65-2.13.3/src/common/target.h 2012-12-29 20:05:05.764384139 +0100 @@ -72,6 +72,7 @@ TGT_NES, TGT_SUPERVISION, TGT_LYNX, + TGT_EC65K, TGT_COUNT /* Number of target systems */ } target_t; diff -ub -r -N cc65-2.13.3.orig/src/common/tgttrans.c cc65-2.13.3/src/common/tgttrans.c --- cc65-2.13.3.orig/src/common/tgttrans.c 2009-09-13 13:46:04.000000000 +0200 +++ cc65-2.13.3/src/common/tgttrans.c 2012-12-29 20:05:05.764384139 +0100 @@ -161,6 +161,7 @@ case TGT_NES: memcpy (Tab, CTNone, sizeof (Tab)); break; case TGT_SUPERVISION: memcpy (Tab, CTNone, sizeof (Tab)); break; case TGT_LYNX: memcpy (Tab, CTNone, sizeof (Tab)); break; + case TGT_EC65K: memcpy (Tab, CTNone, sizeof (Tab)); break; default: AbEnd ("Internal error: Target system unknown (%d)", Target); } diff -ub -r -N cc65-2.13.3.orig/src/ld65/make/gcc.mak cc65-2.13.3/src/ld65/make/gcc.mak --- cc65-2.13.3.orig/src/ld65/make/gcc.mak 2010-11-07 12:36:26.000000000 +0100 +++ cc65-2.13.3/src/ld65/make/gcc.mak 2012-12-29 20:05:05.814384140 +0100 @@ -81,7 +81,8 @@ pet.inc \ plus4.inc \ supervision.inc \ - vic20.inc + vic20.inc \ + ec65k.inc LIBS = $(COMMON)/common.a @@ -182,4 +183,6 @@ vic20.inc: cfg/vic20.cfg @$(CVT) $< $@ CfgVic20 +ec65k.inc: cfg/ec65k.cfg + @$(CVT) $< $@ CfgEc65k diff -ub -r -N cc65-2.13.3.orig/src/ld65/tgtcfg.c cc65-2.13.3/src/ld65/tgtcfg.c --- cc65-2.13.3.orig/src/ld65/tgtcfg.c 2009-09-18 21:13:59.000000000 +0200 +++ cc65-2.13.3/src/ld65/tgtcfg.c 2012-12-29 20:05:05.815384140 +0100 @@ -69,6 +69,7 @@ #include "plus4.inc" #include "supervision.inc" #include "vic20.inc" +#include "ec65k.inc" @@ -100,6 +101,7 @@ { BINFMT_BINARY, CfgNES }, { BINFMT_BINARY, CfgSupervision }, { BINFMT_BINARY, CfgLynx }, + { BINFMT_BINARY, CfgEc65k }, };