;
-; 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
-
;
-; 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
-
;
-; 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
-
+
;
-; 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
-
+
;
-; 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
-
+
;
-; 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
+