From: Oliver Schmidt Date: Thu, 4 Apr 2019 07:16:59 +0000 (+0200) Subject: Avoid unintended file "shadowing". X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fc6a63a15e431b53a993ad285598536f0485bb7f;p=cc65 Avoid unintended file "shadowing". https://github.com/cc65/cc65/commit/3d8c3a494801e106e33fa7dcc4fd3daedad1b98a caused an unintended "shadowing" of files in /libsrc/runtime by files in /libsrc/common. Therefore the files in question are renamed (again) in /libsrc/common to make the files in /libsrc/runtime "visible" again. --- diff --git a/libsrc/common/_idiv32by16r16.s b/libsrc/common/_idiv32by16r16.s new file mode 100644 index 000000000..7df78f4dd --- /dev/null +++ b/libsrc/common/_idiv32by16r16.s @@ -0,0 +1,39 @@ +; +; Ullrich von Bassewitz, 2009-11-04 +; +; CC65 library: 32by16 => 16 signed division +; + + .export _idiv32by16r16 + .import idiv32by16r16, incsp4 + + .include "zeropage.inc" + + +;--------------------------------------------------------------------------- +; 32by16 division. + +.proc _idiv32by16r16 + + pha ; Save rhs + +; Copy from stack to zeropage. This assumes ptr1 and ptr2 are adjacent. + + ldy #3 +@L1: lda (sp),y + sta ptr1,y + dey + bpl @L1 + + lda #4 + clc + adc sp + sta sp + bcc @L2 + inc sp+1 + +@L2: pla ; Old rhs + jmp idiv32by16r16 + +.endproc + diff --git a/libsrc/common/_imul16x16r32.s b/libsrc/common/_imul16x16r32.s new file mode 100644 index 000000000..e08d11c6c --- /dev/null +++ b/libsrc/common/_imul16x16r32.s @@ -0,0 +1,25 @@ +; +; Ullrich von Bassewitz, 2010-11-03 +; +; CC65 library: 16x16 => 32 signed multiplication +; + + .export _imul16x16r32 + .import imul16x16r32, popax + + .include "zeropage.inc" + + +;--------------------------------------------------------------------------- +; 16x16 => 32 signed multiplication routine. + + +.proc _imul16x16r32 + + sta ptr1 + stx ptr1+1 + jsr popax + jmp imul16x16r32 + +.endproc + diff --git a/libsrc/common/_imul8x8r16.s b/libsrc/common/_imul8x8r16.s new file mode 100644 index 000000000..9987f6e85 --- /dev/null +++ b/libsrc/common/_imul8x8r16.s @@ -0,0 +1,22 @@ +; +; 2014-03-27, Oliver Schmidt +; 2014-05-08, Greg King +; +; CC65 library: 8x8 => 16 signed multiplication +; + + .export _imul8x8r16 + .import imul8x8r16, popa, ptr1:zp + + +;--------------------------------------------------------------------------- +; 8x8 => 16 signed multiplication routine. + + +.proc _imul8x8r16 + + sta ptr1 + jsr popa + jmp imul8x8r16 + +.endproc diff --git a/libsrc/common/_udiv32by16r16.s b/libsrc/common/_udiv32by16r16.s new file mode 100644 index 000000000..a1d5f4e66 --- /dev/null +++ b/libsrc/common/_udiv32by16r16.s @@ -0,0 +1,39 @@ +; +; Ullrich von Bassewitz, 2009-11-04 +; +; CC65 library: 32by16 => 16 unsigned division +; + + .export _udiv32by16r16 + .import udiv32by16r16m, incsp4 + + .include "zeropage.inc" + + +;--------------------------------------------------------------------------- +; 32by16 division. + +.proc _udiv32by16r16 + + sta ptr3 + stx ptr3+1 ; Store rhs + +; Copy from stack to zeropage. This assumes ptr1 and ptr2 are adjacent. + + ldy #3 +@L1: lda (sp),y + sta ptr1,y + dey + bpl @L1 + + lda #4 + clc + adc sp + sta sp + bcc @L2 + inc sp+1 + +@L2: jmp udiv32by16r16m + +.endproc + diff --git a/libsrc/common/_umul16x16r32.s b/libsrc/common/_umul16x16r32.s new file mode 100644 index 000000000..674b55f77 --- /dev/null +++ b/libsrc/common/_umul16x16r32.s @@ -0,0 +1,25 @@ +; +; Ullrich von Bassewitz, 2010-11-03 +; +; CC65 library: 16x16 => 32 unsigned multiplication +; + + .export _umul16x16r32 + .import umul16x16r32, popax + + .include "zeropage.inc" + + +;--------------------------------------------------------------------------- +; 16x16 => 32 unsigned multiplication routine. + +.proc _umul16x16r32 + + sta ptr1 + stx ptr1+1 + jsr popax + jmp umul16x16r32 + +.endproc + + diff --git a/libsrc/common/_umul16x8r32.s b/libsrc/common/_umul16x8r32.s new file mode 100644 index 000000000..83a3d9c73 --- /dev/null +++ b/libsrc/common/_umul16x8r32.s @@ -0,0 +1,27 @@ +; +; Ullrich von Bassewitz, 2011-07-10 +; +; CC65 library: 16x8 => 32 unsigned multiplication +; + + .export _umul16x8r32 + .import umul8x16r24, popax + + .include "zeropage.inc" + + +;--------------------------------------------------------------------------- +; 16x8 => 32 unsigned multiplication routine. We use 8x16 => 24 and clear +; the high byte of the result + +.proc _umul16x8r32 + + sta ptr1 + lda #0 + sta sreg+1 ; Clear high byte of result + jsr popax + jmp umul8x16r24 + +.endproc + + diff --git a/libsrc/common/_umul8x8r16.s b/libsrc/common/_umul8x8r16.s new file mode 100644 index 000000000..8a3d46212 --- /dev/null +++ b/libsrc/common/_umul8x8r16.s @@ -0,0 +1,21 @@ +; +; Oliver Schmidt, 2014-03-27 +; +; CC65 library: 8x8 => 16 unsigned multiplication +; + + .export _umul8x8r16 + .import umul8x8r16, popa, ptr1:zp + + +;--------------------------------------------------------------------------- +; 8x8 => 16 unsigned multiplication routine. + + +.proc _umul8x8r16 + + sta ptr1 + jsr popa + jmp umul8x8r16 + +.endproc diff --git a/libsrc/common/idiv32by16r16.s b/libsrc/common/idiv32by16r16.s deleted file mode 100644 index 7df78f4dd..000000000 --- a/libsrc/common/idiv32by16r16.s +++ /dev/null @@ -1,39 +0,0 @@ -; -; Ullrich von Bassewitz, 2009-11-04 -; -; CC65 library: 32by16 => 16 signed division -; - - .export _idiv32by16r16 - .import idiv32by16r16, incsp4 - - .include "zeropage.inc" - - -;--------------------------------------------------------------------------- -; 32by16 division. - -.proc _idiv32by16r16 - - pha ; Save rhs - -; Copy from stack to zeropage. This assumes ptr1 and ptr2 are adjacent. - - ldy #3 -@L1: lda (sp),y - sta ptr1,y - dey - bpl @L1 - - lda #4 - clc - adc sp - sta sp - bcc @L2 - inc sp+1 - -@L2: pla ; Old rhs - jmp idiv32by16r16 - -.endproc - diff --git a/libsrc/common/imul16x16r32.s b/libsrc/common/imul16x16r32.s deleted file mode 100644 index e08d11c6c..000000000 --- a/libsrc/common/imul16x16r32.s +++ /dev/null @@ -1,25 +0,0 @@ -; -; Ullrich von Bassewitz, 2010-11-03 -; -; CC65 library: 16x16 => 32 signed multiplication -; - - .export _imul16x16r32 - .import imul16x16r32, popax - - .include "zeropage.inc" - - -;--------------------------------------------------------------------------- -; 16x16 => 32 signed multiplication routine. - - -.proc _imul16x16r32 - - sta ptr1 - stx ptr1+1 - jsr popax - jmp imul16x16r32 - -.endproc - diff --git a/libsrc/common/imul8x8r16.s b/libsrc/common/imul8x8r16.s deleted file mode 100644 index 9987f6e85..000000000 --- a/libsrc/common/imul8x8r16.s +++ /dev/null @@ -1,22 +0,0 @@ -; -; 2014-03-27, Oliver Schmidt -; 2014-05-08, Greg King -; -; CC65 library: 8x8 => 16 signed multiplication -; - - .export _imul8x8r16 - .import imul8x8r16, popa, ptr1:zp - - -;--------------------------------------------------------------------------- -; 8x8 => 16 signed multiplication routine. - - -.proc _imul8x8r16 - - sta ptr1 - jsr popa - jmp imul8x8r16 - -.endproc diff --git a/libsrc/common/udiv32by16r16.s b/libsrc/common/udiv32by16r16.s deleted file mode 100644 index a1d5f4e66..000000000 --- a/libsrc/common/udiv32by16r16.s +++ /dev/null @@ -1,39 +0,0 @@ -; -; Ullrich von Bassewitz, 2009-11-04 -; -; CC65 library: 32by16 => 16 unsigned division -; - - .export _udiv32by16r16 - .import udiv32by16r16m, incsp4 - - .include "zeropage.inc" - - -;--------------------------------------------------------------------------- -; 32by16 division. - -.proc _udiv32by16r16 - - sta ptr3 - stx ptr3+1 ; Store rhs - -; Copy from stack to zeropage. This assumes ptr1 and ptr2 are adjacent. - - ldy #3 -@L1: lda (sp),y - sta ptr1,y - dey - bpl @L1 - - lda #4 - clc - adc sp - sta sp - bcc @L2 - inc sp+1 - -@L2: jmp udiv32by16r16m - -.endproc - diff --git a/libsrc/common/umul16x16r32.s b/libsrc/common/umul16x16r32.s deleted file mode 100644 index 674b55f77..000000000 --- a/libsrc/common/umul16x16r32.s +++ /dev/null @@ -1,25 +0,0 @@ -; -; Ullrich von Bassewitz, 2010-11-03 -; -; CC65 library: 16x16 => 32 unsigned multiplication -; - - .export _umul16x16r32 - .import umul16x16r32, popax - - .include "zeropage.inc" - - -;--------------------------------------------------------------------------- -; 16x16 => 32 unsigned multiplication routine. - -.proc _umul16x16r32 - - sta ptr1 - stx ptr1+1 - jsr popax - jmp umul16x16r32 - -.endproc - - diff --git a/libsrc/common/umul16x8r32.s b/libsrc/common/umul16x8r32.s deleted file mode 100644 index 83a3d9c73..000000000 --- a/libsrc/common/umul16x8r32.s +++ /dev/null @@ -1,27 +0,0 @@ -; -; Ullrich von Bassewitz, 2011-07-10 -; -; CC65 library: 16x8 => 32 unsigned multiplication -; - - .export _umul16x8r32 - .import umul8x16r24, popax - - .include "zeropage.inc" - - -;--------------------------------------------------------------------------- -; 16x8 => 32 unsigned multiplication routine. We use 8x16 => 24 and clear -; the high byte of the result - -.proc _umul16x8r32 - - sta ptr1 - lda #0 - sta sreg+1 ; Clear high byte of result - jsr popax - jmp umul8x16r24 - -.endproc - - diff --git a/libsrc/common/umul8x8r16.s b/libsrc/common/umul8x8r16.s deleted file mode 100644 index 8a3d46212..000000000 --- a/libsrc/common/umul8x8r16.s +++ /dev/null @@ -1,21 +0,0 @@ -; -; Oliver Schmidt, 2014-03-27 -; -; CC65 library: 8x8 => 16 unsigned multiplication -; - - .export _umul8x8r16 - .import umul8x8r16, popa, ptr1:zp - - -;--------------------------------------------------------------------------- -; 8x8 => 16 unsigned multiplication routine. - - -.proc _umul8x8r16 - - sta ptr1 - jsr popa - jmp umul8x8r16 - -.endproc