Advertisement
Zeda

C_Times_D

Jan 4th, 2012
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. C_Times_D
  2. ;Inputs:
  3. ;     C,D
  4. ;Outputs:
  5. ;     A is the product
  6. ;     B is 0
  7.      ld b,8          ;7           7
  8.      xor a           ;4           4
  9.        rlca          ;4*8        32
  10.        rlc c         ;8*8        64
  11.        jr nc,$+3     ;(12|11)    96|88
  12.          add d       ;--
  13.        djnz $-6      ;13*7+8     99
  14.      ret             ;10         10
  15. ;304+b (b is number of bits)
  16. ;304*256
  17. ;308 is average speed.
  18. ;12 bytes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement