]> git.sur5r.net Git - cc65/commitdiff
Now that we reduce the size of the RAM memory area by the stacksize in the linker...
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 2 Oct 2010 10:37:20 +0000 (10:37 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 2 Oct 2010 10:37:20 +0000 (10:37 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4822 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atmos/crt0.s
libsrc/c128/crt0.s
libsrc/c64/crt0.s
libsrc/geos/devel/crt0.s
libsrc/lynx/crt0.s
libsrc/vic20/crt0.s

index 4fe9d5cbc1b913e61b01734d9390556d2ff2000a..1f561cfe6c126b05e84aa00d8b52ec180c4d3d7a 100644 (file)
@@ -8,7 +8,8 @@
         .export         __STARTUP__ : absolute = 1      ; Mark as startup
        .import         initlib, donelib
        .import         callmain, zerobss
-               .import         __RAM_START__, __RAM_SIZE__, __BSS_LOAD__
+               .import         __RAM_START__, __RAM_SIZE__
+               .import         __BSS_LOAD__, __STACKSIZE__
 
         .include        "zeropage.inc"
         .include        "atmos.inc"
@@ -60,9 +61,9 @@ L1:   lda     sp,x
                tsx
                stx     spsave          ; save system stk ptr
 
-       lda     #<(__RAM_START__ + __RAM_SIZE__)
+       lda     #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
        sta     sp
-       lda     #>(__RAM_START__ + __RAM_SIZE__)
+       lda     #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
                sta     sp+1            ; Set argument stack ptr
 
 ; Call module constructors
index f5ba7b9abcfd9d0b48e06f10ec54dac80e520d6e..be478e3688c1fe3fe1ff0ad1fd6aa977f35f8428 100644 (file)
@@ -9,7 +9,7 @@
        .import         push0, callmain
         .import         RESTOR, BSOUT, CLRCH
        .import         __INTERRUPTOR_COUNT__
-       .import         __RAM_START__, __RAM_SIZE__
+       .import         __RAM_START__, __RAM_SIZE__, __STACKSIZE__
 
         .include        "zeropage.inc"
        .include        "c128.inc"
@@ -77,9 +77,9 @@ L1:           lda     sp,x
                tsx
                stx     spsave          ; Save the system stack pointer
 
-       lda     #<(__RAM_START__ + __RAM_SIZE__)
+       lda     #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
        sta     sp
-       lda     #>(__RAM_START__ + __RAM_SIZE__)
+       lda     #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
                sta     sp+1            ; Set argument stack ptr
 
 ; If we have IRQ functions, chain our stub into the IRQ vector
index a533d7568383f46da9b199404867a804f108d4eb..ffeebd8345b6c3aba0d7dc9956409753c400bb85 100644 (file)
@@ -10,6 +10,7 @@
         .import         RESTOR, BSOUT, CLRCH
        .import         __INTERRUPTOR_COUNT__
        .import         __RAM_START__, __RAM_SIZE__     ; Linker generated
+       .import         __STACKSIZE__                   ; Linker generated
 
         .include        "zeropage.inc"
        .include        "c64.inc"
@@ -71,9 +72,9 @@ L1:   lda     sp,x
                tsx
                stx     spsave          ; Save the system stack ptr
 
-       lda     #<(__RAM_START__ + __RAM_SIZE__)
+       lda     #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
        sta     sp
-       lda     #>(__RAM_START__ + __RAM_SIZE__)
+       lda     #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
                sta     sp+1            ; Set argument stack ptr
 
 ; If we have IRQ functions, chain our stub into the IRQ vector
index 6d85a963107cb3d2f1cb154df3b7940b30290eb8..fb0289a4c989d65eff2c470b738f41ec3b774e09 100644 (file)
@@ -8,6 +8,7 @@
         .export         __STARTUP__ : absolute = 1      ; Mark as startup
 
        .import         __RAM_START__, __RAM_SIZE__     ; Linker generated
+       .import         __STACKSIZE__                   ; Linker generated
        .import         initlib, donelib
        .import         callmain
        .import         zerobss
@@ -25,9 +26,9 @@
 
 ; Setup stack
 
-       lda     #<(__RAM_START__ + __RAM_SIZE__)
+       lda     #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
        sta     sp
-       lda     #>(__RAM_START__ + __RAM_SIZE__)
+       lda     #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
                sta     sp+1            ; Set argument stack ptr
 
 ; Call module constructors
index a49902c4aea63c986891677169b7345d37451b73..397d85bb35ec1ce739e7fb562d012166b1091110 100644 (file)
@@ -25,7 +25,7 @@
        .import         _main
        .import         __BSS_LOAD__
        .import         __INTERRUPTOR_COUNT__
-       .import         __RAM_START__, __RAM_SIZE__
+       .import         __RAM_START__, __RAM_SIZE__, __STACKSIZE__
 
        .include        "zeropage.inc"
         .include        "extzp.inc"
@@ -94,9 +94,9 @@ MikeyInitData:  .byte $9e,$18,$68,$1f,$00,$00,$00,$00,$00,$ff,$1a,$1b,$04,$0d,$2
 
 ; setup the stack
 
-       lda     #<(__RAM_START__ + __RAM_SIZE__)
+       lda     #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
        sta     sp
-       lda     #>(__RAM_START__ + __RAM_SIZE__)
+       lda     #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
        sta     sp+1
 
 ; Init Mickey
index 9c8a53be80754855f240562e9a9887251bec9125..4b1673780c27d79e54bf08eb974a5dcbb3a83511 100644 (file)
@@ -10,6 +10,7 @@
         .import         RESTOR, BSOUT, CLRCH
        .import         __INTERRUPTOR_COUNT__
        .import         __RAM_START__, __RAM_SIZE__     ; Linker generated
+        .import                __STACKSIZE__                   ; Linker generated
 
         .include        "zeropage.inc"
        .include        "vic20.inc"
@@ -59,9 +60,9 @@ L1:   lda     sp,x
                tsx
                stx     spsave          ; Save the system stack ptr
 
-       lda     #<(__RAM_START__ + __RAM_SIZE__)
+       lda     #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
        sta     sp
-       lda     #>(__RAM_START__ + __RAM_SIZE__)
+       lda     #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__)
                sta     sp+1            ; Set argument stack ptr
 
 ; If we have IRQ functions, chain our stub into the IRQ vector