Multiplication and division in assemly
Can someone give a sample routine for multiplication and division in assemly?· I tried the routine in the tv routine with·some modifications. (starting at the div[noparse]:)[/noparse] with no success.· I just want to divide a cnt number by 8000 for tenths of ms without using too many clock cycles.
Comments
This includes multiplication and division routines and some discussion of this.
1/8000 = 0.512 / 4096
0.512 = %0.10000011000100100110 to 20 places
There are tricks like Booth's algorithm where bit sequences like this, 11111, in a multiplier, can be simplified to 100000 minus 1. There was a discussion that when pretty deep into this kind of thing in:
Derivation of Algorithms for Multiplication by a Constant Fraction
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com