mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
Fix for 8x16 multiplication if operants are swapped.
This commit is contained in:
parent
ba2c6d9008
commit
808d3ab471
@ -62,7 +62,8 @@ tosumulax:
|
|||||||
@L4: ldy ptr1 ; Save right operand (8 bit)
|
@L4: ldy ptr1 ; Save right operand (8 bit)
|
||||||
ldx ptr4 ; Copy left 16 bit operand to right
|
ldx ptr4 ; Copy left 16 bit operand to right
|
||||||
stx ptr1
|
stx ptr1
|
||||||
ldx ptr4+1 ; Don't store, this is done later
|
ldx ptr4+1 ; swap high-byte too
|
||||||
|
stx ptr1+1
|
||||||
sty ptr4 ; Copy low 8 bit of right op to left
|
sty ptr4 ; Copy low 8 bit of right op to left
|
||||||
ldy #8
|
ldy #8
|
||||||
jmp mul8x16a
|
jmp mul8x16a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user