--- /dev/null
+SYMBOLS {
+ __STACKSIZE__: type = weak, value = $0400; # 1k stack
+}
+MEMORY {
+ ZP: file = "", define = yes, start = $0002, size = $001A;
+ LOADADDR: file = %O, start = $0FFF, size = $0002;
+ HEADER: file = %O, start = $1001, size = $000C;
+ RAM: file = %O, define = yes, start = $100D, size = $0DF3 - __STACKSIZE__;
+}
+SEGMENTS {
+ STARTUP: load = RAM, type = ro;
+ LOWCODE: load = RAM, type = ro, optional = yes;
+ INIT: load = RAM, type = ro, define = yes, optional = yes;
+ CODE: load = RAM, type = ro;
+ RODATA: load = RAM, type = ro;
+ DATA: load = RAM, type = rw;
+ ZPSAVE: load = RAM, type = bss;
+ BSS: load = RAM, type = bss, define = yes;
+ ZEROPAGE: load = ZP, type = zp;
+}
+FEATURES {
+ CONDES: type = constructor,
+ label = __CONSTRUCTOR_TABLE__,
+ count = __CONSTRUCTOR_COUNT__,
+ segment = INIT;
+ CONDES: type = destructor,
+ label = __DESTRUCTOR_TABLE__,
+ count = __DESTRUCTOR_COUNT__,
+ segment = RODATA;
+}
atari \
atarixl \
atmos \
+ c1p \
$(CBMS) \
$(GEOS) \
lynx \
--- /dev/null
+; ---------------------------------------------------------------------------
+; crt0.s
+; ---------------------------------------------------------------------------
+;
+; Startup code for Ohio Scientific Challenger 1P
+
+.export _init, _exit
+.import _main
+
+.export __STARTUP__ : absolute = 1 ; Mark as startup
+.import __RAM_START__, __RAM_SIZE__ ; Linker generated
+
+.import copydata, zerobss, initlib, donelib
+
+.include "zeropage.inc"
+
+; ---------------------------------------------------------------------------
+; Place the startup code in a special segment
+
+.segment "STARTUP"
+
+; ---------------------------------------------------------------------------
+; A little light 6502 housekeeping
+
+_init: LDX #$FF ; Initialize stack pointer to $01FF
+ TXS
+ CLD ; Clear decimal mode
+
+; ---------------------------------------------------------------------------
+; Set cc65 argument stack pointer
+
+ LDA #<(__RAM_START__ + __RAM_SIZE__)
+ STA sp
+ LDA #>(__RAM_START__ + __RAM_SIZE__)
+ STA sp+1
+
+; ---------------------------------------------------------------------------
+; Initialize memory storage
+
+ ; JSR zerobss ; Clear BSS segment
+ ; JSR copydata ; Initialize DATA segment
+ ; JSR initlib ; Run constructors
+
+; ---------------------------------------------------------------------------
+; Call main()
+
+ JSR _main
+
+; ---------------------------------------------------------------------------
+; Back from main (this is also the _exit entry): force a software break
+
+_exit: JSR donelib ; Run destructors
+ BRK
+
NewSymbol ("__SIM65C02__", 1);
break;
+ case TGT_C1P:
+ NewSymbol ("__OSIC1P__", 1);
+ break;
+
default:
AbEnd ("Invalid target name: `%s'", Sys);
DefineNumericMacro ("__SIM65C02__", 1);
break;
+ case TGT_C1P:
+ DefineNumericMacro ("__OSIC1P__", 1);
+ break;
+
default:
AbEnd ("Unknown target system type %d", Target);
}
};
/* Table that maps target names to ids. Sorted alphabetically for bsearch.
- * Allows mupltiple entries for one target id (target name aliases).
+ * Allows multiple entries for one target id (target name aliases).
*/
static const TargetEntry TargetMap[] = {
{ "apple2", TGT_APPLE2 },
{ "bbc", TGT_BBC },
{ "c128", TGT_C128 },
{ "c16", TGT_C16 },
+ { "c1p", TGT_C1P },
{ "c64", TGT_C64 },
{ "cbm510", TGT_CBM510 },
{ "cbm610", TGT_CBM610 },
{ "atarixl", CPU_6502, BINFMT_BINARY, CTAtari },
{ "vic20", CPU_6502, BINFMT_BINARY, CTPET },
{ "c16", CPU_6502, BINFMT_BINARY, CTPET },
+ { "c1p", CPU_6502, BINFMT_BINARY, CTNone },
{ "c64", CPU_6502, BINFMT_BINARY, CTPET },
{ "c128", CPU_6502, BINFMT_BINARY, CTPET },
{ "plus4", CPU_6502, BINFMT_BINARY, CTPET },
TGT_ATARIXL,
TGT_VIC20,
TGT_C16,
+ TGT_C1P,
TGT_C64,
TGT_C128,
TGT_PLUS4,