]> git.sur5r.net Git - cc65/commitdiff
Renamed leaasp.s again, this time to leaa0sp.s. Added a new module leaaxsp.s.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 31 Aug 2009 12:15:51 +0000 (12:15 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 31 Aug 2009 12:15:51 +0000 (12:15 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4091 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/runtime/Makefile
libsrc/runtime/leaa0sp.s [new file with mode: 0644]
libsrc/runtime/leaasp.s [deleted file]
libsrc/runtime/leaaxsp.s [new file with mode: 0644]

index 134928393f752435ce5d95f21288d978a6336b92..d7bbe8a38217b140926222f724837d3cb9c11628 100644 (file)
@@ -117,7 +117,8 @@ OBJS =      add.o           \
                ldec.o          \
                ldiv.o          \
                le.o            \
-               leaasp.o        \
+               leaa0sp.o       \
+        leaaxsp.o       \
                leave.o         \
                leq.o           \
                lge.o           \
diff --git a/libsrc/runtime/leaa0sp.s b/libsrc/runtime/leaa0sp.s
new file mode 100644 (file)
index 0000000..5dcdc9d
--- /dev/null
@@ -0,0 +1,20 @@
+;
+; Ullrich von Bassewitz, 21.08.1998
+;
+; CC65 runtime: Load effective address with offset in A relative to SP
+;
+
+       .export         leaasp
+       .importzp       sp
+
+.proc  leaasp
+
+       ldx     sp+1            ; Get high byte
+       clc
+       adc     sp
+       bcc     @L9
+       inx
+@L9:   rts
+
+.endproc
+
diff --git a/libsrc/runtime/leaasp.s b/libsrc/runtime/leaasp.s
deleted file mode 100644 (file)
index 5dcdc9d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-;
-; Ullrich von Bassewitz, 21.08.1998
-;
-; CC65 runtime: Load effective address with offset in A relative to SP
-;
-
-       .export         leaasp
-       .importzp       sp
-
-.proc  leaasp
-
-       ldx     sp+1            ; Get high byte
-       clc
-       adc     sp
-       bcc     @L9
-       inx
-@L9:   rts
-
-.endproc
-
diff --git a/libsrc/runtime/leaaxsp.s b/libsrc/runtime/leaaxsp.s
new file mode 100644 (file)
index 0000000..79e3e1e
--- /dev/null
@@ -0,0 +1,23 @@
+;
+; Ullrich von Bassewitz, 2009-08-31
+;
+; CC65 runtime: Load effective address with offset in A/X relative to SP
+;
+
+       .export         leaaxsp
+       .importzp       sp
+
+.proc  leaaxsp
+             
+        clc
+        adc     sp
+        pha
+        txa
+        adc     sp+1
+        tax
+        pla
+        rts
+
+.endproc
+
+