Zeda

BCDE_Times_A

May 31st, 2016
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. BCDE_Times_A:
  2. ;Inputs: BC:DE,A
  3. ;Outputs: A:HL:IX is the 40-bit product, BC,DE unaffected
  4. ;503cc~831cc
  5. ;667cc average
  6. ;29 bytes
  7.     ld ix,0
  8.     ld hl,0
  9.     call +_
  10. _:
  11.     call +_
  12. _:
  13.     call +_
  14. _:
  15.     add ix,ix \ adc hl,hl \ rla \ ret nc
  16.     add ix,de \ adc hl,bc \ adc a,0
  17.     ret
Add Comment
Please, Sign In to add comment