mirror of
https://github.com/cc65/cc65.git
synced 2024-12-22 12:30:41 +00:00
Optimize sign extension.
This commit is contained in:
parent
985371433b
commit
d38417b347
@ -24,13 +24,17 @@ imul8x8r16:
|
||||
sta ptr3
|
||||
|
||||
imul8x8r16m:
|
||||
; Extend sign of Left-Hand Side
|
||||
lda #$7f
|
||||
cmp ptr3
|
||||
adc #$80
|
||||
sta ptr3+1
|
||||
|
||||
; Clear .XY accumulator
|
||||
ldy #<$0000
|
||||
ldx #>$0000
|
||||
bit ptr3
|
||||
bpl @L7
|
||||
dex
|
||||
@L7: stx ptr3+1 ; Extend sign of Left-Hand Side
|
||||
ldy #<$0000 ; Clear .XY accumulator
|
||||
ldx #>$0000
|
||||
|
||||
; Check the multiplier sign.
|
||||
lda ptr1
|
||||
bpl PosStart
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user