Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Faster multiply?
#2
Ok, this is an interesting issue. I tried a supposed faster 8-bit multiplication taken from internet, but it was failing, so I implemented another by myself.

Let me repost your code here, for better clarification:
Code:
LD HL,0
    LD DE, (NUM2)
    LD A, (NUM1)
LOOP:
    RR A ; (Divide A by 2 - copying the 1's column bit into the carry flag.)
    JR NC, JP1; (Jump over the add if we have to)
    ADD HL,DE
JP1:
    RET Z ; (Leave when we finish - A has gone to zero)
    SLA E
    RL D   ; Multiply DE*2
    JR LOOP

I will later study this case.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)