From: cuz Date: Sun, 4 May 2003 22:34:16 +0000 (+0000) Subject: Replaced the incsp functions by faster (but slightly larger) versions X-Git-Tag: V2.12.0~1569 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1cdb90926ae3ae56359ac2f610a9c330502a2022;p=cc65 Replaced the incsp functions by faster (but slightly larger) versions git-svn-id: svn://svn.cc65.org/cc65/trunk@2146 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/runtime/incsp3.s b/libsrc/runtime/incsp3.s index 90dca0b96..6c91bfceb 100644 --- a/libsrc/runtime/incsp3.s +++ b/libsrc/runtime/incsp3.s @@ -1,20 +1,23 @@ ; -; Ullrich von Bassewitz, 25.10.2000 +; Ullrich von Bassewitz, 2003-05-04 ; ; CC65 runtime: Increment the stackpointer by 3 ; .export incsp3 - .import addysp + .importzp sp .proc incsp3 - ldy #3 - jmp addysp - -.endproc - + lda sp + clc + adc #3 + sta sp + bcs @L1 + rts +@L1: inc sp+1 + rts +.endproc - diff --git a/libsrc/runtime/incsp4.s b/libsrc/runtime/incsp4.s index 125c533e7..0d320fdf2 100644 --- a/libsrc/runtime/incsp4.s +++ b/libsrc/runtime/incsp4.s @@ -1,20 +1,23 @@ ; -; Ullrich von Bassewitz, 25.10.2000 +; Ullrich von Bassewitz, 2003-05-04 ; ; CC65 runtime: Increment the stackpointer by 4 ; .export incsp4 - .import addysp + .importzp sp .proc incsp4 - ldy #4 - jmp addysp - -.endproc - + lda sp + clc + adc #4 + sta sp + bcs @L1 + rts +@L1: inc sp+1 + rts +.endproc - diff --git a/libsrc/runtime/incsp5.s b/libsrc/runtime/incsp5.s index df239cf21..963c0b3aa 100644 --- a/libsrc/runtime/incsp5.s +++ b/libsrc/runtime/incsp5.s @@ -1,20 +1,24 @@ ; -; Ullrich von Bassewitz, 25.10.2000 +; Ullrich von Bassewitz, 2003-05-04 ; ; CC65 runtime: Increment the stackpointer by 5 ; .export incsp5 - .import addysp + .importzp sp .proc incsp5 - ldy #5 - jmp addysp - -.endproc - + lda sp + clc + adc #5 + sta sp + bcs @L1 + rts +@L1: inc sp+1 + rts +.endproc - + diff --git a/libsrc/runtime/incsp6.s b/libsrc/runtime/incsp6.s index a7ab932dd..5221138fc 100644 --- a/libsrc/runtime/incsp6.s +++ b/libsrc/runtime/incsp6.s @@ -1,20 +1,24 @@ ; -; Ullrich von Bassewitz, 25.10.2000 +; Ullrich von Bassewitz, 2003-05-04 ; ; CC65 runtime: Increment the stackpointer by 6 ; .export incsp6 - .import addysp + .importzp sp .proc incsp6 - ldy #6 - jmp addysp - -.endproc - + lda sp + clc + adc #6 + sta sp + bcs @L1 + rts +@L1: inc sp+1 + rts +.endproc - + diff --git a/libsrc/runtime/incsp7.s b/libsrc/runtime/incsp7.s index 417700fe9..48fc91a69 100644 --- a/libsrc/runtime/incsp7.s +++ b/libsrc/runtime/incsp7.s @@ -1,20 +1,24 @@ ; -; Ullrich von Bassewitz, 25.10.2000 +; Ullrich von Bassewitz, 2003-05-04 ; ; CC65 runtime: Increment the stackpointer by 7 ; .export incsp7 - .import addysp + .importzp sp .proc incsp7 - ldy #7 - jmp addysp - -.endproc - + lda sp + clc + adc #7 + sta sp + bcs @L1 + rts +@L1: inc sp+1 + rts +.endproc - + diff --git a/libsrc/runtime/incsp8.s b/libsrc/runtime/incsp8.s index 3ec15202e..9baf5185c 100644 --- a/libsrc/runtime/incsp8.s +++ b/libsrc/runtime/incsp8.s @@ -1,17 +1,24 @@ ; -; Ullrich von Bassewitz, 25.10.2000 +; Ullrich von Bassewitz, 2003-05-04 ; ; CC65 runtime: Increment the stackpointer by 8 ; .export incsp8 - .import addysp + .importzp sp .proc incsp8 - ldy #8 - jmp addysp + lda sp + clc + adc #8 + sta sp + bcs @L1 + rts -.endproc +@L1: inc sp+1 + rts +.endproc +