diff --git a/desktop/Makefile b/desktop/Makefile index fcd71fd..4a937e4 100644 --- a/desktop/Makefile +++ b/desktop/Makefile @@ -1,7 +1,7 @@ CC65 = ~/dev/cc65/bin CAFLAGS = --target apple2enh --list-bytes 0 -CCFLAGS = --config apple2-asm.cfg +CCFLAGS = --config asm.cfg TARGETS = s0_loader.built s123_aux.built s4_main1.built @@ -17,7 +17,7 @@ clean: %.o: %.s $(HEADERS) $(CC65)/ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $< -%.built: %.o +%.built: %.o asm.cfg $(CC65)/ld65 $(CCFLAGS) -o $@ $< check: diff --git a/desktop/asm.cfg b/desktop/asm.cfg new file mode 100644 index 0000000..8e5abef --- /dev/null +++ b/desktop/asm.cfg @@ -0,0 +1,19 @@ +# Configuration for assembler programs which don't need a special setup + +FEATURES { + STARTADDRESS: default = $0803; +} +MEMORY { + ZP: file = "", start = $0000, size = $00FF; + HEADER: file = %O, start = %S - 4, size = $0004; + MAIN: file = %O, define = yes, start = %S, size = $C000 - %S; + BSS: file = "", start = __MAIN_LAST__, size = $C000 - __MAIN_LAST__; +} +SEGMENTS { + ZEROPAGE: load = ZP, type = zp, optional = yes; + EXEHDR: load = HEADER, type = ro, optional = yes; + CODE: load = MAIN, type = rw; + RODATA: load = MAIN, type = ro, optional = yes; + DATA: load = MAIN, type = rw, optional = yes; + BSS: load = BSS, type = bss, optional = yes, define = yes; +}