]> git.sur5r.net Git - cc65/commitdiff
Added a file header
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 5 Jul 2002 21:11:16 +0000 (21:11 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 5 Jul 2002 21:11:16 +0000 (21:11 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1332 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/apple2/crt0.s
src/ld65/cfg/apple2.cfg

index d51c282a2968468dde5278020d7d9709f0d0f252..b1f801521c8dc94cda5d5c262337484e114910bf 100644 (file)
@@ -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
 
index c0bf96435497a9034352f838469b5f671939acf3..89ab2ef5486bbbd2ac877a8b670af926d9a5c153 100644 (file)
@@ -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;