]> git.sur5r.net Git - cc65/blobdiff - libsrc/c128/crt0.s
Fixed gcc compiler warning (#867)
[cc65] / libsrc / c128 / crt0.s
index 5891bacf391b61d5df2a247da976cc6976c9d5f1..ba6a78ac57aaa09634e344c016bec312594bb674 100644 (file)
@@ -8,7 +8,7 @@
         .import         zerobss
         .import         push0, callmain
         .import         RESTOR, BSOUT, CLRCH
-        .import         __RAM_START__, __RAM_SIZE__, __STACKSIZE__
+        .import         __MAIN_START__, __MAIN_SIZE__, __STACKSIZE__
         .importzp       ST
 
         .include        "zeropage.inc"
@@ -56,10 +56,10 @@ L1:     lda     sp,x
         tsx
         stx     spsave          ; Save the system stack pointer
 
-        lda     #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
+        lda     #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
+        ldx     #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
         sta     sp
-        lda     #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
-        sta     sp+1            ; Set argument stack ptr
+        stx     sp+1            ; Set argument stack ptr
 
 ; Call the module constructors.