From: uz Date: Mon, 31 Aug 2009 12:15:51 +0000 (+0000) Subject: Renamed leaasp.s again, this time to leaa0sp.s. Added a new module leaaxsp.s. X-Git-Tag: V2.13.0rc1~165 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bf9d36a2fa01ea93fe5e48d57e95f027f4d947c9;p=cc65 Renamed leaasp.s again, this time to leaa0sp.s. Added a new module leaaxsp.s. git-svn-id: svn://svn.cc65.org/cc65/trunk@4091 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/runtime/Makefile b/libsrc/runtime/Makefile index 134928393..d7bbe8a38 100644 --- a/libsrc/runtime/Makefile +++ b/libsrc/runtime/Makefile @@ -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 index 000000000..5dcdc9d14 --- /dev/null +++ b/libsrc/runtime/leaa0sp.s @@ -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 index 5dcdc9d14..000000000 --- a/libsrc/runtime/leaasp.s +++ /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 index 000000000..79e3e1e4f --- /dev/null +++ b/libsrc/runtime/leaaxsp.s @@ -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 + +