]> git.sur5r.net Git - cc65/blobdiff - libsrc/nes/crt0.s
Use AX paradigm for stack initalization.
[cc65] / libsrc / nes / crt0.s
index de874d36306034f19e53b1915409b6bbb3ab83ab..4d258ff9ed4530ebd88ef0a671f0535f8dd33398 100644 (file)
@@ -100,9 +100,9 @@ start:
 ; Set up the stack.
 
         lda     #<(__SRAM_START__ + __SRAM_SIZE__)
+        ldx     #>(__SRAM_START__ + __SRAM_SIZE__)
         sta     sp
-        lda     #>(__SRAM_START__ + __SRAM_SIZE__)
-        sta     sp+1            ; Set argument stack ptr
+        stx     sp+1            ; Set argument stack ptr
 
 ; Call the module constructors.