]> git.sur5r.net Git - cc65/blobdiff - libsrc/atari5200/crt0.s
Use AX paradigm for stack initalization.
[cc65] / libsrc / atari5200 / crt0.s
index 7073bb2a72927154c8352ee520d87d3e1b114372..ee3d0de4f3cdaca88f26221b4742b3705d69925b 100644 (file)
@@ -27,9 +27,9 @@ start:
 ; Set up the stack.
 
         lda     #<(__RAM_START__ + __RAM_SIZE__ - __RESERVED_MEMORY__)
+        ldx     #>(__RAM_START__ + __RAM_SIZE__ - __RESERVED_MEMORY__)
         sta     sp
-        lda     #>(__RAM_START__ + __RAM_SIZE__ - __RESERVED_MEMORY__)
-        sta     sp+1            ; Set argument stack ptr
+        stx     sp+1            ; Set argument stack ptr
 
 ; Call the module constructors.