mirror of
https://github.com/cc65/cc65.git
synced 2025-01-09 11:30:29 +00:00
Changed naming absvaludiv -> absvaludiv16.
This commit is contained in:
parent
dd411efd1c
commit
9c1cb0801c
@ -6,12 +6,12 @@
|
|||||||
; When negating values, we will ignore the possibility here, that one of the
|
; When negating values, we will ignore the possibility here, that one of the
|
||||||
; values is $8000, in which case the negate will fail.
|
; values is $8000, in which case the negate will fail.
|
||||||
|
|
||||||
.export absvaludiv
|
.export absvaludiv16
|
||||||
.import _abs, popax, udiv16
|
.import _abs, popax, udiv16
|
||||||
.importzp ptr1, ptr4
|
.importzp ptr1, ptr4
|
||||||
|
|
||||||
|
|
||||||
absvaludiv:
|
absvaludiv16:
|
||||||
jsr _abs
|
jsr _abs
|
||||||
sta ptr4
|
sta ptr4
|
||||||
stx ptr4+1 ; Save right absolute operand
|
stx ptr4+1 ; Save right absolute operand
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
; values is $8000, in which case the negate will fail.
|
; values is $8000, in which case the negate will fail.
|
||||||
|
|
||||||
.export tosdiva0, tosdivax
|
.export tosdiva0, tosdivax
|
||||||
.import absvaludiv, negax
|
.import absvaludiv16, negax
|
||||||
.importzp sp, ptr1, tmp1
|
.importzp sp, ptr1, tmp1
|
||||||
|
|
||||||
tosdiva0:
|
tosdiva0:
|
||||||
@ -20,10 +20,10 @@ tosdivax:
|
|||||||
eor (sp),y ; eor with lhs high byte
|
eor (sp),y ; eor with lhs high byte
|
||||||
sta tmp1 ; save post negation indicator to tmp1
|
sta tmp1 ; save post negation indicator to tmp1
|
||||||
pla ; back to entry accu
|
pla ; back to entry accu
|
||||||
jsr absvaludiv
|
jsr absvaludiv16
|
||||||
ldx ptr1+1
|
ldx ptr1+1
|
||||||
lda ptr1
|
lda ptr1
|
||||||
ldy tmp1 ; fetch idicator
|
ldy tmp1 ; fetch indicator
|
||||||
bmi negate
|
bmi negate
|
||||||
rts
|
rts
|
||||||
negate: jmp negax
|
negate: jmp negax
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
; values is $8000, in which case the negate will fail.
|
; values is $8000, in which case the negate will fail.
|
||||||
|
|
||||||
.export tosmoda0, tosmodax
|
.export tosmoda0, tosmodax
|
||||||
.import absvaludiv, negax
|
.import absvaludiv16, negax
|
||||||
.importzp sp, sreg, tmp1
|
.importzp sp, sreg, tmp1
|
||||||
|
|
||||||
tosmoda0:
|
tosmoda0:
|
||||||
@ -23,10 +23,10 @@ tosmodax:
|
|||||||
lda (sp),y
|
lda (sp),y
|
||||||
sta tmp1 ; save post negation indicator to tmp1
|
sta tmp1 ; save post negation indicator to tmp1
|
||||||
pla ; back to entry accu
|
pla ; back to entry accu
|
||||||
jsr absvaludiv
|
jsr absvaludiv16
|
||||||
ldx sreg+1 ; remainder to return registers
|
ldx sreg+1 ; remainder to return registers
|
||||||
lda sreg
|
lda sreg
|
||||||
ldy tmp1 ; fetch idicator
|
ldy tmp1 ; fetch indicator
|
||||||
bmi negate
|
bmi negate
|
||||||
rts
|
rts
|
||||||
negate: jmp negax
|
negate: jmp negax
|
||||||
|
Loading…
x
Reference in New Issue
Block a user