]> git.sur5r.net Git - cc65/blobdiff - libsrc/vic20/crt0.s
Fixed _textcolor definition.
[cc65] / libsrc / vic20 / crt0.s
index 7239711686ba0cdd8e05fe87a437b203ef3084f0..68ab3ed122f973018bb8431fc1b4dc4965c4b784 100644 (file)
@@ -8,7 +8,7 @@
         .import         zerobss, push0
         .import         callmain
         .import         RESTOR, BSOUT, CLRCH
-        .import         __RAM_START__, __RAM_SIZE__     ; Linker generated
+        .import         __MAIN_START__, __MAIN_SIZE__   ; Linker generated
         .import         __STACKSIZE__                   ; Linker generated
         .importzp       ST
 
@@ -44,10 +44,10 @@ L1:     lda     sp,x
         tsx
         stx     spsave          ; Save the system stack ptr
 
-        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.