From: cuz Date: Mon, 3 Jun 2002 20:14:11 +0000 (+0000) Subject: New target: oric atmos X-Git-Tag: V2.12.0~2326 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=606ecafccdc54975c8b1c6751d6b1dba083e6854;p=cc65 New target: oric atmos git-svn-id: svn://svn.cc65.org/cc65/trunk@1296 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/main.c b/src/cc65/main.c index 1974aed3d..2ce1de144 100644 --- a/src/cc65/main.c +++ b/src/cc65/main.c @@ -193,6 +193,10 @@ static void SetSys (const char* Sys) DefineNumericMacro ("__LUNIX__", 1); break; + case TGT_ATMOS: + DefineNumericMacro ("__ATMOS__", 1); + break; + default: AbEnd ("Unknown target system type"); } diff --git a/src/common/target.c b/src/common/target.c index 6b059f30a..6c668a0fd 100644 --- a/src/common/target.c +++ b/src/common/target.c @@ -52,7 +52,7 @@ target_t Target = TGT_NONE; /* Table with target names */ const char* TargetNames [TGT_COUNT] = { - "none", + "none", "module", "atari", "c64", @@ -65,7 +65,8 @@ const char* TargetNames [TGT_COUNT] = { "bbc", "apple2", "geos", - "lunix" + "lunix", + "atmos" }; @@ -104,4 +105,5 @@ target_t FindTarget (const char* Name) - + + diff --git a/src/common/target.h b/src/common/target.h index 6153bc3b2..c14ad3b06 100644 --- a/src/common/target.h +++ b/src/common/target.h @@ -61,6 +61,7 @@ typedef enum { TGT_APPLE2, TGT_GEOS, TGT_LUNIX, + TGT_ATMOS, TGT_COUNT /* Number of target systems */ } target_t; @@ -91,4 +92,4 @@ target_t FindTarget (const char* Name); - + diff --git a/src/common/tgttrans.c b/src/common/tgttrans.c index beb113e17..57ad2dba1 100644 --- a/src/common/tgttrans.c +++ b/src/common/tgttrans.c @@ -154,6 +154,7 @@ void TgtTranslateInit (void) case TGT_APPLE2: memcpy (Tab, CTNone, sizeof (Tab)); break; case TGT_GEOS: memcpy (Tab, CTNone, sizeof (Tab)); break; case TGT_LUNIX: memcpy (Tab, CTNone, sizeof (Tab)); break; + case TGT_ATMOS: memcpy (Tab, CTNone, sizeof (Tab)); break; default: AbEnd ("Internal error: Target system unknown (%d)", Target); } @@ -214,4 +215,4 @@ void TgtTranslateSet (unsigned Index, unsigned char C) - + diff --git a/src/ld65/.cvsignore b/src/ld65/.cvsignore index eedb2aa72..1836e47b7 100644 --- a/src/ld65/.cvsignore +++ b/src/ld65/.cvsignore @@ -5,6 +5,7 @@ ld65 *.s apple2.inc atari.inc +atmos.inc bbc.inc c128.inc c64.inc diff --git a/src/ld65/cfg/atmos.cfg b/src/ld65/cfg/atmos.cfg new file mode 100644 index 000000000..f16198324 --- /dev/null +++ b/src/ld65/cfg/atmos.cfg @@ -0,0 +1,28 @@ +MEMORY { + ZP: start = $02, size = $1A, type = rw, define = yes; + RAM: start = $0600, size = $9200, define = yes, file = %O; +} +SEGMENTS { + CODE: load = RAM, type = wprot; + RODATA: load = RAM, type = wprot; + DATA: load = RAM, type = rw; + BSS: load = RAM, type = bss, define = yes; + ZEROPAGE: load = ZP, type = zp; +} +FEATURES { + CONDES: segment = RODATA, + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; +} +SYMBOLS { + __STACKSIZE__ = $800; # 2K stack +} + + + + diff --git a/src/ld65/make/gcc.mak b/src/ld65/make/gcc.mak index 1e8f0a68d..5960a1f63 100644 --- a/src/ld65/make/gcc.mak +++ b/src/ld65/make/gcc.mak @@ -48,6 +48,7 @@ OBJS = bin.o \ INCS = apple2.inc \ atari.inc \ + atmos.inc \ bbc.inc \ c64.inc \ c128.inc \ @@ -109,6 +110,9 @@ apple2.inc: cfg/apple2.cfg atari.inc: cfg/atari.cfg @$(CVT) $< $@ CfgAtari +atmos.inc: cfg/atmos.cfg + @$(CVT) $< $@ CfgAtmos + bbc.inc: cfg/bbc.cfg @$(CVT) $< $@ CfgBBC diff --git a/src/ld65/tgtcfg.c b/src/ld65/tgtcfg.c index 8dc10a816..12c4a024b 100644 --- a/src/ld65/tgtcfg.c +++ b/src/ld65/tgtcfg.c @@ -50,6 +50,7 @@ static const char CfgEmpty[] = ""; /* Actual target configurations, converted into C strings by a perl script */ #include "apple2.inc" #include "atari.inc" +#include "atmos.inc" #include "bbc.inc" #include "c128.inc" #include "c64.inc" @@ -75,6 +76,7 @@ const TargetDesc Targets [TGT_COUNT] = { { BINFMT_BINARY, CfgNone }, { BINFMT_O65, CfgModule }, { BINFMT_BINARY, CfgAtari }, + { BINFMT_BINARY, CfgAtmos }, { BINFMT_BINARY, CfgC64 }, { BINFMT_BINARY, CfgC128 }, { BINFMT_BINARY, CfgEmpty }, /* Ace */