From: cuz Date: Tue, 31 Oct 2000 18:42:47 +0000 (+0000) Subject: Splitted the dec and inc modules into smaller ones X-Git-Tag: V2.12.0~3107 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e2c2f872c0fecdd1d3b40c5585a9c211160e1c55;p=cc65 Splitted the dec and inc modules into smaller ones git-svn-id: svn://svn.cc65.org/cc65/trunk@419 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/runtime/Makefile b/libsrc/runtime/Makefile index a9d5e2853..7ed299804 100644 --- a/libsrc/runtime/Makefile +++ b/libsrc/runtime/Makefile @@ -33,7 +33,9 @@ OBJS = add.o \ bpushbsp.o \ call.o \ compl.o \ - dec.o \ + decax1.o \ + decax2.o \ + decaxy.o \ decsp1.o \ decsp2.o \ decsp3.o \ @@ -48,7 +50,14 @@ OBJS = add.o \ ge.o \ gt.o \ icmp.o \ - inc.o \ + incax1.o \ + incax2.o \ + incax3.o \ + incax5.o \ + incax6.o \ + incax7.o \ + incax8.o \ + incaxy.o \ incsp1.o \ incsp2.o \ incsp3.o \ diff --git a/libsrc/runtime/dec.s b/libsrc/runtime/dec.s deleted file mode 100644 index 784e73f06..000000000 --- a/libsrc/runtime/dec.s +++ /dev/null @@ -1,31 +0,0 @@ -; -; Ullrich von Bassewitz, 29.12.1999 -; -; CC65 runtime: Decrement ax by constant or value in Y -; - - .export decaxy - .export decax2, decax1 - .importzp tmp1 - - -decaxy: sty tmp1 - sec - sbc tmp1 - bcs *+3 - dex - rts - -decax2: sec - sbc #2 - bcs *+3 - dex - rts - -decax1: sec - sbc #1 - bcs *+3 - dex - rts - - diff --git a/libsrc/runtime/decax1.s b/libsrc/runtime/decax1.s new file mode 100644 index 000000000..7c6891a96 --- /dev/null +++ b/libsrc/runtime/decax1.s @@ -0,0 +1,18 @@ +; +; Ullrich von Bassewitz, 29.12.1999 +; +; CC65 runtime: Decrement ax by 1 +; + + .export decax1 + + .macpack generic + +.proc decax1 + + sub #1 + bcs @L9 + dex +@L9: rts + +.endproc diff --git a/libsrc/runtime/decax2.s b/libsrc/runtime/decax2.s new file mode 100644 index 000000000..f117063b6 --- /dev/null +++ b/libsrc/runtime/decax2.s @@ -0,0 +1,18 @@ +; +; Ullrich von Bassewitz, 29.12.1999 +; +; CC65 runtime: Decrement ax by 2 +; + + .export decax2 + + .macpack generic + +.proc decax2 + + sub #2 + bcs @L9 + dex +@L9: rts + +.endproc diff --git a/libsrc/runtime/decaxy.s b/libsrc/runtime/decaxy.s new file mode 100644 index 000000000..ec2b9c784 --- /dev/null +++ b/libsrc/runtime/decaxy.s @@ -0,0 +1,21 @@ +; +; Ullrich von Bassewitz, 29.12.1999 +; +; CC65 runtime: Decrement ax by value in Y +; + + .export decaxy + .importzp tmp1 + + .macpack generic + +.proc decaxy + + sty tmp1 + sub tmp1 + bcs @L9 + dex +@L9: rts + +.endproc + diff --git a/libsrc/runtime/inc.s b/libsrc/runtime/inc.s deleted file mode 100644 index 043d27d3b..000000000 --- a/libsrc/runtime/inc.s +++ /dev/null @@ -1,48 +0,0 @@ -; -; Ullrich von Bassewitz, 05.08.1998 -; -; CC65 runtime: Increment ax by constant or value in Y -; - - .export incaxy - .export incax8, incax7, incax6, incax5 - .export incax4, incax3, incax2, incax1 - .importzp tmp1 - - -incax8: ldy #8 - bne incaxy - -incax7: ldy #7 - bne incaxy - -incax6: ldy #6 - bne incaxy - -incax5: ldy #5 - bne incaxy - -incax4: ldy #4 - bne incaxy - -incax3: ldy #3 -; bne incaxy -incaxy: sty tmp1 - clc - adc tmp1 - bcc *+3 - inx - rts - -incax2: clc - adc #2 - bcc *+3 - inx - rts - -incax1: clc - adc #1 - bcc *+3 - inx - rts - diff --git a/libsrc/runtime/incax1.s b/libsrc/runtime/incax1.s new file mode 100644 index 000000000..c86cfb96b --- /dev/null +++ b/libsrc/runtime/incax1.s @@ -0,0 +1,18 @@ +; +; Ullrich von Bassewitz, 05.08.1998 +; +; CC65 runtime: Increment ax by 1 +; + + .export incax1 + + .macpack generic + +.proc incax1 + + add #1 + bcc @L9 + inx +@L9: rts + +.endproc diff --git a/libsrc/runtime/incax2.s b/libsrc/runtime/incax2.s new file mode 100644 index 000000000..9525171cc --- /dev/null +++ b/libsrc/runtime/incax2.s @@ -0,0 +1,18 @@ +; +; Ullrich von Bassewitz, 05.08.1998 +; +; CC65 runtime: Increment ax by 2 +; + + .export incax2 + + .macpack generic + +.proc incax2 + + add #2 + bcc @L9 + inx +@L9: rts + +.endproc diff --git a/libsrc/runtime/incax3.s b/libsrc/runtime/incax3.s new file mode 100644 index 000000000..ecbe9300e --- /dev/null +++ b/libsrc/runtime/incax3.s @@ -0,0 +1,16 @@ +; +; Ullrich von Bassewitz, 05.08.1998 +; +; CC65 runtime: Increment ax by 3 +; + + .export incax3 + .import incaxy + +.proc incax3 + + lda #3 + jmp incaxy + +.endproc + diff --git a/libsrc/runtime/incax5.s b/libsrc/runtime/incax5.s new file mode 100644 index 000000000..61f1c9346 --- /dev/null +++ b/libsrc/runtime/incax5.s @@ -0,0 +1,16 @@ +; +; Ullrich von Bassewitz, 05.08.1998 +; +; CC65 runtime: Increment ax by 5 +; + + .export incax5 + .import incaxy + +.proc incax5 + + lda #5 + jmp incaxy + +.endproc + diff --git a/libsrc/runtime/incax6.s b/libsrc/runtime/incax6.s new file mode 100644 index 000000000..5edd5f0b2 --- /dev/null +++ b/libsrc/runtime/incax6.s @@ -0,0 +1,16 @@ +; +; Ullrich von Bassewitz, 05.08.1998 +; +; CC65 runtime: Increment ax by 6 +; + + .export incax6 + .import incaxy + +.proc incax6 + + lda #6 + jmp incaxy + +.endproc + diff --git a/libsrc/runtime/incax7.s b/libsrc/runtime/incax7.s new file mode 100644 index 000000000..34cd1b4b4 --- /dev/null +++ b/libsrc/runtime/incax7.s @@ -0,0 +1,16 @@ +; +; Ullrich von Bassewitz, 05.08.1998 +; +; CC65 runtime: Increment ax by 7 +; + + .export incax7 + .import incaxy + +.proc incax7 + + lda #7 + jmp incaxy + +.endproc + diff --git a/libsrc/runtime/incax8.s b/libsrc/runtime/incax8.s new file mode 100644 index 000000000..72d53417b --- /dev/null +++ b/libsrc/runtime/incax8.s @@ -0,0 +1,16 @@ +; +; Ullrich von Bassewitz, 05.08.1998 +; +; CC65 runtime: Increment ax by 8 +; + + .export incax8 + .import incaxy + +.proc incax8 + + lda #8 + jmp incaxy + +.endproc + diff --git a/libsrc/runtime/incaxy.s b/libsrc/runtime/incaxy.s new file mode 100644 index 000000000..feed9564c --- /dev/null +++ b/libsrc/runtime/incaxy.s @@ -0,0 +1,17 @@ +; +; Ullrich von Bassewitz, 05.08.1998 +; +; CC65 runtime: Increment ax by valie in y +; + + .export incaxy, incax4 + .importzp tmp1 + .macpack generic + +incax4: ldy #4 +incaxy: sty tmp1 + add tmp1 + bcc @L9 + inx +@L9: rts +