]> git.sur5r.net Git - cc65/commitdiff
Splitted the dec and inc modules into smaller ones
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 31 Oct 2000 18:42:47 +0000 (18:42 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 31 Oct 2000 18:42:47 +0000 (18:42 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@419 b7a2c559-68d2-44c3-8de9-860c34a00d81

14 files changed:
libsrc/runtime/Makefile
libsrc/runtime/dec.s [deleted file]
libsrc/runtime/decax1.s [new file with mode: 0644]
libsrc/runtime/decax2.s [new file with mode: 0644]
libsrc/runtime/decaxy.s [new file with mode: 0644]
libsrc/runtime/inc.s [deleted file]
libsrc/runtime/incax1.s [new file with mode: 0644]
libsrc/runtime/incax2.s [new file with mode: 0644]
libsrc/runtime/incax3.s [new file with mode: 0644]
libsrc/runtime/incax5.s [new file with mode: 0644]
libsrc/runtime/incax6.s [new file with mode: 0644]
libsrc/runtime/incax7.s [new file with mode: 0644]
libsrc/runtime/incax8.s [new file with mode: 0644]
libsrc/runtime/incaxy.s [new file with mode: 0644]

index a9d5e2853006b29bffc43f79fd800fe77afb8f62..7ed299804b27a2bd67ea1445398ecb315bd64b58 100644 (file)
@@ -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 (file)
index 784e73f..0000000
+++ /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 (file)
index 0000000..7c6891a
--- /dev/null
@@ -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 (file)
index 0000000..f117063
--- /dev/null
@@ -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 (file)
index 0000000..ec2b9c7
--- /dev/null
@@ -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 (file)
index 043d27d..0000000
+++ /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 (file)
index 0000000..c86cfb9
--- /dev/null
@@ -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 (file)
index 0000000..9525171
--- /dev/null
@@ -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 (file)
index 0000000..ecbe930
--- /dev/null
@@ -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 (file)
index 0000000..61f1c93
--- /dev/null
@@ -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 (file)
index 0000000..5edd5f0
--- /dev/null
@@ -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 (file)
index 0000000..34cd1b4
--- /dev/null
@@ -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 (file)
index 0000000..72d5341
--- /dev/null
@@ -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 (file)
index 0000000..feed956
--- /dev/null
@@ -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
+