]> git.sur5r.net Git - cc65/commitdiff
Added LOWCODE and STARTUP segments
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 22 Nov 2002 23:50:45 +0000 (23:50 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 22 Nov 2002 23:50:45 +0000 (23:50 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1600 b7a2c559-68d2-44c3-8de9-860c34a00d81

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

index 607f779be27cc49ce0a0c167a46daf9cac4e7fc4..92ef5bcf1b40347ef87e72bd89e63dc6e8818899 100644 (file)
@@ -1,4 +1,4 @@
-;
+;     
 ; Startup code for cc65 (C64 version)
 ;
 ; This must be the *first* file on the linker command line
        .include        "c64.inc"
 
 
-.code
+; ------------------------------------------------------------------------
+; Create an empty LOWCODE segment to avoid linker warnings
+
+.segment        "LOWCODE"
 
 ; ------------------------------------------------------------------------
+; Place the startup code in a special segment.
+
+.segment               "STARTUP"
+
 ; BASIC header with a SYS call
 
-       .org    $7FF
         .word   Head            ; Load address
 Head:   .word   @Next
         .word   1000            ; Line number
         .byte   $9E,"2061"      ; SYS 2061
         .byte   $00             ; End of BASIC line
 @Next:  .word   0               ; BASIC end marker
-       .reloc
 
 ; ------------------------------------------------------------------------
 ; Actual code
@@ -103,6 +108,9 @@ L2: lda     zpsave,x
        jmp     RESTOR
 
 
+; ------------------------------------------------------------------------
+; Data
+
 .data
 
 zpsave:        .res    zpspace
index 76babb39ebfa99bddb7fe351a42674c6d9b2fbed..d2a3495686158f0ea4a2a5654e41b605de00c3d6 100644 (file)
@@ -3,6 +3,8 @@ MEMORY {
     RAM: start = $7FF, size = $c801, define = yes, file = %O;
 }
 SEGMENTS {
+    STARTUP: load = RAM, type = wprot;
+    LOWCODE: load = RAM, type = wprot;
     CODE: load = RAM, type = wprot;
     RODATA: load = RAM, type = wprot;
     DATA: load = RAM, type = rw;