]> git.sur5r.net Git - cc65/blobdiff - libsrc/c64/crt0.s
Merge pull request #283 from polluks/sp65
[cc65] / libsrc / c64 / crt0.s
index ea7867925f96fefaa971d941a10dfc5af9d2a9e7..7bd294ca75056fa550195bf6d1596dbd5c289d77 100644 (file)
@@ -34,7 +34,7 @@ Start:
         tsx
         stx     spsave          ; Save the system stack ptr
 
-; Save space by putting some of the start-up code in the INIT segment,
+; Save space by putting some of the start-up code in the ONCE segment,
 ; which can be re-used by the BSS segment, the heap and the C stack.
 
         jsr     init
@@ -79,7 +79,7 @@ L2:     lda     zpsave,x
 
 ; ------------------------------------------------------------------------
 
-.segment        "INIT"
+.segment        "ONCE"
 
 init:
 
@@ -93,8 +93,8 @@ L1:     lda     sp,x
 
 ; Set up the stack.
 
-        lda     #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
-        ldx     #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
+        lda     #<(__MAIN_START__ + __MAIN_SIZE__)
+        ldx     #>(__MAIN_START__ + __MAIN_SIZE__)
         sta     sp
         stx     sp+1            ; Set argument stack ptr
 
@@ -111,7 +111,7 @@ L1:     lda     sp,x
 ; ------------------------------------------------------------------------
 ; Data
 
-.segment        "INITBSS"
+.segment        "INIT"
 
 mmusave:.res    1
 spsave: .res    1