]> git.sur5r.net Git - cc65/commitdiff
Moved Apple EXEHDR to separate module (similiar to CBMs).
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 10 Jun 2012 21:05:51 +0000 (21:05 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 10 Jun 2012 21:05:51 +0000 (21:05 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5708 b7a2c559-68d2-44c3-8de9-860c34a00d81

14 files changed:
libsrc/apple2/Makefile
libsrc/apple2/crt0.s
libsrc/apple2/exehdr.s [new file with mode: 0644]
libsrc/apple2enh/Makefile
src/ld65/cfg/apple2-dos33.cfg
src/ld65/cfg/apple2-loader.cfg
src/ld65/cfg/apple2-reboot.cfg
src/ld65/cfg/apple2-system.cfg
src/ld65/cfg/apple2.cfg
src/ld65/cfg/apple2enh-dos33.cfg
src/ld65/cfg/apple2enh-loader.cfg
src/ld65/cfg/apple2enh-reboot.cfg
src/ld65/cfg/apple2enh-system.cfg
src/ld65/cfg/apple2enh.cfg

index 242893d1eaeaa7c041818aeb1d7e5ccc0224ee98..9b0a4938e5f575a71d9a451645f48237f1359706 100644 (file)
@@ -72,6 +72,7 @@ S_OBJS=       _scrsize.o      \
        dosdetect.o     \
        drives.o        \
        exec.o          \
+       exehdr.o        \
        filedes.o       \
        filename.o      \
         get_ostype.o    \
index 83daf07406fcb4563b15243d23a77f8961666f72..9bc8ac68ba12de974af1abeb56c5770e31dceb90 100644 (file)
@@ -1,33 +1,22 @@
 ;
-; Oliver Schmidt, 15.09.2009
+; Oliver Schmidt, 2009-09-15
 ;
 ; Startup code for cc65 (Apple2 version)
 ;
 
         .export         _exit, done, return
-        .export         __STARTUP__ : absolute = 1      ; Mark as startup
+        .export         __STARTUP__ : absolute = 1     ; Mark as startup
         .import         zerobss
         .import        initlib, donelib
         .import        callmain, callirq
-        .import                __RAM_START__ , __RAM_LAST__    ; Linker generated
-        .import         __MOVE_START__, __MOVE_LAST__  ; Linker generated
-        .import         __LC_START__  , __LC_LAST__    ; Linker generated
-        .import                __ZPSAVE_RUN__, __INIT_SIZE__   ; Linker generated
+        .import                __RAM_LAST__, __ZPSAVE_RUN__    ; Linker generated
+        .import         __LC_START__, __LC_LAST__      ; Linker generated
+        .import                __INIT_SIZE__                   ; Linker generated
         .import                __INTERRUPTOR_COUNT__           ; Linker generated
 
         .include        "zeropage.inc"
         .include        "apple2.inc"
 
-        .linecont      +
-
-; ------------------------------------------------------------------------
-
-        .segment        "EXEHDR"
-
-        .addr           __RAM_START__                  ; Start address
-        .word           __ZPSAVE_RUN__ - __RAM_START__ + \
-                       __MOVE_LAST__  - __MOVE_START__ ; Size
-
 ; ------------------------------------------------------------------------
 
         .segment        "STARTUP"
diff --git a/libsrc/apple2/exehdr.s b/libsrc/apple2/exehdr.s
new file mode 100644 (file)
index 0000000..5ebd6f7
--- /dev/null
@@ -0,0 +1,20 @@
+;
+; Oliver Schmidt, 2012-06-10
+;
+; This module supplies a 4 byte DOS 3.3 header
+; containing the load address and load length.
+;
+
+        .export         __EXEHDR__ : absolute = 1      ; Linker referenced
+        .import                __RAM_START__, __ZPSAVE_RUN__   ; Linker generated
+        .import         __MOVE_START__, __MOVE_LAST__  ; Linker generated
+
+        .linecont      +
+
+; ------------------------------------------------------------------------
+
+        .segment        "EXEHDR"
+
+        .addr           __RAM_START__                  ; Start address
+        .word           __ZPSAVE_RUN__ - __RAM_START__ + \
+                       __MOVE_LAST__  - __MOVE_START__ ; Size
index 746bc1bc555429f1b186f7be69afffc8813f70ba..4d984901ffe6856b48d6ee1ba2ba1aaee392f8c7 100644 (file)
@@ -75,6 +75,7 @@ S_OBJS=       _scrsize.o      \
        dosdetect.o     \
        drives.o        \
        exec.o          \
+       exehdr.o        \
        filedes.o       \
        filename.o      \
         get_ostype.o    \
index a8155e492c6eaaef93ba12062b2900263ba50ade..091406e5c17cbbfe1069f96a228b4c72493f307d 100644 (file)
@@ -4,6 +4,7 @@ FEATURES {
     STARTADDRESS: default = $0803;
 }
 SYMBOLS {
+    __EXEHDR__:    type = import;
     __STACKSIZE__: type = weak, value = $0800; # 2k stack
 }
 MEMORY {
index c1eb81fd4f1584577abb0d7076bc4943e5deac19..68556a277bfd484b6f17a39ea42828c2975b7222 100644 (file)
@@ -4,6 +4,7 @@ FEATURES {
     STARTADDRESS: default = $0800;
 }
 SYMBOLS {
+    __EXEHDR__:    type = import;
     __STACKSIZE__: type = weak, value = $0800; # 2k stack
 }
 MEMORY {
index e24eff04a3776ae32af235eaeb3a5cec0ae85e90..82b2ea59b28eeeaaa5fae6333e5a81ece38dfa7d 100644 (file)
@@ -5,6 +5,7 @@ FEATURES {
     STARTADDRESS: default = $0800;
 }
 SYMBOLS {
+    __EXEHDR__:    type = import;
     __STACKSIZE__: type = weak, value = $0800; # 2k stack
 }
 MEMORY {
index f888f3bcb2c1c1e9a1e3383c0c71824c09af5870..187cc7907d9c920076fb1b4f8069e5d1d1b5fb87 100644 (file)
@@ -1,6 +1,7 @@
 # Configuration for ProDOS 8 system programs (without the header)
 
 SYMBOLS {
+    __EXEHDR__:    type = import;
     __STACKSIZE__: type = weak, value = $0800; # 2k stack
 }
 MEMORY {
index 64a1b4f6331a5a6e105652ecbc6c6bf83b0e1a73..00d61564428a6d52c17cf13b5ee91a22ed770a22 100644 (file)
@@ -4,6 +4,7 @@ FEATURES {
     STARTADDRESS: default = $0803;
 }
 SYMBOLS {
+    __EXEHDR__:    type = import;
     __STACKSIZE__: type = weak, value = $0800; # 2k stack
 }
 MEMORY {
index a8155e492c6eaaef93ba12062b2900263ba50ade..091406e5c17cbbfe1069f96a228b4c72493f307d 100644 (file)
@@ -4,6 +4,7 @@ FEATURES {
     STARTADDRESS: default = $0803;
 }
 SYMBOLS {
+    __EXEHDR__:    type = import;
     __STACKSIZE__: type = weak, value = $0800; # 2k stack
 }
 MEMORY {
index c1eb81fd4f1584577abb0d7076bc4943e5deac19..68556a277bfd484b6f17a39ea42828c2975b7222 100644 (file)
@@ -4,6 +4,7 @@ FEATURES {
     STARTADDRESS: default = $0800;
 }
 SYMBOLS {
+    __EXEHDR__:    type = import;
     __STACKSIZE__: type = weak, value = $0800; # 2k stack
 }
 MEMORY {
index e24eff04a3776ae32af235eaeb3a5cec0ae85e90..82b2ea59b28eeeaaa5fae6333e5a81ece38dfa7d 100644 (file)
@@ -5,6 +5,7 @@ FEATURES {
     STARTADDRESS: default = $0800;
 }
 SYMBOLS {
+    __EXEHDR__:    type = import;
     __STACKSIZE__: type = weak, value = $0800; # 2k stack
 }
 MEMORY {
index f888f3bcb2c1c1e9a1e3383c0c71824c09af5870..187cc7907d9c920076fb1b4f8069e5d1d1b5fb87 100644 (file)
@@ -1,6 +1,7 @@
 # Configuration for ProDOS 8 system programs (without the header)
 
 SYMBOLS {
+    __EXEHDR__:    type = import;
     __STACKSIZE__: type = weak, value = $0800; # 2k stack
 }
 MEMORY {
index 64a1b4f6331a5a6e105652ecbc6c6bf83b0e1a73..00d61564428a6d52c17cf13b5ee91a22ed770a22 100644 (file)
@@ -4,6 +4,7 @@ FEATURES {
     STARTADDRESS: default = $0803;
 }
 SYMBOLS {
+    __EXEHDR__:    type = import;
     __STACKSIZE__: type = weak, value = $0800; # 2k stack
 }
 MEMORY {