1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-12-29 17:31:18 +00:00

Let the optimizer optimize the multiplication routine

This commit is contained in:
Karol Stasiak 2018-07-01 19:07:47 +02:00
parent 86b12bd5f9
commit 2b6315f15b

View File

@ -3,13 +3,13 @@ inline asm byte __mul_u8u8u8() {
? LDA #0
? JMP __mul_u8u8u8_start
__mul_u8u8u8_add:
CLC
ADC __reg.lo
? CLC
? ADC __reg.lo
__mul_u8u8u8_loop:
ASL __reg.lo
? ASL __reg.lo
__mul_u8u8u8_start:
LSR __reg.hi
BCS __mul_u8u8u8_add
BNE __mul_u8u8u8_loop
? LSR __reg.hi
? BCS __mul_u8u8u8_add
? BNE __mul_u8u8u8_loop
? RTS
}