From: cuz Date: Fri, 5 Jul 2002 21:11:16 +0000 (+0000) Subject: Added a file header X-Git-Tag: V2.12.0~2292 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=750f5e5028231b3da7e3245af532c60efc11d11f;p=cc65 Added a file header git-svn-id: svn://svn.cc65.org/cc65/trunk@1332 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/apple2/crt0.s b/libsrc/apple2/crt0.s index d51c282a2..b1f801521 100644 --- a/libsrc/apple2/crt0.s +++ b/libsrc/apple2/crt0.s @@ -7,11 +7,20 @@ .export _exit .import initlib, donelib .import zerobss, push0 + .import __CODE_LOAD__, __BSS_LOAD__ ; Linker generated .import _main .include "zeropage.inc" .include "apple2.inc" +; ------------------------------------------------------------------------ +; The executable header + +.segment "EXEHDR" + + .word __CODE_LOAD__ ; Start address + .word __BSS_LOAD__ - __CODE_LOAD__ ; Size + ; ------------------------------------------------------------------------ ; Actual code diff --git a/src/ld65/cfg/apple2.cfg b/src/ld65/cfg/apple2.cfg index c0bf96435..89ab2ef54 100644 --- a/src/ld65/cfg/apple2.cfg +++ b/src/ld65/cfg/apple2.cfg @@ -1,9 +1,11 @@ MEMORY { ZP: start = $00, size = $1A, type = rw, define = yes; + HEADER: start = $0000, size = $4, file = %O; RAM: start = $800, size = $8E00, file = %O; } SEGMENTS { - CODE: load = RAM, type = ro; + EXEHDR: load = HEADER, type = ro; + CODE: load = RAM, type = ro, define = yes; RODATA: load = RAM, type = ro; DATA: load = RAM, type = rw; BSS: load = RAM, type = bss, define = yes;