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
This commit is contained in:
cuz
2003-05-04 22:34:16 +00:00
parent cfe7a8c246
commit 1cdb90926a
6 changed files with 70 additions and 45 deletions

View File

@@ -1,20 +1,23 @@
; ;
; Ullrich von Bassewitz, 25.10.2000 ; Ullrich von Bassewitz, 2003-05-04
; ;
; CC65 runtime: Increment the stackpointer by 3 ; CC65 runtime: Increment the stackpointer by 3
; ;
.export incsp3 .export incsp3
.import addysp .importzp sp
.proc incsp3 .proc incsp3
ldy #3 lda sp
jmp addysp clc
adc #3
sta sp
bcs @L1
rts
@L1: inc sp+1
rts
.endproc .endproc

View File

@@ -1,20 +1,23 @@
; ;
; Ullrich von Bassewitz, 25.10.2000 ; Ullrich von Bassewitz, 2003-05-04
; ;
; CC65 runtime: Increment the stackpointer by 4 ; CC65 runtime: Increment the stackpointer by 4
; ;
.export incsp4 .export incsp4
.import addysp .importzp sp
.proc incsp4 .proc incsp4
ldy #4 lda sp
jmp addysp clc
adc #4
sta sp
bcs @L1
rts
@L1: inc sp+1
rts
.endproc .endproc

View File

@@ -1,20 +1,24 @@
; ;
; Ullrich von Bassewitz, 25.10.2000 ; Ullrich von Bassewitz, 2003-05-04
; ;
; CC65 runtime: Increment the stackpointer by 5 ; CC65 runtime: Increment the stackpointer by 5
; ;
.export incsp5 .export incsp5
.import addysp .importzp sp
.proc incsp5 .proc incsp5
ldy #5 lda sp
jmp addysp clc
adc #5
sta sp
bcs @L1
rts
@L1: inc sp+1
rts
.endproc .endproc

View File

@@ -1,20 +1,24 @@
; ;
; Ullrich von Bassewitz, 25.10.2000 ; Ullrich von Bassewitz, 2003-05-04
; ;
; CC65 runtime: Increment the stackpointer by 6 ; CC65 runtime: Increment the stackpointer by 6
; ;
.export incsp6 .export incsp6
.import addysp .importzp sp
.proc incsp6 .proc incsp6
ldy #6 lda sp
jmp addysp clc
adc #6
sta sp
bcs @L1
rts
@L1: inc sp+1
rts
.endproc .endproc

View File

@@ -1,20 +1,24 @@
; ;
; Ullrich von Bassewitz, 25.10.2000 ; Ullrich von Bassewitz, 2003-05-04
; ;
; CC65 runtime: Increment the stackpointer by 7 ; CC65 runtime: Increment the stackpointer by 7
; ;
.export incsp7 .export incsp7
.import addysp .importzp sp
.proc incsp7 .proc incsp7
ldy #7 lda sp
jmp addysp clc
adc #7
sta sp
bcs @L1
rts
@L1: inc sp+1
rts
.endproc .endproc

View File

@@ -1,17 +1,24 @@
; ;
; Ullrich von Bassewitz, 25.10.2000 ; Ullrich von Bassewitz, 2003-05-04
; ;
; CC65 runtime: Increment the stackpointer by 8 ; CC65 runtime: Increment the stackpointer by 8
; ;
.export incsp8 .export incsp8
.import addysp .importzp sp
.proc incsp8 .proc incsp8
ldy #8 lda sp
jmp addysp clc
adc #8
sta sp
bcs @L1
rts
@L1: inc sp+1
rts
.endproc .endproc