optimize general multiplication, less cpu cykels in most cases
This commit is contained in:
parent
3211f6d441
commit
69232b6d53
1 changed files with 4 additions and 4 deletions
|
@ -12,15 +12,15 @@
|
|||
.include "arithmatic.inc"
|
||||
|
||||
LDA #$00
|
||||
JMP start
|
||||
loop:
|
||||
ASL VAL_B
|
||||
start:
|
||||
ROR VAL_A; add to awnser if VAL_A is odd
|
||||
BCC loop
|
||||
|
||||
LSR VAL_B
|
||||
CLC
|
||||
ADC VAL_B; add val_b because val_a was odd.
|
||||
ASL VAL_B
|
||||
|
||||
LDX VAL_B
|
||||
BNE loop
|
||||
endloop:
|
||||
RTS
|
||||
|
|
Loading…
Add table
Reference in a new issue