Optimize a negation in signed division.
This commit is contained in:
parent
0d21a2b5a4
commit
2bec637637
1 changed files with 5 additions and 6 deletions
|
@ -29,19 +29,18 @@ idiv32by16r16:
|
|||
stx ptr3+1
|
||||
|
||||
lda ptr2+1
|
||||
cmp #$80
|
||||
eor tmp1
|
||||
sta tmp1
|
||||
bit ptr2+1
|
||||
bpl @L3
|
||||
bcc @L3
|
||||
|
||||
; Negate the value in ptr1:ptr2
|
||||
|
||||
ldx #0
|
||||
ldy #4
|
||||
sec
|
||||
@L2: lda ptr1,x
|
||||
eor #$FF
|
||||
adc #$00
|
||||
; sec
|
||||
@L2: lda #$00
|
||||
sbc ptr1,x
|
||||
sta ptr1,x
|
||||
inx
|
||||
dey
|
||||
|
|
Loading…
Add table
Reference in a new issue